diff options
author | Paolo Bonzini | 2015-11-13 13:16:27 +0100 |
---|---|---|
committer | Paolo Bonzini | 2015-12-17 17:33:47 +0100 |
commit | 013a29424c9a1e4a74a108bbc117fef5581abb41 (patch) | |
tree | 7be6e29c75f4ded55f0c5502724ec0c9af251990 /target-ppc/excp_helper.c | |
parent | qemu-char: append opt to stop truncation of serial file (diff) | |
download | qemu-013a29424c9a1e4a74a108bbc117fef5581abb41.tar.gz qemu-013a29424c9a1e4a74a108bbc117fef5581abb41.tar.xz qemu-013a29424c9a1e4a74a108bbc117fef5581abb41.zip |
qemu-log: introduce qemu_log_separate
In some cases, the same message is printed both on stderr and in the log.
Avoid duplicate output in the default case where stderr _is_ the log,
and standardize this to stderr+log where it used to use stdio+log.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-ppc/excp_helper.c')
-rw-r--r-- | target-ppc/excp_helper.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c index 4250106b34..102d789d2d 100644 --- a/target-ppc/excp_helper.c +++ b/target-ppc/excp_helper.c @@ -131,12 +131,11 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp) /* Machine check exception is not enabled. * Enter checkstop state. */ - if (qemu_log_enabled()) { + fprintf(stderr, "Machine check while not allowed. " + "Entering checkstop state\n"); + if (qemu_log_separate()) { qemu_log("Machine check while not allowed. " "Entering checkstop state\n"); - } else { - fprintf(stderr, "Machine check while not allowed. " - "Entering checkstop state\n"); } cs->halted = 1; cs->interrupt_request |= CPU_INTERRUPT_EXITTB; |