mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
7f3bf92fad
commit
dfe47e7029
4 changed files with 10 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue