Re: [Qemu-devel] [PATCH v2 01/12] qemu-img: introduce qemu_img_handle_error()

2013-04-24 Thread Eric Blake
On 04/24/2013 08:53 PM, Wenchao Xia wrote: >>> >>> +static int qemu_img_handle_error(Error *err) >>> +{ >>> +if (error_is_set(&err)) { >>> +error_report("%s", error_get_pretty(err)); >>> +error_free(err); >>> +return 1; >>> +} >>> +return 0; >> >> Maybe it's jus

Re: [Qemu-devel] [PATCH v2 01/12] qemu-img: introduce qemu_img_handle_error()

2013-04-24 Thread Wenchao Xia
于 2013-4-25 0:44, Eric Blake 写道: On 04/24/2013 09:31 AM, Pavel Hrdina wrote: Later in the patch series we will use this function a few times. This will avoid duplicating the code. Signed-off-by: Pavel Hrdina --- qemu-img.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletion

Re: [Qemu-devel] [PATCH v2 01/12] qemu-img: introduce qemu_img_handle_error()

2013-04-24 Thread Eric Blake
On 04/24/2013 09:31 AM, Pavel Hrdina wrote: > Later in the patch series we will use this function a few times. > This will avoid duplicating the code. > > Signed-off-by: Pavel Hrdina > --- > qemu-img.c | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) > > +static int

[Qemu-devel] [PATCH v2 01/12] qemu-img: introduce qemu_img_handle_error()

2013-04-24 Thread Pavel Hrdina
Later in the patch series we will use this function a few times. This will avoid duplicating the code. Signed-off-by: Pavel Hrdina --- qemu-img.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index cd096a1..ab83fbe 100644 --- a/qem