mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
qom: Add helper function for getting user objects root
Add object_get_objects_root() function which is a convenience for obtaining the Object * located at /objects in the object composition tree. Convert existing code over to use the new API where appropriate. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
f08f9271bf
commit
bc2256c4ae
5 changed files with 22 additions and 7 deletions
2
numa.c
2
numa.c
|
@ -485,7 +485,7 @@ MemdevList *qmp_query_memdev(Error **errp)
|
|||
Object *obj;
|
||||
MemdevList *list = NULL;
|
||||
|
||||
obj = object_resolve_path("/objects", NULL);
|
||||
obj = object_get_objects_root();
|
||||
if (obj == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue