2009-12-06 Felix Zielcke <fzielcke@z-51.de>
* util/misc.c (make_system_path_relative_to_its_root): Correctly cope with mount points.
This commit is contained in:
parent
98d3dc02fe
commit
df91e67900
2 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2009-12-05 Carles Pina i Estany <carles@pina.cat>
|
||||||
|
|
||||||
* gettext/gettext.c: Include `<grub/list.h>'. Define grub_gettext_msg,
|
* gettext/gettext.c: Include `<grub/list.h>'. Define grub_gettext_msg,
|
||||||
|
|
12
util/misc.c
12
util/misc.c
|
@ -500,7 +500,17 @@ make_system_path_relative_to_its_root (const char *path)
|
||||||
|
|
||||||
/* buf is another filesystem; we found it. */
|
/* buf is another filesystem; we found it. */
|
||||||
if (st.st_dev != num)
|
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 = p - buf;
|
||||||
/* offset == 1 means root directory. */
|
/* offset == 1 means root directory. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue