2008-05-30 Robert Millan <rmh@aybabtu.com>

* commands/search.c (options): Rename --fs_uuid to --fs-uuid.
        * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
        --fs_uuid with --fs-uuid.
        * util/update-grub.in: Allow filesystem UUID probes to fail (since not
        all filesystems support them).
This commit is contained in:
robertmh 2008-05-30 20:55:29 +00:00
parent 811d3878d8
commit 51500452b9
4 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2008-05-30 Robert Millan <rmh@aybabtu.com>
* commands/search.c (options): Rename --fs_uuid to --fs-uuid.
* util/update-grub_lib.in (prepare_grub_to_access_device): Replace
--fs_uuid with --fs-uuid.
* util/update-grub.in: Allow filesystem UUID probes to fail (since not
all filesystems support them).
2008-05-30 Robert Millan <rmh@aybabtu.com>
* fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as

View file

@ -32,7 +32,7 @@ static const struct grub_arg_option options[] =
{
{"file", 'f', 0, "search devices by a file (default)", 0, 0},
{"label", 'l', 0, "search devices by a filesystem label", 0, 0},
{"fs_uuid", 'u', 0, "search devices by a filesystem UUID", 0, 0},
{"fs-uuid", 'u', 0, "search devices by a filesystem UUID", 0, 0},
{"set", 's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first device found", "VAR", ARG_TYPE_STRING},
{0, 0, 0, 0, 0, 0}
};

View file

@ -101,11 +101,11 @@ fi
# Device containing our userland. Typically used for root= parameter.
GRUB_DEVICE="`grub-probe --target=device /`"
GRUB_DEVICE_UUID="`grub-probe --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`"
GRUB_DEVICE_UUID="`grub-probe --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
# Device containing our /boot partition. Usually the same as GRUB_DEVICE.
GRUB_DEVICE_BOOT="`grub-probe --target=device /boot`"
GRUB_DEVICE_BOOT_UUID="`grub-probe --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`"
GRUB_DEVICE_BOOT_UUID="`grub-probe --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
# Filesystem for the device containing our userland. Used for stuff like
# choosing Hurd filesystem module.

View file

@ -117,7 +117,7 @@ prepare_grub_to_access_device ()
# If there's a filesystem UUID that GRUB is capable of identifiing, use it;
# otherwise set root as per value in device.map.
if fs_uuid="`grub-probe --device ${device} --target=fs_uuid 2> /dev/null`" ; then
echo "search --fs_uuid --set ${fs_uuid}"
echo "search --fs-uuid --set ${fs_uuid}"
else
echo "set root=`${grub_probe} --device ${device} --target=drive`"
fi