From 3d881164d4fb2b0f6791cf28d9725926b8ded0d6 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Sun, 23 Mar 2025 12:47:37 +0100 Subject: qemu: Convert target_name() to TargetInfo API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Have target_name() be a target-agnostic method, dispatching to a per-target TargetInfo singleton structure. By default a stub singleton is used. No logical change expected. Inspired-by: Pierrick Bouvier Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20250424222112.36194-3-philmd@linaro.org> --- target-info.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 target-info.c (limited to 'target-info.c') diff --git a/target-info.c b/target-info.c new file mode 100644 index 0000000000..84b18931e7 --- /dev/null +++ b/target-info.c @@ -0,0 +1,16 @@ +/* + * QEMU target info helpers + * + * Copyright (c) Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/target-info.h" +#include "qemu/target-info-impl.h" + +const char *target_name(void) +{ + return target_info()->target_name; +} -- cgit 1.4.1