=== modified file 'ChangeLog' --- ChangeLog 2011-07-26 15:19:47 +0000 +++ ChangeLog 2011-08-03 00:48:10 +0000 @@ -1,3 +1,8 @@ +2011-08-02 Mario Limonciello + + * util/grub-probe.c: Use realpath to clean up directory arguments + including '..' such as that used in grub-install for EFI. + 2011-07-26 Colin Watson * configure.ac: The Loongson port requires grub-mkfont due to its === modified file 'util/grub-probe.c' --- util/grub-probe.c 2011-04-25 12:52:07 +0000 +++ util/grub-probe.c 2011-08-03 00:53:57 +0000 @@ -42,6 +42,9 @@ #include #include #include +#ifdef HAVE_LIMITS_H +#include +#endif #define _GNU_SOURCE 1 #include @@ -181,7 +184,15 @@ #endif } else - device_name = grub_guess_root_device (path); + { +#ifdef PATH_MAX + grub_path = xmalloc (PATH_MAX); + realpath (path, grub_path); +#else + grub_path = realpath(path, NULL); +#endif + device_name = grub_guess_root_device (grub_path); + } if (! device_name) grub_util_error ("cannot find a device for %s (is /dev mounted?)", path);