[PATCH 1/1] grub-fs-tester: fix losetup race

2018-06-15 Thread Will Thompson
If something else on the system is using loopback devices, then the device that's free at the call to `losetup -f` may not be free in the following call to try to use it. Instead, find and use the first free loopback device in a single call to losetup. --- tests/util/grub-fs-tester.in | 3 +-- 1 f

[PATCH 0/1] grub-fs-tester: fix losetup race

2018-06-15 Thread Will Thompson
tup --find --show /path/to/a/file) losetup -d $x done The fix is to ask losetup to attach the file to a free loop device, and print that device to stdout, in a single invocation. (losetup internally has a retry loop.) Will Thompson (1): grub-fs-tester: fix losetup race tests/util/grub-fs

Re: [PATCH 1/1] grub-fs-tester: fix losetup race

2018-06-20 Thread Will Thompson
On Wed, 20 Jun 2018 at 10:33 Daniel Kiper wrote: > On Fri, Jun 15, 2018 at 06:34:04PM +0100, Will Thompson wrote: > > If something else on the system is using loopback devices, then the > > device that's free at the call to `losetup -f` may not be free in the > > follo

[PATCH 0/1] search: Add search by GPT partition type

2018-06-20 Thread Will Thompson
This may be useful to locate a root partition by the GUID defined in the Discoverable Partitions Specification. https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/ Endless moved away from using this technique because we have to support non-GPT partition tables in some case

[PATCH 1/1] search: Add search by GPT partition type

2018-06-20 Thread Will Thompson
From: Carlo Caione Add a new search.fs_type tool to search by GPT partition type UUID. Signed-off-by: Carlo Caione Signed-off-by: Will Thompson --- docs/grub.texi | 14 --- grub-core/Makefile.core.def | 5 +++ grub-core/commands/search.c | 69