From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQNqu-0000ta-J1 for qemu-devel@nongnu.org; Wed, 19 Mar 2014 17:16:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQNqn-0008PL-7n for qemu-devel@nongnu.org; Wed, 19 Mar 2014 17:16:44 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58242 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQNqn-0008PE-12 for qemu-devel@nongnu.org; Wed, 19 Mar 2014 17:16:37 -0400 Message-ID: <532A0933.8010604@suse.de> Date: Wed, 19 Mar 2014 22:16:35 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1395215937-22987-1-git-send-email-stefanha@redhat.com> <1395215937-22987-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1395215937-22987-2-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RESEND v4 1/5] qom: split object_property_set_link() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Paolo Bonzini , Anthony Liguori , Peter Maydell Am 19.03.2014 08:58, schrieb Stefan Hajnoczi: > The path resolution logic in object_property_set_link() should be a > separate function. This makes the code easier to read and maintain. >=20 > Signed-off-by: Stefan Hajnoczi > --- > qom/object.c | 59 +++++++++++++++++++++++++++++++++++++++-------------= ------- > 1 file changed, 39 insertions(+), 20 deletions(-) >=20 > diff --git a/qom/object.c b/qom/object.c > index a2a1ffa..da49474 100644 > --- a/qom/object.c > +++ b/qom/object.c > @@ -1039,17 +1039,49 @@ static void object_get_link_property(Object *ob= j, Visitor *v, void *opaque, > } > } > =20 > +/* object_resolve_link: I've taken the liberty to adopt the recommended style for non-header gtk-doc comments here, using a single /* rather than /** line. Andreas > + * > + * Lookup an object and ensure its type matches the link property type= . This > + * is similar to object_resolve_path() except type verification agains= t the > + * link property is performed. > + * > + * Returns: The matched object or NULL on path lookup failures. > + */ > +static Object *object_resolve_link(Object *obj, const char *name, > + const char *path, Error **errp) [snip] --=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