From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF3Qr-0002A1-1z for qemu-devel@nongnu.org; Tue, 03 Apr 2012 09:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SF3Qk-0000ME-Vv for qemu-devel@nongnu.org; Tue, 03 Apr 2012 09:05:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF3Qk-0000Lu-MU for qemu-devel@nongnu.org; Tue, 03 Apr 2012 09:05:50 -0400 Message-ID: <4F7AF5A9.1070209@redhat.com> Date: Tue, 03 Apr 2012 15:05:45 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1333451753-3550-1-git-send-email-pbonzini@redhat.com> <1333451753-3550-8-git-send-email-pbonzini@redhat.com> <4F7AECF5.3020402@siemens.com> In-Reply-To: <4F7AECF5.3020402@siemens.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/25] qdev: use object_property_print in info qtree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, afaerber@suse.de Il 03/04/2012 14:28, Jan Kiszka ha scritto: >> > if (object_property_get_type(OBJECT(dev), legacy_name, NULL)) { >> > value = object_property_get_str(OBJECT(dev), legacy_name, &err); > This is not a criticism on this patch, but I'd like to underline that > the line above only works because legacy props also define print ^^^^ You mean always, I guess. > But this statement above is still inconsistent. We should either > assert(print && parse) or handle their non-existence properly. Yes, asserting that print/parse are always present in pairs (if at all) would be good. Paolo