diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-07-22 16:43:04 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-27 14:08:23 -0500 |
commit | 9dfd7c7a00dd700de36ca58005a7cb3934a62efb (patch) | |
tree | 6674bf3d6f3cc0d788012da7dc1850cfa3392984 /sysemu.h | |
parent | e27c88fe9eb26648e4fb282cb3761c41f06ff18a (diff) | |
download | qemu-9dfd7c7a00dd700de36ca58005a7cb3934a62efb.zip qemu-9dfd7c7a00dd700de36ca58005a7cb3934a62efb.tar.gz qemu-9dfd7c7a00dd700de36ca58005a7cb3934a62efb.tar.bz2 |
switch -drive to QemuOpts.
Demo QemuOpts in action ;)
Implementing a alternative way to specify the filename should be
just a few lines of code now once we decided how the cmd line syntax
should look like.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'sysemu.h')
-rw-r--r-- | sysemu.h | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -160,12 +160,6 @@ 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; @@ -173,7 +167,7 @@ typedef struct DriveInfo { BlockInterfaceType type; int bus; int unit; - DriveOpt *opt; + QemuOpts *opts; BlockInterfaceErrorAction onerror; char serial[BLOCK_SERIAL_STRLEN + 1]; TAILQ_ENTRY(DriveInfo) next; @@ -190,15 +184,13 @@ 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(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); -extern DriveOpt *drive_add(const char *file, const char *fmt, ...); -extern DriveInfo *drive_init(DriveOpt *arg, int snapshot, void *machine, - int *fatal_error); +extern QemuOpts *drive_add(const char *file, const char *fmt, ...); +extern DriveInfo *drive_init(QemuOpts *arg, void *machine, int *fatal_error); /* acpi */ typedef void (*qemu_system_device_hot_add_t)(int pcibus, int slot, int state); |