public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hiroshi Ito <ito@mlb.co.jp>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Re: [Patch] default filename of tftp and nfs
Date: Mon, 06 Dec 2004 03:38:01 +0900	[thread overview]
Message-ID: <20041206033801V.ito@mlb.co.jp> (raw)
In-Reply-To: <20041206033522R.ito@mlb.co.jp>

Sorry, I attached wrong file.

Here is a correct patch.

From: Hiroshi Ito <ito@mlb.co.jp>
Subject: [Patch] default filename of tftp and nfs
Date: Mon, 06 Dec 2004 03:35:22 +0900
Message-Id: <20041206033522R.ito@mlb.co.jp>
> Hello,
> 
> default filename of tftp and nfs has different value between little endian
> machine and big one.
> 
> This patch fixes endian problem.
> 
> Patch is for current cvs.
> 
> --------
> Hiroshi Ito
> Media Lab. Inc.,
> URL http://www.mlb.co.jp ( Sorry, Japanese only. )
> TEL +81-3-5294-7255  FAX +81-3-5294-7256
-------------- next part --------------
Index: net/nfs.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/net/nfs.c,v
retrieving revision 1.8
diff -u -b -B -w -p -r1.8 nfs.c
--- net/nfs.c	28 Sep 2004 21:51:43 -0000	1.8
+++ net/nfs.c	5 Dec 2004 18:24:36 -0000
@@ -703,13 +703,11 @@ NfsStart (void)
 	}
 
 	if (BootFile[0] == '\0') {
-		IPaddr_t OurIP = ntohl (NetOurIP);
-
 		sprintf (default_filename, "/nfsroot/%02lX%02lX%02lX%02lX.img",
-			OurIP & 0xFF,
-			(OurIP >>  8) & 0xFF,
-			(OurIP >> 16) & 0xFF,
-			(OurIP >> 24) & 0xFF	);
+			NetOurIP & 0xFF,
+			(NetOurIP >>  8) & 0xFF,
+			(NetOurIP >> 16) & 0xFF,
+			(NetOurIP >> 24) & 0xFF	);
 		strcpy (nfs_path, default_filename);
 
 		printf ("*** Warning: no boot file name; using '%s'\n",
Index: net/tftp.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/net/tftp.c,v
retrieving revision 1.9
diff -u -b -B -w -p -r1.9 tftp.c
--- net/tftp.c	15 Apr 2004 21:48:55 -0000	1.9
+++ net/tftp.c	5 Dec 2004 18:24:36 -0000
@@ -302,13 +302,11 @@ void
 TftpStart (void)
 {
 	if (BootFile[0] == '\0') {
-		IPaddr_t OurIP = ntohl(NetOurIP);
-
 		sprintf(default_filename, "%02lX%02lX%02lX%02lX.img",
-			OurIP & 0xFF,
-			(OurIP >>  8) & 0xFF,
-			(OurIP >> 16) & 0xFF,
-			(OurIP >> 24) & 0xFF	);
+			NetOurIP & 0xFF,
+			(NetOurIP >>  8) & 0xFF,
+			(NetOurIP >> 16) & 0xFF,
+			(NetOurIP >> 24) & 0xFF	);
 		tftp_filename = default_filename;
 
 		printf ("*** Warning: no boot file name; using '%s'\n",

  reply	other threads:[~2004-12-05 18:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-05 18:35 [U-Boot-Users] [Patch] default filename of tftp and nfs Hiroshi Ito
2004-12-05 18:38 ` Hiroshi Ito [this message]
2005-08-03 23:11   ` [U-Boot-Users] " 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=20041206033801V.ito@mlb.co.jp \
    --to=ito@mlb.co.jp \
    --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