[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] qemu-img: Move img_open error reporting to
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] qemu-img: Move img_open error reporting to callers |
Date: |
Fri, 5 Jan 2018 10:03:44 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 01/05/2018 12:55 AM, Fam Zheng wrote:
> In the next patch one caller will have a special error handling logic
> than reporting it, add "Error **" parameters to functions and give
s/than/rather than/
s/it, add/it. Add/
> control back to callers, to make that possible.
>
> Update iotests output accordingly.
>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> qemu-img.c | 115
> +++++++++++++++++++++++++++------------------
> tests/qemu-iotests/043.out | 6 +--
> 2 files changed, 73 insertions(+), 48 deletions(-)
>
> @@ -2455,23 +2464,24 @@ static ImageInfoList *collect_image_info_list(bool
> image_opts,
> ImageInfoList *elem;
>
> if (g_hash_table_lookup_extended(filenames, filename, NULL, NULL)) {
> - error_report("Backing file '%s' creates an infinite loop.",
> - filename);
> + error_setg(errp,
> + "Backing file '%s' creates an infinite loop.",
error_setg() should not end in '.'; you can fix that while touching this...
> +++ b/tests/qemu-iotests/043.out
> @@ -2,19 +2,19 @@ QA output created by 043
> Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
>
> == backing file references self ==
> -qemu-img: Backing file 'TEST_DIR/t.IMGFMT' creates an infinite loop.
> +qemu-img: Could not open 'TEST_DIR/t.IMGFMT': Backing file
> 'TEST_DIR/t.IMGFMT' creates an infinite loop.
> Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
> Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
> backing_file=TEST_DIR/t.IMGFMT.base
>
> == parent references self ==
> -qemu-img: Backing file 'TEST_DIR/t.IMGFMT' creates an infinite loop.
> +qemu-img: Could not open 'TEST_DIR/t.IMGFMT': Backing file
> 'TEST_DIR/t.IMGFMT' creates an infinite loop.
...which is another tweak here.
Those tweaks are minor, so
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Fam Zheng, 2018/01/05
- [Qemu-devel] [PATCH 2/2] qemu-img: info: try -U automatically, Fam Zheng, 2018/01/05
- [Qemu-devel] [PATCH 1/2] qemu-img: Move img_open error reporting to callers, Fam Zheng, 2018/01/05
- Re: [Qemu-devel] [PATCH 1/2] qemu-img: Move img_open error reporting to callers,
Eric Blake <=
- Re: [Qemu-devel] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Kevin Wolf, 2018/01/08
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Nir Soffer, 2018/01/08
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Kevin Wolf, 2018/01/08
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Fam Zheng, 2018/01/09
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Kevin Wolf, 2018/01/09
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Ala Hino, 2018/01/09
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Eric Blake, 2018/01/09
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Ala Hino, 2018/01/09
- Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Daniel P. Berrange, 2018/01/10
Re: [Qemu-devel] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U, Daniel P. Berrange, 2018/01/10