From 384091967d25ad7fe2fc0930b11adb23974bfeb9 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 22 Mar 2019 17:07:00 +0100 Subject: [PATCH] Rename grub_disk members Otherwise it horribly clashes with gnulib when it's replacing open/write/read/close Signed-off-by: Vladimir Serbinenko --- grub-core/disk/arc/arcdisk.c | 10 +++++----- grub-core/disk/ata.c | 10 +++++----- grub-core/disk/cryptodisk.c | 12 ++++++------ grub-core/disk/diskfilter.c | 22 +++++++++++----------- grub-core/disk/efi/efidisk.c | 10 +++++----- grub-core/disk/host.c | 10 +++++----- grub-core/disk/i386/pc/biosdisk.c | 10 +++++----- grub-core/disk/ieee1275/nand.c | 10 +++++----- grub-core/disk/ieee1275/obdisk.c | 8 ++++---- grub-core/disk/ieee1275/ofdisk.c | 10 +++++----- grub-core/disk/loopback.c | 8 ++++---- grub-core/disk/memdisk.c | 10 +++++----- grub-core/disk/scsi.c | 10 +++++----- grub-core/disk/uboot/ubootdisk.c | 10 +++++----- grub-core/disk/xen/xendisk.c | 10 +++++----- grub-core/fs/cbfs.c | 10 +++++----- grub-core/fs/proc.c | 10 +++++----- grub-core/kern/disk.c | 28 ++++++++++++++-------------- grub-core/kern/emu/hostdisk.c | 10 +++++----- grub-core/lib/disk.c | 8 ++++---- include/grub/disk.h | 16 ++++++++-------- util/grub-install.c | 12 ++++++------ util/grub-probe.c | 16 ++++++++-------- 23 files changed, 135 insertions(+), 135 deletions(-) diff --git a/grub-core/disk/arc/arcdisk.c b/grub-core/disk/arc/arcdisk.c index 0cc1993e5..c94039a3d 100644 --- a/grub-core/disk/arc/arcdisk.c +++ b/grub-core/disk/arc/arcdisk.c @@ -296,11 +296,11 @@ static struct grub_disk_dev grub_arcdisk_dev = { .name = "arcdisk", .id = GRUB_DISK_DEVICE_ARCDISK_ID, - .iterate = grub_arcdisk_iterate, - .open = grub_arcdisk_open, - .close = grub_arcdisk_close, - .read = grub_arcdisk_read, - .write = grub_arcdisk_write, + .disk_iterate = grub_arcdisk_iterate, + .disk_open = grub_arcdisk_open, + .disk_close = grub_arcdisk_close, + .disk_read = grub_arcdisk_read, + .disk_write = grub_arcdisk_write, .next = 0 }; diff --git a/grub-core/disk/ata.c b/grub-core/disk/ata.c index 8ba4e5c50..685f33a19 100644 --- a/grub-core/disk/ata.c +++ b/grub-core/disk/ata.c @@ -510,11 +510,11 @@ static struct grub_disk_dev grub_atadisk_dev = { .name = "ATA", .id = GRUB_DISK_DEVICE_ATA_ID, - .iterate = grub_ata_iterate, - .open = grub_ata_open, - .close = grub_ata_close, - .read = grub_ata_read, - .write = grub_ata_write, + .disk_iterate = grub_ata_iterate, + .disk_open = grub_ata_open, + .disk_close = grub_ata_close, + .disk_read = grub_ata_read, + .disk_write = grub_ata_write, .next = 0 }; diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c index bd60a66b3..5037768fc 100644 --- a/grub-core/disk/cryptodisk.c +++ b/grub-core/disk/cryptodisk.c @@ -1015,13 +1015,13 @@ grub_cmd_cryptomount (grub_extcmd_context_t ctxt, int argc, char **args) static struct grub_disk_dev grub_cryptodisk_dev = { .name = "cryptodisk", .id = GRUB_DISK_DEVICE_CRYPTODISK_ID, - .iterate = grub_cryptodisk_iterate, - .open = grub_cryptodisk_open, - .close = grub_cryptodisk_close, - .read = grub_cryptodisk_read, - .write = grub_cryptodisk_write, + .disk_iterate = grub_cryptodisk_iterate, + .disk_open = grub_cryptodisk_open, + .disk_close = grub_cryptodisk_close, + .disk_read = grub_cryptodisk_read, + .disk_write = grub_cryptodisk_write, #ifdef GRUB_UTIL - .memberlist = grub_cryptodisk_memberlist, + .disk_memberlist = grub_cryptodisk_memberlist, #endif .next = 0 }; diff --git a/grub-core/disk/diskfilter.c b/grub-core/disk/diskfilter.c index 6f901c0ad..c3b578acf 100644 --- a/grub-core/disk/diskfilter.c +++ b/grub-core/disk/diskfilter.c @@ -228,9 +228,9 @@ scan_devices (const char *arname) for (pull = 0; pull < GRUB_DISK_PULL_MAX; pull++) for (p = grub_disk_dev_list; p; p = p->next) if (p->id != GRUB_DISK_DEVICE_DISKFILTER_ID - && p->iterate) + && p->disk_iterate) { - if ((p->iterate) (scan_disk_hook, NULL, pull)) + if ((p->disk_iterate) (scan_disk_hook, NULL, pull)) return; if (arname && is_lv_readable (find_lv (arname), 1)) return; @@ -311,9 +311,9 @@ grub_diskfilter_memberlist (grub_disk_t disk) for (pull = 0; pv && pull < GRUB_DISK_PULL_MAX; pull++) for (p = grub_disk_dev_list; pv && p; p = p->next) if (p->id != GRUB_DISK_DEVICE_DISKFILTER_ID - && p->iterate) + && p->disk_iterate) { - (p->iterate) (scan_disk_hook, NULL, pull); + (p->disk_iterate) (scan_disk_hook, NULL, pull); while (pv && pv->disk) pv = pv->next; } @@ -1325,14 +1325,14 @@ static struct grub_disk_dev grub_diskfilter_dev = { .name = "diskfilter", .id = GRUB_DISK_DEVICE_DISKFILTER_ID, - .iterate = grub_diskfilter_iterate, - .open = grub_diskfilter_open, - .close = grub_diskfilter_close, - .read = grub_diskfilter_read, - .write = grub_diskfilter_write, + .disk_iterate = grub_diskfilter_iterate, + .disk_open = grub_diskfilter_open, + .disk_close = grub_diskfilter_close, + .disk_read = grub_diskfilter_read, + .disk_write = grub_diskfilter_write, #ifdef GRUB_UTIL - .memberlist = grub_diskfilter_memberlist, - .raidname = grub_diskfilter_getname, + .disk_memberlist = grub_diskfilter_memberlist, + .disk_raidname = grub_diskfilter_getname, #endif .next = 0 }; diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c index 5d2400f66..0f132f559 100644 --- a/grub-core/disk/efi/efidisk.c +++ b/grub-core/disk/efi/efidisk.c @@ -627,11 +627,11 @@ static struct grub_disk_dev grub_efidisk_dev = { .name = "efidisk", .id = GRUB_DISK_DEVICE_EFIDISK_ID, - .iterate = grub_efidisk_iterate, - .open = grub_efidisk_open, - .close = grub_efidisk_close, - .read = grub_efidisk_read, - .write = grub_efidisk_write, + .disk_iterate = grub_efidisk_iterate, + .disk_open = grub_efidisk_open, + .disk_close = grub_efidisk_close, + .disk_read = grub_efidisk_read, + .disk_write = grub_efidisk_write, .next = 0 }; diff --git a/grub-core/disk/host.c b/grub-core/disk/host.c index 76ef1afb8..c151d225d 100644 --- a/grub-core/disk/host.c +++ b/grub-core/disk/host.c @@ -84,11 +84,11 @@ static struct grub_disk_dev grub_host_dev = /* The only important line in this file :-) */ .name = "host", .id = GRUB_DISK_DEVICE_HOST_ID, - .iterate = grub_host_iterate, - .open = grub_host_open, - .close = grub_host_close, - .read = grub_host_read, - .write = grub_host_write, + .disk_iterate = grub_host_iterate, + .disk_open = grub_host_open, + .disk_close = grub_host_close, + .disk_read = grub_host_read, + .disk_write = grub_host_write, .next = 0 }; diff --git a/grub-core/disk/i386/pc/biosdisk.c b/grub-core/disk/i386/pc/biosdisk.c index f0aadd111..8ca250c77 100644 --- a/grub-core/disk/i386/pc/biosdisk.c +++ b/grub-core/disk/i386/pc/biosdisk.c @@ -637,11 +637,11 @@ static struct grub_disk_dev grub_biosdisk_dev = { .name = "biosdisk", .id = GRUB_DISK_DEVICE_BIOSDISK_ID, - .iterate = grub_biosdisk_iterate, - .open = grub_biosdisk_open, - .close = grub_biosdisk_close, - .read = grub_biosdisk_read, - .write = grub_biosdisk_write, + .disk_iterate = grub_biosdisk_iterate, + .disk_open = grub_biosdisk_open, + .disk_close = grub_biosdisk_close, + .disk_read = grub_biosdisk_read, + .disk_write = grub_biosdisk_write, .next = 0 }; diff --git a/grub-core/disk/ieee1275/nand.c b/grub-core/disk/ieee1275/nand.c index feffa8c4c..bcf3a06f4 100644 --- a/grub-core/disk/ieee1275/nand.c +++ b/grub-core/disk/ieee1275/nand.c @@ -223,11 +223,11 @@ static struct grub_disk_dev grub_nand_dev = { .name = "nand", .id = GRUB_DISK_DEVICE_NAND_ID, - .iterate = grub_nand_iterate, - .open = grub_nand_open, - .close = grub_nand_close, - .read = grub_nand_read, - .write = grub_nand_write, + .disk_iterate = grub_nand_iterate, + .disk_open = grub_nand_open, + .disk_close = grub_nand_close, + .disk_read = grub_nand_read, + .disk_write = grub_nand_write, .next = 0 }; diff --git a/grub-core/disk/ieee1275/obdisk.c b/grub-core/disk/ieee1275/obdisk.c index 877f65c9e..ec413c3fd 100644 --- a/grub-core/disk/ieee1275/obdisk.c +++ b/grub-core/disk/ieee1275/obdisk.c @@ -1047,10 +1047,10 @@ static struct grub_disk_dev grub_obdisk_dev = { .name = "obdisk", .id = GRUB_DISK_DEVICE_OBDISK_ID, - .iterate = grub_obdisk_iterate, - .open = grub_obdisk_open, - .close = grub_obdisk_close, - .read = grub_obdisk_read, + .disk_iterate = grub_obdisk_iterate, + .disk_open = grub_obdisk_open, + .disk_close = grub_obdisk_close, + .disk_read = grub_obdisk_read, }; void diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c index 235c0fe2c..f73257e66 100644 --- a/grub-core/disk/ieee1275/ofdisk.c +++ b/grub-core/disk/ieee1275/ofdisk.c @@ -615,11 +615,11 @@ static struct grub_disk_dev grub_ofdisk_dev = { .name = "ofdisk", .id = GRUB_DISK_DEVICE_OFDISK_ID, - .iterate = grub_ofdisk_iterate, - .open = grub_ofdisk_open, - .close = grub_ofdisk_close, - .read = grub_ofdisk_read, - .write = grub_ofdisk_write, + .disk_iterate = grub_ofdisk_iterate, + .disk_open = grub_ofdisk_open, + .disk_close = grub_ofdisk_close, + .disk_read = grub_ofdisk_read, + .disk_write = grub_ofdisk_write, .next = 0 }; diff --git a/grub-core/disk/loopback.c b/grub-core/disk/loopback.c index 9406d931c..cdf9123fa 100644 --- a/grub-core/disk/loopback.c +++ b/grub-core/disk/loopback.c @@ -222,10 +222,10 @@ static struct grub_disk_dev grub_loopback_dev = { .name = "loopback", .id = GRUB_DISK_DEVICE_LOOPBACK_ID, - .iterate = grub_loopback_iterate, - .open = grub_loopback_open, - .read = grub_loopback_read, - .write = grub_loopback_write, + .disk_iterate = grub_loopback_iterate, + .disk_open = grub_loopback_open, + .disk_read = grub_loopback_read, + .disk_write = grub_loopback_write, .next = 0 }; diff --git a/grub-core/disk/memdisk.c b/grub-core/disk/memdisk.c index e5ffc01bf..613779cf3 100644 --- a/grub-core/disk/memdisk.c +++ b/grub-core/disk/memdisk.c @@ -77,11 +77,11 @@ static struct grub_disk_dev grub_memdisk_dev = { .name = "memdisk", .id = GRUB_DISK_DEVICE_MEMDISK_ID, - .iterate = grub_memdisk_iterate, - .open = grub_memdisk_open, - .close = grub_memdisk_close, - .read = grub_memdisk_read, - .write = grub_memdisk_write, + .disk_iterate = grub_memdisk_iterate, + .disk_open = grub_memdisk_open, + .disk_close = grub_memdisk_close, + .disk_read = grub_memdisk_read, + .disk_write = grub_memdisk_write, .next = 0 }; diff --git a/grub-core/disk/scsi.c b/grub-core/disk/scsi.c index 4c6923f8b..70767cf00 100644 --- a/grub-core/disk/scsi.c +++ b/grub-core/disk/scsi.c @@ -747,11 +747,11 @@ static struct grub_disk_dev grub_scsi_dev = { .name = "scsi", .id = GRUB_DISK_DEVICE_SCSI_ID, - .iterate = grub_scsi_iterate, - .open = grub_scsi_open, - .close = grub_scsi_close, - .read = grub_scsi_read, - .write = grub_scsi_write, + .disk_iterate = grub_scsi_iterate, + .disk_open = grub_scsi_open, + .disk_close = grub_scsi_close, + .disk_read = grub_scsi_read, + .disk_write = grub_scsi_write, .next = 0 }; diff --git a/grub-core/disk/uboot/ubootdisk.c b/grub-core/disk/uboot/ubootdisk.c index 584a9cbdf..2d115a94d 100644 --- a/grub-core/disk/uboot/ubootdisk.c +++ b/grub-core/disk/uboot/ubootdisk.c @@ -286,11 +286,11 @@ uboot_disk_write (struct grub_disk *disk, static struct grub_disk_dev grub_ubootdisk_dev = { .name = "ubootdisk", .id = GRUB_DISK_DEVICE_UBOOTDISK_ID, - .iterate = uboot_disk_iterate, - .open = uboot_disk_open, - .close = uboot_disk_close, - .read = uboot_disk_read, - .write = uboot_disk_write, + .disk_iterate = uboot_disk_iterate, + .disk_open = uboot_disk_open, + .disk_close = uboot_disk_close, + .disk_read = uboot_disk_read, + .disk_write = uboot_disk_write, .next = 0 }; diff --git a/grub-core/disk/xen/xendisk.c b/grub-core/disk/xen/xendisk.c index b18a9238d..48476cbbf 100644 --- a/grub-core/disk/xen/xendisk.c +++ b/grub-core/disk/xen/xendisk.c @@ -249,11 +249,11 @@ grub_virtdisk_write (grub_disk_t disk, grub_disk_addr_t sector, static struct grub_disk_dev grub_virtdisk_dev = { .name = "xen", .id = GRUB_DISK_DEVICE_XEN, - .iterate = grub_virtdisk_iterate, - .open = grub_virtdisk_open, - .close = grub_virtdisk_close, - .read = grub_virtdisk_read, - .write = grub_virtdisk_write, + .disk_iterate = grub_virtdisk_iterate, + .disk_open = grub_virtdisk_open, + .disk_close = grub_virtdisk_close, + .disk_read = grub_virtdisk_read, + .disk_write = grub_virtdisk_write, .next = 0 }; diff --git a/grub-core/fs/cbfs.c b/grub-core/fs/cbfs.c index 0842701a6..a47e44656 100644 --- a/grub-core/fs/cbfs.c +++ b/grub-core/fs/cbfs.c @@ -328,11 +328,11 @@ static struct grub_disk_dev grub_cbfsdisk_dev = { .name = "cbfsdisk", .id = GRUB_DISK_DEVICE_CBFSDISK_ID, - .iterate = grub_cbfsdisk_iterate, - .open = grub_cbfsdisk_open, - .close = grub_cbfsdisk_close, - .read = grub_cbfsdisk_read, - .write = grub_cbfsdisk_write, + .disk_iterate = grub_cbfsdisk_iterate, + .disk_open = grub_cbfsdisk_open, + .disk_close = grub_cbfsdisk_close, + .disk_read = grub_cbfsdisk_read, + .disk_write = grub_cbfsdisk_write, .next = 0 }; diff --git a/grub-core/fs/proc.c b/grub-core/fs/proc.c index 31f3aa9a4..5911c2eb5 100644 --- a/grub-core/fs/proc.c +++ b/grub-core/fs/proc.c @@ -172,11 +172,11 @@ grub_procfs_open (struct grub_file *file, const char *path) static struct grub_disk_dev grub_procfs_dev = { .name = "proc", .id = GRUB_DISK_DEVICE_PROCFS_ID, - .iterate = grub_procdev_iterate, - .open = grub_procdev_open, - .close = grub_procdev_close, - .read = grub_procdev_read, - .write = grub_procdev_write, + .disk_iterate = grub_procdev_iterate, + .disk_open = grub_procdev_open, + .disk_close = grub_procdev_close, + .disk_read = grub_procdev_read, + .disk_write = grub_procdev_write, .next = 0 }; diff --git a/grub-core/kern/disk.c b/grub-core/kern/disk.c index 789f8c052..ffb09c8ee 100644 --- a/grub-core/kern/disk.c +++ b/grub-core/kern/disk.c @@ -223,7 +223,7 @@ grub_disk_open (const char *name) for (dev = grub_disk_dev_list; dev; dev = dev->next) { - if ((dev->open) (raw, disk) == GRUB_ERR_NONE) + if ((dev->disk_open) (raw, disk) == GRUB_ERR_NONE) break; else if (grub_errno == GRUB_ERR_UNKNOWN_DEVICE) grub_errno = GRUB_ERR_NONE; @@ -294,8 +294,8 @@ grub_disk_close (grub_disk_t disk) grub_partition_t part; grub_dprintf ("disk", "Closing `%s'.\n", disk->name); - if (disk->dev && disk->dev->close) - (disk->dev->close) (disk); + if (disk->dev && disk->dev->disk_close) + (disk->dev->disk_close) (disk); /* Reset the timer. */ grub_last_time = grub_get_time_ms (); @@ -341,10 +341,10 @@ grub_disk_read_small_real (grub_disk_t disk, grub_disk_addr_t sector, < (disk->total_sectors << (disk->log_sector_size - GRUB_DISK_SECTOR_BITS))) { grub_err_t err; - err = (disk->dev->read) (disk, transform_sector (disk, sector), - 1U << (GRUB_DISK_CACHE_BITS - + GRUB_DISK_SECTOR_BITS - - disk->log_sector_size), tmp_buf); + err = (disk->dev->disk_read) (disk, transform_sector (disk, sector), + 1U << (GRUB_DISK_CACHE_BITS + + GRUB_DISK_SECTOR_BITS + - disk->log_sector_size), tmp_buf); if (!err) { /* Copy it and store it in the disk cache. */ @@ -377,8 +377,8 @@ grub_disk_read_small_real (grub_disk_t disk, grub_disk_addr_t sector, if (!tmp_buf) return grub_errno; - if ((disk->dev->read) (disk, transform_sector (disk, aligned_sector), - num, tmp_buf)) + if ((disk->dev->disk_read) (disk, transform_sector (disk, aligned_sector), + num, tmp_buf)) { grub_error_push (); grub_dprintf ("disk", "%s read failed\n", disk->name); @@ -483,11 +483,11 @@ grub_disk_read (grub_disk_t disk, grub_disk_addr_t sector, { grub_disk_addr_t i; - err = (disk->dev->read) (disk, transform_sector (disk, sector), - agglomerate << (GRUB_DISK_CACHE_BITS - + GRUB_DISK_SECTOR_BITS - - disk->log_sector_size), - buf); + err = (disk->dev->disk_read) (disk, transform_sector (disk, sector), + agglomerate << (GRUB_DISK_CACHE_BITS + + GRUB_DISK_SECTOR_BITS + - disk->log_sector_size), + buf); if (err) return err; diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index 87e3e2512..e9ec680cd 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -388,11 +388,11 @@ static struct grub_disk_dev grub_util_biosdisk_dev = { .name = "hostdisk", .id = GRUB_DISK_DEVICE_HOSTDISK_ID, - .iterate = grub_util_biosdisk_iterate, - .open = grub_util_biosdisk_open, - .close = grub_util_biosdisk_close, - .read = grub_util_biosdisk_read, - .write = grub_util_biosdisk_write, + .disk_iterate = grub_util_biosdisk_iterate, + .disk_open = grub_util_biosdisk_open, + .disk_close = grub_util_biosdisk_close, + .disk_read = grub_util_biosdisk_read, + .disk_write = grub_util_biosdisk_write, .next = 0 }; diff --git a/grub-core/lib/disk.c b/grub-core/lib/disk.c index 0f186883a..b4eb064a8 100644 --- a/grub-core/lib/disk.c +++ b/grub-core/lib/disk.c @@ -101,8 +101,8 @@ grub_disk_write (grub_disk_t disk, grub_disk_addr_t sector, grub_disk_cache_invalidate (disk->dev->id, disk->id, sector); - if ((disk->dev->write) (disk, transform_sector (disk, sector), - 1, tmp_buf) != GRUB_ERR_NONE) + if ((disk->dev->disk_write) (disk, transform_sector (disk, sector), + 1, tmp_buf) != GRUB_ERR_NONE) { grub_free (tmp_buf); goto finish; @@ -130,8 +130,8 @@ grub_disk_write (grub_disk_t disk, grub_disk_addr_t sector, << (GRUB_DISK_CACHE_BITS + GRUB_DISK_SECTOR_BITS - disk->log_sector_size)); - if ((disk->dev->write) (disk, transform_sector (disk, sector), - n, buf) != GRUB_ERR_NONE) + if ((disk->dev->disk_write) (disk, transform_sector (disk, sector), + n, buf) != GRUB_ERR_NONE) goto finish; while (n--) diff --git a/include/grub/disk.h b/include/grub/disk.h index bd58b11d5..316659fee 100644 --- a/include/grub/disk.h +++ b/include/grub/disk.h @@ -77,26 +77,26 @@ struct grub_disk_dev enum grub_disk_dev_id id; /* Call HOOK with each device name, until HOOK returns non-zero. */ - int (*iterate) (grub_disk_dev_iterate_hook_t hook, void *hook_data, + int (*disk_iterate) (grub_disk_dev_iterate_hook_t hook, void *hook_data, grub_disk_pull_t pull); /* Open the device named NAME, and set up DISK. */ - grub_err_t (*open) (const char *name, struct grub_disk *disk); + grub_err_t (*disk_open) (const char *name, struct grub_disk *disk); /* Close the disk DISK. */ - void (*close) (struct grub_disk *disk); + void (*disk_close) (struct grub_disk *disk); /* Read SIZE sectors from the sector SECTOR of the disk DISK into BUF. */ - grub_err_t (*read) (struct grub_disk *disk, grub_disk_addr_t sector, + grub_err_t (*disk_read) (struct grub_disk *disk, grub_disk_addr_t sector, grub_size_t size, char *buf); /* Write SIZE sectors from BUF into the sector SECTOR of the disk DISK. */ - grub_err_t (*write) (struct grub_disk *disk, grub_disk_addr_t sector, + grub_err_t (*disk_write) (struct grub_disk *disk, grub_disk_addr_t sector, grub_size_t size, const char *buf); #ifdef GRUB_UTIL - struct grub_disk_memberlist *(*memberlist) (struct grub_disk *disk); - const char * (*raidname) (struct grub_disk *disk); + struct grub_disk_memberlist *(*disk_memberlist) (struct grub_disk *disk); + const char * (*disk_raidname) (struct grub_disk *disk); #endif /* The next disk device. */ @@ -187,7 +187,7 @@ grub_disk_dev_iterate (grub_disk_dev_iterate_hook_t hook, void *hook_data) for (pull = 0; pull < GRUB_DISK_PULL_MAX; pull++) for (p = grub_disk_dev_list; p; p = p->next) - if (p->iterate && (p->iterate) (hook, hook_data, pull)) + if (p->disk_iterate && (p->disk_iterate) (hook, hook_data, pull)) return 1; return 0; diff --git a/util/grub-install.c b/util/grub-install.c index 264f9ecdc..2046c48c4 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -446,8 +446,8 @@ probe_mods (grub_disk_t disk) if (raid_level >= 0) { grub_install_push_module ("diskfilter"); - if (disk->dev->raidname) - grub_install_push_module (disk->dev->raidname (disk)); + if (disk->dev->disk_raidname) + grub_install_push_module (disk->dev->disk_raidname (disk)); } if (raid_level == 5) grub_install_push_module ("raid5rec"); @@ -455,8 +455,8 @@ probe_mods (grub_disk_t disk) grub_install_push_module ("raid6rec"); /* In case of LVM/RAID, check the member devices as well. */ - if (disk->dev->memberlist) - list = disk->dev->memberlist (disk); + if (disk->dev->disk_memberlist) + list = disk->dev->disk_memberlist (disk); while (list) { probe_mods (list->disk); @@ -514,9 +514,9 @@ probe_cryptodisk_uuid (grub_disk_t disk) grub_disk_memberlist_t list = NULL, tmp; /* In case of LVM/RAID, check the member devices as well. */ - if (disk->dev->memberlist) + if (disk->dev->disk_memberlist) { - list = disk->dev->memberlist (disk); + list = disk->dev->disk_memberlist (disk); } while (list) { diff --git a/util/grub-probe.c b/util/grub-probe.c index e45dbf9e0..2e44ec8f4 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -171,9 +171,9 @@ probe_partmap (grub_disk_t disk, char delim) grub_diskfilter_get_partmap (disk, do_print, &delim); /* In case of LVM/RAID, check the member devices as well. */ - if (disk->dev->memberlist) + if (disk->dev->disk_memberlist) { - list = disk->dev->memberlist (disk); + list = disk->dev->disk_memberlist (disk); } while (list) { @@ -229,9 +229,9 @@ probe_cryptodisk_uuid (grub_disk_t disk, char delim) grub_disk_memberlist_t list = NULL, tmp; /* In case of LVM/RAID, check the member devices as well. */ - if (disk->dev->memberlist) + if (disk->dev->disk_memberlist) { - list = disk->dev->memberlist (disk); + list = disk->dev->disk_memberlist (disk); } while (list) { @@ -272,8 +272,8 @@ probe_abstraction (grub_disk_t disk, char delim) grub_disk_memberlist_t list = NULL, tmp; int raid_level; - if (disk->dev->memberlist) - list = disk->dev->memberlist (disk); + if (disk->dev->disk_memberlist) + list = disk->dev->disk_memberlist (disk); while (list) { probe_abstraction (list->disk, delim); @@ -299,8 +299,8 @@ probe_abstraction (grub_disk_t disk, char delim) if (raid_level >= 0) { printf ("diskfilter%c", delim); - if (disk->dev->raidname) - printf ("%s%c", disk->dev->raidname (disk), delim); + if (disk->dev->disk_raidname) + printf ("%s%c", disk->dev->disk_raidname (disk), delim); } if (raid_level == 5) printf ("raid5rec%c", delim);