Static-ify a variable. make du work with all the human-readable variants
[oweals/busybox.git] / usage.h
diff --git a/usage.h b/usage.h
index b39fec9242f42b4356a3a52b311138682552f70e..db79630436cbd70e68a865c71e9fa1a4cc347eb0 100644 (file)
--- a/usage.h
+++ b/usage.h
        "[OPTION]... GROUP FILE..."
 #define chgrp_full_usage \
        "Change the group membership of each FILE to GROUP.\n" \
-       "\nOptions:\n\t-R\tChanges files and directories recursively."
+       "\nOptions:\n" \
+       "\t-R\tChanges files and directories recursively."
 
 #define chmod_trivial_usage \
        "[-R] MODE[,MODE]... FILE..."
 #define chmod_full_usage \
-       "Each MODE is one or more of the letters ugoa, one of the symbols +-= and\n" \
-       "one or more of the letters rwxst.\n\n" \
-       "Options:\n\t-R\tChanges files and directories recursively."
+       "Each MODE is one or more of the letters ugoa, one of the\n" \
+       "symbols +-= and one or more of the letters rwxst.\n\n" \
+       "Options:\n" \
+       "\t-R\tChanges files and directories recursively."
 
 #define chown_trivial_usage \
        "[OPTION]...  OWNER[<.|:>[GROUP] FILE..."
 #define chown_full_usage \
        "Change the owner and/or group of each FILE to OWNER and/or GROUP.\n" \
-       "\nOptions:\n\t-R\tChanges files and directories recursively."
+       "\nOptions:\n" \
+       "\t-R\tChanges files and directories recursively."
 
 #define chroot_trivial_usage \
        "NEWROOT [COMMAND...]"
@@ -61,7 +64,7 @@
        "Compare files."
 
 #define cp_trivial_usage \
-       "[OPTION]... SOURCE DEST\n"
+       "[OPTION]... SOURCE DEST"
 #define cp_full_usage \
        "Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" \
        "\n" \
 #define cut_full_usage \
        "Prints selected fields from each input FILE to standard output.\n\n" \
        "Options:\n" \
-       "\t-b LIST\tOutput only bytes from LIST\n" \
-       "\t-c LIST\tOutput only characters from LIST\n" \
-       "\t-d CHAR\tUse CHAR instead of tab as the field delimiter\n" \
-       "\t-s\tOutput only the lines containing delimiter\n" \
-       "\t-f N\tPrint only these fields\n" \
-       "\t-n\tIgnored"
+       "\t-b LIST\t\tOutput only bytes from LIST\n" \
+       "\t-c LIST\t\tOutput only characters from LIST\n" \
+       "\t-d CHAR\t\tUse CHAR instead of tab as the field delimiter\n" \
+       "\t-s\t\tOutput only the lines containing delimiter\n" \
+       "\t-f N\t\tPrint only these fields\n" \
+       "\t-n\t\tIgnored"
 
 #define date_trivial_usage \
-       "[OPTION]... [+FORMAT]\n"
+       "[OPTION]... [+FORMAT]"
 #define date_full_usage \
        "Displays the current time in the given FORMAT, or sets the system date.\n" \
-       "\nOptions:\n\t-R\t\tOutputs RFC-822 compliant date string\n" \
+       "\nOptions:\n" \
+       "\t-R\t\tOutputs RFC-822 compliant date string\n" \
        "\t-d STRING\tdisplay time described by STRING, not `now'\n" \
        "\t-s\t\tSets time described by STRING\n" \
        "\t-u\t\tPrints or sets Coordinated Universal Time"
        "i.e. 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16"
 
 #define dd_trivial_usage \
-       "[if=FILE] [of=FILE] [bs=N] [count=N] [skip=N] [seek=N] [conv=notrunc|sync]"
+       "[if=FILE] [of=FILE] [bs=N] [count=N] [skip=N]\n" \
+       "\t  [seek=N] [conv=notrunc|sync]"
 #define dd_full_usage \
        "Copy a file, converting and formatting according to options\n\n" \
