[U-Boot-Users] [Patch] default filename of tftp and nfs

Hiroshi Ito ito at mlb.co.jp
Sun Dec 5 19:35:22 CET 2004


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: common/command.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/common/command.c,v
retrieving revision 1.17
diff -u -b -B -w -p -r1.17 command.c
--- common/command.c	18 Apr 2004 17:39:39 -0000	1.17
+++ common/command.c	26 Nov 2004 12:06:12 -0000
@@ -136,9 +136,9 @@ do_test (cmd_tbl_t *cmdtp, int flag, int
 
 		if (adv == 2) {
 			if (strcmp(ap[0], "-z") == 0)
-				expr = strlen(ap[1]) == 0 ? 0 : 1;
-			else if (strcmp(ap[0], "-n") == 0)
 				expr = strlen(ap[1]) == 0 ? 1 : 0;
+			else if (strcmp(ap[0], "-n") == 0)
+				expr = strlen(ap[1]) == 0 ? 0 : 1;
 			else {
 				expr = 1;
 				break;


More information about the U-Boot mailing list