All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>,
	Waldemar Brodkorb <mail@waldemar-brodkorb.de>
Subject: [Qemu-devel] [PATCH 2/9] hw/xtensa: replace fprintfs with error_report
Date: Mon, 23 Jun 2014 20:12:49 +0400	[thread overview]
Message-ID: <1403539976-22581-3-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1403539976-22581-1-git-send-email-jcmvbkbc@gmail.com>

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 hw/xtensa/sim.c    |  6 ++++--
 hw/xtensa/xtfpga.c | 10 ++++++----
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index 89da43c..9642bf5 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -31,6 +31,7 @@
 #include "elf.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
+#include "qemu/error-report.h"
 
 static uint64_t translate_phys_addr(void *opaque, uint64_t addr)
 {
@@ -63,8 +64,9 @@ static void xtensa_sim_init(MachineState *machine)
     for (n = 0; n < smp_cpus; n++) {
         cpu = cpu_xtensa_init(cpu_model);
         if (cpu == NULL) {
-            fprintf(stderr, "Unable to find CPU definition\n");
-            exit(1);
+            error_report("unable to find CPU definition '%s'\n",
+                         cpu_model);
+            exit(EXIT_FAILURE);
         }
         env = &cpu->env;
 
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 0b8a2ed..75bc479 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -37,6 +37,7 @@
 #include "hw/block/flash.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/char.h"
+#include "qemu/error-report.h"
 #include "bootparam.h"
 
 typedef struct LxBoardDesc {
@@ -185,8 +186,9 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
     for (n = 0; n < smp_cpus; n++) {
         cpu = cpu_xtensa_init(cpu_model);
         if (cpu == NULL) {
-            fprintf(stderr, "Unable to find CPU definition\n");
-            exit(1);
+            error_report("unable to find CPU definition '%s'\n",
+                         cpu_model);
+            exit(EXIT_FAILURE);
         }
         env = &cpu->env;
 
@@ -227,8 +229,8 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
                 board->flash_size / board->flash_sector_size,
                 4, 0x0000, 0x0000, 0x0000, 0x0000, be);
         if (flash == NULL) {
-            fprintf(stderr, "Unable to mount pflash\n");
-            exit(1);
+            error_report("unable to mount pflash\n");
+            exit(EXIT_FAILURE);
         }
     }
 
-- 
1.8.1.4

  parent reply	other threads:[~2014-06-23 16:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 16:12 [Qemu-devel] [PATCH 0/9] target-xtensa: linux booting improvements Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 1/9] hw/xtensa: remove extraneous xtensa_ prefix from file names Max Filippov
2014-06-23 16:12 ` Max Filippov [this message]
2014-06-23 16:12 ` [Qemu-devel] [PATCH 3/9] hw/xtensa/xtfpga: retrieve parameters from machine_opts Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 4/9] hw/xtensa/xtfpga: use symbolic constants for bootparam tags Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 5/9] hw/xtensa/xtfpga: refactor bootparameters filling Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 6/9] hw/xtensa/xtfpga: add memory info to bootparam Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 7/9] hw/xtensa/xtfpga: implement uImage loading Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 8/9] hw/xtensa/xtfpga: implement DTB loading Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 9/9] hw/xtensa/xtfpga: implement initrd loading Max Filippov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403539976-22581-3-git-send-email-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=mail@waldemar-brodkorb.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.