summaryrefslogtreecommitdiffstats
path: root/lib/copy_file.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: fix whitespace, drop blank lines at EOFAntony Pavlov2014-01-061-1/+0
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* copy_file: Add missing O_TRUNCSascha Hauer2013-09-291-1/+1
| | | | | | | Without it, when copying a smaller file over a larger file the resulting file still has the remaining space from the larger file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: Fix copy_file when filesize is FILESIZE_MAXTeresa Gámez2013-09-271-2/+6
| | | | | | | | | | Using tftp command does not work proper when files have FILESIZE_MAX, as copy_file and show_progress can not handle it. Check the file size for FILESIZE_MAX and handle it as file size = 0. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use a common define for RW_BUF_SIZESascha Hauer2013-04-171-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* copy_file: limit progress bar to sensible limitsSascha Hauer2012-02-191-3/+2
| | | | | | | | | When copying in verbose mode from a tftp server we might not know the size of the file being transfered. In this case print one progress item per 16k instead of one for each single byte. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/cp: add verbose mode which displays progress barHubert Feurstein2011-11-221-1/+20
| | | | | Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* copy_file: handle write return value correctlySascha Hauer2011-04-121-4/+11
| | | | | | | write() does not necessarily consume all input, handle this case correctly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* copy_file: sparse fixesSascha Hauer2010-10-211-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make copy_file() globally availableSascha Hauer2009-09-251-0/+58
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>