qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.10] vmdk: Fix error handling/reporting of


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-2.10] vmdk: Fix error handling/reporting of vmdk_check
Date: Fri, 4 Aug 2017 10:46:36 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 08/04/2017 09:09 AM, Fam Zheng wrote:
> Errors from the callees must be captured and propagated to our caller,
> ensure this for both find_extent() and bdrv_getlength().
> 
> Reported-by: Markus Armbruster <address@hidden>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  block/vmdk.c | 26 ++++++++++++++++++--------
>  1 file changed, 18 insertions(+), 8 deletions(-)
> 

> +        if (ret == VMDK_OK) {
> +            int64_t extent_len = bdrv_getlength(extent->file->bs);
> +            if (extent_len < 0) {
> +                fprintf(stderr,
> +                        "ERROR: could not get extent file length for sector 
> %"
> +                        PRId64 "\n", sector_num);
> +                ret = extent_len;

Pre-existing - our use of fprintf() is not ideal.  But this patch
doesn't make it worse.

Reviewed-by: Eric Blake <address@hidden>

-- 
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

[Prev in Thread] Current Thread [Next in Thread]