From: Vladimir 'phcoder' Serbinenko Date: Tue, 15 Oct 2013 19:04:10 +0000 (+0200) Subject: * grub-core/osdep/unix/getroot.c (grub_guess_root_devices): X-Git-Tag: grub-2.02-beta1~678 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7c4957068e53506b13023baf4c3936d9d702c66;p=thirdparty%2Fgrub.git * grub-core/osdep/unix/getroot.c (grub_guess_root_devices): canonicalize file name before doing the rest. --- diff --git a/ChangeLog b/ChangeLog index a6160be5b..7575597b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-15 Vladimir Serbinenko + + * grub-core/osdep/unix/getroot.c (grub_guess_root_devices): + canonicalize file name before doing the rest. + 2013-10-15 Vladimir Serbinenko * include/grub/osdep/hostfile_windows.h: Add missing ftello for diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c index 041e9cc91..b722cf446 100644 --- a/grub-core/osdep/unix/getroot.c +++ b/grub-core/osdep/unix/getroot.c @@ -524,11 +524,15 @@ grub_find_device (const char *dir, dev_t dev) } char ** -grub_guess_root_devices (const char *dir) +grub_guess_root_devices (const char *dir_in) { char **os_dev = NULL; struct stat st; dev_t dev; + char *dir = canonicalize_file_name (dir_in); + + if (!dir) + grub_util_error (_("failed to get canonical path of `%s'"), dir_in); #ifdef __linux__ if (!os_dev)