[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/9] target/s390x/cpu_models: Rework the output of "-cpu help"
From: |
Michael Tokarev |
Subject: |
[PULL 2/9] target/s390x/cpu_models: Rework the output of "-cpu help" |
Date: |
Mon, 29 Apr 2024 09:45:29 +0300 |
From: Thomas Huth <thuth@redhat.com>
Printing an "s390x" in front of each CPU name is not helpful at all:
It is confusing for the users since they don't know whether they
have to specify these letters for the "-cpu" parameter, too, and
it also takes some precious space in the dense output of the CPU
entries. Let's simply remove this now!
While we're at it, use two spaces at the beginning of the lines for
the indentation of the entries, and add a "Available CPUs" in the
very first line, like most other target architectures are doing it
for their "-cpu help" output already.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
target/s390x/cpu_models.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 8ed3bb6a27..58c58f05a0 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -355,9 +355,9 @@ static void s390_print_cpu_model_list_entry(gpointer data,
gpointer user_data)
/* strip off the -s390x-cpu */
g_strrstr(name, "-" TYPE_S390_CPU)[0] = 0;
if (details->len) {
- qemu_printf("s390 %-15s %-35s (%s)\n", name, scc->desc, details->str);
+ qemu_printf(" %-15s %-35s (%s)\n", name, scc->desc, details->str);
} else {
- qemu_printf("s390 %-15s %-35s\n", name, scc->desc);
+ qemu_printf(" %-15s %-35s\n", name, scc->desc);
}
g_free(name);
}
@@ -402,6 +402,7 @@ void s390_cpu_list(void)
S390Feat feat;
GSList *list;
+ qemu_printf("Available CPUs:\n");
list = object_class_get_list(TYPE_S390_CPU, false);
list = g_slist_sort(list, s390_cpu_list_compare);
g_slist_foreach(list, s390_print_cpu_model_list_entry, NULL);
@@ -411,14 +412,14 @@ void s390_cpu_list(void)
for (feat = 0; feat < S390_FEAT_MAX; feat++) {
const S390FeatDef *def = s390_feat_def(feat);
- qemu_printf("%-20s %s\n", def->name, def->desc);
+ qemu_printf(" %-20s %s\n", def->name, def->desc);
}
qemu_printf("\nRecognized feature groups:\n");
for (group = 0; group < S390_FEAT_GROUP_MAX; group++) {
const S390FeatGroupDef *def = s390_feat_group_def(group);
- qemu_printf("%-20s %s\n", def->name, def->desc);
+ qemu_printf(" %-20s %s\n", def->name, def->desc);
}
}
--
2.39.2
- [PULL 0/9] Trivial patches for 2024-04-29, Michael Tokarev, 2024/04/29
- [PULL 7/9] target/loongarch/cpu.c: typo fix: expection, Michael Tokarev, 2024/04/29
- [PULL 1/9] target/i386/cpu: Remove "x86" prefix from the CPU list, Michael Tokarev, 2024/04/29
- [PULL 4/9] scripts/checkpatch: Avoid author email mangled by qemu-*@nongnu.org, Michael Tokarev, 2024/04/29
- [PULL 6/9] backends/cryptodev-builtin: Fix local_error leaks, Michael Tokarev, 2024/04/29
- [PULL 2/9] target/s390x/cpu_models: Rework the output of "-cpu help",
Michael Tokarev <=
- [PULL 3/9] target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list, Michael Tokarev, 2024/04/29
- [PULL 9/9] checkpatch.pl: forbid strerrorname_np(), Michael Tokarev, 2024/04/29
- [PULL 5/9] scripts/checkpatch: Do not use mailmap, Michael Tokarev, 2024/04/29
- [PULL 8/9] target/riscv/kvm: remove sneaky strerrorname_np() instance, Michael Tokarev, 2024/04/29