Commit 2446333c authored by Blue Swirl's avatar Blue Swirl
Browse files

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: default avatarBlue Swirl <blauwirbel@gmail.com>
parent e945fb76
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include "hw.h"
#include "boards.h"
#include "net.h"
#include "blockdev.h"

DriveInfo *add_init_drive(const char *optstr)
{
+1 −0
Original line number Diff line number Diff line
@@ -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)
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include "isa.h"
#include "sysbus.h"
#include "qdev-addr.h"
#include "blockdev.h"

/********************************************************/
/* debug Floppy devices */
+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
#define HW_FDC_H

/* fdc.c */
#include "blockdev.h"
#define MAX_FD 2

typedef struct FDCtrl FDCtrl;
Loading