cp: FEATURE_CP_LONG_OPTIONS depends on LONG_OPTS
[oweals/busybox.git] / include / usage.h
index dfe05580d6dfb38d16b7341381078dc2b73c48c7..c7013de22ccbee4e8480dda99bb49cb45ca74aad 100644 (file)
 #define ftpd_trivial_usage \
        "[-wvS] [-t N] [-T N] [DIR]"
 #define ftpd_full_usage "\n\n" \
-       "FTP server\n" \
+       "Anonymous FTP server\n" \
        "\n" \
        "ftpd should be used as an inetd service.\n" \
        "ftpd's line for inetd.conf:\n" \
      "\n       -m              Get baud rate from modem's CONNECT status message" \
      "\n       -w              Wait for a CR or LF before sending /etc/issue" \
      "\n       -n              Do not prompt the user for a login name" \
-     "\n       -f issue_file   Display issue_file instead of /etc/issue" \
-     "\n       -l login_app    Invoke login_app instead of /bin/login" \
-     "\n       -t timeout      Terminate after timeout if no username is read" \
-     "\n       -I initstring   Init string to send before anything else" \
-     "\n       -H login_host   Log login_host into the utmp file as the hostname" \
+     "\n       -f ISSUE_FILE   Display ISSUE_FILE instead of /etc/issue" \
+     "\n       -l LOGIN        Invoke LOGIN instead of /bin/login" \
+     "\n       -t SEC          Terminate after SEC if no username is read" \
+     "\n       -I INITSTR      Send INITSTR before anything else" \
+     "\n       -H HOST         Log HOST into the utmp file as the hostname" \
 
 #define grep_trivial_usage \
        "[-HhrilLnqvso" \
      "\n       a       File is accessed" \
      "\n       c       File is modified" \
      "\n       e       Metadata changed" \
-     "\n       w       Writtable file is closed" \
-     "\n       0       Unwrittable file is closed" \
+     "\n       w       Writable file is closed" \
+     "\n       0       Unwritable file is closed" \
      "\n       r       File is opened" \
      "\n       D       File is deleted" \
      "\n       M       File is moved" \
        "       linux64         Set 64bit uname emulation" \
 
 #define ln_trivial_usage \
-       "[OPTIONS] TARGET... LINK_NAME|DIRECTORY"
+       "[OPTIONS] TARGET... LINK|DIRECTORY"
 #define ln_full_usage "\n\n" \
-       "Create a link named LINK_NAME or DIRECTORY to the specified TARGET.\n" \
-       "Use '--' to indicate that all following arguments are non-options.\n" \
+       "Create a link LINK or DIRECTORY/TARGET to the specified TARGET(s)\n" \
      "\nOptions:" \
      "\n       -s      Make symlinks instead of hardlinks" \
      "\n       -f      Remove existing destination files" \
        "-rw-------    1 andersen andersen        0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
 
 #define modprobe_trivial_usage \
-       "[-knqrsv] MODULE [symbol=value...]"
+       IF_MODPROBE_SMALL("[-qfwrsv] MODULE [symbol=value...]") \
+       IF_NOT_MODPROBE_SMALL("[-" \
+               IF_FEATURE_2_4_MODULES("k")"nqrsv" \
+               IF_FEATURE_MODPROBE_BLACKLIST("b")"] MODULE [symbol=value...]")
 #define modprobe_full_usage "\n\n" \
        "Options:" \
