* util/misc.c (make_system_path_relative_to_its_root): Correctly cope with
mount points.
+2009-12-06 Felix Zielcke <fzielcke@z-51.de>
+
+ * util/misc.c (make_system_path_relative_to_its_root): Correctly cope with
+ mount points.
+
2009-12-05 Carles Pina i Estany <carles@pina.cat>
* gettext/gettext.c: Include `<grub/list.h>'. Define grub_gettext_msg,
/* buf is another filesystem; we found it. */
if (st.st_dev != num)
- break;
+ {
+ /* offset == 0 means path given is the mount point. */
+ if (offset == 0)
+ {
+ free (buf);
+ free (buf2);
+ return strdup ("/");
+ }
+ else
+ break;
+ }
offset = p - buf;
/* offset == 1 means root directory. */