hw/ppc: use error_report instead of fprintf

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Cédric Le Goater 2016-08-02 19:38:00 +02:00 committed by David Gibson
parent 15848410af
commit ce9863b797
6 changed files with 26 additions and 22 deletions

View file

@ -10,11 +10,13 @@
#ifndef PPC_FDT_H
#define PPC_FDT_H
#define _FDT(exp) \
do { \
#include "qemu/error-report.h"
#define _FDT(exp) \
do { \
int ret = (exp); \
if (ret < 0) { \
fprintf(stderr, "qemu: error creating device tree: %s: %s\n", \
error_report("error creating device tree: %s: %s", \
#exp, fdt_strerror(ret)); \
exit(1); \
} \