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
|
@ -603,7 +603,7 @@ grub_disk_read (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
cl = GRUB_DISK_SECTOR_SIZE - o;
|
||||
if (cl > l)
|
||||
cl = l;
|
||||
(disk->read_hook) (s, o, cl);
|
||||
(disk->read_hook) (s, o, cl, disk->read_hook_data);
|
||||
s++;
|
||||
l -= cl;
|
||||
o = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue