From: Denys Vlasenko Date: Wed, 23 Nov 2016 08:07:44 +0000 (+0100) Subject: Rename FEATURE_FTP_WRITE and FEATURE_FTP_AUTHENTICATION to *_FTPD_* X-Git-Tag: 1_26_0~53 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3148e0c05be2e90def3fbe0da2ecc96094725e41;p=oweals%2Fbusybox.git Rename FEATURE_FTP_WRITE and FEATURE_FTP_AUTHENTICATION to *_FTPD_* Signed-off-by: Denys Vlasenko --- diff --git a/networking/ftpd.c b/networking/ftpd.c index d4e6c27ce..bcd60a2ad 100644 --- a/networking/ftpd.c +++ b/networking/ftpd.c @@ -17,7 +17,7 @@ //config: help //config: simple FTP daemon. You have to run it via inetd. //config: -//config:config FEATURE_FTP_WRITE +//config:config FEATURE_FTPD_WRITE //config: bool "Enable upload commands" //config: default y //config: depends on FTPD @@ -35,7 +35,7 @@ //config: it increases the code size by ~40 bytes. //config: Most other ftp servers seem to behave similar to this. //config: -//config:config FEATURE_FTP_AUTHENTICATION +//config:config FEATURE_FTPD_AUTHENTICATION //config: bool "Enable authentication" //config: default y //config: depends on FTPD @@ -151,7 +151,7 @@ struct globals { len_and_sockaddr *port_addr; char *ftp_cmd; char *ftp_arg; -#if ENABLE_FEATURE_FTP_WRITE +#if ENABLE_FEATURE_FTPD_WRITE char *rnfr_filename; #endif /* We need these aligned to uint32_t */ @@ -865,7 +865,7 @@ handle_size_or_mdtm(int need_size) /* Upload commands */ -#if ENABLE_FEATURE_FTP_WRITE +#if ENABLE_FEATURE_FTPD_WRITE static void handle_mkd(void) { @@ -1008,7 +1008,7 @@ handle_stou(void) G.restart_pos = 0; handle_upload_common(0, 1); } -#endif /* ENABLE_FEATURE_FTP_WRITE */ +#endif /* ENABLE_FEATURE_FTPD_WRITE */ static uint32_t cmdio_get_cmd_and_arg(void) @@ -1142,7 +1142,7 @@ enum { #endif OPT_v = (1 << ((!BB_MMU) * 3 + 0)), OPT_S = (1 << ((!BB_MMU) * 3 + 1)), - OPT_w = (1 << ((!BB_MMU) * 3 + 2)) * ENABLE_FEATURE_FTP_WRITE, + OPT_w = (1 << ((!BB_MMU) * 3 + 2)) * ENABLE_FEATURE_FTPD_WRITE, }; int ftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; @@ -1152,7 +1152,7 @@ int ftpd_main(int argc, char **argv) int ftpd_main(int argc UNUSED_PARAM, char **argv) #endif { -#if ENABLE_FEATURE_FTP_AUTHENTICATION +#if ENABLE_FEATURE_FTPD_AUTHENTICATION struct passwd *pw = NULL; #endif unsigned abs_timeout; @@ -1166,9 +1166,9 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) G.timeout = 2 * 60; opt_complementary = "vv:SS"; #if BB_MMU - opts = getopt32(argv, "vS" IF_FEATURE_FTP_WRITE("w") "t:+T:+", &G.timeout, &abs_timeout, &G.verbose, &verbose_S); + opts = getopt32(argv, "vS" IF_FEATURE_FTPD_WRITE("w") "t:+T:+", &G.timeout, &abs_timeout, &G.verbose, &verbose_S); #else - opts = getopt32(argv, "l1AvS" IF_FEATURE_FTP_WRITE("w") "t:+T:+", &G.timeout, &abs_timeout, &G.verbose, &verbose_S); + opts = getopt32(argv, "l1AvS" IF_FEATURE_FTPD_WRITE("w") "t:+T:+", &G.timeout, &abs_timeout, &G.verbose, &verbose_S); if (opts & (OPT_l|OPT_1)) { /* Our secret backdoor to ls */ /* TODO: pass --group-directories-first? would be nice, but ls doesn't do that yet */ @@ -1231,7 +1231,7 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) WRITE_OK(FTP_GREET); signal(SIGALRM, timeout_handler); -#if ENABLE_FEATURE_FTP_AUTHENTICATION +#if ENABLE_FEATURE_FTPD_AUTHENTICATION while (1) { uint32_t cmdval = cmdio_get_cmd_and_arg(); if (cmdval == const_USER) { @@ -1281,7 +1281,7 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) xchdir(basedir); } -#if ENABLE_FEATURE_FTP_AUTHENTICATION +#if ENABLE_FEATURE_FTPD_AUTHENTICATION change_identity(pw); #endif @@ -1388,7 +1388,7 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) handle_port(); else if (cmdval == const_REST) handle_rest(); -#if ENABLE_FEATURE_FTP_WRITE +#if ENABLE_FEATURE_FTPD_WRITE else if (opts & OPT_w) { if (cmdval == const_STOR) handle_stor(); @@ -1428,7 +1428,7 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) * (doesn't necessarily mean "we must support them") * foo 1.2.3: XXXX - comment */ -#if ENABLE_FEATURE_FTP_WRITE +#if ENABLE_FEATURE_FTPD_WRITE bad_cmd: #endif cmdio_write_raw(STR(FTP_BADCMD)" Unknown command\r\n");