From eeacee4d8652d7f3b9224cfe0707c0ed87cc0e96 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sun, 3 Jun 2012 16:35:32 +0000 Subject: qemu-log: cleanup Don't use global variables directly but via accessor functions. Rename globals. Convert macros to functions, add GCC format attributes. Signed-off-by: Blue Swirl --- linux-user/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux-user/main.c') diff --git a/linux-user/main.c b/linux-user/main.c index 49108b81d3..d0e0e4fc6a 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1306,8 +1306,9 @@ do { \ fprintf(stderr, fmt , ## __VA_ARGS__); \ cpu_dump_state(env, stderr, fprintf, 0); \ qemu_log(fmt, ## __VA_ARGS__); \ - if (logfile) \ + if (qemu_log_enabled()) { \ log_cpu_state(env, 0); \ + } \ } while (0) static int do_store_exclusive(CPUPPCState *env) -- cgit 1.4.1