* 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.
This commit is contained in:
Mario Limonciello 2011-08-15 23:30:11 +01:00 committed by Colin Watson
parent 5f60ccac6f
commit 828bc390d8
2 changed files with 12 additions and 1 deletions

View File

@ -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.

View 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);