From: Tom Rini Date: Thu, 13 Aug 2015 09:23:34 -0400 Subject: [U-Boot] [U-Boot, RESEND, v5] fs/fs.c: read up to EOF when len would read past EOF In-Reply-To: References: Message-ID: <20150813132334.GQ25532@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Aug 05, 2015 at 05:16:58PM +0200, Marcel Ziswiler wrote: > From: Max Krummenacher > > 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 > Signed-off-by: Marcel Ziswiler > Acked-by: Marek Vasut > Signed-off-by: Stefan Agner > Signed-off-by: Marcel Ziswiler Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: