[PATCH v2 1/1] sandbox: fix return type of os_filesize()

Simon Glass sjg at chromium.org
Wed Apr 5 20:37:07 CEST 2023


On Wed, 5 Apr 2023 at 21:34, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Given a file ../img of size 4294967296 with GPT partition table and
> partitions:
>
> => host bind 0 ../img
> => part list host 0
> Disk host-0.blk not ready
>
> The cause is os_filesize() returning int. File sizes must use off_t.
>
> Correct all uses of os_filesize() too.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> v2:
>         avoid different signedness when comparing numbers
> ---
>  arch/sandbox/cpu/os.c    | 8 ++++++--
>  drivers/block/host_dev.c | 3 ++-
>  include/os.h             | 2 +-
>  3 files changed, 9 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list