[SeaBIOS] [PATCH 17/17] block: Rename process_XXX_op() functions to XXX_process_op()
Kevin O'Connor
kevin at koconnor.net
Tue Jul 7 21:26:21 CEST 2015
Rename disk driver dispatch functions to a consistent naming style.
Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
src/block.c | 14 +++++++-------
src/cdrom.c | 2 +-
src/hw/ahci.c | 2 +-
src/hw/ahci.h | 2 +-
src/hw/ata.c | 2 +-
src/hw/ata.h | 3 +--
src/hw/floppy.c | 2 +-
src/hw/ramdisk.c | 2 +-
src/hw/sdcard.c | 2 +-
src/hw/virtio-blk.c | 2 +-
src/hw/virtio-blk.h | 2 +-
src/util.h | 8 ++++----
12 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/src/block.c b/src/block.c
index 8e5bdad..5e08663 100644
--- a/src/block.c
+++ b/src/block.c
@@ -525,13 +525,13 @@ process_op_32(struct disk_op_s *op)
ASSERT32FLAT();
switch (op->drive_gf->type) {
case DTYPE_VIRTIO_BLK:
- return process_virtio_blk_op(op);
+ return virtio_blk_process_op(op);
case DTYPE_AHCI:
- return process_ahci_op(op);
+ return ahci_process_op(op);
case DTYPE_AHCI_ATAPI:
return ahci_atapi_process_op(op);
case DTYPE_SDCARD:
- return process_sdcard_op(op);
+ return sdcard_process_op(op);
case DTYPE_USB_32:
return usb_process_op(op);
case DTYPE_UAS_32:
@@ -552,13 +552,13 @@ process_op_16(struct disk_op_s *op)
ASSERT16();
switch (GET_GLOBALFLAT(op->drive_gf->type)) {
case DTYPE_FLOPPY:
- return process_floppy_op(op);
+ return floppy_process_op(op);
case DTYPE_ATA:
- return process_ata_op(op);
+ return ata_process_op(op);
case DTYPE_RAMDISK:
- return process_ramdisk_op(op);
+ return ramdisk_process_op(op);
case DTYPE_CDEMU:
- return process_cdemu_op(op);
+ return cdemu_process_op(op);
default:
return process_op_both(op);
}
diff --git a/src/cdrom.c b/src/cdrom.c
index 60964bd..00e9e09 100644
--- a/src/cdrom.c
+++ b/src/cdrom.c
@@ -89,7 +89,7 @@ cdemu_read(struct disk_op_s *op)
}
int
-process_cdemu_op(struct disk_op_s *op)
+cdemu_process_op(struct disk_op_s *op)
{
if (!CONFIG_CDROM_EMU)
return 0;
diff --git a/src/hw/ahci.c b/src/hw/ahci.c
index 72ba230..2253281 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -297,7 +297,7 @@ ahci_disk_readwrite(struct disk_op_s *op, int iswrite)
// command demuxer
int
-process_ahci_op(struct disk_op_s *op)
+ahci_process_op(struct disk_op_s *op)
{
if (!CONFIG_AHCI)
return 0;
diff --git a/src/hw/ahci.h b/src/hw/ahci.h
index 16ad6a9..fa11d66 100644
--- a/src/hw/ahci.h
+++ b/src/hw/ahci.h
@@ -83,7 +83,7 @@ struct ahci_port_s {
};
void ahci_setup(void);
-int process_ahci_op(struct disk_op_s *op);
+int ahci_process_op(struct disk_op_s *op);
int ahci_atapi_process_op(struct disk_op_s *op);
#define AHCI_IRQ_ON_SG (1 << 31)
diff --git a/src/hw/ata.c b/src/hw/ata.c
index b5bd75f..3efc6ab 100644
--- a/src/hw/ata.c
+++ b/src/hw/ata.c
@@ -552,7 +552,7 @@ ata_readwrite(struct disk_op_s *op, int iswrite)
// 16bit command demuxer for ATA harddrives.
int
-process_ata_op(struct disk_op_s *op)
+ata_process_op(struct disk_op_s *op)
{
if (!CONFIG_ATA)
return 0;
diff --git a/src/hw/ata.h b/src/hw/ata.h
index 3a7ab65..65bfcb7 100644
--- a/src/hw/ata.h
+++ b/src/hw/ata.h
@@ -24,10 +24,9 @@ struct atadrive_s {
// ata.c
char *ata_extract_model(char *model, u32 size, u16 *buffer);
int ata_extract_version(u16 *buffer);
-int cdrom_read(struct disk_op_s *op);
+int ata_process_op(struct disk_op_s *op);
int ata_atapi_process_op(struct disk_op_s *op);
void ata_setup(void);
-int process_ata_op(struct disk_op_s *op);
#define PORT_ATA2_CMD_BASE 0x0170
#define PORT_ATA1_CMD_BASE 0x01f0
diff --git a/src/hw/floppy.c b/src/hw/floppy.c
index d60362a..a14f7e0 100644
--- a/src/hw/floppy.c
+++ b/src/hw/floppy.c
@@ -613,7 +613,7 @@ floppy_format(struct disk_op_s *op)
}
int
-process_floppy_op(struct disk_op_s *op)
+floppy_process_op(struct disk_op_s *op)
{
if (!CONFIG_FLOPPY)
return 0;
diff --git a/src/hw/ramdisk.c b/src/hw/ramdisk.c
index 67ba59c..e847824 100644
--- a/src/hw/ramdisk.c
+++ b/src/hw/ramdisk.c
@@ -91,7 +91,7 @@ ramdisk_copy(struct disk_op_s *op, int iswrite)
}
int
-process_ramdisk_op(struct disk_op_s *op)
+ramdisk_process_op(struct disk_op_s *op)
{
if (!CONFIG_FLASH_FLOPPY)
return 0;
diff --git a/src/hw/sdcard.c b/src/hw/sdcard.c
index 965543c..d2c3288 100644
--- a/src/hw/sdcard.c
+++ b/src/hw/sdcard.c
@@ -209,7 +209,7 @@ sdcard_readwrite(struct disk_op_s *op, int iswrite)
}
int
-process_sdcard_op(struct disk_op_s *op)
+sdcard_process_op(struct disk_op_s *op)
{
if (!CONFIG_SDCARD)
return 0;
diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c
index 92a5546..94485e2 100644
--- a/src/hw/virtio-blk.c
+++ b/src/hw/virtio-blk.c
@@ -78,7 +78,7 @@ virtio_blk_op(struct disk_op_s *op, int write)
}
int
-process_virtio_blk_op(struct disk_op_s *op)
+virtio_blk_process_op(struct disk_op_s *op)
{
if (! CONFIG_VIRTIO_BLK)
return 0;
diff --git a/src/hw/virtio-blk.h b/src/hw/virtio-blk.h
index b233c74..157bed6 100644
--- a/src/hw/virtio-blk.h
+++ b/src/hw/virtio-blk.h
@@ -37,7 +37,7 @@ struct virtio_blk_outhdr {
#define VIRTIO_BLK_S_UNSUPP 2
struct disk_op_s;
-int process_virtio_blk_op(struct disk_op_s *op);
+int virtio_blk_process_op(struct disk_op_s *op);
void virtio_blk_setup(void);
#endif /* _VIRTIO_BLK_H */
diff --git a/src/util.h b/src/util.h
index 6250c12..cea844f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -47,7 +47,7 @@ extern u8 CDRom_locks[];
extern struct eltorito_s CDEmu;
extern struct drive_s *cdemu_drive_gf;
struct disk_op_s;
-int process_cdemu_op(struct disk_op_s *op);
+int cdemu_process_op(struct disk_op_s *op);
void cdrom_prepboot(void);
int cdrom_boot(struct drive_s *drive_g);
@@ -143,15 +143,15 @@ extern struct floppy_ext_dbt_s diskette_param_table2;
void floppy_setup(void);
struct drive_s *init_floppy(int floppyid, int ftype);
int find_floppy_type(u32 size);
-int process_floppy_op(struct disk_op_s *op);
+int floppy_process_op(struct disk_op_s *op);
void floppy_tick(void);
// hw/ramdisk.c
void ramdisk_setup(void);
-int process_ramdisk_op(struct disk_op_s *op);
+int ramdisk_process_op(struct disk_op_s *op);
// hw/sdcard.c
-int process_sdcard_op(struct disk_op_s *op);
+int sdcard_process_op(struct disk_op_s *op);
void sdcard_setup(void);
// hw/timer.c
--
1.9.3
More information about the SeaBIOS
mailing list