summaryrefslogtreecommitdiffstats
path: root/master/debian/probe_canonicalise.patch
blob: ba4099510c5aedb3605b63350f6328de1e39fcd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Canonicalise path argument to grub-probe
 This fixes use of "/path/.." as in grub-install for EFI, as well as
 handling symlinks correctly.
Author: Mario Limonciello <mario_limonciello@dell.com>
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Debian: http://bugs.debian.org/637768
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3401
Last-Update: 2011-08-15

Index: b/util/grub-probe.c
===================================================================
--- a/util/grub-probe.c
+++ b/util/grub-probe.c
@@ -108,7 +108,10 @@
 #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);