From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XMy1a-0000DC-Go for mharc-qemu-trivial@gnu.org; Thu, 28 Aug 2014 07:37:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMy1U-00005k-QZ for qemu-trivial@nongnu.org; Thu, 28 Aug 2014 07:37:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMy1Q-00052K-As for qemu-trivial@nongnu.org; Thu, 28 Aug 2014 07:37:48 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:12476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMy1G-0004yg-Gi; Thu, 28 Aug 2014 07:37:35 -0400 Received: from 172.24.2.119 (EHLO szxeml418-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CAX70359; Thu, 28 Aug 2014 19:37:08 +0800 (CST) Received: from [127.0.0.1] (10.142.143.9) by szxeml418-hub.china.huawei.com (10.82.67.157) with Microsoft SMTP Server id 14.3.158.1; Thu, 28 Aug 2014 19:37:05 +0800 Message-ID: <53FF145E.4040004@huawei.com> Date: Thu, 28 Aug 2014 19:37:02 +0800 From: Li Liu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Michael Tokarev References: <1409035084-6740-1-git-send-email-john.liuli@huawei.com> In-Reply-To: <1409035084-6740-1-git-send-email-john.liuli@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.143.9] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 119.145.14.64 Cc: qemu-trivial@nongnu.org, peter.crosthwaite@xilinx.com, qemu-devel@nongnu.org, armbru@redhat.com Subject: Re: [Qemu-trivial] [PATCH v2 1/2] device_tree.c: redirect load_device_tree err message to stderr X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2014 11:37:53 -0000 Could this patchset apply to -trivial, thank you! Best regards, Li. On 2014/8/26 14:38, john.liuli wrote: > From: Li Liu > > Reviewed-by: Peter Crosthwaite > Signed-off-by: Li Liu > --- > changes v1 -> v2: > 1) fix indent issue as peter suggested. > 2) dump all err mesages with error_report. > > --- > device_tree.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/device_tree.c b/device_tree.c > index ca83504..9d47195 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; > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMy1L-0008Sn-Qn for qemu-devel@nongnu.org; Thu, 28 Aug 2014 07:37:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMy1H-00051r-Ar for qemu-devel@nongnu.org; Thu, 28 Aug 2014 07:37:39 -0400 Message-ID: <53FF145E.4040004@huawei.com> Date: Thu, 28 Aug 2014 19:37:02 +0800 From: Li Liu MIME-Version: 1.0 References: <1409035084-6740-1-git-send-email-john.liuli@huawei.com> In-Reply-To: <1409035084-6740-1-git-send-email-john.liuli@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/2] device_tree.c: redirect load_device_tree err message to stderr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: qemu-trivial@nongnu.org, peter.crosthwaite@xilinx.com, qemu-devel@nongnu.org, armbru@redhat.com Could this patchset apply to -trivial, thank you! Best regards, Li. On 2014/8/26 14:38, john.liuli wrote: > From: Li Liu > > Reviewed-by: Peter Crosthwaite > Signed-off-by: Li Liu > --- > changes v1 -> v2: > 1) fix indent issue as peter suggested. > 2) dump all err mesages with error_report. > > --- > device_tree.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/device_tree.c b/device_tree.c > index ca83504..9d47195 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; >