mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-13 21:52:43 +00:00
Fix un-nesting of grub_util_iterate_devices hooks.
This commit is contained in:
parent
4173cb958b
commit
12c2d335d1
11
debian/patches/restore_mkdevicemap.patch
vendored
11
debian/patches/restore_mkdevicemap.patch
vendored
@ -29,13 +29,16 @@ Index: b/include/grub/util/deviceiter.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/include/grub/util/deviceiter.h
|
||||
@@ -0,0 +1,11 @@
|
||||
@@ -0,0 +1,14 @@
|
||||
+#ifndef GRUB_DEVICEITER_MACHINE_UTIL_HEADER
|
||||
+#define GRUB_DEVICEITER_MACHINE_UTIL_HEADER 1
|
||||
+
|
||||
+#include <config.h>
|
||||
+
|
||||
+void grub_util_iterate_devices (int (*hook) (const char *, int),
|
||||
+typedef int (*grub_util_iterate_devices_hook_t) (const char *name,
|
||||
+ int is_floppy, void *data);
|
||||
+
|
||||
+void grub_util_iterate_devices (grub_util_iterate_devices_hook_t hook,
|
||||
+ void *hook_data, int floppy_disks);
|
||||
+void grub_util_emit_devicemap_entry (FILE *fp, char *name, int is_floppy,
|
||||
+ int *num_fd, int *num_hd);
|
||||
@ -568,7 +571,7 @@ Index: b/util/deviceiter.c
|
||||
+#endif /* __linux__ */
|
||||
+
|
||||
+void
|
||||
+grub_util_iterate_devices (int (*hook) (const char *, int), void *hook_data,
|
||||
+grub_util_iterate_devices (int (*hook) (const char *, int, void *), void *hook_data,
|
||||
+ int floppy_disks)
|
||||
+{
|
||||
+ int i;
|
||||
@ -1102,7 +1105,7 @@ Index: b/util/grub-mkdevicemap.c
|
||||
+ if (! ctx.fp)
|
||||
+ grub_util_error (_("cannot open %s"), device_map);
|
||||
+
|
||||
+ grub_util_iterate_devices (process_device, floppy_disks, &ctx);
|
||||
+ grub_util_iterate_devices (process_device, &ctx, floppy_disks);
|
||||
+
|
||||
+ if (ctx.fp != stdout)
|
||||
+ fclose (ctx.fp);
|
||||
|
@ -3,7 +3,10 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
void grub_util_iterate_devices (int (*hook) (const char *, int),
|
||||
typedef int (*grub_util_iterate_devices_hook_t) (const char *name,
|
||||
int is_floppy, void *data);
|
||||
|
||||
void grub_util_iterate_devices (grub_util_iterate_devices_hook_t hook,
|
||||
void *hook_data, int floppy_disks);
|
||||
void grub_util_emit_devicemap_entry (FILE *fp, char *name, int is_floppy,
|
||||
int *num_fd, int *num_hd);
|
||||
|
@ -526,7 +526,7 @@ compare_devices (const void *a, const void *b)
|
||||
#endif /* __linux__ */
|
||||
|
||||
void
|
||||
grub_util_iterate_devices (int (*hook) (const char *, int), void *hook_data,
|
||||
grub_util_iterate_devices (int (*hook) (const char *, int, void *), void *hook_data,
|
||||
int floppy_disks)
|
||||
{
|
||||
int i;
|
||||
|
@ -76,7 +76,7 @@ make_device_map (const char *device_map, int floppy_disks)
|
||||
if (! ctx.fp)
|
||||
grub_util_error (_("cannot open %s"), device_map);
|
||||
|
||||
grub_util_iterate_devices (process_device, floppy_disks, &ctx);
|
||||
grub_util_iterate_devices (process_device, &ctx, floppy_disks);
|
||||
|
||||
if (ctx.fp != stdout)
|
||||
fclose (ctx.fp);
|
||||
|
Loading…
Reference in New Issue
Block a user