From: Paolo Bonzini <pbonz...@redhat.com> Use QERR_INVALID_PARAMETER_VALUE for consistency.
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Hu Tao <hu...@cn.fujitsu.com> --- qmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmp.c b/qmp.c index b722dbe..cef60fb 100644 --- a/qmp.c +++ b/qmp.c @@ -540,7 +540,8 @@ void object_add(const char *type, const char *id, const QDict *qdict, klass = object_class_by_name(type); if (!klass) { - error_setg(errp, "invalid class name"); + error_set(errp, QERR_INVALID_PARAMETER_VALUE, + "qom-type", "a valid class name"); return; } -- 1.8.5.2.229.g4448466