qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH] block: Fix integer promotion error in bdrv_getlength()


From: Max Reitz
Subject: Re: [PATCH] block: Fix integer promotion error in bdrv_getlength()
Date: Thu, 5 Nov 2020 09:31:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 05.11.20 06:40, Tuguoyi wrote:
As BDRV_SECTOR_SIZE is of type uint64_t, the expression will
automatically convert the @ret to uint64_t. When an error code
returned from bdrv_nb_sectors(), the promoted @ret will be a very
large number, as a result the -EFBIG will be returned which is not the
real error code.

Signed-off-by: Guoyi Tu <tu.guoyi@h3c.com>
---
  block.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my block branch:

https://git.xanclic.moe/XanClic/qemu/commits/branch/block

Max




reply via email to

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