mirror of https://github.com/xemu-project/xemu.git
Fix cpu list("-cpu ?") breakage, spotted by TeLeMan
Fix breakage by 04c9a0cbc2
.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
0684bf1b0f
commit
262353cb1f
11
cpus.c
11
cpus.c
|
@ -801,3 +801,14 @@ int64_t cpu_get_icount(void)
|
||||||
}
|
}
|
||||||
return qemu_icount_bias + (icount << icount_time_shift);
|
return qemu_icount_bias + (icount << icount_time_shift);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void list_cpus(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
|
||||||
|
const char *optarg)
|
||||||
|
{
|
||||||
|
/* XXX: implement xxx_cpu_list for targets that still miss it */
|
||||||
|
#if defined(cpu_list_id)
|
||||||
|
cpu_list_id(f, cpu_fprintf, optarg);
|
||||||
|
#elif defined(cpu_list)
|
||||||
|
cpu_list(f, cpu_fprintf); /* deprecated */
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
2
cpus.h
2
cpus.h
|
@ -16,5 +16,7 @@ void vm_state_notify(int running, int reason);
|
||||||
bool tcg_cpu_exec(void);
|
bool tcg_cpu_exec(void);
|
||||||
void set_numa_modes(void);
|
void set_numa_modes(void);
|
||||||
void set_cpu_log(const char *optarg);
|
void set_cpu_log(const char *optarg);
|
||||||
|
void list_cpus(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
|
||||||
|
const char *optarg);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
7
vl.c
7
vl.c
|
@ -2726,12 +2726,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
case QEMU_OPTION_cpu:
|
case QEMU_OPTION_cpu:
|
||||||
/* hw initialization will check this */
|
/* hw initialization will check this */
|
||||||
if (*optarg == '?') {
|
if (*optarg == '?') {
|
||||||
/* XXX: implement xxx_cpu_list for targets that still miss it */
|
list_cpus(stdout, &fprintf, optarg);
|
||||||
#if defined(cpu_list_id)
|
|
||||||
cpu_list_id(stdout, &fprintf, optarg);
|
|
||||||
#elif defined(cpu_list)
|
|
||||||
cpu_list(stdout, &fprintf); /* deprecated */
|
|
||||||
#endif
|
|
||||||
exit(0);
|
exit(0);
|
||||||
} else {
|
} else {
|
||||||
cpu_model = optarg;
|
cpu_model = optarg;
|
||||||
|
|
Loading…
Reference in New Issue