From patchwork Mon Mar 22 10:38:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2,1/2] qdev: Convert qdev_unplug() to QError Date: Mon, 22 Mar 2010 00:38:13 -0000 From: Markus Armbruster X-Patchwork-Id: 48290 Message-Id: <1269254294-23876-2-git-send-email-armbru@redhat.com> To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com Note: our device unplug methods don't need conversion work, because they can't currently fail. Signed-off-by: Markus Armbruster --- hw/qdev.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) 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);