diff mbox series

[RFC,07/11] plugins/loader: populate target_name with target_name()

Message ID 20250305005225.95051-8-philmd@linaro.org
State New
Headers show
Series qemu: Remove TARGET_NAME definition | expand

Commit Message

Philippe Mathieu-Daudé March 5, 2025, 12:52 a.m. UTC
From: Alex Bennée <alex.bennee@linaro.org>

We have a function we can call for this, lets not rely on macros that
stop us building once.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 plugins/loader.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/plugins/loader.c b/plugins/loader.c
index 99686b54666..e56c1003c27 100644
--- a/plugins/loader.c
+++ b/plugins/loader.c
@@ -29,6 +29,7 @@ 
 #include "qemu/xxhash.h"
 #include "qemu/plugin.h"
 #include "qemu/memalign.h"
+#include "qemu/arch_info.h"
 #include "hw/core/cpu.h"
 #include "exec/tb-flush.h"
 #ifndef CONFIG_USER_ONLY
@@ -297,7 +298,7 @@  int qemu_plugin_load_list(QemuPluginList *head, Error **errp)
     struct qemu_plugin_desc *desc, *next;
     g_autofree qemu_info_t *info = g_new0(qemu_info_t, 1);
 
-    info->target_name = TARGET_NAME;
+    info->target_name = target_name();
     info->version.min = QEMU_PLUGIN_MIN_VERSION;
     info->version.cur = QEMU_PLUGIN_VERSION;
 #ifndef CONFIG_USER_ONLY