]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Handle empty dir passed to grub_find_root_device_from_mountinfo; fixes grub-mkrelpath...
authorColin Watson <cjwatson@ubuntu.com>
Fri, 4 Feb 2011 13:33:16 +0000 (13:33 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Fri, 4 Feb 2011 13:33:16 +0000 (13:33 +0000)
grub-core/kern/emu/getroot.c

index 92ff971e5be30bb192159b91b5c045126cdf28f7..c1ed35b2dca717799f8c76a7edb2e6d7b264b001 100644 (file)
@@ -111,6 +111,8 @@ grub_find_root_device_from_mountinfo (const char *dir, char **relroot)
   size_t len = 0;
   char *ret = NULL;
 
+  if (! *dir)
+    dir = "/";
   if (relroot)
     *relroot = NULL;