diff options
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r-- | hw/core/qdev.c | 9 |
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; } |