diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2018-07-06 12:51:27 -0300 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-07-09 00:52:50 +0200 |
commit | 84ca4fa99d7b6c83ce31e1e41300d55cb4e97dcb (patch) | |
tree | 35b408c250d9eb916a3c615190c939f0011daece | |
parent | 8f0ea816435c0f6b7bcf8bd0f46f705ccca0316a (diff) | |
download | qemu-84ca4fa99d7b6c83ce31e1e41300d55cb4e97dcb.zip qemu-84ca4fa99d7b6c83ce31e1e41300d55cb4e97dcb.tar.gz qemu-84ca4fa99d7b6c83ce31e1e41300d55cb4e97dcb.tar.bz2 |
linux-user: Report error message on stderr, rather than stdout
Code change produced with:
git ls-files linux-user | \
xargs sed -i -E 's/(\s+)printf\s*\(("Unhandled.*)\);/\1fprintf(stderr, \2);/g'
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180706155127.7483-4-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r-- | linux-user/alpha/cpu_loop.c | 2 | ||||
-rw-r--r-- | linux-user/cris/cpu_loop.c | 2 | ||||
-rw-r--r-- | linux-user/microblaze/cpu_loop.c | 6 | ||||
-rw-r--r-- | linux-user/sh4/cpu_loop.c | 2 | ||||
-rw-r--r-- | linux-user/sparc/cpu_loop.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/linux-user/alpha/cpu_loop.c b/linux-user/alpha/cpu_loop.c index b87fcae..c1a98c8 100644 --- a/linux-user/alpha/cpu_loop.c +++ b/linux-user/alpha/cpu_loop.c @@ -196,7 +196,7 @@ void cpu_loop(CPUAlphaState *env) arch_interrupt = false; break; default: - printf ("Unhandled trap: 0x%x\n", trapnr); + fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr); cpu_dump_state(cs, stderr, fprintf, 0); exit(EXIT_FAILURE); } diff --git a/linux-user/cris/cpu_loop.c b/linux-user/cris/cpu_loop.c index 1c5eca9..37bdcfa 100644 --- a/linux-user/cris/cpu_loop.c +++ b/linux-user/cris/cpu_loop.c @@ -81,7 +81,7 @@ void cpu_loop(CPUCRISState *env) cpu_exec_step_atomic(cs); break; default: - printf ("Unhandled trap: 0x%x\n", trapnr); + fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr); cpu_dump_state(cs, stderr, fprintf, 0); exit(EXIT_FAILURE); } diff --git a/linux-user/microblaze/cpu_loop.c b/linux-user/microblaze/cpu_loop.c index 5af12d5..2af93eb 100644 --- a/linux-user/microblaze/cpu_loop.c +++ b/linux-user/microblaze/cpu_loop.c @@ -105,8 +105,8 @@ void cpu_loop(CPUMBState *env) queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; default: - printf("Unhandled hw-exception: 0x%" PRIx64 "\n", - env->sregs[SR_ESR] & ESR_EC_MASK); + fprintf(stderr, "Unhandled hw-exception: 0x%" PRIx64 "\n", + env->sregs[SR_ESR] & ESR_EC_MASK); cpu_dump_state(cs, stderr, fprintf, 0); exit(EXIT_FAILURE); break; @@ -130,7 +130,7 @@ void cpu_loop(CPUMBState *env) cpu_exec_step_atomic(cs); break; default: - printf ("Unhandled trap: 0x%x\n", trapnr); + fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr); cpu_dump_state(cs, stderr, fprintf, 0); exit(EXIT_FAILURE); } diff --git a/linux-user/sh4/cpu_loop.c b/linux-user/sh4/cpu_loop.c index 418833e..fdd3481 100644 --- a/linux-user/sh4/cpu_loop.c +++ b/linux-user/sh4/cpu_loop.c @@ -84,7 +84,7 @@ void cpu_loop(CPUSH4State *env) arch_interrupt = false; break; default: - printf ("Unhandled trap: 0x%x\n", trapnr); + fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr); cpu_dump_state(cs, stderr, fprintf, 0); exit(EXIT_FAILURE); } diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 7c4796c..91f714a 100644 --- a/linux-user/sparc/cpu_loop.c +++ b/linux-user/sparc/cpu_loop.c @@ -285,7 +285,7 @@ void cpu_loop (CPUSPARCState *env) cpu_exec_step_atomic(cs); break; default: - printf ("Unhandled trap: 0x%x\n", trapnr); + fprintf(stderr, "Unhandled trap: 0x%x\n", trapnr); cpu_dump_state(cs, stderr, fprintf, 0); exit(EXIT_FAILURE); } |