[U-Boot] [PATCH 1/8] fs/fs.c: read up to EOF when len would read past EOF

Marek Vasut
2015-07-02T05:46:19Z

On Thursday, July 02, 2015 at 01:04:46 AM, Marcel Ziswiler wrote:
> From: Max Krummenacher <max.krummenacher@toradex.com>
>
> http://lists.denx.de/pipermail/u-boot/2012-September/134347.html
> allows for reading files in chunks from the shell.
>
> When this feature is used to read past the end of a file an error
> was returned instead of returning the bytes read up to the end of
> file. Thus the following fails in the shell:
>
> offset = 0
> len = chunksize
> do
> read file, offset, len
> write data
> until bytes_read < len
>
> The patch changes the behaviour to printing an informational
> message and returning the actual read number of bytes.
>
> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

So this behaves like read(2) now, right ?

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut