]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-10-16 Robert Millan <rmh@gnu.org>
authorRobert Millan <rmh@gnu.org>
Sat, 16 Oct 2010 00:30:14 +0000 (02:30 +0200)
committerRobert Millan <rmh@gnu.org>
Sat, 16 Oct 2010 00:30:14 +0000 (02:30 +0200)
* grub-core/kern/emu/misc.c
(grub_make_system_path_relative_to_its_root): Fix premature return
when processing non-root ZFS filesystems.

ChangeLog
grub-core/kern/emu/misc.c

index a40deb7802678341c38c1a34aeb23271547c6d95..ce683bbb0dda04c4f247512ddb343621dd89ebf1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-16  Robert Millan  <rmh@gnu.org>
+
+       * grub-core/kern/emu/misc.c
+       (grub_make_system_path_relative_to_its_root): Fix premature return
+       when processing non-root ZFS filesystems.
+
 2010-10-15  Robert Millan  <rmh@gnu.org>
 
        * util/grub.d/10_linux.in (list): Expand "vmlinu[zx]" instances to
index d8db3be9def4c01b0473383e1f0b9166709b9d1d..cfc143bf9a39c87770809ef1e6627ad913ea01e4 100644 (file)
@@ -406,21 +406,7 @@ grub_make_system_path_relative_to_its_root (const char *path)
 
       /* buf is another filesystem; we found it.  */
       if (st.st_dev != num)
-       {
-         /* offset == 0 means path given is the mount point.
-            This works around special-casing of "/" in Un*x.  This function never
-            prints trailing slashes (so that its output can be appended a slash
-            unconditionally).  Each slash in is considered a preceding slash, and
-            therefore the root directory is an empty string.  */
-         if (offset == 0)
-           {
-             free (buf);
-             free (buf2);
-             return xstrdup ("");
-           }
-         else
-           break;
-       }
+       break;
 
       offset = p - buf;
       /* offset == 1 means root directory.  */
@@ -448,7 +434,10 @@ grub_make_system_path_relative_to_its_root (const char *path)
     }
 #endif
 
-  /* Remove trailing slashes, return empty string if root directory.  */
+  /* This works around special-casing of "/" in Un*x.  This function never
+     prints trailing slashes (so that its output can be appended a slash
+     unconditionally).  Each slash in it is considered a preceding slash,
+     and therefore the root directory is an empty string.  */
   len = strlen (buf3);
   while (len > 0 && buf3[len - 1] == '/')
     {