From b946bffab5e0d359accfcc78faead20fd69f26e8 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 11 Feb 2013 16:41:24 +0000 Subject: cpus.c: Drop unnecessary set_cpu_log() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The set_cpu_log() function in cpus.c is a fairly simple wrapper which is only called from one location. Just inline the code into vl.c, since there is no need to indirect it via cpus.c and the handling of the error case is more appropriate to vl.c. Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber Signed-off-by: Blue Swirl --- vl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index f9f4dda2d..c5b0eea29 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)) { -- cgit v1.2.3