From c732abe2227954316a5db399aac2040ec0d68f91 Mon Sep 17 00:00:00 2001 From: j_mayer Date: Fri, 12 Oct 2007 06:47:46 +0000 Subject: Unify '-cpu ?' option. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3380 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-arm/cpu.h | 3 ++- target-arm/helper.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'target-arm') diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 76fdbb2..7510a24 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -260,7 +260,7 @@ static inline int arm_feature(CPUARMState *env, int feature) return (env->features & (1u << feature)) != 0; } -void arm_cpu_list(void); +void arm_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); void cpu_arm_set_model(CPUARMState *env, const char *name); void cpu_arm_set_cp_io(CPUARMState *env, int cpnum, @@ -299,6 +299,7 @@ void cpu_arm_set_cp_io(CPUARMState *env, int cpnum, #define cpu_exec cpu_arm_exec #define cpu_gen_code cpu_arm_gen_code #define cpu_signal_handler cpu_arm_signal_handler +#define cpu_list arm_cpu_list #include "cpu-all.h" diff --git a/target-arm/helper.c b/target-arm/helper.c index 01573a2..4501fea 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -126,13 +126,13 @@ static const struct arm_cpu_t arm_cpu_names[] = { { 0, NULL} }; -void arm_cpu_list(void) +void arm_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) { int i; - printf ("Available CPUs:\n"); + (*cpu_fprintf)(f, "Available CPUs:\n"); for (i = 0; arm_cpu_names[i].name; i++) { - printf(" %s\n", arm_cpu_names[i].name); + (*cpu_fprintf)(f, " %s\n", arm_cpu_names[i].name); } } -- cgit v1.1