aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-06-02 18:48:27 +0200
committerKevin Wolf <kwolf@redhat.com>2010-06-04 15:20:47 +0200
commit666daa68234b5b1758652633cab07d5ca6046a5b (patch)
treed4511a0094915ab279c7c02e74fbc6b53c524157 /hw
parent7b370f513002b340a383fac961dc8c6fdf39eddc (diff)
downloadqemu-666daa68234b5b1758652633cab07d5ca6046a5b.zip
qemu-666daa68234b5b1758652633cab07d5ca6046a5b.tar.gz
qemu-666daa68234b5b1758652633cab07d5ca6046a5b.tar.bz2
blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/acpi_piix4.c1
-rw-r--r--hw/apb_pci.c1
-rw-r--r--hw/device-hotplug.c2
-rw-r--r--hw/fdc.c1
-rw-r--r--hw/fdc.h2
-rw-r--r--hw/ide/core.c2
-rw-r--r--hw/ide/qdev.c1
-rw-r--r--hw/lan9118.c1
-rw-r--r--hw/nand.c3
-rw-r--r--hw/omap2.c2
-rw-r--r--hw/onenand.c3
-rw-r--r--hw/parallel.c1
-rw-r--r--hw/pc.c1
-rw-r--r--hw/pc_piix.c1
-rw-r--r--hw/pci-hotplug.c2
-rw-r--r--hw/pcmcia.h2
-rw-r--r--hw/qdev-properties.c1
-rw-r--r--hw/qdev.h2
-rw-r--r--hw/scsi-bus.c1
-rw-r--r--hw/scsi-disk.c2
-rw-r--r--hw/scsi-generic.c1
-rw-r--r--hw/serial.c1
-rw-r--r--hw/usb-hid.c1
-rw-r--r--hw/usb-msd.c2
-rw-r--r--hw/virtio-blk.c2
-rw-r--r--hw/virtio-pci.c1
26 files changed, 17 insertions, 23 deletions
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 0fce958..a87286b 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -21,6 +21,7 @@
#include "pm_smbus.h"
#include "pci.h"
#include "acpi.h"
+#include "sysemu.h"
//#define DEBUG
diff --git a/hw/apb_pci.c b/hw/apb_pci.c
index b53e3c3..31c8d70 100644
--- a/hw/apb_pci.c
+++ b/hw/apb_pci.c
@@ -31,6 +31,7 @@
#include "pci_host.h"
#include "rwhandler.h"
#include "apb_pci.h"
+#include "sysemu.h"
/* debug APB */
//#define DEBUG_APB
diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c
index a3fe99e..c1a9a56 100644
--- a/hw/device-hotplug.c
+++ b/hw/device-hotplug.c
@@ -25,8 +25,6 @@
#include "hw.h"
#include "boards.h"
#include "net.h"
-#include "block_int.h"
-#include "sysemu.h"
DriveInfo *add_init_drive(const char *optstr)
{
diff --git a/hw/fdc.c b/hw/fdc.c
index 6306496..b978957 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -29,7 +29,6 @@
#include "hw.h"
#include "fdc.h"
-#include "block.h"
#include "qemu-timer.h"
#include "isa.h"
#include "sysbus.h"
diff --git a/hw/fdc.h b/hw/fdc.h
index c48b5e0..b6b3772 100644
--- a/hw/fdc.h
+++ b/hw/fdc.h
@@ -2,7 +2,7 @@
#define HW_FDC_H
/* fdc.c */
-#include "sysemu.h"
+#include "blockdev.h"
#define MAX_FD 2
typedef struct FDCtrl FDCtrl;
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 70af1b6..045d18d 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -26,8 +26,6 @@
#include <hw/pc.h>
#include <hw/pci.h>
#include <hw/scsi.h>
-#include "block.h"
-#include "block_int.h"
#include "qemu-timer.h"
#include "sysemu.h"
#include "dma.h"
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 6231d77..0f9f22e 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -17,7 +17,6 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include <hw/hw.h>
-#include "sysemu.h"
#include "dma.h"
#include <hw/ide/internal.h>
diff --git a/hw/lan9118.c b/hw/lan9118.c
index 16d3330..b996dc4 100644
--- a/hw/lan9118.c
+++ b/hw/lan9118.c
@@ -10,6 +10,7 @@
#include "sysbus.h"
#include "net.h"
#include "devices.h"
+#include "sysemu.h"
/* For crc32 */
#include <zlib.h>
diff --git a/hw/nand.c b/hw/nand.c
index 40d5a6a..cd7444f 100644
--- a/hw/nand.c
+++ b/hw/nand.c
@@ -13,9 +13,8 @@
# include "hw.h"
# include "flash.h"
-# include "block.h"
+# include "blockdev.h"
/* FIXME: Pass block device as an argument. */
-# include "sysemu.h"
# define NAND_CMD_READ0 0x00
# define NAND_CMD_READ1 0x01
diff --git a/hw/omap2.c b/hw/omap2.c
index bd1b35e..666c15a 100644
--- a/hw/omap2.c
+++ b/hw/omap2.c
@@ -17,6 +17,8 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+
+#include "blockdev.h"
#include "hw.h"
#include "arm-misc.h"
#include "omap.h"
diff --git a/hw/onenand.c b/hw/onenand.c
index c1e7e4d..4118db9 100644
--- a/hw/onenand.c
+++ b/hw/onenand.c
@@ -21,8 +21,7 @@
#include "qemu-common.h"
#include "flash.h"
#include "irq.h"
-#include "sysemu.h"
-#include "block.h"
+#include "blockdev.h"
/* 11 for 2kB-page OneNAND ("2nd generation") and 10 for 1kB-page chips */
#define PAGE_SHIFT 11
diff --git a/hw/parallel.c b/hw/parallel.c
index be8e2d5..6b11672 100644
--- a/hw/parallel.c
+++ b/hw/parallel.c
@@ -26,6 +26,7 @@
#include "qemu-char.h"
#include "isa.h"
#include "pc.h"
+#include "sysemu.h"
//#define DEBUG_PARALLEL
diff --git a/hw/pc.c b/hw/pc.c
index 9b85c42..6e7c468 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -35,6 +35,7 @@
#include "elf.h"
#include "multiboot.h"
#include "mc146818rtc.h"
+#include "sysemu.h"
/* output Bochs bios info messages */
//#define DEBUG_BIOS
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 70f563a..dc46846 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -32,6 +32,7 @@
#include "boards.h"
#include "ide.h"
#include "kvm.h"
+#include "sysemu.h"
#define MAX_IDE_BUS 2
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index a8f3df1..c39e640 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -26,10 +26,8 @@
#include "boards.h"
#include "pci.h"
#include "net.h"
-#include "sysemu.h"
#include "pc.h"
#include "monitor.h"
-#include "block_int.h"
#include "scsi.h"
#include "virtio-blk.h"
#include "qemu-config.h"
diff --git a/hw/pcmcia.h b/hw/pcmcia.h
index cf2db9d..3602923 100644
--- a/hw/pcmcia.h
+++ b/hw/pcmcia.h
@@ -1,7 +1,7 @@
/* PCMCIA/Cardbus */
#include "qemu-common.h"
-#include "sysemu.h"
+#include "blockdev.h"
typedef struct {
qemu_irq irq;
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 48a6b45..5a8739d 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -1,4 +1,3 @@
-#include "sysemu.h"
#include "net.h"
#include "qdev.h"
#include "qerror.h"
diff --git a/hw/qdev.h b/hw/qdev.h
index 0ad6c95..be5ad67 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -2,7 +2,7 @@
#define QDEV_H
#include "hw.h"
-#include "sysemu.h"
+#include "blockdev.h"
#include "qemu-queue.h"
#include "qemu-char.h"
#include "qemu-option.h"
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index 383240b..055a94d 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -2,7 +2,6 @@
#include "qemu-error.h"
#include "scsi.h"
#include "scsi-defs.h"
-#include "block.h"
#include "qdev.h"
static struct BusInfo scsi_bus_info = {
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index a3559d1..a9bf7d2 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -33,9 +33,9 @@ do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
#include "qemu-common.h"
#include "qemu-error.h"
-#include "block.h"
#include "scsi.h"
#include "scsi-defs.h"
+#include "sysemu.h"
#define SCSI_DMA_BUF_SIZE 131072
#define SCSI_MAX_INQUIRY_LEN 256
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index c9aa853..e31060e 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -13,7 +13,6 @@
#include "qemu-common.h"
#include "qemu-error.h"
-#include "block.h"
#include "scsi.h"
#ifdef __linux__
diff --git a/hw/serial.c b/hw/serial.c
index 9102edb..c7e4e77 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -27,6 +27,7 @@
#include "isa.h"
#include "pc.h"
#include "qemu-timer.h"
+#include "sysemu.h"
//#define DEBUG_SERIAL
diff --git a/hw/usb-hid.c b/hw/usb-hid.c
index 8e6c6e0..228d0a0 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -25,6 +25,7 @@
#include "hw.h"
#include "console.h"
#include "usb.h"
+#include "sysemu.h"
/* HID interface requests */
#define GET_REPORT 0xa101
diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 0ba4a64..003bd8a 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -11,10 +11,10 @@
#include "qemu-option.h"
#include "qemu-config.h"
#include "usb.h"
-#include "block.h"
#include "scsi.h"
#include "console.h"
#include "monitor.h"
+#include "sysemu.h"
//#define DEBUG_MSD
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 80d51c4..cdcb492 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -12,9 +12,7 @@
*/
#include <qemu-common.h>
-#include <sysemu.h>
#include "virtio-blk.h"
-#include "block_int.h"
#ifdef __linux__
# include <scsi/sg.h>
#endif
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 7ddf612..e101fa0 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -22,7 +22,6 @@
#include "qemu-error.h"
#include "msix.h"
#include "net.h"
-#include "block_int.h"
#include "loader.h"
#include "kvm.h"