aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_rtas.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2016-08-02 19:38:00 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2016-09-07 12:40:12 +1000
commitce9863b7978976492efc2b57589516f3fcae79cb (patch)
tree7f2ec7698ae5e094bd9a76f266620d05ed1938b2 /hw/ppc/spapr_rtas.c
parent15848410af5caccb7ca419654e46b0ce42d6bf4b (diff)
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>
Diffstat (limited to 'hw/ppc/spapr_rtas.c')
-rw-r--r--hw/ppc/spapr_rtas.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index dc058e512b..27b5ad4bc4 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -27,6 +27,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "qemu/log.h"
+#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "sysemu/char.h"
#include "hw/qdev.h"
@@ -716,7 +717,7 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
ret = fdt_add_mem_rsv(fdt, rtas_addr, rtas_size);
if (ret < 0) {
- fprintf(stderr, "Couldn't add RTAS reserve entry: %s\n",
+ error_report("Couldn't add RTAS reserve entry: %s",
fdt_strerror(ret));
return ret;
}
@@ -724,7 +725,7 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
ret = qemu_fdt_setprop_cell(fdt, "/rtas", "linux,rtas-base",
rtas_addr);
if (ret < 0) {
- fprintf(stderr, "Couldn't add linux,rtas-base property: %s\n",
+ error_report("Couldn't add linux,rtas-base property: %s",
fdt_strerror(ret));
return ret;
}
@@ -732,7 +733,7 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
ret = qemu_fdt_setprop_cell(fdt, "/rtas", "linux,rtas-entry",
rtas_addr);
if (ret < 0) {
- fprintf(stderr, "Couldn't add linux,rtas-entry property: %s\n",
+ error_report("Couldn't add linux,rtas-entry property: %s",
fdt_strerror(ret));
return ret;
}
@@ -740,7 +741,7 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
ret = qemu_fdt_setprop_cell(fdt, "/rtas", "rtas-size",
rtas_size);
if (ret < 0) {
- fprintf(stderr, "Couldn't add rtas-size property: %s\n",
+ error_report("Couldn't add rtas-size property: %s",
fdt_strerror(ret));
return ret;
}
@@ -755,7 +756,7 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
ret = qemu_fdt_setprop_cell(fdt, "/rtas", call->name,
i + RTAS_TOKEN_BASE);
if (ret < 0) {
- fprintf(stderr, "Couldn't add rtas token for %s: %s\n",
+ error_report("Couldn't add rtas token for %s: %s",
call->name, fdt_strerror(ret));
return ret;
}
@@ -770,7 +771,7 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
ret = qemu_fdt_setprop(fdt, "/rtas", "ibm,lrdr-capacity", lrdr_capacity,
sizeof(lrdr_capacity));
if (ret < 0) {
- fprintf(stderr, "Couldn't add ibm,lrdr-capacity rtas property\n");
+ error_report("Couldn't add ibm,lrdr-capacity rtas property");
return ret;
}