Rearrange block headers

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>
This commit is contained in:
Blue Swirl 2010-08-24 15:22:24 +00:00
parent e945fb7627
commit 2446333cd5
47 changed files with 51 additions and 13 deletions

View File

@ -16,15 +16,9 @@
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

View File

@ -25,6 +25,7 @@
#include "hw.h"
#include "boards.h"
#include "net.h"
#include "blockdev.h"
DriveInfo *add_init_drive(const char *optstr)
{

View 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)

View File

@ -34,6 +34,7 @@
#include "isa.h"
#include "sysbus.h"
#include "qdev-addr.h"
#include "blockdev.h"
/********************************************************/
/* debug Floppy devices */

View File

@ -2,7 +2,6 @@
#define HW_FDC_H
/* fdc.c */
#include "blockdev.h"
#define MAX_FD 2
typedef struct FDCtrl FDCtrl;

View File

@ -38,6 +38,7 @@
#include "sysemu.h"
#include "devices.h"
#include "boards.h"
#include "blockdev.h"
static const int sector_len = 128 * 1024;

View File

@ -30,6 +30,7 @@
#include "qemu-timer.h"
#include "sysemu.h"
#include "dma.h"
#include "blockdev.h"
#include <hw/ide/internal.h>

View File

@ -20,6 +20,7 @@
#include "dma.h"
#include "qemu-error.h"
#include <hw/ide/internal.h>
#include "blockdev.h"
/* --------------------------------- */

View 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 },

View File

@ -37,6 +37,7 @@
#include "elf.h"
#include "vt82c686.h"
#include "mc146818rtc.h"
#include "blockdev.h"
#define DEBUG_FULONG2E_INIT

View File

@ -36,6 +36,7 @@
#include "mips-bios.h"
#include "loader.h"
#include "mc146818rtc.h"
#include "blockdev.h"
enum jazz_model_e
{

View File

@ -45,6 +45,7 @@
#include "loader.h"
#include "elf.h"
#include "mc146818rtc.h"
#include "blockdev.h"
//#define DEBUG_BOARD_INIT

View File

@ -22,6 +22,7 @@
#include "loader.h"
#include "elf.h"
#include "mc146818rtc.h"
#include "blockdev.h"
#define MAX_IDE_BUS 2

View 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

View 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)

View File

@ -32,6 +32,7 @@
#include "boards.h"
#include "arm-misc.h"
#include "flash.h"
#include "blockdev.h"
/*****************************************************************************/
/* Siemens SX1 Cellphone V1 */

View File

@ -39,6 +39,7 @@
#include "msix.h"
#include "sysbus.h"
#include "sysemu.h"
#include "blockdev.h"
/* output Bochs bios info messages */
//#define DEBUG_BIOS

View File

@ -34,6 +34,7 @@
#include "kvm.h"
#include "sysemu.h"
#include "sysbus.h"
#include "blockdev.h"
#define MAX_IDE_BUS 2

View 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,

View File

@ -1,7 +1,6 @@
/* PCMCIA/Cardbus */
#include "qemu-common.h"
#include "blockdev.h"
typedef struct {
qemu_irq irq;

View 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)

View 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)

View 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

View 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

View 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

View 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;

View 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)
{

View File

@ -29,6 +29,7 @@
#include "qdev.h"
#include "sysemu.h"
#include "monitor.h"
#include "blockdev.h"
static int qdev_hotplug = 0;

View File

@ -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"

View File

@ -36,6 +36,7 @@
#include "loader.h"
#include "usb.h"
#include "flash.h"
#include "blockdev.h"
#define FLASH_BASE 0x00000000
#define FLASH_SIZE 0x02000000

View File

@ -18,6 +18,7 @@
#include "boards.h"
#include "bitbang_i2c.h"
#include "sysbus.h"
#include "blockdev.h"
#define SMP_BOOT_ADDR 0xe0000000

View 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",

View 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

View File

@ -14,6 +14,7 @@
#include "qemu-common.h"
#include "qemu-error.h"
#include "scsi.h"
#include "blockdev.h"
#ifdef __linux__

View 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"

View File

@ -40,6 +40,7 @@
#include "qdev-addr.h"
#include "loader.h"
#include "elf.h"
#include "blockdev.h"
//#define DEBUG_IRQ

View File

@ -37,6 +37,7 @@
#include "ide.h"
#include "loader.h"
#include "elf.h"
#include "blockdev.h"
//#define DEBUG_IRQ
//#define DEBUG_EBUS

View File

@ -19,6 +19,7 @@
#include "boards.h"
#include "i2c.h"
#include "ssi.h"
#include "blockdev.h"
#define TOSA_RAM 0x04000000
#define TOSA_ROM 0x00800000

View File

@ -15,6 +15,7 @@
#include "console.h"
#include "monitor.h"
#include "sysemu.h"
#include "blockdev.h"
//#define DEBUG_MSD

View File

@ -16,6 +16,7 @@
#include "pci.h"
#include "usb-ohci.h"
#include "boards.h"
#include "blockdev.h"
/* Primary interrupt controller. */

View 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>

View File

@ -24,6 +24,7 @@
#include "net.h"
#include "loader.h"
#include "kvm.h"
#include "blockdev.h"
/* from Linux's linux/virtio_pci.h */

View File

@ -4,8 +4,6 @@
#include "xen_common.h"
#include "sysemu.h"
#include "net.h"
#include "block_int.h"
#include "blockdev.h"
/* ------------------------------------------------------------- */

View File

@ -1,4 +1,6 @@
#include "xen_backend.h"
#include "blockdev.h"
#include "block_int.h" /* XXX */
/* ------------------------------------------------------------- */

View File

@ -41,6 +41,7 @@
#include "qemu-char.h"
#include "xen_blkif.h"
#include "xen_backend.h"
#include "blockdev.h"
/* ------------------------------------------------------------- */

View 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,

View 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. */