summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-08-20 13:52:01 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-08-22 17:11:06 -0500
commit2e33e675a6bbd1e9d2568c2d4aed2daf8fb0e226 (patch)
treeded5ec633b46ede61c76e65b8e2c28e633388edd /hw
parent40d57b3f45825b0b087fb14929d8f40e67ab9eb5 (diff)
downloadqemu-2e33e675a6bbd1e9d2568c2d4aed2daf8fb0e226.tar.gz
qemu-2e33e675a6bbd1e9d2568c2d4aed2daf8fb0e226.tar.bz2
qemu-2e33e675a6bbd1e9d2568c2d4aed2daf8fb0e226.zip
QemuOpts: make most qemu_*_opts static
Switch tree to lookup-by-name using qemu_find_opts(). Also hook up virtfs options so qemu_find_opts works for them too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci-hotplug.c2
-rw-r--r--hw/qdev-properties.c2
-rw-r--r--hw/qdev.c2
-rw-r--r--hw/usb-msd.c2
-rw-r--r--hw/usb-net.c2
-rw-r--r--hw/watchdog.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index c38f47fbf1..6a5e3b883b 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -51,7 +51,7 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
return NULL;
}
- opts = qemu_opts_parse(&qemu_net_opts, opts_str ? opts_str : "", 0);
+ opts = qemu_opts_parse(qemu_find_opts("net"), opts_str ? opts_str : "", 0);
if (!opts) {
return NULL;
}
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 9219cd7a60..2d600f5eeb 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -772,5 +772,5 @@ static int qdev_add_one_global(QemuOpts *opts, void *opaque)
void qemu_add_globals(void)
{
- qemu_opts_foreach(&qemu_global_opts, qdev_add_one_global, NULL, 0);
+ qemu_opts_foreach(qemu_find_opts("global"), qdev_add_one_global, NULL, 0);
}
diff --git a/hw/qdev.c b/hw/qdev.c
index e99c73f0d9..d1acf86c4a 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -792,7 +792,7 @@ int do_device_add(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
QemuOpts *opts;
- opts = qemu_opts_from_qdict(&qemu_device_opts, qdict);
+ opts = qemu_opts_from_qdict(qemu_find_opts("device"), qdict);
if (!opts) {
return -1;
}
diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 65e9624e54..8b510cf90d 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -575,7 +575,7 @@ static USBDevice *usb_msd_init(const char *filename)
/* parse -usbdevice disk: syntax into drive opts */
snprintf(id, sizeof(id), "usb%d", nr++);
- opts = qemu_opts_create(&qemu_drive_opts, id, 0);
+ opts = qemu_opts_create(qemu_find_opts("drive"), id, 0);
p1 = strchr(filename, ':');
if (p1++) {
diff --git a/hw/usb-net.c b/hw/usb-net.c
index a43bd17636..70f9263291 100644
--- a/hw/usb-net.c
+++ b/hw/usb-net.c
@@ -1472,7 +1472,7 @@ static USBDevice *usb_net_init(const char *cmdline)
QemuOpts *opts;
int idx;
- opts = qemu_opts_parse(&qemu_net_opts, cmdline, 0);
+ opts = qemu_opts_parse(qemu_find_opts("net"), cmdline, 0);
if (!opts) {
return NULL;
}
diff --git a/hw/watchdog.c b/hw/watchdog.c
index aebb08a0ee..e9dd56e229 100644
--- a/hw/watchdog.c
+++ b/hw/watchdog.c
@@ -66,7 +66,7 @@ int select_watchdog(const char *p)
QLIST_FOREACH(model, &watchdog_list, entry) {
if (strcasecmp(model->wdt_name, p) == 0) {
/* add the device */
- opts = qemu_opts_create(&qemu_device_opts, NULL, 0);
+ opts = qemu_opts_create(qemu_find_opts("device"), NULL, 0);
qemu_opt_set(opts, "driver", p);
return 0;
}