diff options
-rw-r--r-- | qdev-monitor.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c index 410cdcbe97..bb2e1b6ab9 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -472,6 +472,12 @@ DeviceState *qdev_device_add(QemuOpts *opts) return NULL; } + if (object_class_is_abstract(obj)) { + qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", + "non-abstract device type"); + return NULL; + } + k = DEVICE_CLASS(obj); /* find bus */ |