diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-08 03:01:10 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-08 03:01:10 +0100 |
commit | 115c35d68efa61f168c471df4627e4316952a69b (patch) | |
tree | d949887af5d0a8ae70340dd00207efde87a18e95 /networking | |
parent | 9283d7c5c24cb5875f1115117fde2c69ff7735dc (diff) |
ftpd: better usage text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/ftpd.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/networking/ftpd.c b/networking/ftpd.c index 64068e467..b59135667 100644 --- a/networking/ftpd.c +++ b/networking/ftpd.c @@ -12,6 +12,23 @@ * You have to run this daemon via inetd. */ +//usage:#define ftpd_trivial_usage +//usage: "[-wvS] [-t N] [-T N] [DIR]" +//usage:#define ftpd_full_usage "\n\n" +//usage: "Anonymous FTP server\n" +//usage: "\n" +//usage: "ftpd should be used as an inetd service.\n" +//usage: "ftpd's line for inetd.conf:\n" +//usage: " 21 stream tcp nowait root ftpd ftpd /files/to/serve\n" +//usage: "It also can be ran from tcpsvd:\n" +//usage: " tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve\n" +//usage: "\nOptions:" +//usage: "\n -w Allow upload" +//usage: "\n -v Log errors to stderr. -vv: verbose log" +//usage: "\n -S Log errors to syslog. -SS: verbose log" +//usage: "\n -t,-T Idle and absolute timeouts" +//usage: "\n DIR Change root to this directory" + #include "libbb.h" #include <syslog.h> #include <netinet/tcp.h> @@ -206,7 +223,7 @@ cmdio_write_error(unsigned status) { *(uint32_t *) G.msg_err = status; xwrite(STDOUT_FILENO, G.msg_err, sizeof("NNN " MSG_ERR) - 1); - if (G.verbose > 1) + if (G.verbose > 0) verbose_log(G.msg_err); } #define WRITE_ERR(a) cmdio_write_error(STRNUM32sp(a)) |