summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2009-08-28 15:27:14 -0300
committerAnthony Liguori <aliguori@us.ibm.com>2009-09-04 09:37:31 -0500
commitf18c16de4a321f1dda01dc7eae8f0aca86900e32 (patch)
tree8cc320c4b06a81cfe04b91a4ce5f1eb9c6589adc /hw
parentd54908a55b9123b11c6d525f022f92bb016a6468 (diff)
downloadqemu-f18c16de4a321f1dda01dc7eae8f0aca86900e32.tar.gz
monitor: Port handler_2 to use QDict
This commit ports command handlers that receive two arguments to use the new monitor's dictionary. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci-hotplug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index bf9a3c4415..ba25be4a29 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -48,7 +48,7 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
return pci_nic_init(&nd_table[ret], "rtl8139", devaddr);
}
-void drive_hot_add(Monitor *mon, const char *pci_addr, const char *opts)
+void drive_hot_add(Monitor *mon, const QDict *qdict)
{
int dom, pci_bus;
unsigned slot;
@@ -56,6 +56,8 @@ void drive_hot_add(Monitor *mon, const char *pci_addr, const char *opts)
int success = 0;
PCIDevice *dev;
DriveInfo *dinfo;
+ const char *pci_addr = qdict_get_str(qdict, "pci_addr");
+ const char *opts = qdict_get_str(qdict, "opts");
if (pci_read_devaddr(mon, pci_addr, &dom, &pci_bus, &slot)) {
return;