2010-08-01 Robert Millan <rmh@gnu.org>
* include/grub/emu/misc.h (grub_find_mount_point_from_dir) (grub_find_zpool_from_mount_point): New function prototypes. * kern/emu/getroot.c [HAVE_GETFSSTAT]: Move `<sys/mount.h>' to ... * kern/emu/misc.c [HAVE_GETFSSTAT]: ... here. * kern/emu/getroot.c (find_mount_point_from_dir): Move to ... * kern/emu/misc.c (grub_find_mount_point_from_dir): ... this. Remove `static' attribute. * kern/emu/getroot.c (find_root_device_from_libzfs): Split code for finding zpool from mount point into ... * kern/emu/misc.c (grub_find_zpool_from_mount_point): ... this. * kern/emu/misc.c (grub_make_system_path_relative_to_its_root): When requested path is part of a ZFS pool, use grub_find_zpool_from_mount_point() to detect its filesystem name, and generate a path with `/fsname@path' syntax.
This commit is contained in:
parent
8bfe31d82b
commit
c882acc031
4 changed files with 196 additions and 106 deletions
|
@ -44,7 +44,13 @@ extern const char *program_name;
|
|||
void grub_init_all (void);
|
||||
void grub_fini_all (void);
|
||||
|
||||
char *grub_make_system_path_relative_to_its_root (const char *path) __attribute__ ((warn_unused_result));
|
||||
char *grub_find_mount_point_from_dir (const char *dir)
|
||||
__attribute__ ((warn_unused_result));
|
||||
void grub_find_zpool_from_mount_point (const char *mnt_point,
|
||||
char **poolname, char **poolfs);
|
||||
|
||||
char *grub_make_system_path_relative_to_its_root (const char *path)
|
||||
__attribute__ ((warn_unused_result));
|
||||
|
||||
void * EXPORT_FUNC(xmalloc) (grub_size_t size) __attribute__ ((warn_unused_result));
|
||||
void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size) __attribute__ ((warn_unused_result));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue