[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/45] vl: rename local variable in configure_accelerators
From: |
Paolo Bonzini |
Subject: |
[PULL 29/45] vl: rename local variable in configure_accelerators |
Date: |
Tue, 15 Dec 2020 12:54:29 -0500 |
Silly patch extracted from the next one, which is already big enough.
Because there are already local variables named "accel", we will name
the global vl.c variable for "-M accel" accelerators instead. Rename
it already in configure_accelerators to be ready.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
softmmu/vl.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index c56e6dc0b3..0ed5c5ba93 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2159,17 +2159,17 @@ static int do_configure_accelerator(void *opaque,
QemuOpts *opts, Error **errp)
static void configure_accelerators(const char *progname)
{
- const char *accel;
+ const char *accelerators;
bool init_failed = false;
qemu_opts_foreach(qemu_find_opts("icount"),
do_configure_icount, NULL, &error_fatal);
- accel = qemu_opt_get(qemu_get_machine_opts(), "accel");
+ accelerators = qemu_opt_get(qemu_get_machine_opts(), "accel");
if (QTAILQ_EMPTY(&qemu_accel_opts.head)) {
char **accel_list, **tmp;
- if (accel == NULL) {
+ if (accelerators == NULL) {
/* Select the default accelerator */
bool have_tcg = accel_find("tcg");
bool have_kvm = accel_find("kvm");
@@ -2177,21 +2177,21 @@ static void configure_accelerators(const char *progname)
if (have_tcg && have_kvm) {
if (g_str_has_suffix(progname, "kvm")) {
/* If the program name ends with "kvm", we prefer KVM */
- accel = "kvm:tcg";
+ accelerators = "kvm:tcg";
} else {
- accel = "tcg:kvm";
+ accelerators = "tcg:kvm";
}
} else if (have_kvm) {
- accel = "kvm";
+ accelerators = "kvm";
} else if (have_tcg) {
- accel = "tcg";
+ accelerators = "tcg";
} else {
error_report("No accelerator selected and"
" no default accelerator available");
exit(1);
}
}
- accel_list = g_strsplit(accel, ":", 0);
+ accel_list = g_strsplit(accelerators, ":", 0);
for (tmp = accel_list; *tmp; tmp++) {
/*
@@ -2207,7 +2207,7 @@ static void configure_accelerators(const char *progname)
}
g_strfreev(accel_list);
} else {
- if (accel != NULL) {
+ if (accelerators != NULL) {
error_report("The -accel and \"-machine accel=\" options are
incompatible");
exit(1);
}
--
2.26.2
- [PULL 26/45] kvm: Take into account the unaligned section size when preparing bitmap, (continued)
- [PULL 26/45] kvm: Take into account the unaligned section size when preparing bitmap, Paolo Bonzini, 2020/12/15
- [PULL 25/45] scsi: fix device removal race vs IO restart callback on resume, Paolo Bonzini, 2020/12/15
- [PULL 27/45] qemu-option: simplify search for end of key, Paolo Bonzini, 2020/12/15
- [PULL 36/45] tests: remove GCC < 4 fallbacks, Paolo Bonzini, 2020/12/15
- [PULL 32/45] qemu/atomic: Drop special case for unsupported compiler, Paolo Bonzini, 2020/12/15
- [PULL 35/45] qemu-plugin.h: remove GCC < 4, Paolo Bonzini, 2020/12/15
- [PULL 42/45] linux-user: remove GNUC check, Paolo Bonzini, 2020/12/15
- [PULL 20/45] accel/tcg: Remove deprecated '-tb-size' option, Paolo Bonzini, 2020/12/15
- [PULL 28/45] qemu-option: pass QemuOptsList to opts_accepts_any, Paolo Bonzini, 2020/12/15
- [PULL 24/45] icount: improve exec nocache usage, Paolo Bonzini, 2020/12/15
- [PULL 29/45] vl: rename local variable in configure_accelerators,
Paolo Bonzini <=
- [PULL 31/45] hw/core: Restrict 'fw-path-provider.c' to system mode emulation, Paolo Bonzini, 2020/12/15
- [PULL 33/45] accel/tcg: Remove special case for GCC < 4.6, Paolo Bonzini, 2020/12/15
- [PULL 30/45] docs: set CONFDIR when running sphinx, Paolo Bonzini, 2020/12/15
- [PULL 37/45] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON, Paolo Bonzini, 2020/12/15
- [PULL 34/45] compiler.h: remove GCC < 3 __builtin_expect fallback, Paolo Bonzini, 2020/12/15
- [PULL 39/45] poison: remove GNUC check, Paolo Bonzini, 2020/12/15
- [PULL 38/45] compiler.h: explicit case for Clang printf attribute, Paolo Bonzini, 2020/12/15
- [PULL 41/45] compiler: remove GNUC check, Paolo Bonzini, 2020/12/15
- [PULL 19/45] memory: clamp cached translation in case it points to an MMIO region, Paolo Bonzini, 2020/12/15
- [PULL 44/45] scripts/git.orderfile: Keep files with .inc extension sorted, Paolo Bonzini, 2020/12/15