mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
qom: Use object_get_container()
Use object_get_container() whenever applicable across the tree. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20241121192202.4155849-13-peterx@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
180e8f16f0
commit
d3176a9f38
6 changed files with 8 additions and 8 deletions
|
@ -97,7 +97,7 @@ static int qmp_query_cryptodev_foreach(Object *obj, void *data)
|
|||
QCryptodevInfoList *qmp_query_cryptodev(Error **errp)
|
||||
{
|
||||
QCryptodevInfoList *list = NULL;
|
||||
Object *objs = container_get(object_get_root(), "/objects");
|
||||
Object *objs = object_get_container("objects");
|
||||
|
||||
object_child_foreach(objs, qmp_query_cryptodev_foreach, &list);
|
||||
|
||||
|
@ -557,7 +557,7 @@ static void cryptodev_backend_stats_cb(StatsResultList **result,
|
|||
switch (target) {
|
||||
case STATS_TARGET_CRYPTODEV:
|
||||
{
|
||||
Object *objs = container_get(object_get_root(), "/objects");
|
||||
Object *objs = object_get_container("objects");
|
||||
StatsArgs stats_args;
|
||||
stats_args.result.stats = result;
|
||||
stats_args.names = names;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
Object *get_chardevs_root(void)
|
||||
{
|
||||
return container_get(object_get_root(), "/chardevs");
|
||||
return object_get_container("chardevs");
|
||||
}
|
||||
|
||||
static void chr_be_event(Chardev *s, QEMUChrEvent event)
|
||||
|
|
|
@ -1774,7 +1774,7 @@ Object *object_get_root(void)
|
|||
|
||||
Object *object_get_objects_root(void)
|
||||
{
|
||||
return container_get(object_get_root(), "/objects");
|
||||
return object_get_container("objects");
|
||||
}
|
||||
|
||||
Object *object_get_internal_root(void)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "qemu/module.h"
|
||||
#include "qapi/qapi-commands-block.h"
|
||||
|
||||
#define PR_MANAGER_PATH "/objects"
|
||||
#define PR_MANAGER_PATH "objects"
|
||||
|
||||
typedef struct PRManagerData {
|
||||
PRManager *pr_mgr;
|
||||
|
@ -135,7 +135,7 @@ PRManagerInfoList *qmp_query_pr_managers(Error **errp)
|
|||
{
|
||||
PRManagerInfoList *head = NULL;
|
||||
PRManagerInfoList **prev = &head;
|
||||
Object *container = container_get(object_get_root(), PR_MANAGER_PATH);
|
||||
Object *container = object_get_container(PR_MANAGER_PATH);
|
||||
|
||||
object_child_foreach(container, query_one_pr_manager, &prev);
|
||||
return head;
|
||||
|
|
|
@ -1160,7 +1160,7 @@ DisplayState *init_displaystate(void)
|
|||
* all QemuConsoles are created and the order / numbering
|
||||
* doesn't change any more */
|
||||
name = g_strdup_printf("console[%d]", con->index);
|
||||
object_property_add_child(container_get(object_get_root(), "/backend"),
|
||||
object_property_add_child(object_get_container("backend"),
|
||||
name, OBJECT(con));
|
||||
g_free(name);
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ dbus_chardev_init(DBusDisplay *dpy)
|
|||
dpy->notifier.notify = dbus_display_on_notify;
|
||||
dbus_display_notifier_add(&dpy->notifier);
|
||||
|
||||
object_child_foreach(container_get(object_get_root(), "/chardevs"),
|
||||
object_child_foreach(object_get_container("chardevs"),
|
||||
dbus_display_chardev_foreach, dpy);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue