summaryrefslogtreecommitdiffstats
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2014-03-21 19:42:26 -0400
committerLuiz Capitulino <lcapitulino@redhat.com>2014-04-25 09:19:59 -0400
commitf231b88db14f13ee9a41599896f57f3594c1ca8b (patch)
treecc9ae0ba27b5d6718fbc78eb26ae6b3bdea02f52 /qdev-monitor.c
parentd73f0beadb57f885e678bffc362864f4401262e0 (diff)
downloadhqemu-f231b88db14f13ee9a41599896f57f3594c1ca8b.zip
hqemu-f231b88db14f13ee9a41599896f57f3594c1ca8b.tar.gz
qerror.h: Remove QERR defines that are only used once
Just hardcode them in the callers Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 9268c87..6189780 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -422,12 +422,14 @@ static BusState *qbus_find(const char *path)
* one child bus accept it nevertheless */
switch (dev->num_child_bus) {
case 0:
- qerror_report(QERR_DEVICE_NO_BUS, elem);
+ qerror_report(ERROR_CLASS_GENERIC_ERROR,
+ "Device '%s' has no child bus", elem);
return NULL;
case 1:
return QLIST_FIRST(&dev->child_bus);
default:
- qerror_report(QERR_DEVICE_MULTIPLE_BUSSES, elem);
+ qerror_report(ERROR_CLASS_GENERIC_ERROR,
+ "Device '%s' has multiple child busses", elem);
if (!monitor_cur_is_qmp()) {
qbus_list_bus(dev);
}
@@ -505,14 +507,16 @@ DeviceState *qdev_device_add(QemuOpts *opts)
return NULL;
}
if (!object_dynamic_cast(OBJECT(bus), dc->bus_type)) {
- qerror_report(QERR_BAD_BUS_FOR_DEVICE,
+ qerror_report(ERROR_CLASS_GENERIC_ERROR,
+ "Device '%s' can't go on a %s bus",
driver, object_get_typename(OBJECT(bus)));
return NULL;
}
} else if (dc->bus_type != NULL) {
bus = qbus_find_recursive(sysbus_get_default(), NULL, dc->bus_type);
if (!bus) {
- qerror_report(QERR_NO_BUS_FOR_DEVICE,
+ qerror_report(ERROR_CLASS_GENERIC_ERROR,
+ "No '%s' bus found for device '%s'",
dc->bus_type, driver);
return NULL;
}
OpenPOWER on IntegriCloud