diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2015-08-05 17:16:58 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-13 07:19:35 -0400 |
commit | 7a3e70cfd88cc8062a106ed07bade5a38f146758 (patch) | |
tree | ff698da26a585f7beb20b1e14101f0cff3fb90e1 /include/stdio_dev.h | |
parent | f06b454b1c4420d1698fa1c62b8dd0bab060b691 (diff) | |
download | u-boot-imx-7a3e70cfd88cc8062a106ed07bade5a38f146758.zip u-boot-imx-7a3e70cfd88cc8062a106ed07bade5a38f146758.tar.gz u-boot-imx-7a3e70cfd88cc8062a106ed07bade5a38f146758.tar.bz2 |
fs/fs.c: read up to EOF when len would read past EOF
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 aka read(2)
behaviour for convenient use in U-Boot scripts.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'include/stdio_dev.h')
0 files changed, 0 insertions, 0 deletions