target-info: replace target_info() in system-mode

We now can use TargetInfo information available from QOM, and remove
duplicated target_info() symbol.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260514172303.1484273-6-pierrick.bouvier@oss.qualcomm.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
This commit is contained in:
Pierrick Bouvier
2026-05-14 10:23:03 -07:00
parent 20a1a1579a
commit 669f866946
2 changed files with 5 additions and 5 deletions

View File

@@ -38,11 +38,6 @@ const TargetInfo *target_info(void) \
#include "qom/object.h"
#define target_info_init(ti_var) \
const TargetInfo *target_info(void) \
{ \
return &ti_var; \
} \
\
static const TypeInfo target_info_qom_target_type_info = { \
.name = TYPE_TARGET_INFO"-"TARGET_NAME, \
.parent = TYPE_TARGET_INFO, \

View File

@@ -49,6 +49,11 @@ DEFINE_TARGET_INFO_TYPE(target_info_parent_type)
static const TargetInfo *target_info_ptr;
const TargetInfo *target_info(void)
{
return target_info_ptr;
}
void target_info_qom_set_target(void)
{
g_autoptr(GSList) targets = object_class_get_list(TYPE_TARGET_INFO, false);