]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Rearrange block headers
authorBlue Swirl <blauwirbel@gmail.com>
Tue, 24 Aug 2010 15:22:24 +0000 (15:22 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Tue, 24 Aug 2010 15:22:24 +0000 (15:22 +0000)
Changing block.h or blockdev.h resulted in recompiling most objects.

Move DriveInfo typedef and BlockInterfaceType enum definitions
to qemu-common.h and rearrange blockdev.h use to decrease churn.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
47 files changed:
blockdev.h
hw/device-hotplug.c
hw/etraxfs.c
hw/fdc.c
hw/fdc.h
hw/gumstix.c
hw/ide/core.c
hw/ide/qdev.c
hw/mainstone.c
hw/mips_fulong2e.c
hw/mips_jazz.c
hw/mips_malta.c
hw/mips_r4k.c
hw/musicpal.c
hw/omap1.c
hw/omap_sx1.c
hw/pc.c
hw/pc_piix.c
hw/pci-hotplug.c
hw/pcmcia.h
hw/petalogix_s3adsp1800_mmu.c
hw/ppc405_boards.c
hw/ppc_newworld.c
hw/ppc_oldworld.c
hw/ppc_prep.c
hw/pxa2xx.c
hw/qdev-properties.c
hw/qdev.c
hw/qdev.h
hw/r2d.c
hw/realview.c
hw/scsi-bus.c
hw/scsi-disk.c
hw/scsi-generic.c
hw/spitz.c
hw/sun4m.c
hw/sun4u.c
hw/tosa.c
hw/usb-msd.c
hw/versatilepb.c
hw/virtio-blk.c
hw/virtio-pci.c
hw/xen_backend.h
hw/xen_devconfig.c
hw/xen_disk.c
hw/xen_machine_pv.c
qemu-common.h

index 37f3a017ea0fb7c66754f19e60792f6fb4510e2e..89dcd9a88e38462f010bd9d7dfe209f03475d72e 100644 (file)
 void blockdev_mark_auto_del(BlockDriverState *bs);
 void blockdev_auto_del(BlockDriverState *bs);
 
-typedef enum {
-    IF_NONE,
-    IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
-    IF_COUNT
-} BlockInterfaceType;
-
 #define BLOCK_SERIAL_STRLEN 20
 
-typedef struct DriveInfo {
+struct DriveInfo {
     BlockDriverState *bdrv;
     char *id;
     const char *devaddr;
@@ -35,7 +29,7 @@ typedef struct DriveInfo {
     QemuOpts *opts;
     char serial[BLOCK_SERIAL_STRLEN + 1];
     QTAILQ_ENTRY(DriveInfo) next;
-} DriveInfo;
+};
 
 #define MAX_IDE_DEVS   2
 #define MAX_SCSI_DEVS  7
index c1a9a561d7ed9eae596b3bb851a6c58678ddb8f8..9704e2feb2d6b9fea33fdcb1cf5a12a4b227d942 100644 (file)
@@ -25,6 +25,7 @@
 #include "hw.h"
 #include "boards.h"
 #include "net.h"
+#include "blockdev.h"
 
 DriveInfo *add_init_drive(const char *optstr)
 {
index 46e2920c2389bb840d54af5512119f07f0a844d0..5ee5f979aac9cc0e72ac5b0252a3e23158ab1795 100644 (file)
@@ -31,6 +31,7 @@
 #include "loader.h"
 #include "elf.h"
 #include "cris-boot.h"
+#include "blockdev.h"
 
 #define FLASH_SIZE 0x2000000
 #define INTMEM_SIZE (128 * 1024)
index 2d50bd6a3952ab55ed3c3a13fbc83b5aaccdb0a5..c159dcb6306c4e0ac57a3820634e87a62f17bdd9 100644 (file)
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -34,6 +34,7 @@
 #include "isa.h"
 #include "sysbus.h"
 #include "qdev-addr.h"
+#include "blockdev.h"
 
 /********************************************************/
 /* debug Floppy devices */
index b6b37725923b3a088d6b129c03ec5b1a891b0969..242730af8c2469ae51b1c2a12ec0af68a80aa5b3 100644 (file)
--- a/hw/fdc.h
+++ b/hw/fdc.h
@@ -2,7 +2,6 @@
 #define HW_FDC_H
 
 /* fdc.c */
-#include "blockdev.h"
 #define MAX_FD 2
 
 typedef struct FDCtrl FDCtrl;
index c343a166e8d7edf5212537304bebd99972e69179..af8b464b888882add0b274741d9eaf27731444ca 100644 (file)
@@ -38,6 +38,7 @@
 #include "sysemu.h"
 #include "devices.h"
 #include "boards.h"
+#include "blockdev.h"
 
 static const int sector_len = 128 * 1024;
 
index 631673fc0f94b7438e3b7dbdd2b0ff061caed075..3651d2be91fa4fb57f0c3215b46cd9dc5a990173 100644 (file)
@@ -30,6 +30,7 @@
 #include "qemu-timer.h"
 #include "sysemu.h"
 #include "dma.h"
+#include "blockdev.h"
 
 #include <hw/ide/internal.h>
 
index 53468edcbce805d6349355b983960bd8696f1052..080876035f584636bdcdf0b238d1eff322848eef 100644 (file)
@@ -20,6 +20,7 @@
 #include "dma.h"
 #include "qemu-error.h"
 #include <hw/ide/internal.h>
+#include "blockdev.h"
 
 /* --------------------------------- */
 
index cba7e63b3c36b8623642589f3b20b7027a105050..efa2959c7272a89d076a2487c131ba93c38f9f2d 100644 (file)
@@ -17,6 +17,7 @@
 #include "mainstone.h"
 #include "sysemu.h"
 #include "flash.h"
+#include "blockdev.h"
 
 static struct keymap map[0xE0] = {
     [0 ... 0xDF] = { -1, -1 },
index c6c13ca997e1f7b9c267db4219960a0bdc164ea7..cbe71567a8c1ec693db54d8f265049720d5cd5c6 100644 (file)
@@ -37,6 +37,7 @@
 #include "elf.h"
 #include "vt82c686.h"
 #include "mc146818rtc.h"
+#include "blockdev.h"
 
 #define DEBUG_FULONG2E_INIT
 
index 71b05a203c95a3b92babd9a9f8f1dc11f911a5ff..5d5305a82db779bb7afe0c140d2fb2e38aab0bad 100644 (file)
@@ -36,6 +36,7 @@
 #include "mips-bios.h"
 #include "loader.h"
 #include "mc146818rtc.h"
+#include "blockdev.h"
 
 enum jazz_model_e
 {
index 11e220a944b4abac6b2226c356360101255ec3b0..ec95cd8507120afb1b622f5e745ea34ef5add09e 100644 (file)
@@ -45,6 +45,7 @@
 #include "loader.h"
 #include "elf.h"
 #include "mc146818rtc.h"
+#include "blockdev.h"
 
 //#define DEBUG_BOARD_INIT
 
index 61cd33a93ca7c5db55dc19c8c9eb474f4fa3a3c2..ca61431eefcfe537bb2ee244c616c8f04a41af16 100644 (file)
@@ -22,6 +22,7 @@
 #include "loader.h"
 #include "elf.h"
 #include "mc146818rtc.h"
+#include "blockdev.h"
 
 #define MAX_IDE_BUS 2
 
index 33180a26566e1efe4ea9a4dc10e61c674945f5f4..56f27669d205d5776a78298743f8bf0acd68d555 100644 (file)
@@ -18,6 +18,7 @@
 #include "flash.h"
 #include "console.h"
 #include "i2c.h"
+#include "blockdev.h"
 
 #define MP_MISC_BASE            0x80002000
 #define MP_MISC_SIZE            0x00001000
index cf0d428692d93c38143aba53686a549c0c69801e..06370b6d3474193a1843f743924d1f536cf4f459 100644 (file)
@@ -25,6 +25,7 @@
 #include "soc_dma.h"
 /* We use pc-style serial ports.  */
 #include "pc.h"
+#include "blockdev.h"
 
 /* Should signal the TCMI/GPMC */
 uint32_t omap_badwidth_read8(void *opaque, target_phys_addr_t addr)
index c3f197393dcd2a7e101010e7f5a584821b58df8e..44dc514f3ff4cd56bb47a2354ee1ef2b4734968a 100644 (file)
@@ -32,6 +32,7 @@
 #include "boards.h"
 #include "arm-misc.h"
 #include "flash.h"
+#include "blockdev.h"
 
 /*****************************************************************************/
 /* Siemens SX1 Cellphone V1 */
diff --git a/hw/pc.c b/hw/pc.c
index 58dea57f8e6cc58f34dcc6700ca3cd203526e2c0..69b13bf62cb2ffe3669844042db84776e7004e87 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -39,6 +39,7 @@
 #include "msix.h"
 #include "sysbus.h"
 #include "sysemu.h"
+#include "blockdev.h"
 
 /* output Bochs bios info messages */
 //#define DEBUG_BIOS
index 812ddfd67966013b7d933199c4ff33c05ff11aa2..32a105736db0c5b95722e998e89a4e18c8feb1f3 100644 (file)
@@ -34,6 +34,7 @@
 #include "kvm.h"
 #include "sysemu.h"
 #include "sysbus.h"
+#include "blockdev.h"
 
 #define MAX_IDE_BUS 2
 
index 6a5e3b883b5229d24430900ea33e53a982da5f24..716133c3760416667598afa748a0b3cbff06edcc 100644 (file)
@@ -31,6 +31,7 @@
 #include "scsi.h"
 #include "virtio-blk.h"
 #include "qemu-config.h"
+#include "blockdev.h"
 
 #if defined(TARGET_I386)
 static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
index 360292395ba7ae729d50c7035de9b7a6ab9854a8..50648c973fff8ff214e5edd15e2d40ca6f63cd6c 100644 (file)
@@ -1,7 +1,6 @@
 /* PCMCIA/Cardbus */
 
 #include "qemu-common.h"
-#include "blockdev.h"
 
 typedef struct {
     qemu_irq irq;
index fcbb825d7145424ac596fa3cd3387fe955b327e4..42de45963ba959179ad858015d13d7644dd55c0a 100644 (file)
@@ -34,6 +34,7 @@
 #include "xilinx.h"
 #include "loader.h"
 #include "elf.h"
+#include "blockdev.h"
 
 #define LMB_BRAM_SIZE  (128 * 1024)
 #define FLASH_SIZE     (16 * 1024 * 1024)
index 40ff1b34ea5107cfea9207e630dbcea4aea9aa34..662d7c437470078239a48c3843ccdc72225d789e 100644 (file)
@@ -31,6 +31,7 @@
 #include "boards.h"
 #include "qemu-log.h"
 #include "loader.h"
+#include "blockdev.h"
 
 #define BIOS_FILENAME "ppc405_rom.bin"
 #define BIOS_SIZE (2048 * 1024)
index fbba9b6fb22fb1d3a7d8131aee084d23c395ea7e..639dcde00024c873ffedde423129dff1a73f5288 100644 (file)
@@ -66,6 +66,7 @@
 #include "kvm.h"
 #include "kvm_ppc.h"
 #include "hw/usb.h"
+#include "blockdev.h"
 
 #define MAX_IDE_BUS 2
 #define VGA_BIOS_SIZE 65536
index 6b3ab896110ae1ee6b4e3ea0fd275ace1cff6488..de6005e3595675f111d1f3741bc5e48adc8b1043 100644 (file)
@@ -41,6 +41,7 @@
 #include "elf.h"
 #include "kvm.h"
 #include "kvm_ppc.h"
+#include "blockdev.h"
 
 #define MAX_IDE_BUS 2
 #define VGA_BIOS_SIZE 65536
index fc3e17a0c33a126b7567799ede9a1c59b789d97d..52fa9b6d908e329e8123e77e632658692e392da4 100644 (file)
@@ -37,6 +37,7 @@
 #include "ide.h"
 #include "loader.h"
 #include "mc146818rtc.h"
+#include "blockdev.h"
 
 //#define HARD_DEBUG_PPC_IO
 //#define DEBUG_PPC_IO
index 953e9ee1d189d73e741d83adb1999c2a139c7eb1..26b9205dbe1a76b53f644b9cbf72863f5e8e77ac 100644 (file)
@@ -15,6 +15,7 @@
 #include "ssi.h"
 #include "qemu-timer.h"
 #include "qemu-char.h"
+#include "blockdev.h"
 
 static struct {
     target_phys_addr_t io_base;
index 2d600f5eeb5ee8c001c99871bc8946e254aab3e2..a493087a520db00934330833d63cc104ec3ee4db 100644 (file)
@@ -1,6 +1,7 @@
 #include "net.h"
 #include "qdev.h"
 #include "qerror.h"
+#include "blockdev.h"
 
 void *qdev_get_prop_ptr(DeviceState *dev, Property *prop)
 {
index d1acf86c4a6384e99a7f3610a965a8f6cef1e96f..35858cb81b19476d47bad992f5a9a823805282d8 100644 (file)
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -29,6 +29,7 @@
 #include "qdev.h"
 #include "sysemu.h"
 #include "monitor.h"
+#include "blockdev.h"
 
 static int qdev_hotplug = 0;
 
index 678f8b7d1d3d8193f5c3cf7178cdc1a61e078604..579328afc2c5e20a54cc6628972bd114cfd2f67c 100644 (file)
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -2,7 +2,6 @@
 #define QDEV_H
 
 #include "hw.h"
-#include "blockdev.h"
 #include "qemu-queue.h"
 #include "qemu-char.h"
 #include "qemu-option.h"
index 8c1fbad4baa6a0478482d6797c0846f7a00fcedf..a58f653e52d7cda58385ba232b4415f38cc88fd7 100644 (file)
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -36,6 +36,7 @@
 #include "loader.h"
 #include "usb.h"
 #include "flash.h"
+#include "blockdev.h"
 
 #define FLASH_BASE 0x00000000
 #define FLASH_SIZE 0x02000000
index 70bcdb846d5bdb4207443e14f3de5ea3306a4850..e9fcbc9a6d95976b81f8a65eab22d276146fdfdd 100644 (file)
@@ -18,6 +18,7 @@
 #include "boards.h"
 #include "bitbang_i2c.h"
 #include "sysbus.h"
+#include "blockdev.h"
 
 #define SMP_BOOT_ADDR 0xe0000000
 
index b860a09edf5810c426816cd1dd8a0a62429f442c..7aa0bcd1ee4bf58115ea1d69bf15f044a9902159 100644 (file)
@@ -3,6 +3,7 @@
 #include "scsi.h"
 #include "scsi-defs.h"
 #include "qdev.h"
+#include "blockdev.h"
 
 static struct BusInfo scsi_bus_info = {
     .name  = "SCSI",
index f43f2d097cceff9f6640e3e3be2f9662854de4f7..07a6d86946e975bbdec0da9831dde89fa98cf62f 100644 (file)
@@ -36,6 +36,7 @@ do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
 #include "scsi.h"
 #include "scsi-defs.h"
 #include "sysemu.h"
+#include "blockdev.h"
 
 #define SCSI_DMA_BUF_SIZE    131072
 #define SCSI_MAX_INQUIRY_LEN 256
index a8b4176d80178b6f06a520c8e759f7b538b9ec0b..aa4f62ae57125c0088b621741ffc0bd40e92fb11 100644 (file)
@@ -14,6 +14,7 @@
 #include "qemu-common.h"
 #include "qemu-error.h"
 #include "scsi.h"
+#include "blockdev.h"
 
 #ifdef __linux__
 
index ccf2a091fbaf12ac93b7335c5f287498d5304a32..a064460936938b46e0550e0fd28fb31858526f45 100644 (file)
@@ -22,6 +22,7 @@
 #include "block.h"
 #include "audio/audio.h"
 #include "boards.h"
+#include "blockdev.h"
 
 #undef REG_FMT
 #define REG_FMT                        "0x%02lx"
index a1373d4072f518a48512afc79e7bd77d53261bf6..7d7a7df1cf54e79a47d34866856dc7d843b3b9ea 100644 (file)
@@ -40,6 +40,7 @@
 #include "qdev-addr.h"
 #include "loader.h"
 #include "elf.h"
+#include "blockdev.h"
 
 //#define DEBUG_IRQ
 
index 31c0c4c482d7496a77a3a24e3ffe121baaccfc97..45a46d673c6328b13e1e2725ec6b3c703f474768 100644 (file)
@@ -37,6 +37,7 @@
 #include "ide.h"
 #include "loader.h"
 #include "elf.h"
+#include "blockdev.h"
 
 //#define DEBUG_IRQ
 //#define DEBUG_EBUS
index ba6d9e73bfac245873bb8ea4166fd7413994bd19..cc8ce6d641178812182fd64e72f0aeae6f9e411e 100644 (file)
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -19,6 +19,7 @@
 #include "boards.h"
 #include "i2c.h"
 #include "ssi.h"
+#include "blockdev.h"
 
 #define TOSA_RAM    0x04000000
 #define TOSA_ROM       0x00800000
index 8b510cf90d2b00fcb9eb1368edd695cb1982b3b4..0a95d8d506e1a0a8f0154d67e6c0be3df88c81cf 100644 (file)
@@ -15,6 +15,7 @@
 #include "console.h"
 #include "monitor.h"
 #include "sysemu.h"
+#include "blockdev.h"
 
 //#define DEBUG_MSD
 
index 1d049f2342558b66571c53a44b965c4491541f09..c51ee02c4d25712396c75dbad18c5ba3e11fc23b 100644 (file)
@@ -16,6 +16,7 @@
 #include "pci.h"
 #include "usb-ohci.h"
 #include "boards.h"
+#include "blockdev.h"
 
 /* Primary interrupt controller.  */
 
index 490cd410507e883a94fa9f529d2e7d6a06f21e45..c3a73438f94020308a023cd92c846b14a2cbc29b 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <qemu-common.h>
 #include "qemu-error.h"
+#include "blockdev.h"
 #include "virtio-blk.h"
 #ifdef __linux__
 # include <scsi/sg.h>
index 82a6d78a9bce2192b62352b06f555faa7bb26bb9..6e8f88a141109d62adb6b20db73c3372ffe97bd7 100644 (file)
@@ -24,6 +24,7 @@
 #include "net.h"
 #include "loader.h"
 #include "kvm.h"
+#include "blockdev.h"
 
 /* from Linux's linux/virtio_pci.h */
 
index cc25f9d7db53b7164412d8861a4b8bbf4f3adf9e..292126dd1996c6a49bf2482c03a2b1d58d0b2828 100644 (file)
@@ -4,8 +4,6 @@
 #include "xen_common.h"
 #include "sysemu.h"
 #include "net.h"
-#include "block_int.h"
-#include "blockdev.h"
 
 /* ------------------------------------------------------------- */
 
index ea8f8c4c2df69277ff4c6b10723ec7d8f87caac9..8d50216c0486e74b0686a9736adfdd0a4dc8ac79 100644 (file)
@@ -1,4 +1,6 @@
 #include "xen_backend.h"
+#include "blockdev.h"
+#include "block_int.h" /* XXX */
 
 /* ------------------------------------------------------------- */
 
index 9a466f3cc10c9a46c9ca4760752c0cf69aa35e18..134ac3388e9ecd0174f2bfb7ca6ef74a53cd015c 100644 (file)
@@ -41,6 +41,7 @@
 #include "qemu-char.h"
 #include "xen_blkif.h"
 #include "xen_backend.h"
+#include "blockdev.h"
 
 /* ------------------------------------------------------------- */
 
index 586214d8ba7173280893a2e4de47ee1da6a766bd..77a34bf111dffedc9c95823b3c694e27d316bdee 100644 (file)
@@ -28,6 +28,7 @@
 #include "boards.h"
 #include "xen_backend.h"
 #include "xen_domainbuild.h"
+#include "blockdev.h"
 
 static void xen_init_pv(ram_addr_t ram_size,
                        const char *boot_device,
index 3fb2f0b375e26d106c927a1de9e80b23bce6a8d6..dfd3dc08a248a49751230e2d8ff933d9d35eced6 100644 (file)
@@ -201,6 +201,7 @@ typedef struct NICInfo NICInfo;
 typedef struct HCIInfo HCIInfo;
 typedef struct AudioState AudioState;
 typedef struct BlockDriverState BlockDriverState;
+typedef struct DriveInfo DriveInfo;
 typedef struct DisplayState DisplayState;
 typedef struct DisplayChangeListener DisplayChangeListener;
 typedef struct DisplaySurface DisplaySurface;
@@ -231,6 +232,12 @@ typedef struct VirtIODevice VirtIODevice;
 
 typedef uint64_t pcibus_t;
 
+typedef enum {
+    IF_NONE,
+    IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
+    IF_COUNT
+} BlockInterfaceType;
+
 void cpu_exec_init_all(unsigned long tb_size);
 
 /* CPU save/load.  */