+       IF_MODPROBE_SMALL( \
+     "\n       -q      Quiet" \
+     "\n       -f      Force" \
+     "\n       -w      Wait for unload" \
+     "\n       -r      Remove module (stacks) or do autoclean" \
+     "\n       -s      Report via syslog instead of stderr" \
+     "\n       -v      Verbose" \
+       ) \
+       IF_NOT_MODPROBE_SMALL( \
        IF_FEATURE_2_4_MODULES( \
      "\n       -k      Make module autoclean-able" \
        ) \
      "\n       -v      Verbose" \
        IF_FEATURE_MODPROBE_BLACKLIST( \
      "\n       -b      Apply blacklist to module names too" \
-        )
+       ) \
+       )
 
 #define modprobe_notes_usage \
 "modprobe can (un)load a stack of modules, passing each module options (when\n" \
 #define chpasswd_trivial_usage \
        IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]")
 #define chpasswd_full_usage "\n\n" \
-       "Read user:password information from stdin " \
-       "and update /etc/passwd accordingly.\n" \
+       "Read user:password from stdin and update /etc/passwd\n" \
      "\nOptions:" \
        IF_LONG_OPTS( \
      "\n       -e,--encrypted  Supplied passwords are in encrypted form" \
        "Report process status\n" \
      "\nOptions:" \
      "\n       -o col1,col2=header     Select columns for display" \
+       IF_FEATURE_SHOW_THREADS( \
+     "\n       -T                      Show threads" \
+       )
 
 #else /* !ENABLE_DESKTOP */
 
 #define rmdir_full_usage "\n\n" \
        "Remove the DIRECTORY, if it is empty\n" \
      "\nOptions:" \
-     IF_FEATURE_RMDIR_LONG_OPTIONS( \
+       IF_FEATURE_RMDIR_LONG_OPTIONS( \
      "\n       -p|--parents    Include parents" \
-     "\n       -ignore-fail-on-non-empty" \
-     ) \
-     IF_NOT_FEATURE_RMDIR_LONG_OPTIONS( \
+     "\n       --ignore-fail-on-non-empty" \
+       ) \
+       IF_NOT_FEATURE_RMDIR_LONG_OPTIONS( \
      "\n       -p      Include parents" \
-     )
+       )
 
 #define rmdir_example_usage \
        "# rmdir /tmp/foo\n"
      "\n       -l      Log changes in file labels to syslog" \
      "\n       -n      Don't change any file labels" \
      "\n       -q      Suppress warnings" \
-     "\n       -r dir  Use an altenate root path" \
+     "\n       -r dir  Use an alternate root path" \
      "\n       -e dir  Exclude directory" \
      "\n       -F      Force reset of context to match file_context for customizable files" \
      "\n       -o file Save list of files with incorrect context" \
        IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
      "\nOptions:" \
      "\n       -l LOGIN        Exec LOGIN on connect" \
-     "\n       -f issue_file   Display issue_file instead of /etc/issue" \
+     "\n       -f ISSUE_FILE   Display ISSUE_FILE instead of /etc/issue" \
      "\n       -K              Close connection as soon as login exits" \
      "\n                       (normally wait until all programs close slave pty)" \
        IF_FEATURE_TELNETD_STANDALONE( \
      "\n       -p PORT         Port to listen on" \
-     "\n       -b ADDR         Address to bind to" \
+     "\n       -b ADDR[:PORT]  Address to bind to" \
      "\n       -F              Run in foreground" \
-     "\n       -i              Run as inetd subservice" \
+     "\n       -i              Run as inetd service" \
+       IF_FEATURE_TELNETD_INETD_WAIT( \
+     "\n       -w SEC          Run as inetd service in wait mode, linger time SEC" \
+     "\n       -S              Log to syslog (implied by -i or without -F and -w)" \
+       ) \
        )
 
 /* "test --help" does not print help (POSIX compat), only "[ --help" does.
        "Defaults: SECS: 10, SIG: TERM." \
 
 #define top_trivial_usage \
-       "[-b] [-nCOUNT] [-dSECONDS]"
+       "[-b] [-nCOUNT] [-dSECONDS]" IF_FEATURE_TOPMEM(" [-m]")
 #define top_full_usage "\n\n" \
        "Provide a view of process activity in real time.\n" \
        "Read the status of all processes from /proc each SECONDS\n" \