From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWReD-0007BS-Io for qemu-devel@nongnu.org; Fri, 02 Dec 2011 06:51:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWRe9-0007Zd-7g for qemu-devel@nongnu.org; Fri, 02 Dec 2011 06:51:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWRe8-0007ZX-Vm for qemu-devel@nongnu.org; Fri, 02 Dec 2011 06:51:17 -0500 Message-ID: <4ED8BC6E.9090904@redhat.com> Date: Fri, 02 Dec 2011 12:54:22 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1322687028-29714-1-git-send-email-aliguori@us.ibm.com> <1322687028-29714-7-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1322687028-29714-7-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 06/18] qom: add child properties (composition) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , Stefan Hajnoczi , Jan Kiszka , Markus Armbruster , qemu-devel@nongnu.org, Luiz Capitulino Am 30.11.2011 22:03, schrieb Anthony Liguori: > Child properties express a relationship of composition. > > Signed-off-by: Anthony Liguori Do we have a flag or something that makes sure that a child is never removed without its parent? The code assumes that child stays valid as long as the parent lives. > @@ -499,4 +499,24 @@ gchar *qdev_get_canonical_path(DeviceState *dev); > */ > DeviceState *qdev_resolve_path(const char *path, bool *ambiguous); > > +/** > + * @qdev_property_add_child - Add a child property to a device > + * > + * Child properties form the composition tree. All devices need to be a child > + * of another device. Devices can only be a child of one device. > + * > + * There is no way for a child to determine what it's parent is. It is not s/it's/its/ Kevin