Remove nested functions from disk and file read hooks.
* include/grub/disk.h (grub_disk_read_hook_t): New type. (struct grub_disk): Add read_hook_data member. * include/grub/file.h (struct grub_file): Likewise. * include/grub/fshelp.h (grub_fshelp_read_file): Add read_hook_data argument. Update all callers.
This commit is contained in:
parent
df6da5a52d
commit
4eb8b75659
29 changed files with 409 additions and 345 deletions
|
@ -399,6 +399,7 @@ grub_romfs_read (grub_file_t file, char *buf, grub_size_t len)
|
|||
|
||||
/* XXX: The file is stored in as a single extent. */
|
||||
data->data->disk->read_hook = file->read_hook;
|
||||
data->data->disk->read_hook_data = file->read_hook_data;
|
||||
grub_disk_read (data->data->disk,
|
||||
(data->data_addr + file->offset) >> GRUB_DISK_SECTOR_BITS,
|
||||
(data->data_addr + file->offset) & (GRUB_DISK_SECTOR_SIZE - 1),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue