diff options
author | Rob Landley <rob@landley.net> | 2005-12-15 08:42:55 +0300 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-12-15 08:42:55 +0300 |
commit | 5aabf4e41561a9b501997c088adbafbd68cd2f3a (patch) | |
tree | d2add95971ea5dae9924c1416d77f190ffadec68 /networking/tftp.c | |
parent | 483027f166c9c1625f986fcc12e09db3493fa60c (diff) |
Fix -g and -p options. Patch from Traceman. (I don't know who that is,
it's the darn bug generator again.)
Diffstat (limited to 'networking/tftp.c')
-rw-r--r-- | networking/tftp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index 96d8f3b79..cad0dcc45 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -511,7 +511,6 @@ int tftp_main(int argc, char **argv) int cmd = 0; int fd = -1; int flags = 0; - int opt; int result; int blocksize = TFTP_BLOCKSIZE_DEFAULT; @@ -551,7 +550,7 @@ int tftp_main(int argc, char **argv) #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 @@ int tftp_main(int argc, char **argv) } #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; |