On Tue, Mar 04, 2014 at 03:00:39PM +0100, Paolo Bonzini wrote: > Use QERR_INVALID_PARAMETER_VALUE for consistency, and avoid an assertion > failure if the class name is incorrect. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > qmp.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/qmp.c b/qmp.c > index 2ff943d..a3b0b73 100644 > --- a/qmp.c > +++ b/qmp.c > @@ -541,7 +541,8 @@ void object_add(const char *type, const char *id, const > QDict *qdict, > Error *local_err = NULL; > > if (!object_class_by_name(type)) { > - error_setg(errp, "invalid class name"); > + error_set(errp, QERR_INVALID_PARAMETER_VALUE, > + "qom-type", "a valid class name"); > return; > } > > @@ -556,8 +557,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, "class '%s' isn't supported by object-add", > + type); > goto out; > }
There is already an accepted version de580dafade551. Paolo, I found that your numa tree is behind current master about 99 commits. I'd like to take over this series if you have no time on it.