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:
Daniel P. Berrange 2015-05-13 17:14:05 +01:00 committed by Andreas Färber
parent f08f9271bf
commit bc2256c4ae
5 changed files with 22 additions and 7 deletions

2
numa.c
View file

@ -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;
}