[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qom: Document ways to retrieve child object add
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] qom: Document ways to retrieve child object added by object_property_add_child() |
Date: |
Tue, 21 Feb 2012 11:16:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 |
On 02/21/2012 11:14 AM, address@hidden wrote:
> From: Alexander Barabash <address@hidden>
>
> object_property_add_child() creates a property whose values as a string is
> the child object's canonical path.
>
> Signed-off-by: Alexander Barabash <address@hidden>
> ---
> include/qemu/object.h | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/include/qemu/object.h b/include/qemu/object.h
> index ba2409d..d9e9221 100644
> --- a/include/qemu/object.h
> +++ b/include/qemu/object.h
> @@ -808,6 +808,10 @@ Object *object_resolve_path_type(const char *path, const
> char *typename,
> *
> * There is no way for a child to determine what its parent is. It is not
> * a bidirectional relationship. This is by design.
> + *
> + * The value of a child property as a C string will be the child object's
> + * canonical path. It can be retrieved using object_property_get_str().
> + * The child object itself can be retrieved using object_property_get_link().
> */
> void object_property_add_child(Object *obj, const char *name,
> Object *child, struct Error **errp);
Acked-by: Paolo Bonzini <address@hidden>