summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPere Orga2011-04-01 22:56:30 +0200
committerDenys Vlasenko2011-04-03 01:33:55 +0200
commit6a3e01d5a9f979f7d6e52665c2bf6c74e2592980 (patch)
treeb7d40d6e0c6042f0d102101ff7b5784d2f0536ba
parentfa9126e68904b16aee2a0fc47688ffe17403152a (diff)
downloadbusybox-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.zip
busybox-6a3e01d5a9f979f7d6e52665c2bf6c74e2592980.tar.gz
move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/length.c.disabled9
-rw-r--r--debianutils/pipe_progress.c4
-rw-r--r--debianutils/run_parts.c26
-rw-r--r--debianutils/start_stop_daemon.c63
-rw-r--r--debianutils/which.c9
-rw-r--r--e2fsprogs/chattr.c24
-rw-r--r--e2fsprogs/fsck.c14
-rw-r--r--e2fsprogs/lsattr.c11
-rw-r--r--editors/awk.c8
-rw-r--r--editors/cmp.c9
-rw-r--r--editors/diff.c22
-rw-r--r--editors/ed.c3
-rw-r--r--editors/sed.c17
-rw-r--r--editors/vi.c13
-rw-r--r--include/usage.src.h400
-rw-r--r--loginutils/addgroup.c9
-rw-r--r--loginutils/adduser.c15
-rw-r--r--loginutils/chpasswd.c14
-rw-r--r--loginutils/cryptpw.c39
-rw-r--r--loginutils/deluser.c12
-rw-r--r--loginutils/login.c10
-rw-r--r--loginutils/passwd.c12
-rw-r--r--loginutils/sulogin.c7
-rw-r--r--loginutils/vlock.c7
-rw-r--r--mailutils/mime.c27
-rw-r--r--mailutils/popmaildir.c34
26 files changed, 418 insertions, 400 deletions
diff --git a/coreutils/length.c.disabled b/coreutils/length.c.disabled
index 7f0b48c..aee898d 100644
--- a/coreutils/length.c.disabled
+++ b/coreutils/length.c.disabled
@@ -5,6 +5,15 @@
/* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */
+//usage:#define length_trivial_usage
+//usage: "STRING"
+//usage:#define length_full_usage "\n\n"
+//usage: "Print STRING's length"
+//usage:
+//usage:#define length_example_usage
+//usage: "$ length Hello\n"
+//usage: "5\n"
+
#include "libbb.h"
/* This is a NOFORK applet. Be very careful! */
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c
index 1e57dc2..2c7444f 100644
--- a/debianutils/pipe_progress.c
+++ b/debianutils/pipe_progress.c
@@ -6,6 +6,10 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define pipe_progress_trivial_usage NOUSAGE_STR
+//usage:#define pipe_progress_full_usage ""
+
#include "libbb.h"
#define PIPE_PROGRESS_SIZE 4096
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index b93a5a9..0c23026 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -30,6 +30,32 @@
* -u MASK umask. Set the umask of the program executed to MASK.
*/
+//usage:#define run_parts_trivial_usage
+//usage: "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
+//usage:#define run_parts_full_usage "\n\n"
+//usage: "Run a bunch of scripts in DIRECTORY\n"
+//usage: "\nOptions:"
+//usage: "\n -t Print what would be run, but don't actually run anything"
+//usage: "\n -a ARG Pass ARG as argument for every program"
+//usage: "\n -u MASK Set the umask to MASK before running every program"
+//usage: IF_FEATURE_RUN_PARTS_FANCY(
+//usage: "\n -l Print names of all matching files even if they are not executable"
+//usage: )
+//usage:
+//usage:#define run_parts_example_usage
+//usage: "$ run-parts -a start /etc/init.d\n"
+//usage: "$ run-parts -a stop=now /etc/init.d\n\n"
+//usage: "Let's assume you have a script foo/dosomething:\n"
+//usage: "#!/bin/sh\n"
+//usage: "for i in $*; do eval $i; done; unset i\n"
+//usage: "case \"$1\" in\n"
+//usage: "start*) echo starting something;;\n"
+//usage: "stop*) set -x; shutdown -h $stop;;\n"
+//usage: "esac\n\n"
+//usage: "Running this yields:\n"
+//usage: "$run-parts -a stop=+4m foo/\n"
+//usage: "+ shutdown -h +4m"
+
#include "libbb.h"
struct globals {
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index d2ee950..30dd970 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -56,6 +56,69 @@ Misc options:
-v,--verbose Verbose
*/
+//usage:#define start_stop_daemon_trivial_usage
+//usage: "[OPTIONS] [-S|-K] ... [-- ARGS...]"
+//usage:#define start_stop_daemon_full_usage "\n\n"
+//usage: "Search for matching processes, and then\n"
+//usage: "-K: stop all matching processes.\n"
+//usage: "-S: start a process unless a matching process is found.\n"
+//usage: IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS(
+//usage: "\nProcess matching:"
+//usage: "\n -u,--user USERNAME|UID Match only this user's processes"
+//usage: "\n -n,--name NAME Match processes with NAME"
+//usage: "\n in comm field in /proc/PID/stat"
+//usage: "\n -x,--exec EXECUTABLE Match processes with this command"
+//usage: "\n in /proc/PID/cmdline"
+//usage: "\n -p,--pidfile FILE Match a process with PID from the file"
+//usage: "\n All specified conditions must match"
+//usage: "\n-S only:"
+//usage: "\n -x,--exec EXECUTABLE Program to run"
+//usage: "\n -a,--startas NAME Zeroth argument"
+//usage: "\n -b,--background Background"
+//usage: IF_FEATURE_START_STOP_DAEMON_FANCY(
+//usage: "\n -N,--nicelevel N Change nice level"
+//usage: )
+//usage: "\n -c,--chuid USER[:[GRP]] Change to user/group"
+//usage: "\n -m,--make-pidfile Write PID to the pidfile specified by -p"
+//usage: "\n-K only:"
+//usage: "\n -s,--signal SIG Signal to send"
+//usage: "\n -t,--test Match only, exit with 0 if a process is found"
+//usage: "\nOther:"
+//usage: IF_FEATURE_START_STOP_DAEMON_FANCY(
+//usage: "\n -o,--oknodo Exit with status 0 if nothing is done"
+//usage: "\n -v,--verbose Verbose"
+//usage: )
+//usage: "\n -q,--quiet Quiet"
+//usage: )
+//usage: IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS(
+//usage: "\nProcess matching:"
+//usage: "\n -u USERNAME|UID Match only this user's processes"
+//usage: "\n -n NAME Match processes with NAME"
+//usage: "\n in comm field in /proc/PID/stat"
+//usage: "\n -x EXECUTABLE Match processes with this command"
+//usage: "\n command in /proc/PID/cmdline"
+//usage: "\n -p FILE Match a process with PID from the file"
+//usage: "\n All specified conditions must match"
+//usage: "\n-S only:"
+//usage: "\n -x EXECUTABLE Program to run"
+//usage: "\n -a NAME Zeroth argument"
+//usage: "\n -b Background"
+//usage: IF_FEATURE_START_STOP_DAEMON_FANCY(
+//usage: "\n -N N Change nice level"
+//usage: )
+//usage: "\n -c USER[:[GRP]] Change to user/group"
+//usage: "\n -m Write PID to the pidfile specified by -p"
+//usage: "\n-K only:"
+//usage: "\n -s SIG Signal to send"
+//usage: "\n -t Match only, exit with 0 if a process is found"
+//usage: "\nOther:"
+//usage: IF_FEATURE_START_STOP_DAEMON_FANCY(
+//usage: "\n -o Exit with status 0 if nothing is done"
+//usage: "\n -v Verbose"
+//usage: )
+//usage: "\n -q Quiet"
+//usage: )
+
#include <sys/resource.h>
/* Override ENABLE_FEATURE_PIDFILE */
diff --git a/debianutils/which.c b/debianutils/which.c
index a826419..15fd598 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -10,6 +10,15 @@
* Based on which from debianutils
*/
+//usage:#define which_trivial_usage
+//usage: "[COMMAND]..."
+//usage:#define which_full_usage "\n\n"
+//usage: "Locate a COMMAND"
+//usage:
+//usage:#define which_example_usage
+//usage: "$ which login\n"
+//usage: "/bin/login\n"
+
#include "libbb.h"
int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c
index ab52cb0..b1c77fa 100644
--- a/e2fsprogs/chattr.c
+++ b/e2fsprogs/chattr.c
@@ -19,6 +19,30 @@
* 98/12/29 - Display version info only when -V specified (G M Sipe)
*/
+//usage:#define chattr_trivial_usage
+//usage: "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..."
+//usage:#define chattr_full_usage "\n\n"
+//usage: "Change file attributes on an ext2 fs\n"
+//usage: "\nModifiers:"
+//usage: "\n - Remove attributes"
+//usage: "\n + Add attributes"
+//usage: "\n = Set attributes"
+//usage: "\nAttributes:"
+//usage: "\n A Don't track atime"
+//usage: "\n a Append mode only"
+//usage: "\n c Enable compress"
+//usage: "\n D Write dir contents synchronously"
+//usage: "\n d Don't backup with dump"
+//usage: "\n i Cannot be modified (immutable)"
+//usage: "\n j Write all data to journal first"
+//usage: "\n s Zero disk storage when deleted"
+//usage: "\n S Write file contents synchronously"
+//usage: "\n t Disable tail-merging of partial blocks with other files"
+//usage: "\n u Allow file to be undeleted"
+//usage: "\nOptions:"
+//usage: "\n -R Recurse"
+//usage: "\n -v Set the file's version/generation number"
+
#include "libbb.h"
#include "e2fs_lib.h"
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index a86a9d9..b4257a2 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -34,6 +34,20 @@
* It doesn't guess filesystem types from on-disk format.
*/
+//usage:#define fsck_trivial_usage
+//usage: "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..."
+//usage:#define fsck_full_usage "\n\n"
+//usage: "Check and repair filesystems\n"
+//usage: "\nOptions:"
+//usage: "\n -A Walk /etc/fstab and check all filesystems"
+//usage: "\n -N Don't execute, just show what would be done"
+//usage: "\n -P With -A, check filesystems in parallel"
+//usage: "\n -R With -A, skip the root filesystem"
+//usage: "\n -T Don't show title on startup"
+//usage: "\n -V Verbose"
+//usage: "\n -C n Write status information to specified filedescriptor"
+//usage: "\n -t TYPE List of filesystem types to check"
+
#include "libbb.h"
/* "progress indicator" code is somewhat buggy and ext[23] specific.
diff --git a/e2fsprogs/lsattr.c b/e2fsprogs/lsattr.c
index 7d475a9..964e8d0 100644
--- a/e2fsprogs/lsattr.c
+++ b/e2fsprogs/lsattr.c
@@ -18,6 +18,17 @@
* 98/12/29 - Display version info only when -V specified (G M Sipe)
*/
+//usage:#define lsattr_trivial_usage
+//usage: "[-Radlv] [FILE]..."
+//usage:#define lsattr_full_usage "\n\n"
+//usage: "List file attributes on an ext2 fs\n"
+//usage: "\nOptions:"
+//usage: "\n -R Recurse"
+//usage: "\n -a Don't hide entries starting with ."
+//usage: "\n -d List directory entries instead of contents"
+//usage: "\n -l List long flag names"
+//usage: "\n -v List the file's version/generation number"
+
#include "libbb.h"
#include "e2fs_lib.h"
diff --git a/editors/awk.c b/editors/awk.c
index 2eeb9d7..9d38b1f 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -7,6 +7,14 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define awk_trivial_usage
+//usage: "[OPTIONS] [AWK_PROGRAM] [FILE]..."
+//usage:#define awk_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -v VAR=VAL Set variable"
+//usage: "\n -F SEP Use SEP as field separator"
+//usage: "\n -f FILE Read program from FILE"
+
#include "libbb.h"
#include "xregex.h"
#include <math.h>
diff --git a/editors/cmp.c b/editors/cmp.c
index f84a56e..3a0f5aa 100644
--- a/editors/cmp.c
+++ b/editors/cmp.c
@@ -10,6 +10,15 @@
/* BB_AUDIT SUSv3 (virtually) compliant -- uses nicer GNU format for -l. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/cmp.html */
+//usage:#define cmp_trivial_usage
+//usage: "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
+//usage:#define cmp_full_usage "\n\n"
+//usage: "Compare FILE1 with FILE2 (or stdin)\n"
+//usage: "\nOptions:"
+//usage: "\n -l Write the byte numbers (decimal) and values (octal)"
+//usage: "\n for all differing bytes"
+//usage: "\n -s Quiet"
+
#include "libbb.h"
static const char fmt_eof[] ALIGN1 = "cmp: EOF on %s\n";
diff --git a/editors/diff.c b/editors/diff.c
index 3719bb4..daa58af 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -76,6 +76,28 @@
* 6n words for files of length n.
*/
+//usage:#define diff_trivial_usage
+//usage: "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
+//usage:#define diff_full_usage "\n\n"
+//usage: "Compare files line by line and output the differences between them.\n"
+//usage: "This implementation supports unified diffs only.\n"
+//usage: "\nOptions:"
+//usage: "\n -a Treat all files as text"
+//usage: "\n -b Ignore changes in the amount of whitespace"
+//usage: "\n -B Ignore changes whose lines are all blank"
+//usage: "\n -d Try hard to find a smaller set of changes"
+//usage: "\n -i Ignore case differences"
+//usage: "\n -L Use LABEL instead of the filename in the unified header"
+//usage: "\n -N Treat absent files as empty"
+//usage: "\n -q Output only whether files differ"
+//usage: "\n -r Recurse"
+//usage: "\n -S Start with FILE when comparing directories"
+//usage: "\n -T Make tabs line up by prefixing a tab when necessary"
+//usage: "\n -s Report when two files are the same"
+//usage: "\n -t Expand tabs to spaces in output"
+//usage: "\n -U Output LINES lines of context"
+//usage: "\n -w Ignore all whitespace"
+
#include "libbb.h"
#if 0
diff --git a/editors/ed.c b/editors/ed.c
index b1b6a8d..41ac88c 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -7,6 +7,9 @@
* The "ed" built-in command (much simplified)
*/
+//usage:#define ed_trivial_usage ""
+//usage:#define ed_full_usage ""
+
#include "libbb.h"
typedef struct LINE {
diff --git a/editors/sed.c b/editors/sed.c
index d355524..9ab758b 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -58,6 +58,23 @@
Reference http://www.opengroup.org/onlinepubs/007904975/utilities/sed.html
*/
+//usage:#define sed_trivial_usage
+//usage: "[-efinr] SED_CMD [FILE]..."
+//usage:#define sed_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -e CMD Add CMD to sed commands to be executed"
+//usage: "\n -f FILE Add FILE contents to sed commands to be executed"
+//usage: "\n -i Edit files in-place (else sends result to stdout)"
+//usage: "\n -n Suppress automatic printing of pattern space"
+//usage: "\n -r Use extended regex syntax"
+//usage: "\n"
+//usage: "\nIf no -e or -f, the first non-option argument is the sed command string."
+//usage: "\nRemaining arguments are input files (stdin if none)."
+//usage:
+//usage:#define sed_example_usage
+//usage: "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n"
+//usage: "bar\n"
+
#include "libbb.h"
#include "xregex.h"
diff --git a/editors/vi.c b/editors/vi.c
index 602fc61..fd8bd0f 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -21,6 +21,19 @@
* An "ex" line oriented mode- maybe using "cmdedit"
*/
+//usage:#define vi_trivial_usage
+//usage: "[OPTIONS] [FILE]..."
+//usage:#define vi_full_usage "\n\n"
+//usage: "Edit FILE\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_VI_COLON(
+//usage: "\n -c Initial command to run ($EXINIT also available)"
+//usage: )
+//usage: IF_FEATURE_VI_READONLY(
+//usage: "\n -R Read-only"
+//usage: )
+//usage: "\n -H Short help regarding available features"
+
#include "libbb.h"
/* the CRASHME code is unmaintained, and doesn't currently build */
diff --git a/include/usage.src.h b/include/usage.src.h
index d836093..2c88c46 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -40,28 +40,6 @@ INSERT
"# acpid -l /var/log/my-acpi-log\n" \
"# acpid -e /proc/acpi/event\n"
-#define addgroup_trivial_usage \
- "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP"
-#define addgroup_full_usage "\n\n" \
- "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \
- "\nOptions:" \
- "\n -g GID Group id" \
- "\n -S Create a system group" \
-
-#define adduser_trivial_usage \
- "[OPTIONS] USER"
-#define adduser_full_usage "\n\n" \
- "Add a user\n" \
- "\nOptions:" \
- "\n -h DIR Home directory" \
- "\n -g GECOS GECOS field" \
- "\n -s SHELL Login shell" \
- "\n -G GRP Add user to existing group" \
- "\n -S Create a system user" \
- "\n -D Don't assign a password" \
- "\n -H Don't create home directory" \
- "\n -u UID User id" \
-
#define adjtimex_trivial_usage \
"[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]"
#define adjtimex_full_usage "\n\n" \
@@ -110,14 +88,6 @@ INSERT
"\n -s SRC_IP Sender IP address" \
"\n DST_IP Target IP address" \
-#define awk_trivial_usage \
- "[OPTIONS] [AWK_PROGRAM] [FILE]..."
-#define awk_full_usage "\n\n" \
- "Options:" \
- "\n -v VAR=VAL Set variable" \
- "\n -F SEP Use SEP as field separator" \
- "\n -f FILE Read program from FILE" \
-
#define beep_trivial_usage \
"-f FREQ -l LEN -d DELAY -r COUNT -n"
#define beep_full_usage "\n\n" \
@@ -167,30 +137,6 @@ INSERT
"each pair is a pair of arguments. Example:\n" \
"chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'" \
-#define chattr_trivial_usage \
- "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..."
-#define chattr_full_usage "\n\n" \
- "Change file attributes on an ext2 fs\n" \
- "\nModifiers:" \
- "\n - Remove attributes" \
- "\n + Add attributes" \
- "\n = Set attributes" \
- "\nAttributes:" \
- "\n A Don't track atime" \
- "\n a Append mode only" \
- "\n c Enable compress" \
- "\n D Write dir contents synchronously" \
- "\n d Don't backup with dump" \
- "\n i Cannot be modified (immutable)" \
- "\n j Write all data to journal first" \
- "\n s Zero disk storage when deleted" \
- "\n S Write file contents synchronously" \
- "\n t Disable tail-merging of partial blocks with other files" \
- "\n u Allow file to be undeleted" \
- "\nOptions:" \
- "\n -R Recurse" \
- "\n -v Set the file's version/generation number" \
-
#define chcon_trivial_usage \
"[OPTIONS] CONTEXT FILE..." \
"\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \
@@ -284,15 +230,6 @@ INSERT
"\n -t N Limit CPU time, process receives" \
"\n a SIGXCPU after N seconds" \
-#define cmp_trivial_usage \
- "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
-#define cmp_full_usage "\n\n" \
- "Compare FILE1 with FILE2 (or stdin)\n" \
- "\nOptions:" \
- "\n -l Write the byte numbers (decimal) and values (octal)" \
- "\n for all differing bytes" \
- "\n -s Quiet" \
-
#define bbconfig_trivial_usage \
""
#define bbconfig_full_usage "\n\n" \
@@ -355,57 +292,6 @@ INSERT
"\n -r Delete crontab" \
"\n FILE Replace crontab by FILE ('-': stdin)" \
-#define cryptpw_trivial_usage \
- "[OPTIONS] [PASSWORD] [SALT]"
-/* We do support -s, we just don't mention it */
-#define cryptpw_full_usage "\n\n" \
- "Crypt the PASSWORD using crypt(3)\n" \
- "\nOptions:" \
- IF_LONG_OPTS( \
- "\n -P,--password-fd=N Read password from fd N" \
-/* "\n -s,--stdin Use stdin; like -P0" */ \
- "\n -m,--method=TYPE Encryption method TYPE" \
- "\n -S,--salt=SALT" \
- ) \
- IF_NOT_LONG_OPTS( \
- "\n -P N Read password from fd N" \
-/* "\n -s Use stdin; like -P0" */ \
- "\n -m TYPE Encryption method TYPE" \
- "\n -S SALT" \
- ) \
-
-/* mkpasswd is an alias to cryptpw */
-
-#define mkpasswd_trivial_usage \
- "[OPTIONS] [PASSWORD] [SALT]"
-/* We do support -s, we just don't mention it */
-#define mkpasswd_full_usage "\n\n" \
- "Crypt the PASSWORD using crypt(3)\n" \
- "\nOptions:" \
- IF_LONG_OPTS( \
- "\n -P,--password-fd=N Read password from fd N" \
-/* "\n -s,--stdin Use stdin; like -P0" */ \
- "\n -m,--method=TYPE Encryption method TYPE" \
- "\n -S,--salt=SALT" \
- ) \
- IF_NOT_LONG_OPTS( \
- "\n -P N Read password from fd N" \
-/* "\n -s Use stdin; like -P0" */ \
- "\n -m TYPE Encryption method TYPE" \
- "\n -S SALT" \
- ) \
-
-#define delgroup_trivial_usage \
- IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
-#define delgroup_full_usage "\n\n" \
- "Delete group GROUP from the system" \
- IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
-
-#define deluser_trivial_usage \
- "USER"
-#define deluser_full_usage "\n\n" \
- "Delete USER from the system"
-
#define devmem_trivial_usage \
"ADDRESS [WIDTH [VALUE]]"
@@ -435,28 +321,6 @@ INSERT
#define dhcprelay_full_usage "\n\n" \
"Relay DHCP requests between clients and server" \
-#define diff_trivial_usage \
- "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
-#define diff_full_usage "\n\n" \
- "Compare files line by line and output the differences between them.\n" \
- "This implementation supports unified diffs only.\n" \
- "\nOptions:" \
- "\n -a Treat all files as text" \
- "\n -b Ignore changes in the amount of whitespace" \
- "\n -B Ignore changes whose lines are all blank" \
- "\n -d Try hard to find a smaller set of changes" \
- "\n -i Ignore case differences" \
- "\n -L Use LABEL instead of the filename in the unified header" \
- "\n -N Treat absent files as empty" \
- "\n -q Output only whether files differ" \
- "\n -r Recurse" \
- "\n -S Start with FILE when comparing directories" \
- "\n -T Make tabs line up by prefixing a tab when necessary" \
- "\n -s Report when two files are the same" \
- "\n -t Expand tabs to spaces in output" \
- "\n -U Output LINES lines of context" \
- "\n -w Ignore all whitespace" \
-
#define dmesg_trivial_usage \
"[-c] [-n LEVEL] [-s SIZE]"
#define dmesg_full_usage "\n\n" \
@@ -531,9 +395,6 @@ INSERT
"\n -t Close tray" \
"\n -T Open/close tray (toggle)" \
-#define ed_trivial_usage ""
-#define ed_full_usage ""
-
#define ether_wake_trivial_usage \
"[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
#define ether_wake_full_usage "\n\n" \
@@ -679,20 +540,6 @@ INSERT
#define freeramdisk_example_usage \
"$ freeramdisk /dev/ram2\n"
-#define fsck_trivial_usage \
- "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..."
-#define fsck_full_usage "\n\n" \
- "Check and repair filesystems\n" \
- "\nOptions:" \
- "\n -A Walk /etc/fstab and check all filesystems" \
- "\n -N Don't execute, just show what would be done" \
- "\n -P With -A, check filesystems in parallel" \
- "\n -R With -A, skip the root filesystem" \
- "\n -T Don't show title on startup" \
- "\n -V Verbose" \
- "\n -C n Write status information to specified filedescriptor" \
- "\n -t TYPE List of filesystem types to check" \
-
#define fsck_minix_trivial_usage \
"[-larvsmf] BLOCKDEV"
#define fsck_minix_full_usage "\n\n" \
@@ -1279,15 +1126,6 @@ INSERT
#define logger_example_usage \
"$ logger \"hello\"\n"
-#define login_trivial_usage \
- "[-p] [-h HOST] [[-f] USER]"
-#define login_full_usage "\n\n" \
- "Begin a new session on the system\n" \
- "\nOptions:" \
- "\n -f Don't authenticate (user already authenticated)" \
- "\n -h Name of the remote host" \
- "\n -p Preserve environment" \
-
#define logread_trivial_usage \
"[-f]"
#define logread_full_usage "\n\n" \
@@ -1344,17 +1182,6 @@ INSERT
"\n -h Print banner page too" \
"\n -V Verbose" \
-#define lsattr_trivial_usage \
- "[-Radlv] [FILE]..."
-#define lsattr_full_usage "\n\n" \
- "List file attributes on an ext2 fs\n" \
- "\nOptions:" \
- "\n -R Recurse" \
- "\n -a Don't hide entries starting with ." \
- "\n -d List directory entries instead of contents" \
- "\n -l List long flag names" \
- "\n -v List the file's version/generation number" \
-
#define lspci_trivial_usage \
"[-mk]"
#define lspci_full_usage "\n\n" \
@@ -1424,21 +1251,6 @@ INSERT
"/dev/hda[0-15]\n"
#endif
-#define makemime_trivial_usage \
- "[OPTIONS] [FILE]..."
-#define makemime_full_usage "\n\n" \
- "Create multipart MIME-encoded message from FILEs\n" \
-/* "Transfer encoding is base64, disposition is inline (not attachment)\n" */ \
- "\nOptions:" \
- "\n -o FILE Output. Default: stdout" \
- "\n -a HDR Add header. Examples:" \
- "\n \"From: user@host.org\", \"Date: `date -R`\"" \
- "\n -c CT Content type. Default: text/plain" \
- "\n -C CS Charset. Default: " CONFIG_FEATURE_MIME_CHARSET \
-/* "\n -e ENC Transfer encoding. Ignored. base64 is assumed" */ \
- "\n" \
- "\nOther options are silently ignored" \
-
#define man_trivial_usage \
"[-aw] [MANPAGE]..."
#define man_full_usage "\n\n" \
@@ -1712,31 +1524,6 @@ INSERT
#define parse_full_usage ""
*/
-#define passwd_trivial_usage \
- "[OPTIONS] [USER]"
-#define passwd_full_usage "\n\n" \
- "Change USER's password. If no USER is specified,\n" \
- "changes the password for the current user.\n" \
- "\nOptions:" \
- "\n -a ALG Algorithm to use for password (des, md5)" /* ", sha1)" */ \
- "\n -d Delete password for the account" \
- "\n -l Lock (disable) account" \
- "\n -u Unlock (re-enable) account" \
-
-#define chpasswd_trivial_usage \
- IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]")
-#define chpasswd_full_usage "\n\n" \
- "Read user:password from stdin and update /etc/passwd\n" \
- "\nOptions:" \
- IF_LONG_OPTS( \
- "\n -e,--encrypted Supplied passwords are in encrypted form" \
- "\n -m,--md5 Use MD5 encryption instead of DES" \
- ) \
- IF_NOT_LONG_OPTS( \
- "\n -e Supplied passwords are in encrypted form" \
- "\n -m Use MD5 encryption instead of DES" \
- )
-
#define pgrep_trivial_usage \
"[-flnovx] [-s SID|-P PPID|PATTERN]"
#define pgrep_full_usage "\n\n" \
@@ -1779,9 +1566,6 @@ INSERT
IF_FEATURE_PIDOF_OMIT( \
"$ pidof /bin/sh -o %PPID\n20351 5950")
-#define pipe_progress_trivial_usage NOUSAGE_STR
-#define pipe_progress_full_usage ""
-
#define pivot_root_trivial_usage \
"NEW_ROOT PUT_OLD"
#define pivot_root_full_usage "\n\n" \
@@ -1802,38 +1586,6 @@ INSERT
"\n -s Match session ID (0 for current)" \
"\n -P Match parent process ID" \
-#define popmaildir_trivial_usage \
- "[OPTIONS] MAILDIR [CONN_HELPER ARGS]"
-#define popmaildir_full_usage "\n\n" \
- "Fetch content of remote mailbox to local maildir\n" \
- "\nOptions:" \
-/* "\n -b Binary mode. Ignored" */ \
-/* "\n -d Debug. Ignored" */ \
-/* "\n -m Show used memory. Ignored" */ \
-/* "\n -V Show version. Ignored" */ \
-/* "\n -c Use tcpclient. Ignored" */ \
-/* "\n -a Use APOP protocol. Implied. If server supports APOP -> use it" */ \
- "\n -s Skip authorization" \
- "\n -T Get messages with TOP instead of RETR" \
- "\n -k Keep retrieved messages on the server" \
- "\n -t SEC Network timeout" \
- IF_FEATURE_POPMAILDIR_DELIVERY( \
- "\n -F \"PROG ARGS\" Filter program (may be repeated)" \
- "\n -M \"PROG ARGS\" Delivery program" \
- ) \
- "\n" \
- "\nFetch from plain POP3 server:" \
- "\npopmaildir -k DIR nc pop3.server.com 110 <user_and_pass.txt" \
- "\nFetch from SSLed POP3 server and delete fetched emails:" \
- "\npopmaildir DIR -- openssl s_client -quiet -connect pop3.server.com:995 <user_and_pass.txt"
-/* "\n -R BYTES Remove old messages on the server >= BYTES. Ignored" */
-/* "\n -Z N1-N2 Remove messages from N1 to N2 (dangerous). Ignored" */
-/* "\n -L BYTES Don't retrieve new messages >= BYTES. Ignored" */
-/* "\n -H LINES Type first LINES of a message. Ignored" */
-#define popmaildir_example_usage \
- "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \
- "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
-
#if ENABLE_DESKTOP
@@ -1937,17 +1689,6 @@ INSERT
"\n -r Reset all the counters (root only)" \
"\n -n Disable byte order auto-detection" \
-#define reformime_trivial_usage \
- "[OPTIONS] [FILE]..."
-#define reformime_full_usage "\n\n" \
- "Parse MIME-encoded message\n" \
- "\nOptions:" \
- "\n -x PREFIX Extract content of MIME sections to files" \
- "\n -X PROG ARGS Filter content of MIME sections through PROG" \
- "\n Must be the last option" \
- "\n" \
- "\nOther options are silently ignored" \
-
#define scriptreplay_trivial_usage \
"timingfile [typescript [divisor]]"
#define scriptreplay_full_usage "\n\n" \
@@ -2034,32 +1775,6 @@ INSERT
"\n -l RNG Levelrange" \
)
-#define run_parts_trivial_usage \
- "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
-#define run_parts_full_usage "\n\n" \
- "Run a bunch of scripts in DIRECTORY\n" \
- "\nOptions:" \
- "\n -t Print what would be run, but don't actually run anything" \
- "\n -a ARG Pass ARG as argument for every program" \
- "\n -u MASK Set the umask to MASK before running every program" \
- IF_FEATURE_RUN_PARTS_FANCY( \
- "\n -l Print names of all matching files even if they are not executable" \
- )
-
-#define run_parts_example_usage \
- "$ run-parts -a start /etc/init.d\n" \
- "$ run-parts -a stop=now /etc/init.d\n\n" \
- "Let's assume you have a script foo/dosomething:\n" \
- "#!/bin/sh\n" \
- "for i in $*; do eval $i; done; unset i\n" \
- "case \"$1\" in\n" \
- "start*) echo starting something;;\n" \
- "stop*) set -x; shutdown -h $stop;;\n" \
- "esac\n\n" \
- "Running this yields:\n" \
- "$run-parts -a stop=+4m foo/\n" \
- "+ shutdown -h +4m"
-
#define runlevel_trivial_usage \
"[FILE]"
#define runlevel_full_usage "\n\n" \
@@ -2102,23 +1817,6 @@ INSERT
"\n -t Send timing to stderr" \
)
-#define sed_trivial_usage \
- "[-efinr] SED_CMD [FILE]..."
-#define sed_full_usage "\n\n" \
- "Options:" \
- "\n -e CMD Add CMD to sed commands to be executed" \
- "\n -f FILE Add FILE contents to sed commands to be executed" \
- "\n -i Edit files in-place (else sends result to stdout)" \
- "\n -n Suppress automatic printing of pattern space" \
- "\n -r Use extended regex syntax" \
- "\n" \
- "\nIf no -e or -f, the first non-option argument is the sed command string." \
- "\nRemaining arguments are input files (stdin if none)."
-
-#define sed_example_usage \
- "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
- "bar\n"
-
#define selinuxenabled_trivial_usage NOUSAGE_STR
#define selinuxenabled_full_usage ""
@@ -2205,69 +1903,6 @@ INSERT
"\n -L Enable 3-wire operation" \
"\n -F Disable RTS/CTS flow control" \
-#define start_stop_daemon_trivial_usage \
- "[OPTIONS] [-S|-K] ... [-- ARGS...]"
-#define start_stop_daemon_full_usage "\n\n" \
- "Search for matching processes, and then\n" \
- "-K: stop all matching processes.\n" \
- "-S: start a process unless a matching process is found.\n" \
- IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
- "\nProcess matching:" \
- "\n -u,--user USERNAME|UID Match only this user's processes" \
- "\n -n,--name NAME Match processes with NAME" \
- "\n in comm field in /proc/PID/stat" \
- "\n -x,--exec EXECUTABLE Match processes with this command" \
- "\n in /proc/PID/cmdline" \
- "\n -p,--pidfile FILE Match a process with PID from the file" \
- "\n All specified conditions must match" \
- "\n-S only:" \
- "\n -x,--exec EXECUTABLE Program to run" \
- "\n -a,--startas NAME Zeroth argument" \
- "\n -b,--background Background" \
- IF_FEATURE_START_STOP_DAEMON_FANCY( \
- "\n -N,--nicelevel N Change nice level" \
- ) \
- "\n -c,--chuid USER[:[GRP]] Change to user/group" \
- "\n -m,--make-pidfile Write PID to the pidfile specified by -p" \
- "\n-K only:" \
- "\n -s,--signal SIG Signal to send" \
- "\n -t,--test Match only, exit with 0 if a process is found" \
- "\nOther:" \
- IF_FEATURE_START_STOP_DAEMON_FANCY( \
- "\n -o,--oknodo Exit with status 0 if nothing is done" \
- "\n -v,--verbose Verbose" \
- ) \
- "\n -q,--quiet Quiet" \
- ) \
- IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
- "\nProcess matching:" \
- "\n -u USERNAME|UID Match only this user's processes" \
- "\n -n NAME Match processes with NAME" \
- "\n in comm field in /proc/PID/stat" \
- "\n -x EXECUTABLE Match processes with this command" \
- "\n command in /proc/PID/cmdline" \
- "\n -p FILE Match a process with PID from the file" \
- "\n All specified conditions must match" \
- "\n-S only:" \
- "\n -x EXECUTABLE Program to run" \
- "\n -a NAME Zeroth argument" \
- "\n -b Background" \
- IF_FEATURE_START_STOP_DAEMON_FANCY( \
- "\n -N N Change nice level" \
- ) \
- "\n -c USER[:[GRP]] Change to user/group" \
- "\n -m Write PID to the pidfile specified by -p" \
- "\n-K only:" \
- "\n -s SIG Signal to send" \
- "\n -t Match only, exit with 0 if a process is found" \
- "\nOther:" \
- IF_FEATURE_START_STOP_DAEMON_FANCY( \
- "\n -o Exit with status 0 if nothing is done" \
- "\n -v Verbose" \
- ) \
- "\n -q Quiet" \
- ) \
-
#define strings_trivial_usage \
"[-afo] [-n LEN] [FILE]..."
#define strings_full_usage "\n\n" \
@@ -2278,13 +1913,6 @@ INSERT
"\n -n LEN At least LEN characters form a string (default 4)" \
"\n -o Precede strings with decimal offsets" \
-#define sulogin_trivial_usage \
- "[-t N] [TTY]"
-#define sulogin_full_usage "\n\n" \
- "Single user login\n" \
- "\nOptions:" \
- "\n -t N Timeout" \
-
#define sv_trivial_usage \
"[-v] [-w SEC] CMD SERVICE_DIR..."
#define sv_full_usage "\n\n" \
@@ -2650,26 +2278,6 @@ INSERT
"\n set_ingress_map [vlan-name] [skb_priority] [vlan_qos]" \
"\n set_name_type [name-type]" \
-#define vi_trivial_usage \
- "[OPTIONS] [FILE]..."
-#define vi_full_usage "\n\n" \
- "Edit FILE\n" \
- "\nOptions:" \
- IF_FEATURE_VI_COLON( \
- "\n -c Initial command to run ($EXINIT also available)" \
- ) \
- IF_FEATURE_VI_READONLY( \
- "\n -R Read-only" \
- ) \
- "\n -H Short help regarding available features" \
-
-#define vlock_trivial_usage \
- "[-a]"
-#define vlock_full_usage "\n\n" \
- "Lock a virtual terminal. A password is required to unlock.\n" \
- "\nOptions:" \
- "\n -a Lock all VTs" \
-
#define volname_trivial_usage \
"[DEVICE]"
#define volname_full_usage "\n\n" \
@@ -2708,14 +2316,6 @@ INSERT
"\n" \
"\nUse 500ms to specify period in milliseconds" \
-#define which_trivial_usage \
- "[COMMAND]..."
-#define which_full_usage "\n\n" \
- "Locate a COMMAND"
-#define which_example_usage \
- "$ which login\n" \
- "/bin/login\n"
-
#define zcip_trivial_usage \
"[OPTIONS] IFACE SCRIPT"
#define zcip_full_usage "\n\n" \
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c
index 5a07145..2d6736f 100644
--- a/loginutils/addgroup.c
+++ b/loginutils/addgroup.c
@@ -9,6 +9,15 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
*/
+
+//usage:#define addgroup_trivial_usage
+//usage: "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP"
+//usage:#define addgroup_full_usage "\n\n"
+//usage: "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n"
+//usage: "\nOptions:"
+//usage: "\n -g GID Group id"
+//usage: "\n -S Create a system group"
+
#include "libbb.h"
#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID
diff --git a/loginutils/adduser.c b/loginutils/adduser.c
index 0c675ca..1944d9d 100644
--- a/loginutils/adduser.c
+++ b/loginutils/adduser.c
@@ -7,6 +7,21 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define adduser_trivial_usage
+//usage: "[OPTIONS] USER"
+//usage:#define adduser_full_usage "\n\n"
+//usage: "Add a user\n"
+//usage: "\nOptions:"
+//usage: "\n -h DIR Home directory"
+//usage: "\n -g GECOS GECOS field"
+//usage: "\n -s SHELL Login shell"
+//usage: "\n -G GRP Add user to existing group"
+//usage: "\n -S Create a system user"
+//usage: "\n -D Don't assign a password"
+//usage: "\n -H Don't create home directory"
+//usage: "\n -u UID User id"
+
#include "libbb.h"
#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index 48cf9b1..c2d8666 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -7,6 +7,20 @@
*/
#include "libbb.h"
+//usage:#define chpasswd_trivial_usage
+//usage: IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]")
+//usage:#define chpasswd_full_usage "\n\n"
+//usage: "Read user:password from stdin and update /etc/passwd\n"
+//usage: "\nOptions:"
+//usage: IF_LONG_OPTS(
+//usage: "\n -e,--encrypted Supplied passwords are in encrypted form"
+//usage: "\n -m,--md5 Use MD5 encryption instead of DES"
+//usage: )
+//usage: IF_NOT_LONG_OPTS(
+//usage: "\n -e Supplied passwords are in encrypted form"
+//usage: "\n -m Use MD5 encryption instead of DES"
+//usage: )
+
#if ENABLE_LONG_OPTS
static const char chpasswd_longopts[] ALIGN1 =
"encrypted\0" No_argument "e"
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c
index 6c801f9..72388c4 100644
--- a/loginutils/cryptpw.c
+++ b/loginutils/cryptpw.c
@@ -10,6 +10,45 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//usage:#define cryptpw_trivial_usage
+//usage: "[OPTIONS] [PASSWORD] [SALT]"
+/* We do support -s, we just don't mention it */
+//usage:#define cryptpw_full_usage "\n\n"
+//usage: "Crypt the PASSWORD using crypt(3)\n"
+//usage: "\nOptions:"
+//usage: IF_LONG_OPTS(
+//usage: "\n -P,--password-fd=N Read password from fd N"
+/* //usage: "\n -s,--stdin Use stdin; like -P0" */
+//usage: "\n -m,--method=TYPE Encryption method TYPE"
+//usage: "\n -S,--salt=SALT"
+//usage: )
+//usage: IF_NOT_LONG_OPTS(
+//usage: "\n -P N Read password from fd N"
+/* //usage: "\n -s Use stdin; like -P0" */
+//usage: "\n -m TYPE Encryption method TYPE"
+//usage: "\n -S SALT"
+//usage: )
+
+/* mkpasswd is an alias to cryptpw */
+//usage:#define mkpasswd_trivial_usage
+//usage: "[OPTIONS] [PASSWORD] [SALT]"
+/* We do support -s, we just don't mention it */
+//usage:#define mkpasswd_full_usage "\n\n"
+//usage: "Crypt the PASSWORD using crypt(3)\n"
+//usage: "\nOptions:"
+//usage: IF_LONG_OPTS(
+//usage: "\n -P,--password-fd=N Read password from fd N"
+/* //usage: "\n -s,--stdin Use stdin; like -P0" */
+//usage: "\n -m,--method=TYPE Encryption method TYPE"
+//usage: "\n -S,--salt=SALT"
+//usage: )
+//usage: IF_NOT_LONG_OPTS(
+//usage: "\n -P N Read password from fd N"
+/* //usage: "\n -s Use stdin; like -P0" */
+//usage: "\n -m TYPE Encryption method TYPE"
+//usage: "\n -S SALT"
+//usage: )
+
#include "libbb.h"
/* Debian has 'mkpasswd' utility, manpage says:
diff --git a/loginutils/deluser.c b/loginutils/deluser.c
index 47a10fe..e39ac55 100644
--- a/loginutils/deluser.c
+++ b/loginutils/deluser.c
@@ -9,6 +9,18 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*
*/
+
+//usage:#define deluser_trivial_usage
+//usage: "USER"
+//usage:#define deluser_full_usage "\n\n"
+//usage: "Delete USER from the system"
+
+//usage:#define delgroup_trivial_usage
+//usage: IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
+//usage:#define delgroup_full_usage "\n\n"
+//usage: "Delete group GROUP from the system"
+//usage: IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
+
#include "libbb.h"
int deluser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/loginutils/login.c b/loginutils/login.c
index ce0d174..f2563dc 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -2,6 +2,16 @@
/*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define login_trivial_usage
+//usage: "[-p] [-h HOST] [[-f] USER]"
+//usage:#define login_full_usage "\n\n"
+//usage: "Begin a new session on the system\n"
+//usage: "\nOptions:"
+//usage: "\n -f Don't authenticate (user already authenticated)"
+//usage: "\n -h Name of the remote host"
+//usage: "\n -p Preserve environment"
+
#include "libbb.h"
#include <syslog.h>
#include <sys/resource.h>
diff --git a/loginutils/passwd.c b/loginutils/passwd.c
index f3928ce..8b6a63e 100644
--- a/loginutils/passwd.c
+++ b/loginutils/passwd.c
@@ -2,6 +2,18 @@
/*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define passwd_trivial_usage
+//usage: "[OPTIONS] [USER]"
+//usage:#define passwd_full_usage "\n\n"
+//usage: "Change USER's password. If no USER is specified,\n"
+//usage: "changes the password for the current user.\n"
+//usage: "\nOptions:"
+//usage: "\n -a ALG Algorithm to use for password (des, md5)" /* ", sha1)" */
+//usage: "\n -d Delete password for the account"
+//usage: "\n -l Lock (disable) account"
+//usage: "\n -u Unlock (re-enable) account"
+
#include "libbb.h"
#include <syslog.h>
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index 0e5b594..28edf06 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -5,6 +5,13 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define sulogin_trivial_usage
+//usage: "[-t N] [TTY]"
+//usage:#define sulogin_full_usage "\n\n"
+//usage: "Single user login\n"
+//usage: "\nOptions:"
+//usage: "\n -t N Timeout"
+
#include "libbb.h"
#include <syslog.h>
diff --git a/loginutils/vlock.c b/loginutils/vlock.c
index 3299afa..efad63f 100644
--- a/loginutils/vlock.c
+++ b/loginutils/vlock.c
@@ -15,6 +15,13 @@
/* Fixed by Erik Andersen to do passwords the tinylogin way...
* It now works with md5, sha1, etc passwords. */
+//usage:#define vlock_trivial_usage
+//usage: "[-a]"
+//usage:#define vlock_full_usage "\n\n"
+//usage: "Lock a virtual terminal. A password is required to unlock.\n"
+//usage: "\nOptions:"
+//usage: "\n -a Lock all VTs"
+
#include "libbb.h"
#ifdef __linux__
diff --git a/mailutils/mime.c b/mailutils/mime.c
index 1e393ed..0aff8b1 100644
--- a/mailutils/mime.c
+++ b/mailutils/mime.c
@@ -7,6 +7,33 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define makemime_trivial_usage
+//usage: "[OPTIONS] [FILE]..."
+//usage:#define makemime_full_usage "\n\n"
+//usage: "Create multipart MIME-encoded message from FILEs\n"
+/* //usage: "Transfer encoding is base64, disposition is inline (not attachment)\n" */
+//usage: "\nOptions:"
+//usage: "\n -o FILE Output. Default: stdout"
+//usage: "\n -a HDR Add header. Examples:"
+//usage: "\n \"From: user@host.org\", \"Date: `date -R`\""
+//usage: "\n -c CT Content type. Default: text/plain"
+//usage: "\n -C CS Charset. Default: " CONFIG_FEATURE_MIME_CHARSET
+/* //usage: "\n -e ENC Transfer encoding. Ignored. base64 is assumed" */
+//usage: "\n"
+//usage: "\nOther options are silently ignored"
+
+//usage:#define reformime_trivial_usage
+//usage: "[OPTIONS] [FILE]..."
+//usage:#define reformime_full_usage "\n\n"
+//usage: "Parse MIME-encoded message\n"
+//usage: "\nOptions:"
+//usage: "\n -x PREFIX Extract content of MIME sections to files"
+//usage: "\n -X PROG ARGS Filter content of MIME sections through PROG"
+//usage: "\n Must be the last option"
+//usage: "\n"
+//usage: "\nOther options are silently ignored"
+
#include "libbb.h"
#include "mail.h"
diff --git a/mailutils/popmaildir.c b/mailutils/popmaildir.c
index 6b73344..6426579 100644
--- a/mailutils/popmaildir.c
+++ b/mailutils/popmaildir.c
@@ -9,6 +9,40 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define popmaildir_trivial_usage
+//usage: "[OPTIONS] MAILDIR [CONN_HELPER ARGS]"
+//usage:#define popmaildir_full_usage "\n\n"
+//usage: "Fetch content of remote mailbox to local maildir\n"
+//usage: "\nOptions:"
+/* //usage: "\n -b Binary mode. Ignored" */
+/* //usage: "\n -d Debug. Ignored" */
+/* //usage: "\n -m Show used memory. Ignored" */
+/* //usage: "\n -V Show version. Ignored" */
+/* //usage: "\n -c Use tcpclient. Ignored" */
+/* //usage: "\n -a Use APOP protocol. Implied. If server supports APOP -> use it" */
+//usage: "\n -s Skip authorization"
+//usage: "\n -T Get messages with TOP instead of RETR"
+//usage: "\n -k Keep retrieved messages on the server"
+//usage: "\n -t SEC Network timeout"
+//usage: IF_FEATURE_POPMAILDIR_DELIVERY(
+//usage: "\n -F \"PROG ARGS\" Filter program (may be repeated)"
+//usage: "\n -M \"PROG ARGS\" Delivery program"
+//usage: )
+//usage: "\n"
+//usage: "\nFetch from plain POP3 server:"
+//usage: "\npopmaildir -k DIR nc pop3.server.com 110 <user_and_pass.txt"
+//usage: "\nFetch from SSLed POP3 server and delete fetched emails:"
+//usage: "\npopmaildir DIR -- openssl s_client -quiet -connect pop3.server.com:995 <user_and_pass.txt"
+/* //usage: "\n -R BYTES Remove old messages on the server >= BYTES. Ignored" */
+/* //usage: "\n -Z N1-N2 Remove messages from N1 to N2 (dangerous). Ignored" */
+/* //usage: "\n -L BYTES Don't retrieve new messages >= BYTES. Ignored" */
+/* //usage: "\n -H LINES Type first LINES of a message. Ignored" */
+//usage:
+//usage:#define popmaildir_example_usage
+//usage: "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n"
+//usage: "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
+
#include "libbb.h"
#include "mail.h"