]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/osdep/unix/getroot.c (grub_guess_root_devices):
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 15 Oct 2013 19:04:10 +0000 (21:04 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 15 Oct 2013 19:04:10 +0000 (21:04 +0200)
canonicalize file name before doing the rest.

ChangeLog
grub-core/osdep/unix/getroot.c

index a6160be5b441048f74d856bb631ab039aa174886..7575597b6f0d949ae9c4432f49924f34bf5809af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/osdep/unix/getroot.c (grub_guess_root_devices):
+       canonicalize file name before doing the rest.
+
 2013-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * include/grub/osdep/hostfile_windows.h: Add missing ftello for
index 041e9cc9109df6cb21af49a2e34f70028155416d..b722cf446920077ac93e9483f98237eb98fd5aa2 100644 (file)
@@ -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)