aboutsummaryrefslogtreecommitdiff
path: root/qdev-monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 8f9f6cb45f..753bab7545 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -481,6 +481,12 @@ DeviceState *qdev_device_add(QemuOpts *opts)
return NULL;
}
+ if (object_class_is_abstract(oc)) {
+ qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver",
+ "non-abstract device type");
+ return NULL;
+ }
+
dc = DEVICE_CLASS(oc);
/* find bus */