]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device):
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 29 Jan 2012 19:52:37 +0000 (20:52 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 29 Jan 2012 19:52:37 +0000 (20:52 +0100)
Don't add "root" line if no compatibility hont is available.
Suggested by: Seth Goldberg.

ChangeLog
util/grub-mkconfig_lib.in

index 7a0af5e7a75fafedde578395ce49df088df89ac2..48f4530596e2ff95833f76350006621619fb0d64 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-29  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * 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  <phcoder@gmail.com>
 
        * include/grub/ata.h (grub_ata): Add a new element maxbuffer.
index d7549c5401ca7a38fee1e9d6b898e9cb6045ac4a..0b77dc38c2e8b367b1ca143110f2231395333ba4 100644 (file)
@@ -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"