diff mbox series

[v2,21/32] plugins/loader: populate target_name with target_name()

Message ID 20250304222439.2035603-22-alex.bennee@linaro.org
State New
Headers show
Series maintainer updates for 10.0 softfreeze (gpu/tcg tests, plugins, MAINTAINERS) pre-PR | expand

Commit Message

Alex Bennée March 4, 2025, 10:24 p.m. UTC
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>
Message-Id: <20250226140343.3907080-17-alex.bennee@linaro.org>
---
 plugins/loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé March 5, 2025, 12:01 a.m. UTC | #1
On 4/3/25 23:24, Alex Bennée wrote:
> 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>
> Message-Id: <20250226140343.3907080-17-alex.bennee@linaro.org>
> ---
>   plugins/loader.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/plugins/loader.c b/plugins/loader.c
> index 99686b5466..827473c8b6 100644
> --- a/plugins/loader.c
> +++ b/plugins/loader.c
> @@ -297,7 +297,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();

Unfortunately the declaration is in "hw/core/cpu.h".

>       info->version.min = QEMU_PLUGIN_MIN_VERSION;
>       info->version.cur = QEMU_PLUGIN_VERSION;
>   #ifndef CONFIG_USER_ONLY
Alex Bennée March 5, 2025, 6:57 a.m. UTC | #2
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On 4/3/25 23:24, Alex Bennée wrote:
>> 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>
>> Message-Id: <20250226140343.3907080-17-alex.bennee@linaro.org>
>> ---
>>   plugins/loader.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/plugins/loader.c b/plugins/loader.c
>> index 99686b5466..827473c8b6 100644
>> --- a/plugins/loader.c
>> +++ b/plugins/loader.c
>> @@ -297,7 +297,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();
>
> Unfortunately the declaration is in "hw/core/cpu.h".

I thought that was common. It didn't break anything.

>
>>       info->version.min = QEMU_PLUGIN_MIN_VERSION;
>>       info->version.cur = QEMU_PLUGIN_VERSION;
>>   #ifndef CONFIG_USER_ONLY
diff mbox series

Patch

diff --git a/plugins/loader.c b/plugins/loader.c
index 99686b5466..827473c8b6 100644
--- a/plugins/loader.c
+++ b/plugins/loader.c
@@ -297,7 +297,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