Received: from eggs.gnu.org ([2001:4830:134:3::10]:53215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKfWb-0004QJ-Vj for qemu-devel@nongnu.org; Mon, 03 Mar 2014 21:56:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKfWS-0004j4-Cs for qemu-devel@nongnu.org; Mon, 03 Mar 2014 21:56:09 -0500 Received: from cantor2.suse.de ([195.135.220.15]:49646 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKfWS-0004iz-2Q for qemu-devel@nongnu.org; Mon, 03 Mar 2014 21:56:00 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 4 Mar 2014 03:55:45 +0100 Message-Id: <1393901749-5944-3-git-send-email-afaerber@suse.de> In-Reply-To: <1393901749-5944-1-git-send-email-afaerber@suse.de> References: <1393901749-5944-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-cpu 2/6] target-sparc: Use error_report() for CPU error reporting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Igor Mammedov , Eduardo Habkost , Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= Replace non-debug fprintf() with error_report(). Signed-off-by: Andreas F=C3=A4rber --- 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 @@ */ =20 #include "cpu.h" +#include "qemu/error-report.h" =20 //#define DEBUG_FEATURES =20 @@ -505,7 +506,7 @@ static void add_flagname_to_bitmaps(const char *flagn= ame, uint32_t *features) return; } } - fprintf(stderr, "CPU feature %s not found\n", flagname); + error_report("CPU feature %s not found", flagname); } =20 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_de= f, const char *cpu_model) =20 iu_version =3D 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 =3D iu_version; @@ -556,7 +557,7 @@ static int cpu_sparc_find_by_name(sparc_def_t *cpu_de= f, const char *cpu_model) =20 fpu_version =3D 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 =3D fpu_version; @@ -568,7 +569,7 @@ static int cpu_sparc_find_by_name(sparc_def_t *cpu_de= f, const char *cpu_model) =20 mmu_version =3D 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 =3D mmu_version; @@ -581,7 +582,7 @@ static int cpu_sparc_find_by_name(sparc_def_t *cpu_de= f, const char *cpu_model) nwindows =3D 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 =3D 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=3Dxyz)\n", featurestr); + error_report("feature string `%s' not in format " + "(+feature|-feature|feature=3Dxyz)", featurestr= ); goto error; } featurestr =3D strtok(NULL, ","); --=20 1.8.4.5