From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXXDa-0004mq-GT for qemu-devel@nongnu.org; Thu, 24 May 2012 08:32:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXXDY-0001lr-T5 for qemu-devel@nongnu.org; Thu, 24 May 2012 08:32:38 -0400 Received: from cantor2.suse.de ([195.135.220.15]:46294 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXXDY-0001lZ-NI for qemu-devel@nongnu.org; Thu, 24 May 2012 08:32:36 -0400 Message-ID: <4FBE2A59.3060701@suse.de> Date: Thu, 24 May 2012 14:32:25 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1337859784-24097-1-git-send-email-armbru@redhat.com> In-Reply-To: <1337859784-24097-1-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RFC 0/2] QMP command qom-new List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, anthony@codemonkey.ws 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 >=20 > 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(-) --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg