summaryrefslogtreecommitdiff
path: root/networking/ftpgetput.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-29 11:09:43 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-29 11:09:43 +0000
commitc61852a02bd2d61682235ba3185173f527313827 (patch)
tree6af2895da70dda926317fac31cd4db6a4b20200c /networking/ftpgetput.c
parent601ae1378ba7bb59e9c1a19fcc4ddd7bf9fb2e1b (diff)
downloadbusybox-w32-c61852a02bd2d61682235ba3185173f527313827.tar.gz
busybox-w32-c61852a02bd2d61682235ba3185173f527313827.tar.bz2
busybox-w32-c61852a02bd2d61682235ba3185173f527313827.zip
fix support for globally disabling --long-options.
(disabling them saves ~4K on fully configured bbox)
Diffstat (limited to 'networking/ftpgetput.c')
-rw-r--r--networking/ftpgetput.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 1facfa3d8..223d2435c 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -264,15 +264,13 @@ int ftp_send(ftp_host_info_t *server, FILE *control_stream,
264 264
265#if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS 265#if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS
266static const struct option ftpgetput_long_options[] = { 266static const struct option ftpgetput_long_options[] = {
267 {"continue", 1, NULL, 'c'}, 267 { "continue", 1, NULL, 'c' },
268 {"verbose", 0, NULL, 'v'}, 268 { "verbose", 0, NULL, 'v' },
269 {"username", 1, NULL, 'u'}, 269 { "username", 1, NULL, 'u' },
270 {"password", 1, NULL, 'p'}, 270 { "password", 1, NULL, 'p' },
271 {"port", 1, NULL, 'P'}, 271 { "port", 1, NULL, 'P' },
272 {0, 0, 0, 0} 272 { 0, 0, 0, 0 }
273}; 273};
274#else
275#define ftpgetput_long_options 0
276#endif 274#endif
277 275
278int ftpgetput_main(int argc, char **argv) 276int ftpgetput_main(int argc, char **argv)
@@ -307,9 +305,9 @@ int ftpgetput_main(int argc, char **argv)
307 /* 305 /*
308 * Decipher the command line 306 * Decipher the command line
309 */ 307 */
310 if (ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS) 308#if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS
311 applet_long_options = ftpgetput_long_options; 309 applet_long_options = ftpgetput_long_options;
312 310#endif
313 opt = getopt32(argc, argv, "cvu:p:P:", &server->user, &server->password, &port); 311 opt = getopt32(argc, argv, "cvu:p:P:", &server->user, &server->password, &port);
314 312
315 /* Process the non-option command line arguments */ 313 /* Process the non-option command line arguments */