From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjSWj-0001C8-M2 for qemu-devel@nongnu.org; Sun, 11 May 2014 08:06:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjSWa-0003m0-Dx for qemu-devel@nongnu.org; Sun, 11 May 2014 08:06:45 -0400 Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]:41659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjSWa-0003ll-5z for qemu-devel@nongnu.org; Sun, 11 May 2014 08:06:36 -0400 Received: by mail-wg0-f51.google.com with SMTP id x13so5784171wgg.22 for ; Sun, 11 May 2014 05:06:35 -0700 (PDT) Date: Sun, 11 May 2014 13:06:28 +0100 From: Hani Benhabiles Message-ID: <20140511120628.GB4487@Inspiron-3521> References: <1398594570-14015-1-git-send-email-kroosec@gmail.com> <20140505143330.0d9794ab@redhat.com> <536A1278.1070506@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <536A1278.1070506@redhat.com> Subject: Re: [Qemu-devel] [PATCH] monitor: Add info qom-tree subcommand. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: armbru@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org, afaerber@suse.de, Luiz Capitulino On Wed, May 07, 2014 at 01:01:12PM +0200, Paolo Bonzini wrote: > Il 05/05/2014 20:33, Luiz Capitulino ha scritto: > >>+ data = object_property_get_qobject(obj, info->name, NULL); > >>+ if (!data) { > >>+ list = list->next; > >>+ continue; > > You could use object_property_print and get rid of a relatively large amount > of code. Thanks for pointing that. But StringOutputVisitor doesn't have handlers for structs and lists like QMP countrepart so the call segfaults when used against object properties using that. ie. Unless I am missing something, I should add those handlers to the string visitor before being able to use object_property_print(), right ? > Apart from this, the patch is definitely useful.