object: Report type in error when not user creatable.
Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Hu Tao <hutao@cn.fujitsu.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
1c884abede
commit
de580dafad
4
qmp.c
4
qmp.c
@ -556,8 +556,8 @@ void object_add(const char *type, const char *id, const QDict *qdict,
|
||||
}
|
||||
|
||||
if (!object_dynamic_cast(obj, TYPE_USER_CREATABLE)) {
|
||||
error_setg(&local_err, "object '%s' isn't supported by object-add",
|
||||
id);
|
||||
error_setg(&local_err, "object type '%s' isn't supported by object-add",
|
||||
type);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user