From 828bc390d82e119133877f67ddd1eb3795fb8afc Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Mon, 15 Aug 2011 23:30:11 +0100 Subject: [PATCH] * 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. --- ChangeLog | 8 ++++++++ util/grub-probe.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b4ec6f677..f3c2cf690 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-08-15 Mario Limonciello +2011-08-15 Colin Watson + + * 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 * util/grub-probe.c: Remove duplicate #include. diff --git a/util/grub-probe.c b/util/grub-probe.c index 3f519bcb4..ae58c89f3 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -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);