From 6848d827162fea039f2658414a4adb6164a4f9b0 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Fri, 16 Oct 2009 12:23:48 -0300 Subject: [PATCH] monitor: Convert do_pci_device_hot_remove() to QObject Errors are still directly printed, as we are only converting regular output. Signed-off-by: Luiz Capitulino Signed-off-by: Anthony Liguori --- hw/pci-hotplug.c | 3 ++- qemu-monitor.hx | 3 ++- sysemu.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index 8a125c90d8..15a2dfb6d9 100644 --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -265,7 +265,8 @@ void pci_device_hot_remove(Monitor *mon, const char *pci_addr) qdev_unplug(&d->qdev); } -void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict) +void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict, + QObject **ret_data) { pci_device_hot_remove(mon, qdict_get_str(qdict, "pci_addr")); } diff --git a/qemu-monitor.hx b/qemu-monitor.hx index 41fbfd374e..4610ad4c00 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -816,7 +816,8 @@ ETEXI .args_type = "pci_addr:s", .params = "[[:]:]", .help = "hot remove PCI device", - .mhandler.cmd = do_pci_device_hot_remove, + .user_print = monitor_user_noop, + .mhandler.cmd_new = do_pci_device_hot_remove, }, #endif diff --git a/sysemu.h b/sysemu.h index cda58486b8..17af0242a0 100644 --- a/sysemu.h +++ b/sysemu.h @@ -208,7 +208,8 @@ DriveInfo *add_init_drive(const char *opts); void pci_device_hot_add(Monitor *mon, const QDict *qdict); void drive_hot_add(Monitor *mon, const QDict *qdict); void pci_device_hot_remove(Monitor *mon, const char *pci_addr); -void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict); +void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict, + QObject **ret_data); /* serial ports */