]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-probe.c (probe): Canonicalise the path argument, fixing
authorMario Limonciello <mario_limonciello@dell.com>
Mon, 15 Aug 2011 22:30:11 +0000 (23:30 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Mon, 15 Aug 2011 22:30:11 +0000 (23:30 +0100)
use of "/path/.." as in grub-install for EFI as well as handling
symlinks correctly.
Fixes Debian bug #637768.

ChangeLog
util/grub-probe.c

index b4ec6f6778b9a2e7f911680216f6910888a2beb8..f3c2cf69006660a89a0a11d3f8223d9977b5de74 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-08-15  Mario Limonciello  <mario_limonciello@dell.com>
+2011-08-15  Colin Watson  <cjwatson@ubuntu.com>
+
+       * util/grub-probe.c (probe): Canonicalise the path argument, fixing
+       use of "/path/.." as in grub-install for EFI as well as handling
+       symlinks correctly.
+       Fixes Debian bug #637768.
+
 2011-08-15  Colin Watson  <cjwatson@ubuntu.com>
 
        * util/grub-probe.c: Remove duplicate #include.
index 3f519bcb48d804b4cae5ac38121c263bccb0e68a..ae58c89f32f0e88efc184f4fb3288bc8b58e2b4a 100644 (file)
@@ -180,7 +180,10 @@ probe (const char *path, char *device_name)
 #endif
     }
   else
-    device_name = grub_guess_root_device (path);
+    {
+      grub_path = canonicalize_file_name (path);
+      device_name = grub_guess_root_device (grub_path);
+    }
 
   if (! device_name)
     grub_util_error ("cannot find a device for %s (is /dev mounted?)", path);