hw/xtensa: replace fprintfs with error_report
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
parent
b707ab757e
commit
8488ab021b
@ -31,6 +31,7 @@
|
|||||||
#include "elf.h"
|
#include "elf.h"
|
||||||
#include "exec/memory.h"
|
#include "exec/memory.h"
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
|
#include "qemu/error-report.h"
|
||||||
|
|
||||||
static uint64_t translate_phys_addr(void *opaque, uint64_t addr)
|
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++) {
|
for (n = 0; n < smp_cpus; n++) {
|
||||||
cpu = cpu_xtensa_init(cpu_model);
|
cpu = cpu_xtensa_init(cpu_model);
|
||||||
if (cpu == NULL) {
|
if (cpu == NULL) {
|
||||||
fprintf(stderr, "Unable to find CPU definition\n");
|
error_report("unable to find CPU definition '%s'\n",
|
||||||
exit(1);
|
cpu_model);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
env = &cpu->env;
|
env = &cpu->env;
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "hw/block/flash.h"
|
#include "hw/block/flash.h"
|
||||||
#include "sysemu/blockdev.h"
|
#include "sysemu/blockdev.h"
|
||||||
#include "sysemu/char.h"
|
#include "sysemu/char.h"
|
||||||
|
#include "qemu/error-report.h"
|
||||||
#include "bootparam.h"
|
#include "bootparam.h"
|
||||||
|
|
||||||
typedef struct LxBoardDesc {
|
typedef struct LxBoardDesc {
|
||||||
@ -185,8 +186,9 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
|
|||||||
for (n = 0; n < smp_cpus; n++) {
|
for (n = 0; n < smp_cpus; n++) {
|
||||||
cpu = cpu_xtensa_init(cpu_model);
|
cpu = cpu_xtensa_init(cpu_model);
|
||||||
if (cpu == NULL) {
|
if (cpu == NULL) {
|
||||||
fprintf(stderr, "Unable to find CPU definition\n");
|
error_report("unable to find CPU definition '%s'\n",
|
||||||
exit(1);
|
cpu_model);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
env = &cpu->env;
|
env = &cpu->env;
|
||||||
|
|
||||||
@ -227,8 +229,8 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
|
|||||||
board->flash_size / board->flash_sector_size,
|
board->flash_size / board->flash_sector_size,
|
||||||
4, 0x0000, 0x0000, 0x0000, 0x0000, be);
|
4, 0x0000, 0x0000, 0x0000, 0x0000, be);
|
||||||
if (flash == NULL) {
|
if (flash == NULL) {
|
||||||
fprintf(stderr, "Unable to mount pflash\n");
|
error_report("unable to mount pflash\n");
|
||||||
exit(1);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user