-       "\tif=FILE\tread from FILE instead of stdin\n" \
-       "\tof=FILE\twrite to FILE instead of stdout\n" \
-       "\tbs=N\tread and write N bytes at a time\n" \
-       "\tcount=N\tcopy only N input blocks\n" \
-       "\tskip=N\tskip N input blocks\n" \
-       "\tseek=N\tskip N output blocks\n" \
+       "\tif=FILE\t\tread from FILE instead of stdin\n" \
+       "\tof=FILE\t\twrite to FILE instead of stdout\n" \
+       "\tbs=N\t\tread and write N bytes at a time\n" \
+       "\tcount=N\t\tcopy only N input blocks\n" \
+       "\tskip=N\t\tskip N input blocks\n" \
+       "\tseek=N\t\tskip N output blocks\n" \
        "\tconv=notrunc\tdon't truncate output file\n" \
        "\tconv=sync\tpad blocks with zeros\n" \
        "\n" \
 
 
 #ifdef BB_FEATURE_HUMAN_READABLE
-  #define USAGE_HUMAN_READABLE(a,b) a
+  #define USAGE_HUMAN_READABLE(a) a
+  #define USAGE_NOT_HUMAN_READABLE(a)
 #else
-  #define USAGE_HUMAN_READABLE(a,b) b
+  #define USAGE_HUMAN_READABLE(a) 
+  #define USAGE_NOT_HUMAN_READABLE(a) a
 #endif
 #define df_trivial_usage \
-       "[-" \
-       USAGE_HUMAN_READABLE("hm", "") \
-       "k] [filesystem ...]\n"
+       "[-" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [filesystem ...]"
 #define df_full_usage \
        "Print the filesystem space used and space available.\n\n" \
        "Options:\n" \
