summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-07-28 21:18:37 +0300
committerAvi Kivity <avi@redhat.com>2009-07-28 21:18:37 +0300
commiteb9854c6dfda34b51c163976f047929e8b3c973f (patch)
treeb4463af2beda975c214aadb79dbddfab38073b7a /sysemu.h
parentMerge commit '3b0ba927931925f0f76509747ae145df30c97a05' into upstream-merge (diff)
parentswitch -drive to QemuOpts. (diff)
downloadqemu-kvm-eb9854c6dfda34b51c163976f047929e8b3c973f.tar.gz
qemu-kvm-eb9854c6dfda34b51c163976f047929e8b3c973f.tar.bz2
qemu-kvm-eb9854c6dfda34b51c163976f047929e8b3c973f.zip
Merge commit '9dfd7c7a00dd700de36ca58005a7cb3934a62efb' into upstream-merge
* commit '9dfd7c7a00dd700de36ca58005a7cb3934a62efb': switch -drive to QemuOpts. QemuOpts: framework for storing and parsing options. qemu-option: factor out parse_option_size qemu-option: factor out parse_option_bool move parser functions from vl.c to qemu-option.c Conflicts: vl.c Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'sysemu.h')
-rw-r--r--sysemu.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/sysemu.h b/sysemu.h
index 32383caf8..57a7304d5 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -3,6 +3,7 @@
/* Misc. things related to the system emulator. */
#include "qemu-common.h"
+#include "qemu-option.h"
#include "sys-queue.h"
#ifdef _WIN32
@@ -162,12 +163,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;
@@ -175,7 +170,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;
@@ -193,15 +188,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 */
void qemu_system_cpu_hot_add(int cpu, int state);
@@ -281,13 +274,6 @@ void do_usb_add(Monitor *mon, const char *devname);
void do_usb_del(Monitor *mon, const char *devname);
void usb_info(Monitor *mon);
-int get_param_value(char *buf, int buf_size,
- const char *tag, const char *str);
-int get_next_param_value(char *buf, int buf_size,
- const char *tag, const char **pstr);
-int check_params(char *buf, int buf_size,
- const char * const *params, const char *str);
-
void register_devices(void);
#endif