Received: from eggs.gnu.org ([2001:4830:134:3::10]:36154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLptN-0002h7-07 for qemu-devel@nongnu.org; Mon, 25 Aug 2014 04:44:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLptI-0001aa-5s for qemu-devel@nongnu.org; Mon, 25 Aug 2014 04:44:44 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:64062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLptH-0001a9-Gt for qemu-devel@nongnu.org; Mon, 25 Aug 2014 04:44:40 -0400 From: "john.liuli" Date: Mon, 25 Aug 2014 16:44:17 +0800 Message-ID: <1408956257-8176-1-git-send-email-john.liuli@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH] device_tree.c: redirect load_device_tree err message to stderr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.crosthwaite@xilinx.com, agraf@suse.de Cc: Li Liu , qemu-devel@nongnu.org From: Li Liu Signed-off-by: Li Liu --- device_tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/device_tree.c b/device_tree.c index ca83504..ccdb039 100644 --- a/device_tree.c +++ b/device_tree.c @@ -79,7 +79,7 @@ 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", + fprintf(stderr, "Unable to get size of device tree file '%s'\n", filename_path); goto fail; } @@ -92,20 +92,20 @@ 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", + fprintf(stderr, "Unable to open device tree file '%s'\n", filename_path); goto fail; } ret = fdt_open_into(fdt, fdt, dt_size); if (ret) { - printf("Unable to copy device tree in memory\n"); + fprintf(stderr, "Unable to copy device tree in memory\n"); goto fail; } /* Check sanity of device tree */ if (fdt_check_header(fdt)) { - printf ("Device tree file loaded into memory is invalid: %s\n", + fprintf(stderr, "Device tree file loaded into memory is invalid: %s\n", filename_path); goto fail; } -- 1.7.9.5