]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
tftp.c: fix CONFIG_TFTP_TSIZE for small files
authorMax Krummenacher <max.krummenacher@toradex.com>
Wed, 5 Aug 2015 15:17:05 +0000 (17:17 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:17:44 +0000 (08:17 +0200)
commit1f8434723ebbae4a1d95181e2b05a5e6dadfb02c
tree0d912c9eb7d3e0e3d7aca357d447205b7bb92b92
parent7ef9c9b853ad4d5e988e943cf4bd597cbdc08602
tftp.c: fix CONFIG_TFTP_TSIZE for small files

CONFIG_TFTP_TSIZE should limit a tftp downloads progress to 50 '#'
chars. Make this work also for small files.

If the file size is small, i.e. smaller than 2 tftp block sizes the
number of '#' can get much larger. i.e. with a 1 byte file 65000
characters are printed, with a 512 byte file around 500.

When using CONFIG TFTP BLOCKSIZE together with CONFIG_IP_DEFRAG the
issue is more notable.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
net/tftp.c