Skip to content

Commit

Permalink
hw/xtensa: replace fprintfs with error_report
Browse files Browse the repository at this point in the history
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
jcmvbkbc committed Jun 28, 2014
1 parent b707ab7 commit 8488ab0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions hw/xtensa/sim.c
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;

Expand Down
10 changes: 6 additions & 4 deletions hw/xtensa/xtfpga.c
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 8488ab0

Please sign in to comment.