diff options
author | Andreas Färber | 2012-04-05 13:21:46 +0200 |
---|---|---|
committer | Anthony Liguori | 2012-04-24 16:50:31 +0200 |
commit | dfe47e7029e117f65a14c0948021654f7f7d5d05 (patch) | |
tree | 9831f047090bf7bb7c58959741aad546221cb862 /include/qemu | |
parent | qtest: Fix tv_usec != long (diff) | |
download | qemu-dfe47e7029e117f65a14c0948021654f7f7d5d05.tar.gz qemu-dfe47e7029e117f65a14c0948021654f7f7d5d05.tar.xz qemu-dfe47e7029e117f65a14c0948021654f7f7d5d05.zip |
qom: Refine container_get() to allow using a custom root
Specify the root to search from as argument. This avoids hardcoding
"/machine" in some places and makes it more flexible.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/object.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/qemu/object.h b/include/qemu/object.h index a675937da1..ca1649c918 100644 --- a/include/qemu/object.h +++ b/include/qemu/object.h @@ -905,6 +905,7 @@ void object_property_add_str(Object *obj, const char *name, /** * container_get: + * @root: root of the #path, e.g., object_get_root() * @path: path to the container * * Return a container object whose path is @path. Create more containers @@ -912,7 +913,7 @@ void object_property_add_str(Object *obj, const char *name, * * Returns: the container object. */ -Object *container_get(const char *path); +Object *container_get(Object *root, const char *path); #endif |