[v2,1/2] qdev: Convert qdev_unplug() to QError

Submitted by Markus Armbruster on March 22, 2010, 10:38 a.m.

Details

Message ID 1269254294-23876-2-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster March 22, 2010, 10:38 a.m.
Note: our device unplug methods don't need conversion work, because
they can't currently fail.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/qdev.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/hw/qdev.c b/hw/qdev.c
index f45ed0f..c521115 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -287,8 +287,7 @@  int qdev_init(DeviceState *dev)
 int qdev_unplug(DeviceState *dev)
 {
     if (!dev->parent_bus->allow_hotplug) {
-        error_report("Bus %s does not support hotplugging",
-                     dev->parent_bus->name);
+        qerror_report(QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);
         return -1;
     }
     assert(dev->info->unplug != NULL);