[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.0-rc0 21/58] target-sparc: Use error_report() f
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL for-2.0-rc0 21/58] target-sparc: Use error_report() for CPU error reporting |
Date: |
Thu, 13 Mar 2014 15:54:24 +0100 |
Replace non-debug fprintf() with error_report().
Tested-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
target-sparc/cpu.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c
index 6cf7e37..9870991 100644
--- a/target-sparc/cpu.c
+++ b/target-sparc/cpu.c
@@ -18,6 +18,7 @@
*/
#include "cpu.h"
+#include "qemu/error-report.h"
//#define DEBUG_FEATURES
@@ -506,7 +507,7 @@ static void add_flagname_to_bitmaps(const char *flagname,
uint32_t *features)
return;
}
}
- fprintf(stderr, "CPU feature %s not found\n", flagname);
+ error_report("CPU feature %s not found", flagname);
}
static int cpu_sparc_find_by_name(sparc_def_t *cpu_def, const char *cpu_model)
@@ -545,7 +546,7 @@ static int cpu_sparc_find_by_name(sparc_def_t *cpu_def,
const char *cpu_model)
iu_version = strtoll(val, &err, 0);
if (!*val || *err) {
- fprintf(stderr, "bad numerical value %s\n", val);
+ error_report("bad numerical value %s", val);
goto error;
}
cpu_def->iu_version = iu_version;
@@ -557,7 +558,7 @@ static int cpu_sparc_find_by_name(sparc_def_t *cpu_def,
const char *cpu_model)
fpu_version = strtol(val, &err, 0);
if (!*val || *err) {
- fprintf(stderr, "bad numerical value %s\n", val);
+ error_report("bad numerical value %s", val);
goto error;
}
cpu_def->fpu_version = fpu_version;
@@ -569,7 +570,7 @@ static int cpu_sparc_find_by_name(sparc_def_t *cpu_def,
const char *cpu_model)
mmu_version = strtol(val, &err, 0);
if (!*val || *err) {
- fprintf(stderr, "bad numerical value %s\n", val);
+ error_report("bad numerical value %s", val);
goto error;
}
cpu_def->mmu_version = mmu_version;
@@ -582,7 +583,7 @@ static int cpu_sparc_find_by_name(sparc_def_t *cpu_def,
const char *cpu_model)
nwindows = strtol(val, &err, 0);
if (!*val || *err || nwindows > MAX_NWINDOWS ||
nwindows < MIN_NWINDOWS) {
- fprintf(stderr, "bad numerical value %s\n", val);
+ error_report("bad numerical value %s", val);
goto error;
}
cpu_def->nwindows = nwindows;
@@ -590,12 +591,12 @@ static int cpu_sparc_find_by_name(sparc_def_t *cpu_def,
const char *cpu_model)
fprintf(stderr, "nwindows %d\n", nwindows);
#endif
} else {
- fprintf(stderr, "unrecognized feature %s\n", featurestr);
+ error_report("unrecognized feature %s", featurestr);
goto error;
}
} else {
- fprintf(stderr, "feature string `%s' not in format "
- "(+feature|-feature|feature=xyz)\n", featurestr);
+ error_report("feature string `%s' not in format "
+ "(+feature|-feature|feature=xyz)", featurestr);
goto error;
}
featurestr = strtok(NULL, ",");
--
1.8.4.5
- [Qemu-devel] [PULL for-2.0-rc0 12/58] target-i386: Call x86_cpu_load_def() earlier, (continued)
- [Qemu-devel] [PULL for-2.0-rc0 12/58] target-i386: Call x86_cpu_load_def() earlier, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 10/58] cpu: Turn cpu_has_work() into a CPUClass hook, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 13/58] target-i386: Rename x86_def_t to X86CPUDefinition, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 11/58] target-i386: Rename cpu_x86_register() to x86_cpu_load_def(), Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 15/58] target-i386: Make kvm_default_features an array, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 14/58] target-i386: Don't declare variables in the middle of blocks, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 18/58] target-i386: Prepare CPUClass::class_by_name for X86CPU, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 16/58] target-i386: Introduce x86_cpu_compat_disable_kvm_features(), Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 17/58] target-i386: Enable x2apic by default on KVM, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 20/58] cpu: Introduce CPUClass::parse_features() hook, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 21/58] target-sparc: Use error_report() for CPU error reporting,
Andreas Färber <=
- [Qemu-devel] [PULL for-2.0-rc0 23/58] target-sparc: Defer SPARCCPU feature inference to QOM realize, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 19/58] target-i386: X86CPU model subclasses, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 24/58] cpu: Implement CPUClass::parse_features() for the rest of CPUs, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 26/58] target-m68k: Remove custom qemu_assert() function, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 22/58] target-sparc: Implement CPUClass::parse_features() for SPARCCPU, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 25/58] cpu: Factor out cpu_generic_init(), Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 28/58] cpu: Move mem_io_{pc, vaddr} fields from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 27/58] cpu: Turn cpu_handle_mmu_fault() into a CPUClass hook, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 29/58] cpu: Move can_do_io field from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13