summaryrefslogtreecommitdiffstats
path: root/vl.c
diff options
context:
space:
mode:
authorPeter Maydell2013-02-11 17:41:24 +0100
committerBlue Swirl2013-02-16 11:45:19 +0100
commitb946bffab5e0d359accfcc78faead20fd69f26e8 (patch)
tree7a3f19a45dda0c0b377148469a00642d5ae3e53c /vl.c
parentqemu-log: Rename the public-facing cpu_set_log function to qemu_set_log (diff)
downloadqemu-b946bffab5e0d359accfcc78faead20fd69f26e8.tar.gz
qemu-b946bffab5e0d359accfcc78faead20fd69f26e8.tar.xz
qemu-b946bffab5e0d359accfcc78faead20fd69f26e8.zip
cpus.c: Drop unnecessary set_cpu_log()
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 <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c9
1 files changed, 8 insertions, 1 deletions
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)) {