-USAGE_HUMAN_READABLE( \
+       USAGE_HUMAN_READABLE( \
        "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
        "\t-m\tprint sizes in megabytes\n" \
-       "\t-k\tprint sizes in kilobytes(default)", \
+       "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
        "\n\t-k\tprint sizes in kilobytes(compatability)")
 
 #define dirname_trivial_usage \
@@ -154,9 +159,15 @@ USAGE_HUMAN_READABLE( \
        "\t-s SIZE\t\tUse a buffer of size SIZE"
 
 #define dos2unix_trivial_usage \
-       "< dosfile > unixfile"
+       "[option] [file]"
 #define dos2unix_full_usage \
-       "Converts a text file from dos format to unix format."
+       "Converts a text file to/from dos format to unix format.\n\n" \
+       "Options:\n" \
+       "\t-u\toutput will be in UNIX format\n" \
+       "\t-d\toutput will be in DOS format\n\n" \
+       "- when no option is given then input format will be automaticaly detected\n" \
+       "  and converted to the oposite format on output\n" \
+       "- when no file is given, then stdin is used as input and stdout as output"
 
 #define dpkg_trivial_usage \
        "[-i|-r|--unpack|--configure] my.deb"
@@ -175,20 +186,18 @@ USAGE_HUMAN_READABLE( \
        "\t-X\tVerbose extract"
 
 #define du_trivial_usage \
-       "[-ls" USAGE_HUMAN_READABLE("hm""") "k] [FILE]..."
+       "[-ls" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [FILE]..."
 #define du_full_usage \
        "Summarizes disk space used for each FILE and/or directory.\n" \
        "Disk space is printed in units of 1024 bytes.\n\n" \
        "Options:\n" \
        "\t-l\tcount sizes many times if hard linked\n" \
        "\t-s\tdisplay only a total for each argument" \
-USAGE_HUMAN_READABLE( \
+       USAGE_HUMAN_READABLE( \
        "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
        "\t-m\tprint sizes in megabytes\n" \
-       "\t-k\tprint sizes in kilobytes(default)" \
-       , \
-       "\n\t-k\tprint sizes in kilobytes(compatability)" \
-       )
+       "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
+       "\n\t-k\tprint sizes in kilobytes(compatability)")
 
 #define dumpkmap_trivial_usage \
        "> keymap"
@@ -215,27 +224,29 @@ USAGE_HUMAN_READABLE( \
 #define expr_full_usage \
        "Prints the value of EXPRESSION to standard output.\n\n" \
        "EXPRESSION may be:\n" \
-       "ARG1 |  ARG2   ARG1 if it is neither null nor 0, otherwise ARG2\n" \
-       "ARG1 &  ARG2   ARG1 if neither argument is null or 0, otherwise 0\n" \
-       "ARG1 <  ARG2   ARG1 is less than ARG2\n" \
-       "ARG1 <= ARG2   ARG1 is less than or equal to ARG2\n" \
-       "ARG1 =  ARG2   ARG1 is equal to ARG2\n" \
-       "ARG1 != ARG2   ARG1 is unequal to ARG2\n" \
-       "ARG1 >= ARG2   ARG1 is greater than or equal to ARG2\n" \
-       "ARG1 >  ARG2   ARG1 is greater than ARG2\n" \
-       "ARG1 +  ARG2   arithmetic sum of ARG1 and ARG2\n" \
-       "ARG1 -  ARG2   arithmetic difference of ARG1 and ARG2\n" \
-       "ARG1 *  ARG2   arithmetic product of ARG1 and ARG2\n" \
-       "ARG1 /  ARG2   arithmetic quotient of ARG1 divided by ARG2\n" \
-       "ARG1 %  ARG2   arithmetic remainder of ARG1 divided by ARG2\n" \
-       "STRING : REGEXP                anchored pattern match of REGEXP in STRING\n" \
-       "match STRING REGEXP            same as STRING : REGEXP\n" \
-       "substr STRING POS LENGTH       substring of STRING, POS counted from 1\n" \
-       "index STRING CHARS             index in STRING where any CHARS is found, or 0\n" \
-       "length STRING                  length of STRING\n" \
-       "quote TOKEN                    interpret TOKEN as a string, even if it is a \n" \
-       "                               keyword like `match' or an operator like `/'\n" \
-       "( EXPRESSION )                 value of EXPRESSION\n\n" \
+       "\tARG1 |  ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
+       "\tARG1 &  ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
+       "\tARG1 <  ARG2 ARG1 is less than ARG2\n" \
+       "\tARG1 <= ARG2 ARG1 is less than or equal to ARG2\n" \
+       "\tARG1 =  ARG2 ARG1 is equal to ARG2\n" \
+       "\tARG1 != ARG2 ARG1 is unequal to ARG2\n" \
+       "\tARG1 >= ARG2 ARG1 is greater than or equal to ARG2\n" \
+       "\tARG1 >  ARG2 ARG1 is greater than ARG2\n" \
+       "\tARG1 +  ARG2 arithmetic sum of ARG1 and ARG2\n" \
+       "\tARG1 -  ARG2 arithmetic difference of ARG1 and ARG2\n" \
+       "\tARG1 *  ARG2 arithmetic product of ARG1 and ARG2\n" \
+       "\tARG1 /  ARG2 arithmetic quotient of ARG1 divided by ARG2\n" \
+       "\tARG1 %  ARG2 arithmetic remainder of ARG1 divided by ARG2\n" \
+       "\tSTRING : REGEXP             anchored pattern match of REGEXP in STRING\n" \
+       "\tmatch STRING REGEXP         same as STRING : REGEXP\n" \
+       "\tsubstr STRING POS LENGTH    substring of STRING, POS counted from 1\n" \
+       "\tindex STRING CHARS          index in STRING where any CHARS is found,\n" \
+       "\t                            or 0\n" \
+       "\tlength STRING               length of STRING\n" \
+       "\tquote TOKEN                 interpret TOKEN as a string, even if\n" \
+       "\t                            it is a keyword like `match' or an\n" \
+       "\t                            operator like `/'\n" \
+       "\t( EXPRESSION )              value of EXPRESSION\n\n" \
        "Beware that many operators need to be escaped or quoted for shells.\n" \
        "Comparisons are arithmetic if both ARGs are numbers, else\n" \
        "lexicographical.  Pattern matches return the string matched between \n" \
@@ -272,11 +283,11 @@ USAGE_HUMAN_READABLE( \
        "[PATH...] [EXPRESSION]"
 #define find_full_usage \
        "Search for files in a directory hierarchy.  The default PATH is\n" \
-       "the current directory; default EXPRESSION is '-print'\n\n" \
+       "the current directory; default EXPRESSION is '-print'\n" \
        "\nEXPRESSION may consist of:\n" \
        "\t-follow\t\tDereference symbolic links.\n" \
        "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \
-USAGE_FIND_TYPE( \
+       USAGE_FIND_TYPE( \
        "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \
 ) USAGE_FIND_PERM( \
        "\n\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN);\n\t\t\tor exactly (NNN)" \
@@ -309,7 +320,7 @@ USAGE_FIND_TYPE( \
 #define getopt_trivial_usage \
        "[OPTIONS]..."
 #define getopt_full_usage \
-       "\nParse command options\n" \
+       "Parse command options\n" \
        "\t-a, --alternative            Allow long options starting with single -\n" \
        "\t-l, --longoptions=longopts   Long options to be recognized\n" \
        "\t-n, --name=progname          The name under which errors are reported\n" \
@@ -361,7 +372,8 @@ USAGE_FIND_TYPE( \
        "Print first 10 lines of each FILE to standard output.\n" \
        "With more than one FILE, precede each with a header giving the\n" \
        "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
-       "Options:\n" "\t-n NUM\t\tPrint first NUM lines instead of first 10"
+       "Options:\n" \
+       "\t-n NUM\t\tPrint first NUM lines instead of first 10"
 
 #define hostid_trivial_usage \
        ""
@@ -401,7 +413,7 @@ USAGE_FIND_TYPE( \
        "Options:\n" \
        "\t[[-]broadcast [<address>]]  [[-]pointopoint [<address>]]\n" \
        "\t[netmask <address>]  [dstaddr <address>]  [tunnel <adress>]\n" \
-USAGE_SIOCSKEEPALIVE("\t[outfill <NN>] [keepalive <NN>]\n") \
+       USAGE_SIOCSKEEPALIVE("\t[outfill <NN>] [keepalive <NN>]\n") \
        "\t[hw ether <address>]  [metric <NN>]  [mtu <NN>]\n" \
        "\t[[-]trailers]  [[-]arp]  [[-]allmulti]\n" \
        "\t[multicast]  [[-]promisc]\n" \
@@ -429,13 +441,15 @@ USAGE_SIOCSKEEPALIVE("\t[outfill <NN>] [keepalive <NN>]\n") \
        "[-signal] process-id [process-id ...]"
 #define kill_full_usage \
        "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\
-       "Options:\n" "\t-l\tList all signal names and numbers."
+       "Options:\n" \
+       "\t-l\tList all signal names and numbers."
 
 #define killall_trivial_usage \
        "[-signal] process-name [process-name ...]"
 #define killall_full_usage \
        "Send a signal (default is SIGTERM) to the specified process(es).\n\n"\
-       "Options:\n" "\t-l\tList all signal names and numbers."
+       "Options:\n" \
+       "\t-l\tList all signal names and numbers."
 
 #define length_trivial_usage \
        "STRING"
@@ -513,14 +527,7 @@ USAGE_SIOCSKEEPALIVE("\t[outfill <NN>] [keepalive <NN>]\n") \
   #define USAGE_AUTOWIDTH(a)
 #endif
 #define ls_trivial_usage \
-       "[-1Aa" USAGE_LS_TIMESTAMPS("c") \
-       "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" \
-       USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") \
-       USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") \
-       "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") \
-       USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" \
-       USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h", "") \
-       "k] [filenames...]"
+       "[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h") USAGE_NOT_HUMAN_READABLE("") "k] [filenames...]"
 #define ls_full_usage \
        "List directory contents\n\n" \
        "Options:\n" \
@@ -528,59 +535,30 @@ USAGE_SIOCSKEEPALIVE("\t[outfill <NN>] [keepalive <NN>]\n") \
        "\t-A\tdo not list implied . and ..\n" \
        "\t-a\tdo not hide entries starting with .\n" \
        "\t-C\tlist entries by columns\n" \
-USAGE_LS_TIMESTAMPS( \
-       "\t-c\twith -l: show ctime (the time of last\n" \
-       "\t\tmodification of file status information)\n" \
-       ) \
+       USAGE_LS_TIMESTAMPS("\t-c\twith -l: show ctime\n") \
        "\t-d\tlist directory entries instead of contents\n" \
-USAGE_LS_TIMESTAMPS( \
-       "\t-e\tlist both full date and full time\n" \
-       ) \
-USAGE_LS_FILETYPES( \
-       "\t-F\tappend indicator (one of */=@|) to entries\n" \
-       ) \
+       USAGE_LS_TIMESTAMPS("\t-e\tlist both full date and full time\n") \
+       USAGE_LS_FILETYPES("\t-F\tappend indicator (one of */=@|) to entries\n") \
        "\t-i\tlist the i-node for each file\n" \
        "\t-l\tuse a long listing format\n" \
        "\t-n\tlist numeric UIDs and GIDs instead of names\n" \
-USAGE_LS_FILETYPES( \
-       "\t-p\tappend indicator (one of /=@|) to entries\n" \
-       ) \
-USAGE_LS_FOLLOWLINKS( \
-       "\t-L\tlist entries pointed to by symbolic links\n" \
-       ) \
-USAGE_LS_RECURSIVE( \
-       "\t-R\tlist subdirectories recursively\n" \
-       ) \
-USAGE_LS_SORTFILES( \
-       "\t-r\tsort the listing in reverse order\n" \
-       "\t-S\tsort the listing by file size\n" \
-       ) \
+       USAGE_LS_FILETYPES("\t-p\tappend indicator (one of /=@|) to entries\n") \
+       USAGE_LS_FOLLOWLINKS("\t-L\tlist entries pointed to by symbolic links\n") \
+       USAGE_LS_RECURSIVE("\t-R\tlist subdirectories recursively\n") \
+       USAGE_LS_SORTFILES("\t-r\tsort the listing in reverse order\n") \
+       USAGE_LS_SORTFILES("\t-S\tsort the listing by file size\n") \
        "\t-s\tlist the size of each file, in blocks\n" \
-USAGE_AUTOWIDTH( \
-       "\t-T NUM\tassume Tabstop every NUM columns\n" \
-       ) \
-USAGE_LS_TIMESTAMPS( \
-       "\t-t\twith -l: show modification time (the time of last\n" \
-       "\t\tchange of the file)\n" \
-       "\t-u\twith -l: show access time (the time of last\n" \
-       "\t\taccess of the file)\n" \
-       ) \
-USAGE_LS_SORTFILES( \
-       "\t-v\tsort the listing by version\n" \
-       ) \
-USAGE_AUTOWIDTH( \
-       "\t-w NUM\tassume the terminal is NUM columns wide\n" \
-       ) \
+       USAGE_AUTOWIDTH("\t-T NUM\tassume Tabstop every NUM columns\n") \
+       USAGE_LS_TIMESTAMPS("\t-t\twith -l: show modification time\n") \
+       USAGE_LS_TIMESTAMPS("\t-u\twith -l: show access time\n") \
+       USAGE_LS_SORTFILES("\t-v\tsort the listing by version\n") \
+       USAGE_AUTOWIDTH("\t-w NUM\tassume the terminal is NUM columns wide\n") \
        "\t-x\tlist entries by lines instead of by columns\n" \
-USAGE_LS_SORTFILES( \
-       "\t-X\tsort the listing by extension\n" \
-       ) \
-USAGE_HUMAN_READABLE( \
+       USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \
+       USAGE_HUMAN_READABLE( \
        "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
-       "\t-k\tprint sizes in kilobytes(default)" \
-       , \
-       "\t-k\tprint sizes in kilobytes(compatability)" \
-       ) \
+       "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
+       "\t-k\tprint sizes in kilobytes(compatability)") 
 
 #define lsmod_trivial_usage \
        ""
@@ -603,7 +581,8 @@ USAGE_HUMAN_READABLE( \
        "\tmakedevs /dev/hda b 3 0 0 8 s    ->  hda,hda1-hda8"
 
 #define md5sum_trivial_usage \
-       "[OPTION] [FILE]...\nor:    md5sum [OPTION] -c [FILE]"
+       "[OPTION] [FILE]...\n" \
+       "or: md5sum [OPTION] -c [FILE]"
 #define md5sum_full_usage \
        "Print or check MD5 checksums.\n\n" \
        "Options:\n" \
@@ -613,8 +592,8 @@ USAGE_HUMAN_READABLE( \
        "\t-t\tread files in text mode (default)\n" \
        "\t-g\tread a string\n" \
        "\nThe following two options are useful only when verifying checksums:\n" \
-       "\t-s,\tdon't output anything, status code shows success\n" \
-       "\t-w,\twarn about improperly formated MD5 checksum lines"
+       "\t-s\tdon't output anything, status code shows success\n" \
+       "\t-w\twarn about improperly formated MD5 checksum lines"
 
 #define mkdir_trivial_usage \
        "[OPTION] DIRECTORY..."
@@ -657,9 +636,10 @@ USAGE_HUMAN_READABLE( \
        "[-c] [-v0|-v1] device [block-count]"
 #define mkswap_full_usage \
        "Prepare a disk partition to be used as a swap partition.\n\n" \
-       "Options:\n" "\t-c\t\tCheck for read-ability.\n" \
+       "Options:\n" \
+       "\t-c\t\tCheck for read-ability.\n" \
        "\t-v0\t\tMake version 0 swap [max 128 Megs].\n" \
-       "\t-v1\t\tMake version 1 swap [big!] (default for kernels > 2.1.117).\n" \
+       "\t-v1\t\tMake version 1 swap [big!] (default for kernels >\n\t\t\t2.1.117).\n" \
        "\tblock-count\tNumber of block to use (default is entire partition)."
 
 #define mktemp_trivial_usage \
@@ -689,8 +669,8 @@ USAGE_HUMAN_READABLE( \
        "Mount a filesystem\n\n" \
        "Flags:\n"  \
        "\t-a:\t\tMount all filesystems in fstab.\n" \
-USAGE_MTAB( \
-       "\t-f:\t\t\"Fake\" mount. Add entry to mount table but don't mount it.\n" \
+       USAGE_MTAB( \
+       "\t-f:\t\t\"Fake\" Add entry to mount table but don't mount it.\n" \
        "\t-n:\t\tDon't write a mount table entry.\n" \
        ) \
        "\t-o option:\tOne of many filesystem options, listed below.\n" \
@@ -703,11 +683,11 @@ USAGE_MTAB( \
        "\tatime/noatime:\tEnable / disable updates to inode access times.\n" \
        "\tdev/nodev:\tAllow use of special device files / disallow them.\n" \
        "\texec/noexec:\tAllow use of executable files / disallow them.\n" \
-USAGE_MOUNT_LOOP( \
+       USAGE_MOUNT_LOOP( \
        "\tloop:\t\tMounts a file via loop device.\n" \
        ) \
        "\tsuid/nosuid:\tAllow set-user-id-root programs / disallow them.\n" \
-       "\tremount:\tRe-mount a currently-mounted filesystem, changing its flags.\n" \
+       "\tremount:\tRe-mount a mounted filesystem, changing its flags.\n" \
        "\tro/rw:\t\tMount for read-only / read-write.\n" \
        "\nThere are EVEN MORE flags that are specific to each filesystem.\n" \
        "You'll have to see the written documentation for those."
@@ -723,7 +703,8 @@ USAGE_MOUNT_LOOP( \
        "setpart tell unload unlock weof wset"
 
 #define mv_trivial_usage \
-       "SOURCE DEST\n   or: mv SOURCE... DIRECTORY"
+       "SOURCE DEST\n" \
+       "or: mv SOURCE... DIRECTORY"
 #define mv_full_usage \
        "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY."
 
@@ -783,7 +764,7 @@ USAGE_MOUNT_LOOP( \
 #define rdate_trivial_usage \
        "[OPTION] HOST"
 #define rdate_full_usage \
-       "Get and possibly set the system date and time from a remote HOST.\n" \
+       "Get and possibly set the system date and time from a remote HOST.\n\n" \
        "Options:\n" \
        "\t-s\tSet the system date and time (default).\n" \
        "\t-p\tPrint the date and time."
@@ -844,10 +825,11 @@ USAGE_MOUNT_LOOP( \
 #define sed_trivial_usage \
        "[-Vhnef] pattern [files...]"
 #define sed_full_usage \
-       "-n\t\tsuppress automatic printing of pattern space\n" \
-       "-e script\tadd the script to the commands to be executed\n" \
-       "-f scriptfile\tadd the contents of script-file to the commands to be executed\n" \
-       "-h\t\tdisplay this help message\n" \
+       "Options:\n" \
+       "\t-n\t\tsuppress automatic printing of pattern space\n" \
+       "\t-e script\tadd the script to the commands to be executed\n" \
+       "\t-f scriptfile\tadd the contents of script-file to the commands to be executed\n" \
+       "\t-h\t\tdisplay this help message\n" \
        "\n" \
        "If no -e or -f is given, the first non-option argument is taken as the\n" \
        "sed script to interpret. All remaining arguments are names of input\n" \
@@ -862,7 +844,8 @@ USAGE_MOUNT_LOOP( \
        "and KEYCODE is given in decimal"
 
 #define sh_trivial_usage \
-       "[FILE]...\n   or: sh -c command [args]..."
+       "[FILE]...\n" \
+       "or: sh -c command [args]..."
 #define sh_full_usage \
        "lash: The BusyBox command interpreter (shell)."
 
@@ -887,10 +870,11 @@ USAGE_MOUNT_LOOP( \
 #define stty_full_usage \
        "Without arguments, prints baud rate, line discipline," \
        "\nand deviations from stty sane." \
-       "\n -F device  open and use the specified device instead of stdin" \
-       "\n -a    print all current settings in human-readable form. Or" \
-       "\n -g    print in a stty-readable form" \
-       "\n [SETTING]  see in documentation"
+       "\n\nOptions:" \
+       "\n\t-F device\topen device instead of stdin" \
+       "\n\t-a\t\tprint all current settings in human-readable form" \
+       "\n\t-g\t\tprint in stty-readable form" \
+       "\n\t[SETTING]\tsee documentation"
 
 #define swapoff_trivial_usage \
        "[OPTION] [device]"
@@ -930,11 +914,11 @@ USAGE_MOUNT_LOOP( \
        "Options:\n" \
        "\t-m NUM\t\tInterval between MARK lines (default=20min, 0=off)\n" \
        "\t-n\t\tRun as a foreground process\n" \
-USAGE_KLOGD("\t-K\t\tDo not start up the klogd process\n") \
+       USAGE_KLOGD("\t-K\t\tDo not start up the klogd process\n") \
        "\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)" \
-USAGE_REMOTE_LOG( \
-       "\n\t-R HOST[:PORT]\t\tLog remotely to IP or hostname on PORT (default PORT=514/UDP)\n" \
-       "\t-L\t\tLog locally as well as network logging (default is network only)")
+       USAGE_REMOTE_LOG( \
+       "\n\t-R HOST[:PORT]\tLog to IP or hostname on PORT (default PORT=514/UDP)\n" \
+       "\t-L\t\tLog locally and via network logging (default is network only)")
 
 
 #ifdef BB_FEATURE_SIMPLE_TAIL
@@ -949,10 +933,10 @@ USAGE_REMOTE_LOG( \
        "With more than one FILE, precede each with a header giving the\n" \
        "file name. With no FILE, or when FILE is -, read standard input.\n\n" \
        "Options:\n" \
-USAGE_UNSIMPLE_TAIL("\t-c N[kbm]\toutput the last N bytes\n") \
+       USAGE_UNSIMPLE_TAIL("\t-c N[kbm]\toutput the last N bytes\n") \
        "\t-n N[kbm]\tprint last N lines instead of last 10\n" \
        "\t-f\t\toutput data as the file grows" \
-USAGE_UNSIMPLE_TAIL( \
+       USAGE_UNSIMPLE_TAIL( \
        "\n\t-q\t\tnever output headers giving file names\n" \
        "\t-s SEC\t\twait SEC seconds between reads with -f\n" \
        "\t-v\t\talways output headers giving file names\n\n" \
@@ -978,13 +962,13 @@ USAGE_UNSIMPLE_TAIL( \
 #define tar_full_usage \
        "Create, extract, or list files from a tar file.\n\n" \
        "Main operation mode:\n" \
-USAGE_TAR_CREATE("\tc\t\tcreate\n") \
+       USAGE_TAR_CREATE("\tc\t\tcreate\n") \
        "\tx\t\textract\n" \
        "\tt\t\tlist\n" \
        "\nFile selection:\n" \
        "\tf\t\tname of tarfile or \"-\" for stdin\n" \
        "\tO\t\textract to stdout\n" \
-USAGE_TAR_EXCLUDE( \
+       USAGE_TAR_EXCLUDE( \
        "\texclude\t\tfile to exclude\n" \
         "\tX\t\tfile with names to exclude\n" \
        ) \
@@ -995,7 +979,8 @@ USAGE_TAR_EXCLUDE( \
        "[OPTION]... [FILE]..."
 #define tee_full_usage \
        "Copy standard input to each FILE, and also to standard output.\n\n" \
-       "Options:\n" "\t-a\tappend to the given FILEs, do not overwrite"
+       "Options:\n" \
+       "\t-a\tappend to the given FILEs, do not overwrite"
 
 #define telnet_trivial_usage \
        "host [port]"
@@ -1009,6 +994,30 @@ USAGE_TAR_EXCLUDE( \
        "Checks file types and compares values returning an exit\n" \
        "code determined by the value of EXPRESSION."
 
+#ifdef BB_FEATURE_TFTP_GET
+  #define USAGE_TFTP_GET(a) a
+#else
+  #define USAGE_TFTP_GET(a)
+#endif
+#ifdef BB_FEATURE_TFTP_PUT
+  #define USAGE_TFTP_PUT(a) a
+#else
+  #define USAGE_TFTP_PUT(a)
+#endif
+
+#define tftp_trivial_usage \
+       "command SOURCE DEST"
+#define tftp_full_usage \
+       "Transfers a file from/to a tftp server using \"octet\" mode.\n\n" \
+       "Commands:\n" \
+        USAGE_TFTP_GET(        \
+        "\tget\tGet file from server SOURCE and store to local DEST.\n" \
+        ) \
+        USAGE_TFTP_PUT(        \
+       "\tput\tPut local file SOURCE to server DEST.\n" \
+       ) \
+       "\nWhen nameing a server, use the syntax \"server:file\"."
+
 #define touch_trivial_usage \
        "[-c] file [file ...]"
 #define touch_full_usage \
@@ -1048,11 +1057,10 @@ USAGE_TAR_EXCLUDE( \
 #define umount_full_usage \
        "Unmount file systems\n" \
        "\nFlags:\n" "\t-a:\tUnmount all file systems" \
-USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \
+       USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \
        "\n\t-r:\tTry to remount devices as read-only if mount is busy" \
-USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \
-USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)" \
-       )
+       USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \
+       USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)")
 
 #define uname_trivial_usage \
        "[OPTION]..."
@@ -1071,16 +1079,16 @@ USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been us
        "[OPTION]... [INPUT [OUTPUT]]"
 #define uniq_full_usage \
        "Discard all but one of successive identical lines from INPUT\n" \
-       "(or standard input), writing to OUTPUT (or standard output).\n" \
+       "(or standard input), writing to OUTPUT (or standard output).\n\n" \
        "Options:\n" \
        "\t-c\tprefix lines by the number of occurrences\n" \
        "\t-d\tonly print duplicate lines\n" \
        "\t-u\tonly print unique lines"
 
 #define unix2dos_trivial_usage \
-       "< unixfile > dosfile"
+       "[option] [file]"
 #define unix2dos_full_usage \
-       "Converts a text file from unix format to dos format."
+       "See 'dos2unix --help' for help!"
 
 #define update_trivial_usage \
        "[options]"
@@ -1116,9 +1124,9 @@ USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been us
        "\t-m\tuse base64 encoding as of RFC1521"
 
 #define watchdog_trivial_usage \
-       "dev"
+       "DEV"
 #define watchdog_full_usage \
-       "Periodically write to watchdog device \"dev\""
+       "Periodically write to watchdog device DEV"
 
 #define wc_trivial_usage \
        "[OPTION]... [FILE]..."