[PATCH] fs/squashfs: Set ret to 0 on successful read
Richard GENOUD
richard.genoud at bootlin.com
Tue Apr 21 08:14:03 CEST 2026
Hi Michael,
Le 20/04/2026 à 18:35, Michael Zimmermann a écrit :
> It might still be a positive number due to the call to sqfs_disk_read.
> This only happens when reading a file from an uncompressed squashfs.
>
> I found this by trying to boot using the extlinux bootmethod, where
> positive values are treated as errors.
>
> Signed-off-by: Michael Zimmermann <sigmaepsilon92 at gmail.com>
Good catch!
Acked-by: Richard Genoud <richard.genoud at bootlin.com>
> ---
>
> fs/squashfs/sqfs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c
> index 543db8c7e9e..0768fc4a7b2 100644
> --- a/fs/squashfs/sqfs.c
> +++ b/fs/squashfs/sqfs.c
> @@ -1636,6 +1636,8 @@ static int sqfs_read_nest(const char *filename, void *buf, loff_t offset,
> *actread = finfo.size;
> }
>
> + ret = 0;
> +
> out:
> free(fragment);
> free(datablock);
Thanks!
Regards,
Richard
More information about the U-Boot
mailing list