aboutsummaryrefslogtreecommitdiff
path: root/networking/tftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/tftp.c')
-rw-r--r--networking/tftp.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/networking/tftp.c b/networking/tftp.c
index 5baa80448..73a9829aa 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -761,15 +761,16 @@ int tftp_main(int argc UNUSED_PARAM, char **argv)
761 761
762 INIT_G(); 762 INIT_G();
763 763
764 /* -p or -g is mandatory, and they are mutually exclusive */ 764 IF_GETPUT(opt =) getopt32(argv, "^"
765 opt_complementary = "" IF_FEATURE_TFTP_GET("g:") IF_FEATURE_TFTP_PUT("p:")
766 IF_GETPUT("g--p:p--g:");
767
768 IF_GETPUT(opt =) getopt32(argv,
769 IF_FEATURE_TFTP_GET("g") IF_FEATURE_TFTP_PUT("p") 765 IF_FEATURE_TFTP_GET("g") IF_FEATURE_TFTP_PUT("p")
770 "l:r:" IF_FEATURE_TFTP_BLOCKSIZE("b:"), 766 "l:r:" IF_FEATURE_TFTP_BLOCKSIZE("b:")
767 "\0"
768 /* -p or -g is mandatory, and they are mutually exclusive */
769 IF_FEATURE_TFTP_GET("g:") IF_FEATURE_TFTP_PUT("p:")
770 IF_GETPUT("g--p:p--g:"),
771 &local_file, &remote_file 771 &local_file, &remote_file
772 IF_FEATURE_TFTP_BLOCKSIZE(, &blksize_str)); 772 IF_FEATURE_TFTP_BLOCKSIZE(, &blksize_str)
773 );
773 argv += optind; 774 argv += optind;
774 775
775# if ENABLE_FEATURE_TFTP_BLOCKSIZE 776# if ENABLE_FEATURE_TFTP_BLOCKSIZE