summaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-02-07 16:26:01 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-02-07 16:26:01 +0000
commit17a5bbb44df9a4a79166332bc26e2d8ca6bd8fa8 (patch)
tree3c51588df6d984563c370bdcae0ecc51673b9398 /cpus.c
parentea62da0913d20338b8a47bbfaef2e8f2763ee13f (diff)
parent493d89bf74d17fa304b7a02f531b024df2003fea (diff)
downloadqemu-17a5bbb44df9a4a79166332bc26e2d8ca6bd8fa8.tar.gz
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-02-06' into staging
Error reporting patches for 2018-02-06 # gpg: Signature made Tue 06 Feb 2018 19:48:30 GMT # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-error-2018-02-06: tcg: Replace fprintf(stderr, "*\n" with error_report() hw/xen*: Replace fprintf(stderr, "*\n" with error_report() hw/sparc*: Replace fprintf(stderr, "*\n" with error_report() hw/sd: Replace fprintf(stderr, "*\n" with DPRINTF() hw/ppc: Replace fprintf(stderr, "*\n" with error_report() hw/pci*: Replace fprintf(stderr, "*\n" with error_report() hw/openrisc: Replace fprintf(stderr, "*\n" with error_report() hw/moxie: Replace fprintf(stderr, "*\n" with error_report() hw/mips: Replace fprintf(stderr, "*\n" with error_report() hw/lm32: Replace fprintf(stderr, "*\n" with error_report() hw/dma: Replace fprintf(stderr, "*\n" with error_report() hw/arm: Replace fprintf(stderr, "*\n" with error_report() audio: Replace AUDIO_FUNC with __func__ error: Improve documentation of error_append_hint() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpus.c b/cpus.c
index 2cb0af9b22..5d3a165960 100644
--- a/cpus.c
+++ b/cpus.c
@@ -259,7 +259,7 @@ int64_t cpu_get_icount_raw(void)
if (cpu && cpu->running) {
if (!cpu->can_do_io) {
- fprintf(stderr, "Bad icount read\n");
+ error_report("Bad icount read");
exit(1);
}
/* Take into account what has run */
@@ -1181,7 +1181,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
r = kvm_init_vcpu(cpu);
if (r < 0) {
- fprintf(stderr, "kvm_init_vcpu failed: %s\n", strerror(-r));
+ error_report("kvm_init_vcpu failed: %s", strerror(-r));
exit(1);
}
@@ -1211,7 +1211,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
static void *qemu_dummy_cpu_thread_fn(void *arg)
{
#ifdef _WIN32
- fprintf(stderr, "qtest is not supported under Windows\n");
+ error_report("qtest is not supported under Windows");
exit(1);
#else
CPUState *cpu = arg;
@@ -1631,8 +1631,8 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
#else /* _WIN32 */
if (!qemu_cpu_is_self(cpu)) {
if (!QueueUserAPC(dummy_apc_func, cpu->hThread, 0)) {
- fprintf(stderr, "%s: QueueUserAPC failed with error %lu\n",
- __func__, GetLastError());
+ error_report("%s: QueueUserAPC failed with error %lu", __func__,
+ GetLastError());
exit(1);
}
}