summaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
authorAlexander Graf <agraf@csgraf.de>2022-06-24 15:42:56 +0100
committerPeter Maydell <peter.maydell@linaro.org>2022-06-27 11:18:17 +0100
commit55bd445c4195966675236936c0a8642f1965dddb (patch)
tree60f42772a34decbea78de9cb46dd0913a7a87510 /softmmu
parentba1a6723f58640ba281bc952abc255e97c70bad5 (diff)
accel: Introduce current_accel_name()
We need to fetch the name of the current accelerator in flexible error messages more going forward. Let's create a helper that gives it to us without casting in the target code. Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220620192242.70573-1-agraf@csgraf.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/vl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 54e920ada1..3dca5936c7 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2271,8 +2271,7 @@ static void configure_accelerators(const char *progname)
}
if (init_failed && !qtest_chrdev) {
- AccelClass *ac = ACCEL_GET_CLASS(current_accel());
- error_report("falling back to %s", ac->name);
+ error_report("falling back to %s", current_accel_name());
}
if (icount_enabled() && !tcg_enabled()) {