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
|
@ -23,6 +23,7 @@
|
|||
#include <grub/err.h>
|
||||
#include <grub/device.h>
|
||||
#include <grub/fs.h>
|
||||
#include <grub/disk.h>
|
||||
|
||||
/* File description. */
|
||||
struct grub_file
|
||||
|
@ -46,8 +47,10 @@ struct grub_file
|
|||
void *data;
|
||||
|
||||
/* This is called when a sector is read. Used only for a disk device. */
|
||||
void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector,
|
||||
unsigned offset, unsigned length);
|
||||
grub_disk_read_hook_t read_hook;
|
||||
|
||||
/* Caller-specific data passed to the read hook. */
|
||||
void *read_hook_data;
|
||||
};
|
||||
typedef struct grub_file *grub_file_t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue