mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
Remove nested functions from USB iterators.
* include/grub/usb.h (grub_usb_iterate_hook_t): New type. (grub_usb_controller_iterate_hook_t): Likewise. (grub_usb_iterate): Add hook_data argument. (grub_usb_controller_iterate): Likewise. (struct grub_usb_controller_dev.iterate): Likewise. Update all implementations and callers.
This commit is contained in:
1 parent
18288f17ac
commit
5fdbaed168
9 files changed
+108
-75
No files matched your search
@@ -88,7 +88,7 @@ grub_usb_poll_devices (void)
|
||||
|
||||
|
||||
int
|
||||
grub_usb_iterate (int (*hook) (grub_usb_device_t dev))
|
||||
grub_usb_iterate (grub_usb_iterate_hook_t hook, void *hook_data)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -96,7 +96,7 @@ grub_usb_iterate (int (*hook) (grub_usb_device_t dev))
|
||||
{
|
||||
if (grub_usb_devs[i])
|
||||
{
|
||||
if (hook (grub_usb_devs[i]))
|
||||
if (hook (grub_usb_devs[i], hook_data))
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user