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>
This commit is contained in:
Peter Xu 2024-11-21 14:22:02 -05:00 committed by Philippe Mathieu-Daudé
parent d3176a9f38
commit f6f0284b6f
2 changed files with 0 additions and 34 deletions

View file

@ -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)