diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2015-05-13 17:14:05 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2015-06-19 18:40:00 +0200 |
commit | bc2256c4ae86308a1521c89456b599d441119418 (patch) | |
tree | 8a9a2cb0a8d570459730143e3326ea0572054f93 /qom | |
parent | f08f9271bfe3f19a5eb3d7a2f48532065304d5c8 (diff) |
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>
Diffstat (limited to 'qom')
-rw-r--r-- | qom/object.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qom/object.c b/qom/object.c index d142d15644..69b7077c2b 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1054,6 +1054,11 @@ Object *object_get_root(void) return root; } +Object *object_get_objects_root(void) +{ + return container_get(object_get_root(), "/objects"); +} + static void object_get_child_property(Object *obj, Visitor *v, void *opaque, const char *name, Error **errp) { |