Am 24.05.2012 13:43, schrieb Markus Armbruster: > Beware: second patch is the product of voodoo-coding.
Hm, I don't like the voodoo. ;) I would rather expose a proper C API like object_try_new(const char *, Error **) than opening up the TypeImpl internals to the public and hand-coding it everywhere. I ran into a similar error-catching scenario where I needed to check for class existence in some qdev_try_* function. And there were still too many asserts in the QOM core for my taste. The QMP command itself looks good to me. Andreas > Markus Armbruster (2): > qom: Give type_get_by_name() external linkage > qmp: New command qom-new > > include/qemu/object.h | 8 ++++++++ > qapi-schema.json | 22 ++++++++++++++++++++++ > qmp-commands.hx | 5 +++++ > qmp.c | 27 +++++++++++++++++++++++++++ > qom/object.c | 2 +- > 5 files changed, 63 insertions(+), 1 deletions(-) -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg