summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorVladimir Dronnikov2009-10-23 23:34:43 +0200
committerDenys Vlasenko2009-10-23 23:34:43 +0200
commit1dacfbb1f466a2964cbf49855f336bcc1d25ebc0 (patch)
treec0fd2cd5645e19cef4e1d9945a4fe70189ade51a /networking
parent337a31b0741f5e9ba32bedd750ab99bb253085dc (diff)
downloadbusybox-1dacfbb1f466a2964cbf49855f336bcc1d25ebc0.zip
busybox-1dacfbb1f466a2964cbf49855f336bcc1d25ebc0.tar.gz
ftpget/put: make 3rd parameter optional
function old new delta packed_usage 26728 26738 +10 ftpgetput_main 343 351 +8 Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/ftpgetput.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index d39b73e..c0ecdda 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -306,7 +306,7 @@ int ftpgetput_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS
applet_long_options = ftpgetput_longopts;
#endif
- opt_complementary = "=3:vv:cc"; /* must have 3 params; -v and -c count */
+ opt_complementary = "-2:vv:cc"; /* must have 2 to 3 params; -v and -c count */
opt = getopt32(argv, "cvu:p:P:", &user, &password, &port,
&verbose_flag, &do_continue);
argv += optind;
@@ -321,5 +321,5 @@ int ftpgetput_main(int argc UNUSED_PARAM, char **argv)
}
ftp_login();
- return ftp_action(argv[1], argv[2]);
+ return ftp_action(argv[1], argv[2] ? argv[2] : argv[1]);
}