diff options
author | Avi Kivity <avi@redhat.com> | 2009-07-28 21:12:00 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-07-28 21:12:00 +0300 |
commit | 632b7b67399fb4f2e3ad1d699603aeb482380990 (patch) | |
tree | 0ac84618d9e17be2b46ba966e81e05eda8d07edf /sysemu.h | |
parent | Merge commit '1dae12e6d02f8714c04bc0681ef4527980b13a9a' into upstream-merge (diff) | |
parent | kill drives_opt (diff) | |
download | qemu-kvm-632b7b67399fb4f2e3ad1d699603aeb482380990.tar.gz qemu-kvm-632b7b67399fb4f2e3ad1d699603aeb482380990.tar.bz2 qemu-kvm-632b7b67399fb4f2e3ad1d699603aeb482380990.zip |
Merge commit '3b0ba927931925f0f76509747ae145df30c97a05' into upstream-merge
* commit '3b0ba927931925f0f76509747ae145df30c97a05':
kill drives_opt
Conflicts:
sysemu.h
vl.c
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'sysemu.h')
-rw-r--r-- | sysemu.h | 24 |
1 files changed, 11 insertions, 13 deletions
@@ -162,6 +162,12 @@ typedef enum { #define BLOCK_SERIAL_STRLEN 20 +typedef struct DriveOpt { + const char *file; + char opt[1024]; + TAILQ_ENTRY(DriveOpt) next; +} DriveOpt; + typedef struct DriveInfo { BlockDriverState *bdrv; char *id; @@ -169,7 +175,7 @@ typedef struct DriveInfo { BlockInterfaceType type; int bus; int unit; - int drive_opt_idx; + DriveOpt *opt; BlockInterfaceErrorAction onerror; char serial[BLOCK_SERIAL_STRLEN + 1]; TAILQ_ENTRY(DriveInfo) next; @@ -180,29 +186,21 @@ typedef struct DriveInfo { #define MAX_DRIVES 32 extern TAILQ_HEAD(drivelist, DriveInfo) drives; +extern TAILQ_HEAD(driveoptlist, DriveOpt) driveopts; extern DriveInfo *extboot_drive; extern DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit); extern DriveInfo *drive_get_by_id(char *id); extern int drive_get_max_bus(BlockInterfaceType type); extern void drive_uninit(BlockDriverState *bdrv); -extern void drive_remove(int index); +extern void drive_remove(DriveOpt *opt); extern const char *drive_get_serial(BlockDriverState *bdrv); extern BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv); BlockDriverState *qdev_init_bdrv(DeviceState *dev, BlockInterfaceType type); -struct drive_opt { - const char *file; - char opt[1024]; - int used; -}; - -extern struct drive_opt drives_opt[MAX_DRIVES]; -extern int nb_drives_opt; - -extern int drive_add(const char *file, const char *fmt, ...); -extern DriveInfo *drive_init(struct drive_opt *arg, int snapshot, void *machine, +extern DriveOpt *drive_add(const char *file, const char *fmt, ...); +extern DriveInfo *drive_init(DriveOpt *arg, int snapshot, void *machine, int *fatal_error); /* acpi */ |