[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 3/9] target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU lis
|
From: |
Michael Tokarev |
|
Subject: |
[PULL 3/9] target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list |
|
Date: |
Mon, 29 Apr 2024 09:45:30 +0300 |
From: Thomas Huth <thuth@redhat.com>
Printing a "PowerPC" 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 and use two spaces at the
beginning of the lines for the indentation of the entries instead,
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/ppc/cpu_init.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 6d82f24c87..c11a69fd90 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -7063,7 +7063,7 @@ static void ppc_cpu_list_entry(gpointer data, gpointer
user_data)
}
name = cpu_model_from_type(typename);
- qemu_printf("PowerPC %-16s PVR %08x\n", name, pcc->pvr);
+ qemu_printf(" %-16s PVR %08x\n", name, pcc->pvr);
for (i = 0; ppc_cpu_aliases[i].alias != NULL; i++) {
PowerPCCPUAlias *alias = &ppc_cpu_aliases[i];
ObjectClass *alias_oc = ppc_cpu_class_by_name(alias->model);
@@ -7076,10 +7076,10 @@ static void ppc_cpu_list_entry(gpointer data, gpointer
user_data)
* avoid printing the wrong alias here and use "preferred" instead
*/
if (strcmp(alias->alias, family->desc) == 0) {
- qemu_printf("PowerPC %-16s (alias for preferred %s CPU)\n",
+ qemu_printf(" %-16s (alias for preferred %s CPU)\n",
alias->alias, family->desc);
} else {
- qemu_printf("PowerPC %-16s (alias for %s)\n",
+ qemu_printf(" %-16s (alias for %s)\n",
alias->alias, name);
}
}
@@ -7090,6 +7090,7 @@ void ppc_cpu_list(void)
{
GSList *list;
+ qemu_printf("Available CPUs:\n");
list = object_class_get_list(TYPE_POWERPC_CPU, false);
list = g_slist_sort(list, ppc_cpu_list_compare);
g_slist_foreach(list, ppc_cpu_list_entry, NULL);
@@ -7097,7 +7098,7 @@ void ppc_cpu_list(void)
#ifdef CONFIG_KVM
qemu_printf("\n");
- qemu_printf("PowerPC %s\n", "host");
+ qemu_printf(" %s\n", "host");
#endif
}
--
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, 2024/04/29
- [PULL 3/9] target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list,
Michael Tokarev <=
- [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