From bc2256c4ae86308a1521c89456b599d441119418 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 13 May 2015 17:14:05 +0100 Subject: qom: Add helper function for getting user objects root MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Eric Blake Signed-off-by: Andreas Färber --- iothread.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'iothread.c') diff --git a/iothread.c b/iothread.c index 878a594ef4..6d2a33faf9 100644 --- a/iothread.c +++ b/iothread.c @@ -19,8 +19,6 @@ #include "qmp-commands.h" #include "qemu/error-report.h" -#define IOTHREADS_PATH "/objects" - typedef ObjectClass IOThreadClass; #define IOTHREAD_GET_CLASS(obj) \ @@ -160,7 +158,7 @@ IOThreadInfoList *qmp_query_iothreads(Error **errp) { IOThreadInfoList *head = NULL; IOThreadInfoList **prev = &head; - Object *container = container_get(object_get_root(), IOTHREADS_PATH); + Object *container = object_get_objects_root(); object_child_foreach(container, query_one_iothread, &prev); return head; -- cgit v1.2.3