From ebe2c96154948d271a5c74a024629a8f64f3c12b Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 29 Jan 2012 20:52:37 +0100 Subject: [PATCH] * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Don't add "root" line if no compatibility hont is available. Suggested by: Seth Goldberg. --- ChangeLog | 6 ++++++ util/grub-mkconfig_lib.in | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7a0af5e7a..48f453059 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-01-29 Vladimir Serbinenko + + * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): + Don't add "root" line if no compatibility hont is available. + Suggested by: Seth Goldberg. + 2012-01-29 Vladimir Serbinenko * include/grub/ata.h (grub_ata): Add a new element maxbuffer. diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in index d7549c540..0b77dc38c 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -146,7 +146,10 @@ prepare_grub_to_access_device () # If there's a filesystem UUID that GRUB is capable of identifying, use it; # otherwise set root as per value in device.map. - echo "set root='`"${grub_probe}" --device "${device}" --target=compatibility_hint`'" + fs_hint="`"${grub_probe}" --device "${device}" --target=compatibility_hint`" + if [ "x$fs_hint" != x ]; then + echo "set root='$fs_hint'" + fi if fs_uuid="`"${grub_probe}" --device "${device}" --target=fs_uuid 2> /dev/null`" ; then hints="`"${grub_probe}" --device "${device}" --target=hints_string 2> /dev/null`" echo "if [ x\$feature_platform_search_hint = xy ]; then"