fshelp: Add handling of "." and ".." and grub_fshelp_find_file_lookup.
Recent tests have discovered that many of our filesystems have flawed handling of "." and "..". Rather than attempting to fix it in filesystems themselves, make the common code fshelp aware of "." and ".." and handle them in this layer. Add grub_fshelp_find_file_lookup for easy conversion of BFS, HFS and exFAT which have the same problem and don't use fshelp.
This commit is contained in:
parent
4622f4e1ee
commit
fa93b0e4f5
2 changed files with 228 additions and 107 deletions
|
@ -62,6 +62,17 @@ EXPORT_FUNC(grub_fshelp_find_file) (const char *path,
|
|||
enum grub_fshelp_filetype expect);
|
||||
|
||||
|
||||
grub_err_t
|
||||
EXPORT_FUNC(grub_fshelp_find_file_lookup) (const char *path,
|
||||
grub_fshelp_node_t rootnode,
|
||||
grub_fshelp_node_t *foundnode,
|
||||
grub_err_t (*lookup_file) (grub_fshelp_node_t dir,
|
||||
const char *name,
|
||||
grub_fshelp_node_t *foundnode,
|
||||
enum grub_fshelp_filetype *foundtype),
|
||||
char *(*read_symlink) (grub_fshelp_node_t node),
|
||||
enum grub_fshelp_filetype expect);
|
||||
|
||||
/* Read LEN bytes from the file NODE on disk DISK into the buffer BUF,
|
||||
beginning with the block POS. READ_HOOK should be set before
|
||||
reading a block from the file. GET_BLOCK is used to translate file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue