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 <f...@redhat.com>
> ---
>  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 <ebl...@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to