diff options
author | Li Liu <john.liuli@huawei.com> | 2014-08-26 14:38:02 +0800 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-09-02 22:38:16 +0400 |
commit | db013f81b206f19297200a78ecd02d6c2c01d383 (patch) | |
tree | 1ba4fcce8b9597774d40724f40b029b3be0d6559 | |
parent | 7d2ff422cac3e6d5dc7df9072e54bb8dfbd8b589 (diff) |
device_tree.c: redirect load_device_tree err message to stderr
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Li Liu <john.liuli@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | device_tree.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/device_tree.c b/device_tree.c index ca83504819..9d47195587 100644 --- a/device_tree.c +++ b/device_tree.c @@ -20,6 +20,7 @@ #include "config.h" #include "qemu-common.h" +#include "qemu/error-report.h" #include "sysemu/device_tree.h" #include "sysemu/sysemu.h" #include "hw/loader.h" @@ -79,8 +80,8 @@ void *load_device_tree(const char *filename_path, int *sizep) *sizep = 0; dt_size = get_image_size(filename_path); if (dt_size < 0) { - printf("Unable to get size of device tree file '%s'\n", - filename_path); + error_report("Unable to get size of device tree file '%s'", + filename_path); goto fail; } @@ -92,21 +93,21 @@ void *load_device_tree(const char *filename_path, int *sizep) dt_file_load_size = load_image(filename_path, fdt); if (dt_file_load_size < 0) { - printf("Unable to open device tree file '%s'\n", - filename_path); + error_report("Unable to open device tree file '%s'", + filename_path); goto fail; } ret = fdt_open_into(fdt, fdt, dt_size); if (ret) { - printf("Unable to copy device tree in memory\n"); + error_report("Unable to copy device tree in memory"); goto fail; } /* Check sanity of device tree */ if (fdt_check_header(fdt)) { - printf ("Device tree file loaded into memory is invalid: %s\n", - filename_path); + error_report("Device tree file loaded into memory is invalid: %s", + filename_path); goto fail; } *sizep = dt_size; |