Patchwork [10/10] monitor: Convert do_pci_device_hot_remove() to QObject

login
register
mail settings
Submitter Luiz Capitulino
Date Oct. 8, 2009, 9:35 p.m.
Message ID <1255037747-3340-11-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/35540/
State Under Review
Headers show

Comments

Luiz Capitulino - Oct. 8, 2009, 9:35 p.m.
Errors are still directly printed, as we are only converting
regular output.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/pci-hotplug.c |    3 ++-
 qemu-monitor.hx  |    3 ++-
 sysemu.h         |    3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 3234265..ce06573 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -262,7 +262,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 37dc863..1c5879a 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -817,7 +817,8 @@  ETEXI
         .args_type  = "pci_addr:s",
         .params     = "[[<domain>:]<bus>:]<slot>",
         .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 17b91c4..896916f 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -212,7 +212,8 @@  void pci_add_user_print(Monitor *mon, const QObject *data);
 void pci_device_hot_add(Monitor *mon, const QDict *qdict, QObject **ret_data);
 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);
 void pci_device_hot_remove_success(PCIDevice *dev);
 
 /* serial ports */