public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 8/8] tftp.c: fix CONFIG_TFTP_TSIZE for small files
Date: Thu, 2 Jul 2015 07:54:11 +0200	[thread overview]
Message-ID: <201507020754.11676.marex@denx.de> (raw)
In-Reply-To: <4c4c29ae74120a1829e496ec03a27a7220d74c9d.1435791392.git.marcel.ziswiler@toradex.com>

On Thursday, July 02, 2015 at 01:04:53 AM, Marcel Ziswiler wrote:
> From: Max Krummenacher <max.krummenacher@toradex.com>
> 
> 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>
> ---
>  net/tftp.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/tftp.c b/net/tftp.c
> index 3e99e73..1853fe7 100644
> --- a/net/tftp.c
> +++ b/net/tftp.c
> @@ -249,6 +249,8 @@ static void show_block_marker(void)
>  	if (tftp_tsize) {
>  		ulong pos = tftp_cur_block * tftp_block_size +
>  			tftp_block_wrap_offset;
> +		if(pos > tftp_tsize)

Nitpick:

if[SPACE](...

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

      reply	other threads:[~2015-07-02  5:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 23:04 [U-Boot] [PATCH 0/8] assortment of fixes/enhancements Marcel Ziswiler
2015-07-01 23:04 ` [U-Boot] [PATCH 1/8] fs/fs.c: read up to EOF when len would read past EOF Marcel Ziswiler
2015-07-02  5:46   ` Marek Vasut
2015-07-02  6:01     ` Marcel Ziswiler
2015-07-01 23:04 ` [U-Boot] [PATCH 2/8] net: asix: fix operation without eeprom Marcel Ziswiler
2015-07-02  5:50   ` Marek Vasut
2015-07-02  6:12     ` Marcel Ziswiler
2015-07-02 18:39       ` Marek Vasut
2015-07-08  3:55   ` Joe Hershberger
2015-07-08  6:39     ` Marcel Ziswiler
2015-07-01 23:04 ` [U-Boot] [PATCH 3/8] generic-board: allow showing custom board info Marcel Ziswiler
2015-07-03  3:27   ` Simon Glass
2015-07-01 23:04 ` [U-Boot] [PATCH 4/8] logos: add Toradex logo Marcel Ziswiler
2015-07-01 23:04 ` [U-Boot] [PATCH 5/8] colibri_vf: remove spurious new line Marcel Ziswiler
2015-07-02  5:52   ` Marek Vasut
2015-07-01 23:04 ` [U-Boot] [PATCH 6/8] image-fdt.c: store returned error value Marcel Ziswiler
2015-07-02  5:52   ` Marek Vasut
2015-07-03  3:21     ` Simon Glass
2015-07-01 23:04 ` [U-Boot] [PATCH 7/8] mtd/nand/ubi: assortment of alignment fixes Marcel Ziswiler
2015-07-02  5:53   ` Marek Vasut
2015-07-02 21:35     ` Scott Wood
2015-07-03 13:44       ` Marek Vasut
2015-07-06 21:25         ` Scott Wood
2015-07-06 21:45           ` Marek Vasut
2015-07-06 21:50             ` Scott Wood
2015-07-06 21:57               ` Marek Vasut
2015-07-01 23:04 ` [U-Boot] [PATCH 8/8] tftp.c: fix CONFIG_TFTP_TSIZE for small files Marcel Ziswiler
2015-07-02  5:54   ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201507020754.11676.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox