]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
target: Simplify how the TARGET_cpu_list() print
authorMarkus Armbruster <armbru@redhat.com>
Wed, 17 Apr 2019 19:17:57 +0000 (21:17 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 18 Apr 2019 20:18:59 +0000 (22:18 +0200)
commit0442428a8976b4f94e04d24b5db9eb1b678d82c4
treea4307320a5c4a5e6656c0f7ccf050c3db4edac57
parentb6b71cb5c674a97a4cd935349ce8a2764f720af4
target: Simplify how the TARGET_cpu_list() print

The various TARGET_cpu_list() take an fprintf()-like callback and a
FILE * to pass to it.  Their callers (vl.c's main() via list_cpus(),
bsd-user/main.c's main(), linux-user/main.c's main()) all pass
fprintf() and stdout.  Thus, the flexibility provided by the (rather
tiresome) indirection isn't actually used.

Drop the callback, and call qemu_printf() instead.

Calling printf() would also work, but would make the code unsuitable
for monitor context without making it simpler.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190417191805.28198-10-armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
40 files changed:
bsd-user/main.c
cpus.c
include/exec/cpu-common.h
include/sysemu/cpus.h
linux-user/main.c
target/alpha/cpu.c
target/alpha/cpu.h
target/arm/cpu.c
target/arm/cpu.h
target/arm/helper.c
target/cris/cpu.c
target/cris/cpu.h
target/hppa/cpu.c
target/hppa/cpu.h
target/i386/cpu.c
target/i386/cpu.h
target/lm32/cpu.c
target/lm32/cpu.h
target/m68k/cpu.h
target/m68k/helper.c
target/mips/cpu.h
target/mips/translate.c
target/mips/translate_init.inc.c
target/openrisc/cpu.c
target/openrisc/cpu.h
target/ppc/cpu.h
target/ppc/translate_init.inc.c
target/riscv/cpu.c
target/riscv/cpu.h
target/s390x/cpu.h
target/s390x/cpu_models.c
target/sh4/cpu.c
target/sh4/cpu.h
target/sparc/cpu.c
target/sparc/cpu.h
target/tricore/cpu.h
target/tricore/helper.c
target/xtensa/cpu.h
target/xtensa/helper.c
vl.c