U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@saftware.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] fixed tftp error message output
Date: 19 Jul 2003 22:28:34 +0200	[thread overview]
Message-ID: <1058646514.774.55.camel@localhost> (raw)
In-Reply-To: <20030719192819.B3ED3C6D82@atlas.denx.de>

On Sat, 2003-07-19 at 21:28, Wolfgang Denk wrote:
> > This patch fixes tftp error message output, i.e. does not print the last
> > two bytes which contain garbage (at least for my setup, I hope this is
> > not a tftp server issue).
> 
> Is there a way to provoke such an error, so we can test this?

Just try to tftp a file which does not exist on the server or which does
not have correct permissions (leading to a "file not found" message). I
am using atftpd on debian sarge and sid.

> What happens if "len" turns out to be zero?

Ok, I'll add a check for it.

> If there really is such a problem, this should do as well (and  maybe
> better):
> 
> 	printf ("\nTFTP error: '%.*s' (%d)\n",
> 		len - 2,
> 		pkt + 2,
> 		ntohs(*(ushort *)pkt) );
> 
> Can you please test this (and eventually re-submit the patch) ?

I see, this would indeed be simpler. I didn't know %.*s until now. I
will try it when I come home next week.

Regards,
Andreas

  reply	other threads:[~2003-07-19 20:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-19  2:34 [U-Boot-Users] [PATCH] fixed tftp error message output Andreas Oberritter
2003-07-19 19:28 ` Wolfgang Denk
2003-07-19 20:28   ` Andreas Oberritter [this message]
2003-07-19 21:59     ` Wolfgang Denk
2003-07-19 22:31       ` Andreas Oberritter
2003-07-20 12:53         ` Wolfgang Denk

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=1058646514.774.55.camel@localhost \
    --to=obi@saftware.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