[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Is the use of bdrv_getlength() in vmdk_check() kosher?
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] Is the use of bdrv_getlength() in vmdk_check() kosher? |
Date: |
Fri, 4 Aug 2017 21:55:37 +0800 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Fri, 08/04 15:28, Markus Armbruster wrote:
> Have a look at vmdk_check():
>
> if (ret == VMDK_OK &&
> cluster_offset >= bdrv_getlength(extent->file->bs))
>
> bdrv_getlength() can fail. Does it do the right thing then? For what
> it's worth, the comparison of its value is unsigned.
Sure, error handling should be done with bdrv_getlength() return value. I'll
send a patch.
Fam