From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Make TFTP Quiet
Date: Thu, 13 Aug 2009 00:01:29 -0400 [thread overview]
Message-ID: <200908130001.30203.vapier@gentoo.org> (raw)
In-Reply-To: <200908101626.20218.rgetz@blackfin.uclinux.org>
On Monday 10 August 2009 16:26:20 Robin Getz wrote:
> From bca49fb5e3045bc175e924999a4015804c39c5c6 Mon Sep 17 00:00:00 2001
> From: Robin Getz <rgetz@blackfin.uclinux.org>
>
> I was using this when I was looking at some other recent tftp performance,
> and thought I would share. I really don't think it belongs, as it is
> (a) trivial and (b) mostly debug... (but I'm trying out some more things
> with git).
>
> This adds the ability to make tftp a little quieter, which saves some
> time printing hash marks on the console. It also has the ability to
> print some download stats for debugging network issues.
>
> Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
>
> ---
> net/tftp.c | 29 ++++++++++++++++++++++++-----
> 1 files changed, 24 insertions(+), 5 deletions(-)
>
> diff --git a/net/tftp.c b/net/tftp.c
> index 0fa7033..9544691 100644
> --- a/net/tftp.c
> +++ b/net/tftp.c
> @@ -22,6 +22,16 @@
> /* (for checking the image size) */
> #define HASHES_PER_LINE 65 /* Number of "loading" hashes per line */
>
> +#ifdef CONFIG_TFTP_QUIET
> +#define puts_quiet(fmt)
> +#else
> +#define puts_quiet(fmt) puts(fmt);
macros shouldnt insert semi-colons for you
> - putc ('#');
> + puts_quiet("#");
you might as well fix the style while you're here (no spaces before the open
paren)
> + printf("Time to download == %ld ms\n", end_time - start_time);
> + printf("Download rate = %lld bytes/second\n", (long
> long)(NetBootFileXferSize) * 1000 / (end_time - start_time));
shouldnt they both be = or == ? do you really need 64bit math ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090813/1d4969b4/attachment.pgp
prev parent reply other threads:[~2009-08-13 4:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 20:26 [U-Boot] [PATCH] Make TFTP Quiet Robin Getz
2009-08-10 20:55 ` Timur Tabi
2009-08-10 23:33 ` Scott Wood
2009-08-11 1:10 ` Robin Getz
2009-08-12 10:02 ` Detlev Zundel
2009-08-12 19:48 ` Scott Wood
2009-08-12 20:06 ` Robin Getz
2009-08-13 11:32 ` Detlev Zundel
2009-08-13 4:01 ` Mike Frysinger [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=200908130001.30203.vapier@gentoo.org \
--to=vapier@gentoo.org \
--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