Received: from eggs.gnu.org ([2001:4830:134:3::10]:33041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkyKj-0001xa-0J for qemu-devel@nongnu.org; Thu, 15 May 2014 12:16:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkyKc-00060m-SW for qemu-devel@nongnu.org; Thu, 15 May 2014 12:16:36 -0400 From: Markus Armbruster References: <1399473780-20374-1-git-send-email-marcel.a@redhat.com> <1399473780-20374-4-git-send-email-marcel.a@redhat.com> Date: Thu, 15 May 2014 18:15:55 +0200 In-Reply-To: <1399473780-20374-4-git-send-email-marcel.a@redhat.com> (Marcel Apfelbaum's message of "Wed, 7 May 2014 17:42:59 +0300") Message-ID: <87ha4rqapw.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 3/4] vl.c: do not set 'type' property in obj_set_property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: mst@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org, lcapitulino@redhat.com, blauwirbel@gmail.com, jcmvbkbc@gmail.com, edgar.iglesias@gmail.com, gxt@mprc.pku.edu.cn, peter.chubb@nicta.com.au, proljc@gmail.com, agraf@suse.de, scottwood@freescale.com, borntraeger@de.ibm.com, hpoussin@reactos.org, aliguori@amazon.com, lersek@redhat.com, mdroth@linux.vnet.ibm.com, chouteau@adacore.com, jan.kiszka@web.de, stefanha@redhat.com, cornelia.huck@de.ibm.com, peter.crosthwaite@xilinx.com, mark.langsdorf@calxeda.com, michael@walle.cc, qemu-ppc@nongnu.org, pbonzini@redhat.com, afaerber@suse.de, aurelien@aurel32.net Marcel Apfelbaum writes: > Filter out also 'type' property when setting > object's properties > > Reviewed-by: Paolo Bonzini > Signed-off-by: Marcel Apfelbaum > --- > vl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/vl.c b/vl.c > index 58673bd..6ec6c1a 100644 > --- a/vl.c > +++ b/vl.c > @@ -2889,7 +2889,8 @@ static int object_set_property(const char *name, const char *value, void *opaque > StringInputVisitor *siv; > Error *local_err = NULL; > > - if (strcmp(name, "qom-type") == 0 || strcmp(name, "id") == 0) { > + if (strcmp(name, "qom-type") == 0 || strcmp(name, "id") == 0 || > + strcmp(name, "type") == 0) { > return 0; > } I can see why "id" and "qom-type" need to be filtered out: they're consumed by object_create() before object_set_property() gets called. I can't see why "type". Explain?