@@ -17,9 +17,6 @@
* add new ones!
*/
-#define QERR_DEVICE_NO_HOTPLUG \
- "Device '%s' does not support hotplugging"
-
#define QERR_INVALID_PARAMETER \
"Invalid parameter '%s'"
@@ -29,7 +29,6 @@
#include "qapi/error.h"
#include "qapi/qapi-events-qdev.h"
#include "qapi/qmp/qdict.h"
-#include "qapi/qmp/qerror.h"
#include "qapi/visitor.h"
#include "qemu/error-report.h"
#include "qemu/option.h"
@@ -479,7 +478,8 @@ static void device_set_realized(Object *obj, bool value, Error **errp)
static int unattached_count;
if (dev->hotplugged && !dc->hotpluggable) {
- error_setg(errp, QERR_DEVICE_NO_HOTPLUG, object_get_typename(obj));
+ error_setg(errp, "Device '%s' does not support hotplugging",
+ object_get_typename(obj));
return;
}
@@ -917,7 +917,7 @@ void qdev_unplug(DeviceState *dev, Error **errp)
}
if (!dc->hotpluggable) {
- error_setg(errp, QERR_DEVICE_NO_HOTPLUG,
+ error_setg(errp, "Device '%s' does not support hotplugging",
object_get_typename(OBJECT(dev)));
return;
}