monitor: Port handler_3 to use QDict

This commit ports command handlers that receive three 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>
This commit is contained in:
Luiz Capitulino 2009-08-28 15:27:15 -03:00 committed by Anthony Liguori
parent f18c16de4a
commit 1d4daa91ff
5 changed files with 28 additions and 23 deletions

View file

@ -151,10 +151,12 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
return dev;
}
void pci_device_hot_add(Monitor *mon, const char *pci_addr, const char *type,
const char *opts)
void pci_device_hot_add(Monitor *mon, const QDict *qdict)
{
PCIDevice *dev = NULL;
const char *pci_addr = qdict_get_str(qdict, "pci_addr");
const char *type = qdict_get_str(qdict, "type");
const char *opts = qdict_get_try_str(qdict, "opts");
/* strip legacy tag */
if (!strncmp(pci_addr, "pci_addr=", 9)) {