|
@@ -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;
|
|
|
}
|
|
|
|