diff options
author | Peter Xu <peterx@redhat.com> | 2024-11-21 14:22:02 -0500 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-01-09 18:16:24 +0100 |
commit | f6f0284b6fd495c4a0d7d3b91317105d8e1a8bf3 (patch) | |
tree | 850e44bafe9707d2aa13c2983c407134399d37a4 | |
parent | d3176a9f387f8b6b56882045d36f5b3f82565d90 (diff) | |
download | qemu-f6f0284b6fd495c4a0d7d3b91317105d8e1a8bf3.zip qemu-f6f0284b6fd495c4a0d7d3b91317105d8e1a8bf3.tar.gz qemu-f6f0284b6fd495c4a0d7d3b91317105d8e1a8bf3.tar.bz2 |
qom: Remove container_get()
Now there's no user of container_get(), remove it.
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241121192202.4155849-14-peterx@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r-- | include/qom/object.h | 11 | ||||
-rw-r--r-- | qom/container.c | 23 |
2 files changed, 0 insertions, 34 deletions
diff --git a/include/qom/object.h b/include/qom/object.h index bcf9910..7793557 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -2017,17 +2017,6 @@ int object_child_foreach(Object *obj, int (*fn)(Object *child, void *opaque), int object_child_foreach_recursive(Object *obj, int (*fn)(Object *child, void *opaque), void *opaque); -/** - * container_get: - * @root: root of the #path, e.g., object_get_root() - * @path: path to the container - * - * Return a container object whose path is @path. Create more containers - * along the path if necessary. - * - * Returns: the container object. - */ -Object *container_get(Object *root, const char *path); /** * object_property_add_new_container: diff --git a/qom/container.c b/qom/container.c index 20ab74b..38a27ec 100644 --- a/qom/container.c +++ b/qom/container.c @@ -34,27 +34,4 @@ Object *object_property_add_new_container(Object *obj, const char *name) return child; } -Object *container_get(Object *root, const char *path) -{ - Object *obj, *child; - char **parts; - int i; - - parts = g_strsplit(path, "/", 0); - assert(parts != NULL && parts[0] != NULL && !parts[0][0]); - obj = root; - - for (i = 1; parts[i] != NULL; i++, obj = child) { - child = object_resolve_path_component(obj, parts[i]); - if (!child) { - child = object_property_add_new_container(obj, parts[i]); - } - } - - g_strfreev(parts); - - return obj; -} - - type_init(container_register_types) |