aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpus.c12
-rw-r--r--include/sysemu/cpus.h1
-rw-r--r--vl.c9
3 files changed, 8 insertions, 14 deletions
diff --git a/cpus.c b/cpus.c
index 24e6affbf7..c4b021dd2e 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1175,18 +1175,6 @@ void set_numa_modes(void)
}
}
-void set_cpu_log(const char *optarg)
-{
- int mask;
-
- mask = qemu_str_to_log_mask(optarg);
- if (!mask) {
- qemu_print_log_usage(stdout);
- exit(1);
- }
- qemu_set_log(mask);
-}
-
void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg)
{
/* XXX: implement xxx_cpu_list for targets that still miss it */
diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h
index 60e44bb70c..6502488a05 100644
--- a/include/sysemu/cpus.h
+++ b/include/sysemu/cpus.h
@@ -24,7 +24,6 @@ extern int smp_threads;
#endif
void set_numa_modes(void);
-void set_cpu_log(const char *optarg);
void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg);
#endif
diff --git a/vl.c b/vl.c
index f9f4dda2d7..c5b0eea29b 100644
--- a/vl.c
+++ b/vl.c
@@ -3864,10 +3864,17 @@ int main(int argc, char **argv, char **envp)
* location or level of logging.
*/
if (log_mask) {
+ int mask;
if (log_file) {
qemu_set_log_filename(log_file);
}
- set_cpu_log(log_mask);
+
+ mask = qemu_str_to_log_mask(log_mask);
+ if (!mask) {
+ qemu_print_log_usage(stdout);
+ exit(1);
+ }
+ qemu_set_log(mask);
}
if (!trace_backend_init(trace_events, trace_file)) {