On 21/11/24 20:22, Peter Xu wrote:
Use object_get_container() whenever applicable across the tree.
Signed-off-by: Peter Xu <pet...@redhat.com>
---
backends/cryptodev.c | 4 ++--
chardev/char.c | 2 +-
qom/object.c | 2 +-
scsi/pr-manager.c | 4 ++--
ui/console.c | 2 +-
ui/dbus-chardev.c | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/scsi/pr-manager.c b/scsi/pr-manager.c
index fb5fc29730..1977d99ce0 100644
--- a/scsi/pr-manager.c
+++ b/scsi/pr-manager.c
@@ -21,7 +21,7 @@
#include "qemu/module.h"
#include "qapi/qapi-commands-block.h"
-#define PR_MANAGER_PATH "/objects"
+#define PR_MANAGER_PATH "objects"
We can probably inline this string, since the definition isn't
really useful (and match the other uses). Anyway,
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>
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;