object: Report type in error when not user creatable.
PATCH 1/1 object: Report type in error when not user creatable.
Signed-off-by Hani Benhabiles <[email protected]>
--- qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
qmp.c +2 -2
@@ -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; }
Signature · 1 line
1.8.3.2
cced: Igor
Quoted 10 lines · Hani Benhabiles
Signed-off-by Hani Benhabiles <[email protected]>--- qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)qmp.c +0
-0
qmp.c void object_add(const char *type, const char *id, const QDict *qdict, · line 562
Quoted 9 lines
qmp.c +2
-2@@ -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; }
Same problem here. In the case what we should let user know is the type of object, instead of id which is just a normal property of object.
Reviewed-by Hu Tao <[email protected]>
Il 18/02/2014 23:42, Hani Benhabiles ha scritto:
Quoted 11 lines
Signed-off-by Hani Benhabiles <[email protected]>--- qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)qmp.c +0
-0
qmp.c void object_add(const char *type, const char *id, const QDict *qdict, · line 563
Quoted 10 lines
qmp.c +2
-2@@ -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; }
Acked-by Paolo Bonzini <[email protected]>
Paolo
Michael Tokarev
AppliedThanks, applied to the trivial patches queue.
/mjt