svn commit: trunk/busybox/networking

landley at busybox.net landley at busybox.net
Thu Dec 15 05:43:02 UTC 2005


Author: landley
Date: 2005-12-14 21:42:55 -0800 (Wed, 14 Dec 2005)
New Revision: 12889

Log:
Fix -g and -p options.  Patch from Traceman.  (I don't know who that is,
it's the darn bug generator again.)


Modified:
   trunk/busybox/networking/tftp.c


Changeset:
Modified: trunk/busybox/networking/tftp.c
===================================================================
--- trunk/busybox/networking/tftp.c	2005-12-15 05:29:48 UTC (rev 12888)
+++ trunk/busybox/networking/tftp.c	2005-12-15 05:42:55 UTC (rev 12889)
@@ -511,7 +511,6 @@
 	int cmd = 0;
 	int fd = -1;
 	int flags = 0;
-	int opt;
 	int result;
 	int blocksize = TFTP_BLOCKSIZE_DEFAULT;
 
@@ -551,7 +550,7 @@
 #endif
 
 	
-	opt = bb_getopt_ulflags(argc, argv, GET PUT "l:r:" BS, 
+	cmd = bb_getopt_ulflags(argc, argv, GET PUT "l:r:" BS, 
 				&localfile, &remotefile BS_ARG);
 #ifdef CONFIG_FEATURE_TFTP_BLOCKSIZE
 	if(sblocksize) {
@@ -562,7 +561,7 @@
 	}
 #endif
 
-	cmd &= (tftp_cmd_get & tftp_cmd_put);
+	cmd &= (tftp_cmd_get | tftp_cmd_put);
 #ifdef CONFIG_FEATURE_TFTP_GET
 	if(cmd == tftp_cmd_get)
 		flags = O_WRONLY | O_CREAT | O_TRUNC;




More information about the busybox-cvs mailing list