aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-03-12 15:13:35 +0100
committerMarkus Armbruster <armbru@redhat.com>2024-04-24 09:50:58 +0200
commit7f65e789abf496480be6a54ba454dd6641b45784 (patch)
tree32ff2ea5ff0a2914645394e63e57af47afb695f2 /system
parent4a18751cf423970221d86853c6909696fae52785 (diff)
qapi: Inline and remove QERR_BUS_NO_HOTPLUG definition
Address the comment added in commit 4629ed1e98 ("qerror: Finally unused, clean up"), from 2015: /* * These macros will go away, please don't use * in new code, and do not add new ones! */ Mechanical transformation using sed, and manual cleanup. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240312141343.3168265-3-armbru@redhat.com>
Diffstat (limited to 'system')
-rw-r--r--system/qdev-monitor.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c
index 840177d19f..2ae1460e21 100644
--- a/system/qdev-monitor.c
+++ b/system/qdev-monitor.c
@@ -660,7 +660,8 @@ DeviceState *qdev_device_add_from_qdict(const QDict *opts,
if (qdev_should_hide_device(opts, from_json, errp)) {
if (bus && !qbus_is_hotpluggable(bus)) {
- error_setg(errp, QERR_BUS_NO_HOTPLUG, bus->name);
+ error_setg(errp, "Bus '%s' does not support hotplugging",
+ bus->name);
}
return NULL;
} else if (*errp) {
@@ -668,7 +669,7 @@ DeviceState *qdev_device_add_from_qdict(const QDict *opts,
}
if (phase_check(PHASE_MACHINE_READY) && bus && !qbus_is_hotpluggable(bus)) {
- error_setg(errp, QERR_BUS_NO_HOTPLUG, bus->name);
+ error_setg(errp, "Bus '%s' does not support hotplugging", bus->name);
return NULL;
}
@@ -910,7 +911,8 @@ void qdev_unplug(DeviceState *dev, Error **errp)
}
if (dev->parent_bus && !qbus_is_hotpluggable(dev->parent_bus)) {
- error_setg(errp, QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);
+ error_setg(errp, "Bus '%s' does not support hotplugging",
+ dev->parent_bus->name);
return;
}