From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXfg7-0005RO-7w for qemu-devel@nongnu.org; Thu, 24 May 2012 17:34:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXfg1-0002Ch-Fo for qemu-devel@nongnu.org; Thu, 24 May 2012 17:34:38 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43224 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXfg1-00029g-82 for qemu-devel@nongnu.org; Thu, 24 May 2012 17:34:33 -0400 Message-ID: <4FBEA960.2080409@suse.de> Date: Thu, 24 May 2012 23:34:24 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1337787881-3579-1-git-send-email-pbonzini@redhat.com> <1337787881-3579-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1337787881-3579-3-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 02/10] qdev: remove qdev_prop_exists List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: imammedo@redhat.com, qemu-devel@nongnu.org, peter.maydell@linaro.org Am 23.05.2012 17:44, schrieb Paolo Bonzini: > Can be replaced everywhere with object_property_find. >=20 > Signed-off-by: Paolo Bonzini [...] > diff --git a/include/qemu/object.h b/include/qemu/object.h > index 5fd2270..b7efc63 100644 > --- a/include/qemu/object.h > +++ b/include/qemu/object.h > @@ -636,6 +636,15 @@ void object_property_add(Object *obj, const char *= name, const char *type, > =20 > void object_property_del(Object *obj, const char *name, struct Error *= *errp); > =20 > +/** > + * object_property_find: > + * @obj: the object > + * @name: the name of the property > + * > + * Look up a property for an object and return its #ObjectProperty if = found. > + */ > +ObjectProperty *object_property_find(Object *obj, const char *name); > + > void object_unparent(Object *obj); > =20 > /** > diff --git a/qom/object.c b/qom/object.c > index 4b410f1..13fd157 100644 > --- a/qom/object.c > +++ b/qom/object.c > @@ -662,7 +662,7 @@ void object_property_add(Object *obj, const char *n= ame, const char *type, > QTAILQ_INSERT_TAIL(&obj->properties, prop, node); > } > =20 > -static ObjectProperty *object_property_find(Object *obj, const char *n= ame) > +ObjectProperty *object_property_find(Object *obj, const char *name) > { > ObjectProperty *prop; > =20 Any reason not to expose a bool object_property_exists() instead? Is the ObjectProperty actually used somewhere? Andreas --=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