qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH qom-cpu 2/6] target-sparc: Use error_report() for CP


From: Andreas Färber
Subject: [Qemu-devel] [PATCH qom-cpu 2/6] target-sparc: Use error_report() for CPU error reporting
Date: Tue, 4 Mar 2014 03:55:45 +0100

Replace non-debug fprintf() with error_report().

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 e91a2f3..ed005b2 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
 
@@ -505,7 +506,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)
@@ -544,7 +545,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;
@@ -556,7 +557,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;
@@ -568,7 +569,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;
@@ -581,7 +582,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;
@@ -589,12 +590,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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]