aboutsummaryrefslogtreecommitdiff
path: root/hw/core/qdev.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-06-23 10:38:00 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-06-23 10:38:00 +0100
commita3206972a9eab65ec8e8f9ae320ad628ba4b58f1 (patch)
treef5109b0cced9784dde30aa2877aea30651933eee /hw/core/qdev.c
parent0c8ff723bd29e5c8b2ca989f857ae5c37ec49c4e (diff)
parenta0b1a66ea39bca011108734147a72232a4d08c7a (diff)
Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-06-22' into staging
Monitor patches # gpg: Signature made Mon Jun 22 18:56:18 2015 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-monitor-2015-06-22: (24 commits) Include monitor/monitor.h exactly where needed Include qapi/qmp/qerror.h exactly where needed qerror: Move #include out of qerror.h qerror: Finally unused, clean up qmp: Wean off qerror_report() tpm: Avoid qerror_report() outside QMP command handlers qerror: Clean up QERR_ macros to expand into a single string qerror: Eliminate QERR_DEVICE_NOT_FOUND vl: Use error_report() for --display errors vl: Avoid qerror_report() outside QMP command handlers QemuOpts: Wean off qerror_report_err() qdev-monitor: Propagate errors through qdev_device_add() qdev-monitor: Propagate errors through set_property() qdev-monitor: Convert qbus_find() to Error qdev-monitor: Fix check for full bus qdev-monitor: Stop error avalanche in qbus_find_recursive() disas: Remove uses of CPU env monitor: Split mon_get_cpu fn to remove ENV_GET_CPU monitor: Fix failure path for "S" argument monitor: Point to "help" command on syntax error ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r--hw/core/qdev.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index a6353c177f..b2f404a765 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -32,6 +32,7 @@
#include "qapi/qmp/qerror.h"
#include "qapi/visitor.h"
#include "qapi/qmp/qjson.h"
+#include "qemu/error-report.h"
#include "hw/hotplug.h"
#include "hw/boards.h"
#include "qapi-event.h"
@@ -276,13 +277,13 @@ void qdev_unplug(DeviceState *dev, Error **errp)
HotplugHandlerClass *hdc;
if (dev->parent_bus && !qbus_is_hotpluggable(dev->parent_bus)) {
- error_set(errp, QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);
+ error_setg(errp, QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);
return;
}
if (!dc->hotpluggable) {
- error_set(errp, QERR_DEVICE_NO_HOTPLUG,
- object_get_typename(OBJECT(dev)));
+ error_setg(errp, QERR_DEVICE_NO_HOTPLUG,
+ object_get_typename(OBJECT(dev)));
return;
}
@@ -1026,7 +1027,7 @@ static void device_set_realized(Object *obj, bool value, Error **errp)
Error *local_err = NULL;
if (dev->hotplugged && !dc->hotpluggable) {
- error_set(errp, QERR_DEVICE_NO_HOTPLUG, object_get_typename(obj));
+ error_setg(errp, QERR_DEVICE_NO_HOTPLUG, object_get_typename(obj));
return;
}