summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-08-04 01:09:44 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-08-04 01:09:44 +0200
commitc43352ccfa1ebeb15da26e52bcb152f614cbfe0a (patch)
tree9ece7bff185c2d8ae93c4aa690464e895e623a82
parent6dfa434e326babbf0209bfae01bb57424924d2a9 (diff)
downloadtalos-obmc-uboot-c43352ccfa1ebeb15da26e52bcb152f614cbfe0a.tar.gz
talos-obmc-uboot-c43352ccfa1ebeb15da26e52bcb152f614cbfe0a.zip
Fix endianess problem in TFTP / NFS default filenames
Patch by Hiroshi Ito, 06 Dec 2004
-rw-r--r--CHANGELOG3
-rw-r--r--net/nfs.c10
-rw-r--r--net/tftp.c10
3 files changed, 11 insertions, 12 deletions
diff --git a/CHANGELOG b/CHANGELOG
index b0b0c586a4..d54a159f8d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
Changes for U-Boot 1.1.3:
======================================================================
+* Fix endianess problem in TFTP / NFS default filenames
+ Patch by Hiroshi Ito, 06 Dec 2004
+
* Ignore broadcast status bit in received frames in 8260 FCC ethernet
loopback test code
Patch by Murray Jensen, 18 Jul 2005
diff --git a/net/nfs.c b/net/nfs.c
index 2d94c08f76..1c697ad346 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -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",
diff --git a/net/tftp.c b/net/tftp.c
index 5a5ae22ac8..64a5576663 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -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",
OpenPOWER on IntegriCloud