From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 2 Jul 2015 07:46:19 +0200 Subject: [U-Boot] [PATCH 1/8] fs/fs.c: read up to EOF when len would read past EOF In-Reply-To: <7a14941b6bdb958d25899d6a6cc2481e8043df3a.1435791392.git.marcel.ziswiler@toradex.com> References: <7a14941b6bdb958d25899d6a6cc2481e8043df3a.1435791392.git.marcel.ziswiler@toradex.com> Message-ID: <201507020746.20073.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, July 02, 2015 at 01:04:46 AM, 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. > > Signed-off-by: Max Krummenacher > Signed-off-by: Marcel Ziswiler So this behaves like read(2) now, right ? Acked-by: Marek Vasut Best regards, Marek Vasut