9
0
Fork 0
Commit Graph

9 Commits

Author SHA1 Message Date
Antony Pavlov c2ffad8855 lib: fix whitespace, drop blank lines at EOF
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-06 09:24:22 +01:00
Sascha Hauer d4f5bb1e01 copy_file: Add missing O_TRUNC
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>
2013-09-29 12:10:59 +02:00
Teresa Gámez e2b67d6a6a lib: Fix copy_file when filesize is FILESIZE_MAX
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>
2013-09-27 16:20:17 +02:00
Sascha Hauer 4e3ce28973 Use a common define for RW_BUF_SIZE
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 13:36:31 +02:00
Sascha Hauer 74c70b3980 copy_file: limit progress bar to sensible limits
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>
2012-02-19 18:51:03 +01:00
Hubert Feurstein 7bb009c744 commands/cp: add verbose mode which displays progress bar
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22 21:13:05 +01:00
Sascha Hauer 583fe4fc0e copy_file: handle write return value correctly
write() does not necessarily consume all input, handle this
case correctly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:54:56 +02:00
Sascha Hauer ee6b3e174d copy_file: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:23 +02:00
Sascha Hauer a205b87fa2 make copy_file() globally available
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-25 13:33:52 +02:00