move help text from include/usage.src.h to coreutils/*.c
[oweals/busybox.git] / include / usage.src.h
1 /* vi: set sw=8 ts=8: */
2 /*
3  * This file suffers from chronically incorrect tabification
4  * of messages. Before editing this file:
5  * 1. Switch you editor to 8-space tab mode.
6  * 2. Do not use \t in messages, use real tab character.
7  * 3. Start each source line with message as follows:
8  *    |<7 spaces>"text with tabs"....
9  * or
10  *    |<5 spaces>"\ntext with tabs"....
11  */
12 #ifndef BB_USAGE_H
13 #define BB_USAGE_H 1
14
15
16 #define NOUSAGE_STR "\b"
17
18 INSERT
19
20 #define acpid_trivial_usage \
21        "[-d] [-c CONFDIR] [-l LOGFILE] [-a ACTIONFILE] [-M MAPFILE] [-e PROC_EVENT_FILE] [-p PIDFILE]"
22 #define acpid_full_usage "\n\n" \
23        "Listen to ACPI events and spawn specific helpers on event arrival\n" \
24      "\nOptions:" \
25      "\n        -c DIR  Config directory [/etc/acpi]" \
26      "\n        -d      Don't daemonize, (implies -f)" \
27      "\n        -e FILE /proc event file [/proc/acpi/event]" \
28      "\n        -f      Run in foreground" \
29      "\n        -l FILE Log file [/var/log/acpid.log]" \
30      "\n        -p FILE Pid file [/var/run/acpid.pid]" \
31      "\n        -a FILE Action file [/etc/acpid.conf]" \
32      "\n        -M FILE Map file [/etc/acpi.map]" \
33         IF_FEATURE_ACPID_COMPAT( \
34      "\n\nAccept and ignore compatibility options -g -m -s -S -v" \
35         )
36
37 #define acpid_example_usage \
38        "Without -e option, acpid uses all /dev/input/event* files\n" \
39        "# acpid\n" \
40        "# acpid -l /var/log/my-acpi-log\n" \
41        "# acpid -e /proc/acpi/event\n"
42
43 #define addgroup_trivial_usage \
44        "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP"
45 #define addgroup_full_usage "\n\n" \
46        "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \
47      "\nOptions:" \
48      "\n        -g GID  Group id" \
49      "\n        -S      Create a system group" \
50
51 #define adduser_trivial_usage \
52        "[OPTIONS] USER"
53 #define adduser_full_usage "\n\n" \
54        "Add a user\n" \
55      "\nOptions:" \
56      "\n        -h DIR          Home directory" \
57      "\n        -g GECOS        GECOS field" \
58      "\n        -s SHELL        Login shell" \
59      "\n        -G GRP          Add user to existing group" \
60      "\n        -S              Create a system user" \
61      "\n        -D              Don't assign a password" \
62      "\n        -H              Don't create home directory" \
63      "\n        -u UID          User id" \
64
65 #define adjtimex_trivial_usage \
66        "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]"
67 #define adjtimex_full_usage "\n\n" \
68        "Read and optionally set system timebase parameters. See adjtimex(2)\n" \
69      "\nOptions:" \
70      "\n        -q      Quiet" \
71      "\n        -o OFF  Time offset, microseconds" \
72      "\n        -f FREQ Frequency adjust, integer kernel units (65536 is 1ppm)" \
73      "\n                (positive values make clock run faster)" \
74      "\n        -t TICK Microseconds per tick, usually 10000" \
75      "\n        -p TCONST" \
76
77 #define arp_trivial_usage \
78      "\n[-vn]   [-H HWTYPE] [-i IF] -a [HOSTNAME]" \
79      "\n[-v]                [-i IF] -d HOSTNAME [pub]" \
80      "\n[-v]    [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [temp]" \
81      "\n[-v]    [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [netmask MASK] pub" \
82      "\n[-v]    [-H HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub"
83 #define arp_full_usage "\n\n" \
84        "Manipulate ARP cache\n" \
85      "\nOptions:" \
86        "\n      -a              Display (all) hosts" \
87        "\n      -s              Set new ARP entry" \
88        "\n      -d              Delete a specified entry" \
89        "\n      -v              Verbose" \
90        "\n      -n              Don't resolve names" \
91        "\n      -i IF           Network interface" \
92        "\n      -D              Read <hwaddr> from given device" \
93        "\n      -A,-p AF        Protocol family" \
94        "\n      -H HWTYPE       Hardware address type" \
95
96 #define arping_trivial_usage \
97        "[-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP"
98 #define arping_full_usage "\n\n" \
99        "Send ARP requests/replies\n" \
100      "\nOptions:" \
101      "\n        -f              Quit on first ARP reply" \
102      "\n        -q              Quiet" \
103      "\n        -b              Keep broadcasting, don't go unicast" \
104      "\n        -D              Duplicated address detection mode" \
105      "\n        -U              Unsolicited ARP mode, update your neighbors" \
106      "\n        -A              ARP answer mode, update your neighbors" \
107      "\n        -c N            Stop after sending N ARP requests" \
108      "\n        -w TIMEOUT      Time to wait for ARP reply, seconds" \
109      "\n        -I IFACE        Interface to use (default eth0)" \
110      "\n        -s SRC_IP       Sender IP address" \
111      "\n        DST_IP          Target IP address" \
112
113 #define awk_trivial_usage \
114        "[OPTIONS] [AWK_PROGRAM] [FILE]..."
115 #define awk_full_usage "\n\n" \
116        "Options:" \
117      "\n        -v VAR=VAL      Set variable" \
118      "\n        -F SEP          Use SEP as field separator" \
119      "\n        -f FILE         Read program from FILE" \
120
121 #define beep_trivial_usage \
122        "-f FREQ -l LEN -d DELAY -r COUNT -n"
123 #define beep_full_usage "\n\n" \
124        "Options:" \
125      "\n        -f      Frequency in Hz" \
126      "\n        -l      Length in ms" \
127      "\n        -d      Delay in ms" \
128      "\n        -r      Repetitions" \
129      "\n        -n      Start new tone" \
130
131 #define blkid_trivial_usage \
132        ""
133 #define blkid_full_usage "\n\n" \
134        "Print UUIDs of all filesystems"
135
136 #define brctl_trivial_usage \
137        "COMMAND [BRIDGE [INTERFACE]]"
138 #define brctl_full_usage "\n\n" \
139        "Manage ethernet bridges\n" \
140      "\nCommands:" \
141         IF_FEATURE_BRCTL_SHOW( \
142      "\n        show                    Show a list of bridges" \
143         ) \
144      "\n        addbr BRIDGE            Create BRIDGE" \
145      "\n        delbr BRIDGE            Delete BRIDGE" \
146      "\n        addif BRIDGE IFACE      Add IFACE to BRIDGE" \
147      "\n        delif BRIDGE IFACE      Delete IFACE from BRIDGE" \
148         IF_FEATURE_BRCTL_FANCY( \
149      "\n        setageing BRIDGE TIME           Set ageing time" \
150      "\n        setfd BRIDGE TIME               Set bridge forward delay" \
151      "\n        sethello BRIDGE TIME            Set hello time" \
152      "\n        setmaxage BRIDGE TIME           Set max message age" \
153      "\n        setpathcost BRIDGE COST         Set path cost" \
154      "\n        setportprio BRIDGE PRIO         Set port priority" \
155      "\n        setbridgeprio BRIDGE PRIO       Set bridge priority" \
156      "\n        stp BRIDGE [1/yes/on|0/no/off]  STP on/off" \
157         ) \
158
159 #define busybox_notes_usage \
160        "Hello world!\n"
161
162 #define chat_trivial_usage \
163        "EXPECT [SEND [EXPECT [SEND...]]]"
164 #define chat_full_usage "\n\n" \
165        "Useful for interacting with a modem connected to stdin/stdout.\n" \
166        "A script consists of one or more \"expect-send\" pairs of strings,\n" \
167        "each pair is a pair of arguments. Example:\n" \
168        "chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'" \
169
170 #define chattr_trivial_usage \
171        "[-R] [-+=AacDdijsStTu] [-v VERSION] [FILE]..."
172 #define chattr_full_usage "\n\n" \
173        "Change file attributes on an ext2 fs\n" \
174      "\nModifiers:" \
175      "\n        -       Remove attributes" \
176      "\n        +       Add attributes" \
177      "\n        =       Set attributes" \
178      "\nAttributes:" \
179      "\n        A       Don't track atime" \
180      "\n        a       Append mode only" \
181      "\n        c       Enable compress" \
182      "\n        D       Write dir contents synchronously" \
183      "\n        d       Don't backup with dump" \
184      "\n        i       Cannot be modified (immutable)" \
185      "\n        j       Write all data to journal first" \
186      "\n        s       Zero disk storage when deleted" \
187      "\n        S       Write file contents synchronously" \
188      "\n        t       Disable tail-merging of partial blocks with other files" \
189      "\n        u       Allow file to be undeleted" \
190      "\nOptions:" \
191      "\n        -R      Recurse" \
192      "\n        -v      Set the file's version/generation number" \
193
194 #define chcon_trivial_usage \
195        "[OPTIONS] CONTEXT FILE..." \
196        "\n      chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \
197         IF_FEATURE_CHCON_LONG_OPTIONS( \
198        "\n      chcon [OPTIONS] --reference=RFILE FILE..." \
199         )
200 #define chcon_full_usage "\n\n" \
201        "Change the security context of each FILE to CONTEXT\n" \
202         IF_FEATURE_CHCON_LONG_OPTIONS( \
203      "\n        -v,--verbose            Verbose" \
204      "\n        -c,--changes            Report changes made" \
205      "\n        -h,--no-dereference     Affect symlinks instead of their targets" \
206      "\n        -f,--silent,--quiet     Suppress most error messages" \
207      "\n        --reference=RFILE       Use RFILE's group instead of using a CONTEXT value" \
208      "\n        -u,--user=USER          Set user/role/type/range in the target" \
209      "\n        -r,--role=ROLE          security context" \
210      "\n        -t,--type=TYPE" \
211      "\n        -l,--range=RANGE" \
212      "\n        -R,--recursive          Recurse" \
213         ) \
214         IF_NOT_FEATURE_CHCON_LONG_OPTIONS( \
215      "\n        -v      Verbose" \
216      "\n        -c      Report changes made" \
217      "\n        -h      Affect symlinks instead of their targets" \
218      "\n        -f      Suppress most error messages" \
219      "\n        -u USER Set user/role/type/range in the target security context" \
220      "\n        -r ROLE" \
221      "\n        -t TYPE" \
222      "\n        -l RNG" \
223      "\n        -R      Recurse" \
224         )
225
226 #define chpst_trivial_usage \
227        "[-vP012] [-u USER[:GRP]] [-U USER[:GRP]] [-e DIR]\n" \
228        "        [-/ DIR] [-n NICE] [-m BYTES] [-d BYTES] [-o N]\n" \
229        "        [-p N] [-f BYTES] [-c BYTES] PROG ARGS"
230 #define chpst_full_usage "\n\n" \
231        "Change the process state, run PROG\n" \
232      "\nOptions:" \
233      "\n        -u USER[:GRP]   Set uid and gid" \
234      "\n        -U USER[:GRP]   Set $UID and $GID in environment" \
235      "\n        -e DIR          Set environment variables as specified by files" \
236      "\n                        in DIR: file=1st_line_of_file" \
237      "\n        -/ DIR          Chroot to DIR" \
238      "\n        -n NICE         Add NICE to nice value" \
239      "\n        -m BYTES        Same as -d BYTES -s BYTES -l BYTES" \
240      "\n        -d BYTES        Limit data segment" \
241      "\n        -o N            Limit number of open files per process" \
242      "\n        -p N            Limit number of processes per uid" \
243      "\n        -f BYTES        Limit output file sizes" \
244      "\n        -c BYTES        Limit core file size" \
245      "\n        -v              Verbose" \
246      "\n        -P              Create new process group" \
247      "\n        -0              Close stdin" \
248      "\n        -1              Close stdout" \
249      "\n        -2              Close stderr" \
250
251 #define setuidgid_trivial_usage \
252        "USER PROG ARGS"
253 #define setuidgid_full_usage "\n\n" \
254        "Set uid and gid to USER's uid and gid, drop supplementary group ids,\n" \
255        "run PROG"
256 #define envuidgid_trivial_usage \
257        "USER PROG ARGS"
258 #define envuidgid_full_usage "\n\n" \
259        "Set $UID to USER's uid and $GID to USER's gid, run PROG"
260 #define envdir_trivial_usage \
261        "DIR PROG ARGS"
262 #define envdir_full_usage "\n\n" \
263        "Set various environment variables as specified by files\n" \
264        "in the directory DIR, run PROG"
265 #define softlimit_trivial_usage \
266        "[-a BYTES] [-m BYTES] [-d BYTES] [-s BYTES] [-l BYTES]\n" \
267        "        [-f BYTES] [-c BYTES] [-r BYTES] [-o N] [-p N] [-t N]\n" \
268        "        PROG ARGS"
269 #define softlimit_full_usage "\n\n" \
270        "Set soft resource limits, then run PROG\n" \
271      "\nOptions:" \
272      "\n        -a BYTES        Limit total size of all segments" \
273      "\n        -m BYTES        Same as -d BYTES -s BYTES -l BYTES -a BYTES" \
274      "\n        -d BYTES        Limit data segment" \
275      "\n        -s BYTES        Limit stack segment" \
276      "\n        -l BYTES        Limit locked memory size" \
277      "\n        -o N            Limit number of open files per process" \
278      "\n        -p N            Limit number of processes per uid" \
279      "\nOptions controlling file sizes:" \
280      "\n        -f BYTES        Limit output file sizes" \
281      "\n        -c BYTES        Limit core file size" \
282      "\nEfficiency opts:" \
283      "\n        -r BYTES        Limit resident set size" \
284      "\n        -t N            Limit CPU time, process receives" \
285      "\n                        a SIGXCPU after N seconds" \
286
287 #define cmp_trivial_usage \
288        "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
289 #define cmp_full_usage "\n\n" \
290        "Compare FILE1 with FILE2 (or stdin)\n" \
291      "\nOptions:" \
292      "\n        -l      Write the byte numbers (decimal) and values (octal)" \
293      "\n                for all differing bytes" \
294      "\n        -s      Quiet" \
295
296 #define bbconfig_trivial_usage \
297        ""
298 #define bbconfig_full_usage "\n\n" \
299        "Print the config file used by busybox build"
300
301 #define chrt_trivial_usage \
302        "[-prfom] [PRIO] [PID | PROG ARGS]"
303 #define chrt_full_usage "\n\n" \
304        "Change scheduling priority and class for a process\n" \
305      "\nOptions:" \
306      "\n        -p      Operate on PID" \
307      "\n        -r      Set SCHED_RR class" \
308      "\n        -f      Set SCHED_FIFO class" \
309      "\n        -o      Set SCHED_OTHER class" \
310      "\n        -m      Show min/max priorities" \
311
312 #define chrt_example_usage \
313        "$ chrt -r 4 sleep 900; x=$!\n" \
314        "$ chrt -f -p 3 $x\n" \
315        "You need CAP_SYS_NICE privileges to set scheduling attributes of a process"
316
317 #define renice_trivial_usage \
318        "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]"
319 #define renice_full_usage "\n\n" \
320        "Change scheduling priority for a running process\n" \
321      "\nOptions:" \
322      "\n        -n      Adjust current nice value (smaller is faster)" \
323      "\n        -p      Process id(s) (default)" \
324      "\n        -g      Process group id(s)" \
325      "\n        -u      Process user name(s) and/or id(s)" \
326
327 #define ionice_trivial_usage \
328         "[-c 1-3] [-n 0-7] [-p PID] [PROG]"
329 #define ionice_full_usage "\n\n" \
330        "Change I/O priority and class\n" \
331      "\nOptions:" \
332      "\n        -c      Class. 1:realtime 2:best-effort 3:idle" \
333      "\n        -n      Priority" \
334
335 #define crond_trivial_usage \
336        "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
337 #define crond_full_usage "\n\n" \
338        "        -f      Foreground" \
339      "\n        -b      Background (default)" \
340      "\n        -S      Log to syslog (default)" \
341      "\n        -l      Set log level. 0 is the most verbose, default 8" \
342         IF_FEATURE_CROND_D( \
343      "\n        -d      Set log level, log to stderr" \
344         ) \
345      "\n        -L      Log to file" \
346      "\n        -c      Working dir" \
347
348 #define crontab_trivial_usage \
349        "[-c DIR] [-u USER] [-ler]|[FILE]"
350 #define crontab_full_usage "\n\n" \
351        "        -c      Crontab directory" \
352      "\n        -u      User" \
353      "\n        -l      List crontab" \
354      "\n        -e      Edit crontab" \
355      "\n        -r      Delete crontab" \
356      "\n        FILE    Replace crontab by FILE ('-': stdin)" \
357
358 #define cryptpw_trivial_usage \
359        "[OPTIONS] [PASSWORD] [SALT]"
360 /* We do support -s, we just don't mention it */
361 #define cryptpw_full_usage "\n\n" \
362        "Crypt the PASSWORD using crypt(3)\n" \
363      "\nOptions:" \
364         IF_LONG_OPTS( \
365      "\n        -P,--password-fd=N      Read password from fd N" \
366 /*   "\n        -s,--stdin              Use stdin; like -P0" */ \
367      "\n        -m,--method=TYPE        Encryption method TYPE" \
368      "\n        -S,--salt=SALT" \
369         ) \
370         IF_NOT_LONG_OPTS( \
371      "\n        -P N    Read password from fd N" \
372 /*   "\n        -s      Use stdin; like -P0" */ \
373      "\n        -m TYPE Encryption method TYPE" \
374      "\n        -S SALT" \
375         ) \
376
377 /* mkpasswd is an alias to cryptpw */
378
379 #define mkpasswd_trivial_usage \
380        "[OPTIONS] [PASSWORD] [SALT]"
381 /* We do support -s, we just don't mention it */
382 #define mkpasswd_full_usage "\n\n" \
383        "Crypt the PASSWORD using crypt(3)\n" \
384      "\nOptions:" \
385         IF_LONG_OPTS( \
386      "\n        -P,--password-fd=N      Read password from fd N" \
387 /*   "\n        -s,--stdin              Use stdin; like -P0" */ \
388      "\n        -m,--method=TYPE        Encryption method TYPE" \
389      "\n        -S,--salt=SALT" \
390         ) \
391         IF_NOT_LONG_OPTS( \
392      "\n        -P N    Read password from fd N" \
393 /*   "\n        -s      Use stdin; like -P0" */ \
394      "\n        -m TYPE Encryption method TYPE" \
395      "\n        -S SALT" \
396         ) \
397
398 #define delgroup_trivial_usage \
399         IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
400 #define delgroup_full_usage "\n\n" \
401        "Delete group GROUP from the system" \
402         IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
403
404 #define deluser_trivial_usage \
405        "USER"
406 #define deluser_full_usage "\n\n" \
407        "Delete USER from the system"
408
409 #define devmem_trivial_usage \
410         "ADDRESS [WIDTH [VALUE]]"
411
412 #define devmem_full_usage "\n\n" \
413        "Read/write from physical address\n" \
414      "\n        ADDRESS Address to act upon" \
415      "\n        WIDTH   Width (8/16/...)" \
416      "\n        VALUE   Data to be written" \
417
418 #define devfsd_trivial_usage \
419        "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]")
420 #define devfsd_full_usage "\n\n" \
421        "Manage devfs permissions and old device name symlinks\n" \
422      "\nOptions:" \
423      "\n        mntpnt  The mount point where devfs is mounted" \
424      "\n        -v      Print the protocol version numbers for devfsd" \
425      "\n                and the kernel-side protocol version and exit" \
426         IF_DEVFSD_FG_NP( \
427      "\n        -fg     Run in foreground" \
428      "\n        -np     Exit after parsing the configuration file" \
429      "\n                and processing synthetic REGISTER events," \
430      "\n                don't poll for events" \
431         )
432
433 #define dhcprelay_trivial_usage \
434        "CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]"
435 #define dhcprelay_full_usage "\n\n" \
436        "Relay DHCP requests between clients and server" \
437
438 #define diff_trivial_usage \
439        "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
440 #define diff_full_usage "\n\n" \
441        "Compare files line by line and output the differences between them.\n" \
442        "This implementation supports unified diffs only.\n" \
443      "\nOptions:" \
444      "\n        -a      Treat all files as text" \
445      "\n        -b      Ignore changes in the amount of whitespace" \
446      "\n        -B      Ignore changes whose lines are all blank" \
447      "\n        -d      Try hard to find a smaller set of changes" \
448      "\n        -i      Ignore case differences" \
449      "\n        -L      Use LABEL instead of the filename in the unified header" \
450      "\n        -N      Treat absent files as empty" \
451      "\n        -q      Output only whether files differ" \
452      "\n        -r      Recurse" \
453      "\n        -S      Start with FILE when comparing directories" \
454      "\n        -T      Make tabs line up by prefixing a tab when necessary" \
455      "\n        -s      Report when two files are the same" \
456      "\n        -t      Expand tabs to spaces in output" \
457      "\n        -U      Output LINES lines of context" \
458      "\n        -w      Ignore all whitespace" \
459
460 #define dmesg_trivial_usage \
461        "[-c] [-n LEVEL] [-s SIZE]"
462 #define dmesg_full_usage "\n\n" \
463        "Print or control the kernel ring buffer\n" \
464      "\nOptions:" \
465      "\n        -c              Clear ring buffer after printing" \
466      "\n        -n LEVEL        Set console logging level" \
467      "\n        -s SIZE         Buffer size" \
468
469 #define dnsd_trivial_usage \
470        "[-dvs] [-c CONFFILE] [-t TTL_SEC] [-p PORT] [-i ADDR]"
471 #define dnsd_full_usage "\n\n" \
472        "Small static DNS server daemon\n" \
473      "\nOptions:" \
474      "\n        -c FILE Config file" \
475      "\n        -t SEC  TTL" \
476      "\n        -p PORT Listen on PORT" \
477      "\n        -i ADDR Listen on ADDR" \
478      "\n        -d      Daemonize" \
479      "\n        -v      Verbose" \
480      "\n        -s      Send successful replies only. Use this if you want" \
481      "\n                to use /etc/resolv.conf with two nameserver lines:" \
482      "\n                        nameserver DNSD_SERVER" \
483      "\n                        nameserver NORNAL_DNS_SERVER" \
484
485 #define dumpleases_trivial_usage \
486        "[-r|-a] [-f LEASEFILE]"
487 #define dumpleases_full_usage "\n\n" \
488        "Display DHCP leases granted by udhcpd\n" \
489      "\nOptions:" \
490         IF_LONG_OPTS( \
491      "\n        -f,--file=FILE  Lease file" \
492      "\n        -r,--remaining  Show remaining time" \
493      "\n        -a,--absolute   Show expiration time" \
494         ) \
495         IF_NOT_LONG_OPTS( \
496      "\n        -f FILE Lease file" \
497      "\n        -r      Show remaining time" \
498      "\n        -a      Show expiration time" \
499         )
500
501 /*
502 #define e2fsck_trivial_usage \
503        "[-panyrcdfvstDFSV] [-b superblock] [-B blocksize] " \
504        "[-I inode_buffer_blocks] [-P process_inode_size] " \
505        "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \
506        "[-E extended-options] device"
507 #define e2fsck_full_usage "\n\n" \
508        "Check ext2/ext3 file system\n" \
509      "\nOptions:" \
510      "\n        -p              Automatic repair (no questions)" \
511      "\n        -n              Make no changes to the filesystem" \
512      "\n        -y              Assume 'yes' to all questions" \
513      "\n        -c              Check for bad blocks and add them to the badblock list" \
514      "\n        -f              Force checking even if filesystem is marked clean" \
515      "\n        -v              Verbose" \
516      "\n        -b superblock   Use alternative superblock" \
517      "\n        -B blocksize    Force blocksize when looking for superblock" \
518      "\n        -j journal      Set location of the external journal" \
519      "\n        -l file         Add to badblocks list" \
520      "\n        -L file         Set badblocks list" \
521 */
522
523 #define eject_trivial_usage \
524        "[-t] [-T] [DEVICE]"
525 #define eject_full_usage "\n\n" \
526        "Eject DEVICE or default /dev/cdrom\n" \
527      "\nOptions:" \
528         IF_FEATURE_EJECT_SCSI( \
529      "\n        -s      SCSI device" \
530         ) \
531      "\n        -t      Close tray" \
532      "\n        -T      Open/close tray (toggle)" \
533
534 #define ed_trivial_usage ""
535 #define ed_full_usage ""
536
537 #define ether_wake_trivial_usage \
538        "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
539 #define ether_wake_full_usage "\n\n" \
540        "Send a magic packet to wake up sleeping machines.\n" \
541        "MAC must be a station address (00:11:22:33:44:55) or\n" \
542        "a hostname with a known 'ethers' entry.\n" \
543      "\nOptions:" \
544      "\n        -b              Send wake-up packet to the broadcast address" \
545      "\n        -i iface        Interface to use (default eth0)" \
546      "\n        -p pass         Append four or six byte password PW to the packet" \
547
548 #define fakeidentd_trivial_usage \
549        "[-fiw] [-b ADDR] [STRING]"
550 #define fakeidentd_full_usage "\n\n" \
551        "Provide fake ident (auth) service\n" \
552      "\nOptions:" \
553      "\n        -f      Run in foreground" \
554      "\n        -i      Inetd mode" \
555      "\n        -w      Inetd 'wait' mode" \
556      "\n        -b ADDR Bind to specified address" \
557      "\n        STRING  Ident answer string (default: nobody)" \
558
559 #define fbsplash_trivial_usage \
560        "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]"
561 #define fbsplash_full_usage "\n\n" \
562        "Options:" \
563      "\n        -s      Image" \
564      "\n        -c      Hide cursor" \
565      "\n        -d      Framebuffer device (default /dev/fb0)" \
566      "\n        -i      Config file (var=value):" \
567      "\n                        BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT" \
568      "\n                        BAR_R,BAR_G,BAR_B" \
569      "\n        -f      Control pipe (else exit after drawing image)" \
570      "\n                        commands: 'NN' (% for progress bar) or 'exit'" \
571
572 #define fbset_trivial_usage \
573        "[OPTIONS] [MODE]"
574 #define fbset_full_usage "\n\n" \
575        "Show and modify frame buffer settings"
576
577 #define fbset_example_usage \
578        "$ fbset\n" \
579        "mode \"1024x768-76\"\n" \
580        "        # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \
581        "        geometry 1024 768 1024 768 16\n" \
582        "        timings 12714 128 32 16 4 128 4\n" \
583        "        accel false\n" \
584        "        rgba 5/11,6/5,5/0,0/0\n" \
585        "endmode\n"
586
587 #define fdflush_trivial_usage \
588        "DEVICE"
589 #define fdflush_full_usage "\n\n" \
590        "Force floppy disk drive to detect disk change"
591
592 #define fdformat_trivial_usage \
593        "[-n] DEVICE"
594 #define fdformat_full_usage "\n\n" \
595        "Format floppy disk\n" \
596      "\nOptions:" \
597      "\n        -n      Don't verify after format" \
598
599 /* Looks like someone forgot to add this to config system */
600 #ifndef ENABLE_FEATURE_FDISK_BLKSIZE
601 # define ENABLE_FEATURE_FDISK_BLKSIZE 0
602 # define IF_FEATURE_FDISK_BLKSIZE(a)
603 #endif
604
605 #define fdisk_trivial_usage \
606        "[-ul" IF_FEATURE_FDISK_BLKSIZE("s") "] " \
607        "[-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK"
608 #define fdisk_full_usage "\n\n" \
609        "Change partition table\n" \
610      "\nOptions:" \
611      "\n        -u              Start and End are in sectors (instead of cylinders)" \
612      "\n        -l              Show partition table for each DISK, then exit" \
613         IF_FEATURE_FDISK_BLKSIZE( \
614      "\n        -s              Show partition sizes in kb for each DISK, then exit" \
615         ) \
616      "\n        -b 2048         (for certain MO disks) use 2048-byte sectors" \
617      "\n        -C CYLINDERS    Set number of cylinders/heads/sectors" \
618      "\n        -H HEADS" \
619      "\n        -S SECTORS" \
620
621 #define findfs_trivial_usage \
622        "LABEL=label or UUID=uuid"
623 #define findfs_full_usage "\n\n" \
624        "Find a filesystem device based on a label or UUID"
625 #define findfs_example_usage \
626        "$ findfs LABEL=MyDevice"
627
628 #define flash_lock_trivial_usage \
629        "MTD_DEVICE OFFSET SECTORS"
630 #define flash_lock_full_usage "\n\n" \
631        "Lock part or all of an MTD device. If SECTORS is -1, then all sectors\n" \
632        "will be locked, regardless of the value of OFFSET"
633
634 #define flash_unlock_trivial_usage \
635        "MTD_DEVICE"
636 #define flash_unlock_full_usage "\n\n" \
637        "Unlock an MTD device"
638
639 #define flash_eraseall_trivial_usage \
640        "[-jq] MTD_DEVICE"
641 #define flash_eraseall_full_usage "\n\n" \
642        "Erase an MTD device\n" \
643      "\nOptions:" \
644      "\n        -j      Format the device for jffs2" \
645      "\n        -q      Don't display progress messages" \
646
647 #define flashcp_trivial_usage \
648        "-v FILE MTD_DEVICE"
649 #define flashcp_full_usage "\n\n" \
650        "Copy an image to MTD device\n" \
651      "\nOptions:" \
652      "\n        -v      Verbose" \
653
654 #define flock_trivial_usage \
655        "[-sxun] FD|{FILE [-c] PROG ARGS}"
656 #define flock_full_usage "\n\n" \
657        "[Un]lock file descriptor, or lock FILE, run PROG\n" \
658      "\nOptions:" \
659      "\n        -s      Shared lock" \
660      "\n        -x      Exclusive lock (default)" \
661      "\n        -u      Unlock FD" \
662      "\n        -n      Fail rather than wait" \
663
664 #define free_trivial_usage \
665        "" IF_DESKTOP("[-b/k/m/g]")
666 #define free_full_usage "\n\n" \
667        "Display the amount of free and used system memory"
668 #define free_example_usage \
669        "$ free\n" \
670        "              total         used         free       shared      buffers\n" \
671        "  Mem:       257628       248724         8904        59644        93124\n" \
672        " Swap:       128516         8404       120112\n" \
673        "Total:       386144       257128       129016\n" \
674
675 #define freeramdisk_trivial_usage \
676        "DEVICE"
677 #define freeramdisk_full_usage "\n\n" \
678        "Free all memory used by the specified ramdisk"
679 #define freeramdisk_example_usage \
680        "$ freeramdisk /dev/ram2\n"
681
682 #define fsck_trivial_usage \
683        "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..."
684 #define fsck_full_usage "\n\n" \
685        "Check and repair filesystems\n" \
686      "\nOptions:" \
687      "\n        -A      Walk /etc/fstab and check all filesystems" \
688      "\n        -N      Don't execute, just show what would be done" \
689      "\n        -P      With -A, check filesystems in parallel" \
690      "\n        -R      With -A, skip the root filesystem" \
691      "\n        -T      Don't show title on startup" \
692      "\n        -V      Verbose" \
693      "\n        -C n    Write status information to specified filedescriptor" \
694      "\n        -t TYPE List of filesystem types to check" \
695
696 #define fsck_minix_trivial_usage \
697        "[-larvsmf] BLOCKDEV"
698 #define fsck_minix_full_usage "\n\n" \
699        "Check MINIX filesystem\n" \
700      "\nOptions:" \
701      "\n        -l      List all filenames" \
702      "\n        -r      Perform interactive repairs" \
703      "\n        -a      Perform automatic repairs" \
704      "\n        -v      Verbose" \
705      "\n        -s      Output superblock information" \
706      "\n        -m      Show \"mode not cleared\" warnings" \
707      "\n        -f      Force file system check" \
708
709 #define ftpget_trivial_usage \
710        "[OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE"
711 #define ftpget_full_usage "\n\n" \
712        "Retrieve a remote file via FTP\n" \
713      "\nOptions:" \
714         IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \
715      "\n        -c,--continue   Continue previous transfer" \
716      "\n        -v,--verbose    Verbose" \
717      "\n        -u,--username   Username" \
718      "\n        -p,--password   Password" \
719      "\n        -P,--port       Port number" \
720         ) \
721         IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \
722      "\n        -c      Continue previous transfer" \
723      "\n        -v      Verbose" \
724      "\n        -u      Username" \
725      "\n        -p      Password" \
726      "\n        -P      Port number" \
727         )
728
729 #define ftpput_trivial_usage \
730        "[OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE"
731 #define ftpput_full_usage "\n\n" \
732        "Store a local file on a remote machine via FTP\n" \
733      "\nOptions:" \
734         IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \
735      "\n        -v,--verbose    Verbose" \
736      "\n        -u,--username   Username" \
737      "\n        -p,--password   Password" \
738      "\n        -P,--port       Port number" \
739         ) \
740         IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \
741      "\n        -v      Verbose" \
742      "\n        -u      Username" \
743      "\n        -p      Password" \
744      "\n        -P      Port number" \
745         )
746
747 #define fuser_trivial_usage \
748        "[OPTIONS] FILE or PORT/PROTO"
749 #define fuser_full_usage "\n\n" \
750        "Find processes which use FILEs or PORTs\n" \
751      "\nOptions:" \
752      "\n        -m      Find processes which use same fs as FILEs" \
753      "\n        -4,-6   Search only IPv4/IPv6 space" \
754      "\n        -s      Don't display PIDs" \
755      "\n        -k      Kill found processes" \
756      "\n        -SIGNAL Signal to send (default: KILL)" \
757
758 #define getenforce_trivial_usage NOUSAGE_STR
759 #define getenforce_full_usage ""
760
761 #define getopt_trivial_usage \
762        "[OPTIONS]"
763 #define getopt_full_usage "\n\n" \
764        "Options:" \
765         IF_LONG_OPTS( \
766      "\n        -a,--alternative                Allow long options starting with single -" \
767      "\n        -l,--longoptions=longopts       Long options to be recognized" \
768      "\n        -n,--name=progname              The name under which errors are reported" \
769      "\n        -o,--options=optstring          Short options to be recognized" \
770      "\n        -q,--quiet                      Disable error reporting by getopt(3)" \
771      "\n        -Q,--quiet-output               No normal output" \
772      "\n        -s,--shell=shell                Set shell quoting conventions" \
773      "\n        -T,--test                       Test for getopt(1) version" \
774      "\n        -u,--unquoted                   Don't quote the output" \
775         ) \
776         IF_NOT_LONG_OPTS( \
777      "\n        -a              Allow long options starting with single -" \
778      "\n        -l longopts     Long options to be recognized" \
779      "\n        -n progname     The name under which errors are reported" \
780      "\n        -o optstring    Short options to be recognized" \
781      "\n        -q              Disable error reporting by getopt(3)" \
782      "\n        -Q              No normal output" \
783      "\n        -s shell        Set shell quoting conventions" \
784      "\n        -T              Test for getopt(1) version" \
785      "\n        -u              Don't quote the output" \
786         )
787 #define getopt_example_usage \
788        "$ cat getopt.test\n" \
789        "#!/bin/sh\n" \
790        "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
791        "       -n 'example.busybox' -- \"$@\"`\n" \
792        "if [ $? != 0 ]; then exit 1; fi\n" \
793        "eval set -- \"$GETOPT\"\n" \
794        "while true; do\n" \
795        " case $1 in\n" \
796        "   -a|--a-long) echo \"Option a\"; shift;;\n" \
797        "   -b|--b-long) echo \"Option b, argument '$2'\"; shift 2;;\n" \
798        "   -c|--c-long)\n" \
799        "     case \"$2\" in\n" \
800        "       \"\") echo \"Option c, no argument\"; shift 2;;\n" \
801        "       *)  echo \"Option c, argument '$2'\"; shift 2;;\n" \
802        "     esac;;\n" \
803        "   --) shift; break;;\n" \
804        "   *) echo \"Internal error!\"; exit 1;;\n" \
805        " esac\n" \
806        "done\n"
807
808 #define getsebool_trivial_usage \
809        "-a or getsebool boolean..."
810 #define getsebool_full_usage "\n\n" \
811        "        -a      Show all selinux booleans"
812
813 #define hdparm_trivial_usage \
814        "[OPTIONS] [DEVICE]"
815 #define hdparm_full_usage "\n\n" \
816        "Options:" \
817      "\n        -a      Get/set fs readahead" \
818      "\n        -A      Set drive read-lookahead flag (0/1)" \
819      "\n        -b      Get/set bus state (0 == off, 1 == on, 2 == tristate)" \
820      "\n        -B      Set Advanced Power Management setting (1-255)" \
821      "\n        -c      Get/set IDE 32-bit IO setting" \
822      "\n        -C      Check IDE power mode status" \
823         IF_FEATURE_HDPARM_HDIO_GETSET_DMA( \
824      "\n        -d      Get/set using_dma flag") \
825      "\n        -D      Enable/disable drive defect-mgmt" \
826      "\n        -f      Flush buffer cache for device on exit" \
827      "\n        -g      Display drive geometry" \
828      "\n        -h      Display terse usage information" \
829         IF_FEATURE_HDPARM_GET_IDENTITY( \
830      "\n        -i      Display drive identification") \
831         IF_FEATURE_HDPARM_GET_IDENTITY( \
832      "\n        -I      Detailed/current information directly from drive") \
833      "\n        -k      Get/set keep_settings_over_reset flag (0/1)" \
834      "\n        -K      Set drive keep_features_over_reset flag (0/1)" \
835      "\n        -L      Set drive doorlock (0/1) (removable harddisks only)" \
836      "\n        -m      Get/set multiple sector count" \
837      "\n        -n      Get/set ignore-write-errors flag (0/1)" \
838      "\n        -p      Set PIO mode on IDE interface chipset (0,1,2,3,4,...)" \
839      "\n        -P      Set drive prefetch count" \
840 /*   "\n        -q      Change next setting quietly" - not supported ib bbox */ \
841      "\n        -Q      Get/set DMA tagged-queuing depth (if supported)" \
842      "\n        -r      Get/set readonly flag (DANGEROUS to set)" \
843         IF_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
844      "\n        -R      Register an IDE interface (DANGEROUS)") \
845      "\n        -S      Set standby (spindown) timeout" \
846      "\n        -t      Perform device read timings" \
847      "\n        -T      Perform cache read timings" \
848      "\n        -u      Get/set unmaskirq flag (0/1)" \
849         IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
850      "\n        -U      Unregister an IDE interface (DANGEROUS)") \
851      "\n        -v      Defaults; same as -mcudkrag for IDE drives" \
852      "\n        -V      Display program version and exit immediately" \
853         IF_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
854      "\n        -w      Perform device reset (DANGEROUS)") \
855      "\n        -W      Set drive write-caching flag (0/1) (DANGEROUS)" \
856         IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
857      "\n        -x      Tristate device for hotswap (0/1) (DANGEROUS)") \
858      "\n        -X      Set IDE xfer mode (DANGEROUS)" \
859      "\n        -y      Put IDE drive in standby mode" \
860      "\n        -Y      Put IDE drive to sleep" \
861      "\n        -Z      Disable Seagate auto-powersaving mode" \
862      "\n        -z      Reread partition table" \
863
864 #define hexdump_trivial_usage \
865        "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..."
866 #define hexdump_full_usage "\n\n" \
867        "Display FILEs (or stdin) in a user specified format\n" \
868      "\nOptions:" \
869      "\n        -b              One-byte octal display" \
870      "\n        -c              One-byte character display" \
871      "\n        -C              Canonical hex+ASCII, 16 bytes per line" \
872      "\n        -d              Two-byte decimal display" \
873      "\n        -e FORMAT_STRING" \
874      "\n        -f FORMAT_FILE" \
875      "\n        -n LENGTH       Interpret only LENGTH bytes of input" \
876      "\n        -o              Two-byte octal display" \
877      "\n        -s OFFSET       Skip OFFSET bytes" \
878      "\n        -v              Display all input data" \
879      "\n        -x              Two-byte hexadecimal display" \
880         IF_FEATURE_HEXDUMP_REVERSE( \
881      "\n        -R              Reverse of 'hexdump -Cv'") \
882
883 #define hd_trivial_usage \
884        "FILE..."
885 #define hd_full_usage "\n\n" \
886        "hd is an alias for hexdump -C"
887
888 #define hostname_trivial_usage \
889        "[OPTIONS] [HOSTNAME | -F FILE]"
890 #define hostname_full_usage "\n\n" \
891        "Get or set hostname or DNS domain name\n" \
892      "\nOptions:" \
893      "\n        -s      Short" \
894      "\n        -i      Addresses for the hostname" \
895      "\n        -d      DNS domain name" \
896      "\n        -f      Fully qualified domain name" \
897      "\n        -F FILE Use FILE's content as hostname" \
898
899 #define hostname_example_usage \
900        "$ hostname\n" \
901        "sage\n"
902
903 #define dnsdomainname_trivial_usage NOUSAGE_STR
904 #define dnsdomainname_full_usage ""
905
906 #define httpd_trivial_usage \
907        "[-ifv[v]]" \
908        " [-c CONFFILE]" \
909        " [-p [IP:]PORT]" \
910         IF_FEATURE_HTTPD_SETUID(" [-u USER[:GRP]]") \
911         IF_FEATURE_HTTPD_BASIC_AUTH(" [-r REALM]") \
912        " [-h HOME]\n" \
913        "or httpd -d/-e" IF_FEATURE_HTTPD_AUTH_MD5("/-m") " STRING"
914 #define httpd_full_usage "\n\n" \
915        "Listen for incoming HTTP requests\n" \
916      "\nOptions:" \
917      "\n        -i              Inetd mode" \
918      "\n        -f              Don't daemonize" \
919      "\n        -v[v]           Verbose" \
920      "\n        -p [IP:]PORT    Bind to IP:PORT (default *:80)" \
921         IF_FEATURE_HTTPD_SETUID( \
922      "\n        -u USER[:GRP]   Set uid/gid after binding to port") \
923         IF_FEATURE_HTTPD_BASIC_AUTH( \
924      "\n        -r REALM        Authentication Realm for Basic Authentication") \
925      "\n        -h HOME         Home directory (default .)" \
926      "\n        -c FILE         Configuration file (default {/etc,HOME}/httpd.conf)" \
927         IF_FEATURE_HTTPD_AUTH_MD5( \
928      "\n        -m STRING       MD5 crypt STRING") \
929      "\n        -e STRING       HTML encode STRING" \
930      "\n        -d STRING       URL decode STRING" \
931
932 #define ifconfig_trivial_usage \
933         IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
934 #define ifconfig_full_usage "\n\n" \
935        "Configure a network interface\n" \
936      "\nOptions:" \
937      "\n" \
938         IF_FEATURE_IPV6( \
939        "        [add ADDRESS[/PREFIXLEN]]\n") \
940         IF_FEATURE_IPV6( \
941        "        [del ADDRESS[/PREFIXLEN]]\n") \
942        "        [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \
943        "        [netmask ADDRESS] [dstaddr ADDRESS]\n" \
944         IF_FEATURE_IFCONFIG_SLIP( \
945        "        [outfill NN] [keepalive NN]\n") \
946        "        " IF_FEATURE_IFCONFIG_HW("[hw ether" IF_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n" \
947        "        [[-]trailers] [[-]arp] [[-]allmulti]\n" \
948        "        [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \
949         IF_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \
950        "        [mem_start NN] [io_addr NN] [irq NN]\n") \
951        "        [up|down] ..."
952
953 #define ifenslave_trivial_usage \
954        "[-cdf] MASTER_IFACE SLAVE_IFACE..."
955 #define ifenslave_full_usage "\n\n" \
956        "Configure network interfaces for parallel routing\n" \
957      "\nOptions:" \
958      "\n        -c,--change-active      Change active slave" \
959      "\n        -d,--detach             Remove slave interface from bonding device" \
960      "\n        -f,--force              Force, even if interface is not Ethernet" \
961 /*   "\n        -r,--receive-slave      Create a receive-only slave" */
962
963 #define ifenslave_example_usage \
964        "To create a bond device, simply follow these three steps:\n" \
965        "- ensure that the required drivers are properly loaded:\n" \
966        "  # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" \
967        "- assign an IP address to the bond device:\n" \
968        "  # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" \
969        "- attach all the interfaces you need to the bond device:\n" \
970        "  # ifenslave bond0 eth0 eth1 eth2\n" \
971        "  If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" \
972        "  interfaces attached AFTER this assignment will get the same MAC addr.\n\n" \
973        "  To detach a dead interface without setting the bond device down:\n" \
974        "  # ifenslave -d bond0 eth1\n\n" \
975        "  To set the bond device down and automatically release all the slaves:\n" \
976        "  # ifconfig bond0 down\n\n" \
977        "  To change active slave:\n" \
978        "  # ifenslave -c bond0 eth0\n" \
979
980 #define ifplugd_trivial_usage \
981        "[OPTIONS]"
982 #define ifplugd_full_usage "\n\n" \
983        "Network interface plug detection daemon\n" \
984      "\nOptions:" \
985      "\n        -n              Don't daemonize" \
986      "\n        -s              Don't log to syslog" \
987      "\n        -i IFACE        Interface" \
988      "\n        -f/-F           Treat link detection error as link down/link up" \
989      "\n                        (otherwise exit on error)" \
990      "\n        -a              Don't up interface at each link probe" \
991      "\n        -M              Monitor creation/destruction of interface" \
992      "\n                        (otherwise it must exist)" \
993      "\n        -r PROG         Script to run" \
994      "\n        -x ARG          Extra argument for script" \
995      "\n        -I              Don't exit on nonzero exit code from script" \
996      "\n        -p              Don't run script on daemon startup" \
997      "\n        -q              Don't run script on daemon quit" \
998      "\n        -l              Run script on startup even if no cable is detected" \
999      "\n        -t SECS         Poll time in seconds" \
1000      "\n        -u SECS         Delay before running script after link up" \
1001      "\n        -d SECS         Delay after link down" \
1002      "\n        -m MODE         API mode (mii, priv, ethtool, wlan, iff, auto)" \
1003      "\n        -k              Kill running daemon" \
1004
1005 #define ifup_trivial_usage \
1006        "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..."
1007 #define ifup_full_usage "\n\n" \
1008        "Options:" \
1009      "\n        -a      De/configure all interfaces automatically" \
1010      "\n        -i FILE Use FILE for interface definitions" \
1011      "\n        -n      Print out what would happen, but don't do it" \
1012         IF_FEATURE_IFUPDOWN_MAPPING( \
1013      "\n                (note: doesn't disable mappings)" \
1014      "\n        -m      Don't run any mappings" \
1015         ) \
1016      "\n        -v      Print out what would happen before doing it" \
1017      "\n        -f      Force de/configuration" \
1018
1019 #define ifdown_trivial_usage \
1020        "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..."
1021 #define ifdown_full_usage "\n\n" \
1022        "Options:" \
1023      "\n        -a      De/configure all interfaces automatically" \
1024      "\n        -i FILE Use FILE for interface definitions" \
1025      "\n        -n      Print out what would happen, but don't do it" \
1026         IF_FEATURE_IFUPDOWN_MAPPING( \
1027      "\n                (note: doesn't disable mappings)" \
1028      "\n        -m      Don't run any mappings" \
1029         ) \
1030      "\n        -v      Print out what would happen before doing it" \
1031      "\n        -f      Force de/configuration" \
1032
1033 #define inetd_trivial_usage \
1034        "[-fe] [-q N] [-R N] [CONFFILE]"
1035 #define inetd_full_usage "\n\n" \
1036        "Listen for network connections and launch programs\n" \
1037      "\nOptions:" \
1038      "\n        -f      Run in foreground" \
1039      "\n        -e      Log to stderr" \
1040      "\n        -q N    Socket listen queue (default: 128)" \
1041      "\n        -R N    Pause services after N connects/min" \
1042      "\n                (default: 0 - disabled)" \
1043
1044 #define inotifyd_trivial_usage \
1045         "PROG FILE1[:MASK]..."
1046 #define inotifyd_full_usage "\n\n" \
1047        "Run PROG on filesystem changes." \
1048      "\nWhen a filesystem event matching MASK occurs on FILEn," \
1049      "\nPROG ACTUAL_EVENTS FILEn [SUBFILE] is run." \
1050      "\nEvents:" \
1051      "\n        a       File is accessed" \
1052      "\n        c       File is modified" \
1053      "\n        e       Metadata changed" \
1054      "\n        w       Writable file is closed" \
1055      "\n        0       Unwritable file is closed" \
1056      "\n        r       File is opened" \
1057      "\n        D       File is deleted" \
1058      "\n        M       File is moved" \
1059      "\n        u       Backing fs is unmounted" \
1060      "\n        o       Event queue overflowed" \
1061      "\n        x       File can't be watched anymore" \
1062      "\nIf watching a directory:" \
1063      "\n        m       Subfile is moved into dir" \
1064      "\n        y       Subfile is moved out of dir" \
1065      "\n        n       Subfile is created" \
1066      "\n        d       Subfile is deleted" \
1067      "\n" \
1068      "\ninotifyd waits for PROG to exit." \
1069      "\nWhen x event happens for all FILEs, inotifyd exits." \
1070
1071 /* would need to make the " | " optional depending on more than one selected: */
1072 #define ip_trivial_usage \
1073        "[OPTIONS] {" \
1074         IF_FEATURE_IP_ADDRESS("address | ") \
1075         IF_FEATURE_IP_ROUTE("route | ") \
1076         IF_FEATURE_IP_LINK("link | ") \
1077         IF_FEATURE_IP_TUNNEL("tunnel | ") \
1078         IF_FEATURE_IP_RULE("rule") \
1079        "} {COMMAND}"
1080 #define ip_full_usage "\n\n" \
1081        "ip [OPTIONS] OBJECT {COMMAND}\n" \
1082        "where OBJECT := {" \
1083         IF_FEATURE_IP_ADDRESS("address | ") \
1084         IF_FEATURE_IP_ROUTE("route | ") \
1085         IF_FEATURE_IP_LINK("link | ") \
1086         IF_FEATURE_IP_TUNNEL("tunnel | ") \
1087         IF_FEATURE_IP_RULE("rule") \
1088        "}\n" \
1089        "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" \
1090
1091 #define ipaddr_trivial_usage \
1092        "{ {add|del} IFADDR dev STRING | {show|flush}\n" \
1093        "                [dev STRING] [to PREFIX] }"
1094 #define ipaddr_full_usage "\n\n" \
1095        "ipaddr {add|delete} IFADDR dev STRING\n" \
1096        "ipaddr {show|flush} [dev STRING] [scope SCOPE-ID]\n" \
1097        "        [to PREFIX] [label PATTERN]\n" \
1098        "        IFADDR := PREFIX | ADDR peer PREFIX\n" \
1099        "        [broadcast ADDR] [anycast ADDR]\n" \
1100        "        [label STRING] [scope SCOPE-ID]\n" \
1101        "        SCOPE-ID := [host | link | global | NUMBER]" \
1102
1103 #define ipcalc_trivial_usage \
1104        "[OPTIONS] ADDRESS[[/]NETMASK] [NETMASK]"
1105 #define ipcalc_full_usage "\n\n" \
1106        "Calculate IP network settings from a IP address\n" \
1107      "\nOptions:" \
1108         IF_FEATURE_IPCALC_LONG_OPTIONS( \
1109      "\n        -b,--broadcast  Display calculated broadcast address" \
1110      "\n        -n,--network    Display calculated network address" \
1111      "\n        -m,--netmask    Display default netmask for IP" \
1112         IF_FEATURE_IPCALC_FANCY( \
1113      "\n        -p,--prefix     Display the prefix for IP/NETMASK" \
1114      "\n        -h,--hostname   Display first resolved host name" \
1115      "\n        -s,--silent     Don't ever display error messages" \
1116         ) \
1117         ) \
1118         IF_NOT_FEATURE_IPCALC_LONG_OPTIONS( \
1119      "\n        -b      Display calculated broadcast address" \
1120      "\n        -n      Display calculated network address" \
1121      "\n        -m      Display default netmask for IP" \
1122         IF_FEATURE_IPCALC_FANCY( \
1123      "\n        -p      Display the prefix for IP/NETMASK" \
1124      "\n        -h      Display first resolved host name" \
1125      "\n        -s      Don't ever display error messages" \
1126         ) \
1127         )
1128
1129 #define ipcrm_trivial_usage \
1130        "[-MQS key] [-mqs id]"
1131 #define ipcrm_full_usage "\n\n" \
1132        "Upper-case options MQS remove an object by shmkey value.\n" \
1133        "Lower-case options remove an object by shmid value.\n" \
1134      "\nOptions:" \
1135      "\n        -mM     Remove memory segment after last detach" \
1136      "\n        -qQ     Remove message queue" \
1137      "\n        -sS     Remove semaphore" \
1138
1139 #define ipcs_trivial_usage \
1140        "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
1141 #define ipcs_full_usage "\n\n" \
1142        "        -i      Show specific resource" \
1143      "\nResource specification:" \
1144      "\n        -m      Shared memory segments" \
1145      "\n        -q      Message queues" \
1146      "\n        -s      Semaphore arrays" \
1147      "\n        -a      All (default)" \
1148      "\nOutput format:" \
1149      "\n        -t      Time" \
1150      "\n        -c      Creator" \
1151      "\n        -p      Pid" \
1152      "\n        -l      Limits" \
1153      "\n        -u      Summary" \
1154
1155 #define iplink_trivial_usage \
1156        "{ set DEVICE { up | down | arp { on | off } | show [DEVICE] }"
1157 #define iplink_full_usage "\n\n" \
1158        "iplink set DEVICE { up | down | arp | multicast { on | off } |\n" \
1159        "                        dynamic { on | off } |\n" \
1160        "                        mtu MTU }\n" \
1161        "iplink show [DEVICE]" \
1162
1163 #define iproute_trivial_usage \
1164        "{ list | flush | { add | del | change | append |\n" \
1165        "                replace | monitor } ROUTE }"
1166 #define iproute_full_usage "\n\n" \
1167        "iproute { list | flush } SELECTOR\n" \
1168        "iproute get ADDRESS [from ADDRESS iif STRING]\n" \
1169        "                        [oif STRING]  [tos TOS]\n" \
1170        "iproute { add | del | change | append | replace | monitor } ROUTE\n" \
1171        "                        SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \
1172        "                        ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]\n" \
1173        "                                [metric METRIC]" \
1174
1175 #define iprule_trivial_usage \
1176        "{[list | add | del] RULE}"
1177 #define iprule_full_usage "\n\n" \
1178        "iprule [list | add | del] SELECTOR ACTION\n" \
1179        "        SELECTOR := [from PREFIX] [to PREFIX] [tos TOS] [fwmark FWMARK]\n" \
1180        "                        [dev STRING] [pref NUMBER]\n" \
1181        "        ACTION := [table TABLE_ID] [nat ADDRESS]\n" \
1182        "                        [prohibit | reject | unreachable]\n" \
1183        "                        [realms [SRCREALM/]DSTREALM]\n" \
1184        "        TABLE_ID := [local | main | default | NUMBER]" \
1185
1186 #define iptunnel_trivial_usage \
1187        "{ add | change | del | show } [NAME]\n" \
1188        "        [mode { ipip | gre | sit }]\n" \
1189        "        [remote ADDR] [local ADDR] [ttl TTL]"
1190 #define iptunnel_full_usage "\n\n" \
1191        "iptunnel { add | change | del | show } [NAME]\n" \
1192        "        [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n" \
1193        "        [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n" \
1194        "        [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]" \
1195
1196 #define kill_trivial_usage \
1197        "[-l] [-SIG] PID..."
1198 #define kill_full_usage "\n\n" \
1199        "Send a signal (default: TERM) to given PIDs\n" \
1200      "\nOptions:" \
1201      "\n        -l      List all signal names and numbers" \
1202 /*   "\n        -s SIG  Yet another way of specifying SIG" */ \
1203
1204 #define kill_example_usage \
1205        "$ ps | grep apache\n" \
1206        "252 root     root     S [apache]\n" \
1207        "263 www-data www-data S [apache]\n" \
1208        "264 www-data www-data S [apache]\n" \
1209        "265 www-data www-data S [apache]\n" \
1210        "266 www-data www-data S [apache]\n" \
1211        "267 www-data www-data S [apache]\n" \
1212        "$ kill 252\n"
1213
1214 #define killall_trivial_usage \
1215        "[-l] [-q] [-SIG] PROCESS_NAME..."
1216 #define killall_full_usage "\n\n" \
1217        "Send a signal (default: TERM) to given processes\n" \
1218      "\nOptions:" \
1219      "\n        -l      List all signal names and numbers" \
1220 /*   "\n        -s SIG  Yet another way of specifying SIG" */ \
1221      "\n        -q      Don't complain if no processes were killed" \
1222
1223 #define killall_example_usage \
1224        "$ killall apache\n"
1225
1226 #define killall5_trivial_usage \
1227        "[-l] [-SIG] [-o PID]..."
1228 #define killall5_full_usage "\n\n" \
1229        "Send a signal (default: TERM) to all processes outside current session\n" \
1230      "\nOptions:" \
1231      "\n        -l      List all signal names and numbers" \
1232      "\n        -o PID  Don't signal this PID" \
1233 /*   "\n        -s SIG  Yet another way of specifying SIG" */ \
1234
1235 #define klogd_trivial_usage \
1236        "[-c N] [-n]"
1237 #define klogd_full_usage "\n\n" \
1238        "Kernel logger\n" \
1239      "\nOptions:" \
1240      "\n        -c N    Only messages with level < N are printed to console" \
1241      "\n        -n      Run in foreground" \
1242
1243 #define less_trivial_usage \
1244        "[-EMNmh~I?] [FILE]..."
1245 #define less_full_usage "\n\n" \
1246        "View FILE (or stdin) one screenful at a time\n" \
1247      "\nOptions:" \
1248      "\n        -E      Quit once the end of a file is reached" \
1249      "\n        -M,-m   Display status line with line numbers" \
1250      "\n                and percentage through the file" \
1251      "\n        -N      Prefix line number to each line" \
1252      "\n        -I      Ignore case in all searches" \
1253      "\n        -~      Suppress ~s displayed past the end of the file" \
1254
1255 #define linux32_trivial_usage NOUSAGE_STR
1256 #define linux32_full_usage ""
1257 #define linux64_trivial_usage NOUSAGE_STR
1258 #define linux64_full_usage ""
1259
1260 #define setarch_trivial_usage \
1261        "personality PROG ARGS"
1262 #define setarch_full_usage "\n\n" \
1263        "Personality may be:\n" \
1264        "        linux32         Set 32bit uname emulation\n" \
1265        "        linux64         Set 64bit uname emulation" \
1266
1267 #define load_policy_trivial_usage NOUSAGE_STR
1268 #define load_policy_full_usage ""
1269
1270 #define logger_trivial_usage \
1271        "[OPTIONS] [MESSAGE]"
1272 #define logger_full_usage "\n\n" \
1273        "Write MESSAGE (or stdin) to syslog\n" \
1274      "\nOptions:" \
1275      "\n        -s      Log to stderr as well as the system log" \
1276      "\n        -t TAG  Log using the specified tag (defaults to user name)" \
1277      "\n        -p PRIO Priority (numeric or facility.level pair)" \
1278
1279 #define logger_example_usage \
1280        "$ logger \"hello\"\n"
1281
1282 #define login_trivial_usage \
1283        "[-p] [-h HOST] [[-f] USER]"
1284 #define login_full_usage "\n\n" \
1285        "Begin a new session on the system\n" \
1286      "\nOptions:" \
1287      "\n        -f      Don't authenticate (user already authenticated)" \
1288      "\n        -h      Name of the remote host" \
1289      "\n        -p      Preserve environment" \
1290
1291 #define logread_trivial_usage \
1292        "[-f]"
1293 #define logread_full_usage "\n\n" \
1294        "Show messages in syslogd's circular buffer\n" \
1295      "\nOptions:" \
1296      "\n        -f      Output data as log grows" \
1297
1298 #define losetup_trivial_usage \
1299        "[-o OFS] LOOPDEV FILE - associate loop devices\n" \
1300        "        losetup -d LOOPDEV - disassociate\n" \
1301        "        losetup [-f] - show"
1302 #define losetup_full_usage "\n\n" \
1303        "Options:" \
1304      "\n        -o OFS  Start OFS bytes into FILE" \
1305      "\n        -f      Show first free loop device" \
1306
1307 #define losetup_notes_usage \
1308        "No arguments will display all current associations.\n" \
1309        "One argument (losetup /dev/loop1) will display the current association\n" \
1310        "(if any), or disassociate it (with -d). The display shows the offset\n" \
1311        "and filename of the file the loop device is currently bound to.\n\n" \
1312        "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \
1313        "with an optional offset (-o 12345). Encryption is not yet supported.\n" \
1314        "losetup -f will show the first loop free loop device\n\n"
1315
1316 #define lpd_trivial_usage \
1317        "SPOOLDIR [HELPER [ARGS]]"
1318 #define lpd_full_usage "\n\n" \
1319        "SPOOLDIR must contain (symlinks to) device nodes or directories" \
1320      "\nwith names matching print queue names. In the first case, jobs are" \
1321      "\nsent directly to the device. Otherwise each job is stored in queue" \
1322      "\ndirectory and HELPER program is called. Name of file to print" \
1323      "\nis passed in $DATAFILE variable." \
1324      "\nExample:" \
1325      "\n        tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print" \
1326
1327 #define lpq_trivial_usage \
1328        "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID]... [-fs]"
1329 #define lpq_full_usage "\n\n" \
1330        "Options:" \
1331      "\n        -P      lp service to connect to (else uses $PRINTER)" \
1332      "\n        -d      Delete jobs" \
1333      "\n        -f      Force any waiting job to be printed" \
1334      "\n        -s      Short display" \
1335
1336 #define lpr_trivial_usage \
1337        "-P queue[@host[:port]] -U USERNAME -J TITLE -Vmh [FILE]..."
1338 /* -C CLASS exists too, not shown.
1339  * CLASS is supposed to be printed on banner page, if one is requested */
1340 #define lpr_full_usage "\n\n" \
1341        "Options:" \
1342      "\n        -P      lp service to connect to (else uses $PRINTER)"\
1343      "\n        -m      Send mail on completion" \
1344      "\n        -h      Print banner page too" \
1345      "\n        -V      Verbose" \
1346
1347 #define lsattr_trivial_usage \
1348        "[-Radlv] [FILE]..."
1349 #define lsattr_full_usage "\n\n" \
1350        "List file attributes on an ext2 fs\n" \
1351      "\nOptions:" \
1352      "\n        -R      Recurse" \
1353      "\n        -a      Don't hide entries starting with ." \
1354      "\n        -d      List directory entries instead of contents" \
1355      "\n        -l      List long flag names" \
1356      "\n        -v      List the file's version/generation number" \
1357
1358 #define lspci_trivial_usage \
1359        "[-mk]"
1360 #define lspci_full_usage "\n\n" \
1361        "List all PCI devices" \
1362      "\n" \
1363      "\n        -m      Parseable output" \
1364      "\n        -k      Show driver" \
1365
1366 #define lsusb_trivial_usage NOUSAGE_STR
1367 #define lsusb_full_usage ""
1368
1369 #if ENABLE_FEATURE_MAKEDEVS_LEAF
1370 #define makedevs_trivial_usage \
1371        "NAME TYPE MAJOR MINOR FIRST LAST [s]"
1372 #define makedevs_full_usage "\n\n" \
1373        "Create a range of block or character special files" \
1374      "\n" \
1375      "\nTYPE is:" \
1376      "\n        b       Block device" \
1377      "\n        c       Character device" \
1378      "\n        f       FIFO, MAJOR and MINOR are ignored" \
1379      "\n" \
1380      "\nFIRST..LAST specify numbers appended to NAME." \
1381      "\nIf 's' is the last argument, the base device is created as well." \
1382      "\n" \
1383      "\nExamples:" \
1384      "\n        makedevs /dev/ttyS c 4 66 2 63   ->  ttyS2-ttyS63" \
1385      "\n        makedevs /dev/hda b 3 0 0 8 s    ->  hda,hda1-hda8"
1386 #define makedevs_example_usage \
1387        "# makedevs /dev/ttyS c 4 66 2 63\n" \
1388        "[creates ttyS2-ttyS63]\n" \
1389        "# makedevs /dev/hda b 3 0 0 8 s\n" \
1390        "[creates hda,hda1-hda8]\n"
1391 #endif
1392
1393 #if ENABLE_FEATURE_MAKEDEVS_TABLE
1394 #define makedevs_trivial_usage \
1395        "[-d device_table] rootdir"
1396 #define makedevs_full_usage "\n\n" \
1397        "Create a range of special files as specified in a device table.\n" \
1398        "Device table entries take the form of:\n" \
1399        "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
1400        "Where name is the file name, type can be one of:\n" \
1401        "        f       Regular file\n" \
1402        "        d       Directory\n" \
1403        "        c       Character device\n" \
1404        "        b       Block device\n" \
1405        "        p       Fifo (named pipe)\n" \
1406        "uid is the user id for the target file, gid is the group id for the\n" \
1407        "target file. The rest of the entries (major, minor, etc) apply to\n" \
1408        "to device special files. A '-' may be used for blank entries."
1409 #define makedevs_example_usage \
1410        "For example:\n" \
1411        "<name>    <type> <mode><uid><gid><major><minor><start><inc><count>\n" \
1412        "/dev         d   755    0    0    -      -      -      -    -\n" \
1413        "/dev/console c   666    0    0    5      1      -      -    -\n" \
1414        "/dev/null    c   666    0    0    1      3      0      0    -\n" \
1415        "/dev/zero    c   666    0    0    1      5      0      0    -\n" \
1416        "/dev/hda     b   640    0    0    3      0      0      0    -\n" \
1417        "/dev/hda     b   640    0    0    3      1      1      1    15\n\n" \
1418        "Will Produce:\n" \
1419        "/dev\n" \
1420        "/dev/console\n" \
1421        "/dev/null\n" \
1422        "/dev/zero\n" \
1423        "/dev/hda\n" \
1424        "/dev/hda[0-15]\n"
1425 #endif
1426
1427 #define makemime_trivial_usage \
1428        "[OPTIONS] [FILE]..."
1429 #define makemime_full_usage "\n\n" \
1430        "Create multipart MIME-encoded message from FILEs\n" \
1431 /*     "Transfer encoding is base64, disposition is inline (not attachment)\n" */ \
1432      "\nOptions:" \
1433      "\n        -o FILE Output. Default: stdout" \
1434      "\n        -a HDR  Add header. Examples:" \
1435      "\n                \"From: user@host.org\", \"Date: `date -R`\"" \
1436      "\n        -c CT   Content type. Default: text/plain" \
1437      "\n        -C CS   Charset. Default: " CONFIG_FEATURE_MIME_CHARSET \
1438 /*   "\n        -e ENC  Transfer encoding. Ignored. base64 is assumed" */ \
1439      "\n" \
1440      "\nOther options are silently ignored" \
1441
1442 #define man_trivial_usage \
1443        "[-aw] [MANPAGE]..."
1444 #define man_full_usage "\n\n" \
1445        "Format and display manual page\n" \
1446      "\nOptions:" \
1447      "\n        -a      Display all pages" \
1448      "\n        -w      Show page locations" \
1449
1450 #define matchpathcon_trivial_usage \
1451        "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]"
1452 #define matchpathcon_full_usage "\n\n" \
1453        "        -n      Don't display path" \
1454      "\n        -N      Don't use translations" \
1455      "\n        -f      Use alternate file_context file" \
1456      "\n        -p      Use prefix to speed translations" \
1457      "\n        -V      Verify file context on disk matches defaults" \
1458
1459 #define mdev_trivial_usage \
1460        "[-s]"
1461 #define mdev_full_usage "\n\n" \
1462        "        -s      Scan /sys and populate /dev during system boot\n" \
1463        "\n" \
1464        "It can be run by kernel as a hotplug helper. To activate it:\n" \
1465        " echo /sbin/mdev > /proc/sys/kernel/hotplug\n" \
1466         IF_FEATURE_MDEV_CONF( \
1467        "It uses /etc/mdev.conf with lines\n" \
1468        "[-]DEVNAME UID:GID PERM" \
1469                         IF_FEATURE_MDEV_RENAME(" [>|=PATH]") \
1470                         IF_FEATURE_MDEV_EXEC(" [@|$|*PROG]") \
1471         ) \
1472
1473 #define mdev_notes_usage "" \
1474         IF_FEATURE_MDEV_CONFIG( \
1475        "The mdev config file contains lines that look like:\n" \
1476        "  hd[a-z][0-9]* 0:3 660\n\n" \
1477        "That's device name (with regex match), uid:gid, and permissions.\n\n" \
1478         IF_FEATURE_MDEV_EXEC( \
1479        "Optionally, that can be followed (on the same line) by a special character\n" \
1480        "and a command line to run after creating/before deleting the corresponding\n" \
1481        "device(s). The environment variable $MDEV indicates the active device node\n" \
1482        "(which is useful if it's a regex match). For example:\n\n" \
1483        "  hdc root:cdrom 660  *ln -s $MDEV cdrom\n\n" \
1484        "The special characters are @ (run after creating), $ (run before deleting),\n" \
1485        "and * (run both after creating and before deleting). The commands run in\n" \
1486        "the /dev directory, and use system() which calls /bin/sh.\n\n" \
1487         ) \
1488        "Config file parsing stops on the first matching line. If no config\n" \
1489        "entry is matched, devices are created with default 0:0 660. (Make\n" \
1490        "the last line match .* to override this.)\n\n" \
1491         )
1492
1493 #define microcom_trivial_usage \
1494        "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY"
1495 #define microcom_full_usage "\n\n" \
1496        "Copy bytes for stdin to TTY and from TTY to stdout\n" \
1497      "\nOptions:" \
1498      "\n        -d      Wait up to DELAY ms for TTY output before sending every" \
1499      "\n                next byte to it" \
1500      "\n        -t      Exit if both stdin and TTY are silent for TIMEOUT ms" \
1501      "\n        -s      Set serial line to SPEED" \
1502      "\n        -X      Disable special meaning of NUL and Ctrl-X from stdin" \
1503
1504 #define mkfs_ext2_trivial_usage \
1505        "[-Fn] " \
1506        /* "[-c|-l filename] " */ \
1507        "[-b BLK_SIZE] " \
1508        /* "[-f fragment-size] [-g blocks-per-group] " */ \
1509        "[-i INODE_RATIO] [-I INODE_SIZE] " \
1510        /* "[-j] [-J journal-options] [-N number-of-inodes] " */ \
1511        "[-m RESERVED_PERCENT] " \
1512        /* "[-o creator-os] [-O feature[,...]] [-q] " */ \
1513        /* "[r fs-revision-level] [-E extended-options] [-v] [-F] " */ \
1514        "[-L LABEL] " \
1515        /* "[-M last-mounted-directory] [-S] [-T filesystem-type] " */ \
1516        "BLOCKDEV [KBYTES]"
1517 #define mkfs_ext2_full_usage "\n\n" \
1518        "        -b BLK_SIZE     Block size, bytes" \
1519 /*   "\n        -c              Check device for bad blocks" */ \
1520 /*   "\n        -E opts         Set extended options" */ \
1521 /*   "\n        -f size         Fragment size in bytes" */ \
1522      "\n        -F              Force" \
1523 /*   "\n        -g N            Number of blocks in a block group" */ \
1524      "\n        -i RATIO        Max number of files is filesystem_size / RATIO" \
1525      "\n        -I BYTES        Inode size (min 128)" \
1526 /*   "\n        -j              Create a journal (ext3)" */ \
1527 /*   "\n        -J opts         Set journal options (size/device)" */ \
1528 /*   "\n        -l file         Read bad blocks list from file" */ \
1529      "\n        -L LBL          Volume label" \
1530      "\n        -m PERCENT      Percent of blocks to reserve for admin" \
1531 /*   "\n        -M dir          Set last mounted directory" */ \
1532      "\n        -n              Dry run" \
1533 /*   "\n        -N N            Number of inodes to create" */ \
1534 /*   "\n        -o os           Set the 'creator os' field" */ \
1535 /*   "\n        -O features     Dir_index/filetype/has_journal/journal_dev/sparse_super" */ \
1536 /*   "\n        -q              Quiet" */ \
1537 /*   "\n        -r rev          Set filesystem revision" */ \
1538 /*   "\n        -S              Write superblock and group descriptors only" */ \
1539 /*   "\n        -T fs-type      Set usage type (news/largefile/largefile4)" */ \
1540 /*   "\n        -v              Verbose" */ \
1541
1542 #define mkfs_minix_trivial_usage \
1543        "[-c | -l FILE] [-nXX] [-iXX] BLOCKDEV [KBYTES]"
1544 #define mkfs_minix_full_usage "\n\n" \
1545        "Make a MINIX filesystem\n" \
1546      "\nOptions:" \
1547      "\n        -c              Check device for bad blocks" \
1548      "\n        -n [14|30]      Maximum length of filenames" \
1549      "\n        -i INODES       Number of inodes for the filesystem" \
1550      "\n        -l FILE         Read bad blocks list from FILE" \
1551      "\n        -v              Make version 2 filesystem" \
1552
1553 #define mkfs_reiser_trivial_usage \
1554        "[-f] [-l LABEL] BLOCKDEV [4K-BLOCKS]"
1555
1556 #define mkfs_reiser_full_usage "\n\n" \
1557        "Make a ReiserFS V3 filesystem\n" \
1558      "\nOptions:" \
1559      "\n        -f      Force" \
1560      "\n        -l LBL  Volume label" \
1561
1562 #define mkfs_vfat_trivial_usage \
1563        "[-v] [-n LABEL] BLOCKDEV [KBYTES]"
1564 /* Accepted but ignored:
1565        "[-c] [-C] [-I] [-l bad-block-file] [-b backup-boot-sector] "
1566        "[-m boot-msg-file] [-i volume-id] "
1567        "[-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs] "
1568        "[-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors] "
1569 */
1570 #define mkfs_vfat_full_usage "\n\n" \
1571        "Make a FAT32 filesystem\n" \
1572      "\nOptions:" \
1573 /*   "\n        -c      Check device for bad blocks" */ \
1574      "\n        -v      Verbose" \
1575 /*   "\n        -I      Allow to use entire disk device (e.g. /dev/hda)" */ \
1576      "\n        -n LBL  Volume label" \
1577
1578 #define mkswap_trivial_usage \
1579        "[-L LBL] BLOCKDEV [KBYTES]"
1580 #define mkswap_full_usage "\n\n" \
1581        "Prepare BLOCKDEV to be used as swap partition\n" \
1582      "\nOptions:" \
1583      "\n        -L LBL  Label" \
1584
1585 #define more_trivial_usage \
1586        "[FILE]..."
1587 #define more_full_usage "\n\n" \
1588        "View FILE (or stdin) one screenful at a time"
1589
1590 #define more_example_usage \
1591        "$ dmesg | more\n"
1592
1593 #define mount_trivial_usage \
1594        "[OPTIONS] [-o OPTS] DEVICE NODE"
1595 #define mount_full_usage "\n\n" \
1596        "Mount a filesystem. Filesystem autodetection requires /proc.\n" \
1597      "\nOptions:" \
1598      "\n        -a              Mount all filesystems in fstab" \
1599         IF_FEATURE_MOUNT_FAKE( \
1600         IF_FEATURE_MTAB_SUPPORT( \
1601      "\n        -f              Update /etc/mtab, but don't mount" \
1602         ) \
1603         IF_NOT_FEATURE_MTAB_SUPPORT( \
1604      "\n        -f              Dry run" \
1605         ) \
1606         ) \
1607         IF_FEATURE_MOUNT_HELPERS( \
1608      "\n        -i              Don't run mount helper" \
1609         ) \
1610         IF_FEATURE_MTAB_SUPPORT( \
1611      "\n        -n              Don't update /etc/mtab" \
1612         ) \
1613      "\n        -r              Read-only mount" \
1614      "\n        -w              Read-write mount (default)" \
1615      "\n        -t FSTYPE       Filesystem type" \
1616      "\n        -O OPT          Mount only filesystems with option OPT (-a only)" \
1617      "\n-o OPT:" \
1618         IF_FEATURE_MOUNT_LOOP( \
1619      "\n        loop            Ignored (loop devices are autodetected)" \
1620         ) \
1621         IF_FEATURE_MOUNT_FLAGS( \
1622      "\n        [a]sync         Writes are [a]synchronous" \
1623      "\n        [no]atime       Disable/enable updates to inode access times" \
1624      "\n        [no]diratime    Disable/enable atime updates to directories" \
1625      "\n        [no]relatime    Disable/enable atime updates relative to modification time" \
1626      "\n        [no]dev         (Dis)allow use of special device files" \
1627      "\n        [no]exec        (Dis)allow use of executable files" \
1628      "\n        [no]suid        (Dis)allow set-user-id-root programs" \
1629      "\n        [r]shared       Convert [recursively] to a shared subtree" \
1630      "\n        [r]slave        Convert [recursively] to a slave subtree" \
1631      "\n        [r]private      Convert [recursively] to a private subtree" \
1632      "\n        [un]bindable    Make mount point [un]able to be bind mounted" \
1633      "\n        [r]bind         Bind a file or directory [recursively] to another location" \
1634      "\n        move            Relocate an existing mount point" \
1635         ) \
1636      "\n        remount         Remount a mounted filesystem, changing flags" \
1637      "\n        ro/rw           Same as -r/-w" \
1638      "\n" \
1639      "\nThere are filesystem-specific -o flags." \
1640
1641 #define mount_example_usage \
1642        "$ mount\n" \
1643        "/dev/hda3 on / type minix (rw)\n" \
1644        "proc on /proc type proc (rw)\n" \
1645        "devpts on /dev/pts type devpts (rw)\n" \
1646        "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
1647        "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \
1648        "$ mount cd_image.iso mydir\n"
1649 #define mount_notes_usage \
1650        "Returns 0 for success, number of failed mounts for -a, or errno for one mount."
1651
1652 #define mountpoint_trivial_usage \
1653        "[-q] <[-dn] DIR | -x DEVICE>"
1654 #define mountpoint_full_usage "\n\n" \
1655        "Check if the directory is a mountpoint\n" \
1656      "\nOptions:" \
1657      "\n        -q      Quiet" \
1658      "\n        -d      Print major/minor device number of the filesystem" \
1659      "\n        -n      Print device name of the filesystem" \
1660      "\n        -x      Print major/minor device number of the blockdevice" \
1661
1662 #define mountpoint_example_usage \
1663        "$ mountpoint /proc\n" \
1664        "/proc is not a mountpoint\n" \
1665        "$ mountpoint /sys\n" \
1666        "/sys is a mountpoint\n"
1667
1668 #define mt_trivial_usage \
1669        "[-f device] opcode value"
1670 #define mt_full_usage "\n\n" \
1671        "Control magnetic tape drive operation\n" \
1672        "\n" \
1673        "Available Opcodes:\n" \
1674        "\n" \
1675        "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
1676        "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
1677        "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
1678        "setpart tell unload unlock weof wset" \
1679
1680 #define nslookup_trivial_usage \
1681        "[HOST] [SERVER]"
1682 #define nslookup_full_usage "\n\n" \
1683        "Query the nameserver for the IP address of the given HOST\n" \
1684        "optionally using a specified DNS server"
1685 #define nslookup_example_usage \
1686        "$ nslookup localhost\n" \
1687        "Server:     default\n" \
1688        "Address:    default\n" \
1689        "\n" \
1690        "Name:       debian\n" \
1691        "Address:    127.0.0.1\n"
1692
1693 #define ntpd_trivial_usage \
1694         "[-dnqNw"IF_FEATURE_NTPD_SERVER("l")"] [-S PROG] [-p PEER]..."
1695 #define ntpd_full_usage "\n\n" \
1696        "NTP client/server\n" \
1697      "\nOptions:" \
1698      "\n        -d      Verbose" \
1699      "\n        -n      Do not daemonize" \
1700      "\n        -q      Quit after clock is set" \
1701      "\n        -N      Run at high priority" \
1702      "\n        -w      Do not set time (only query peers), implies -n" \
1703         IF_FEATURE_NTPD_SERVER( \
1704      "\n        -l      Run as server on port 123" \
1705         ) \
1706      "\n        -S PROG Run PROG after stepping time, stratum change, and every 11 mins" \
1707      "\n        -p PEER Obtain time from PEER (may be repeated)" \
1708
1709 /*
1710 #define parse_trivial_usage \
1711        "[-n MAXTOKENS] [-m MINTOKENS] [-d DELIMS] [-f FLAGS] FILE..."
1712 #define parse_full_usage ""
1713 */
1714
1715 #define passwd_trivial_usage \
1716        "[OPTIONS] [USER]"
1717 #define passwd_full_usage "\n\n" \
1718        "Change USER's password. If no USER is specified,\n" \
1719        "changes the password for the current user.\n" \
1720      "\nOptions:" \
1721      "\n        -a ALG  Algorithm to use for password (des, md5)" /* ", sha1)" */ \
1722      "\n        -d      Delete password for the account" \
1723      "\n        -l      Lock (disable) account" \
1724      "\n        -u      Unlock (re-enable) account" \
1725
1726 #define chpasswd_trivial_usage \
1727         IF_LONG_OPTS("[--md5|--encrypted]") IF_NOT_LONG_OPTS("[-m|-e]")
1728 #define chpasswd_full_usage "\n\n" \
1729        "Read user:password from stdin and update /etc/passwd\n" \
1730      "\nOptions:" \
1731         IF_LONG_OPTS( \
1732      "\n        -e,--encrypted  Supplied passwords are in encrypted form" \
1733      "\n        -m,--md5        Use MD5 encryption instead of DES" \
1734         ) \
1735         IF_NOT_LONG_OPTS( \
1736      "\n        -e      Supplied passwords are in encrypted form" \
1737      "\n        -m      Use MD5 encryption instead of DES" \
1738         )
1739
1740 #define pgrep_trivial_usage \
1741        "[-flnovx] [-s SID|-P PPID|PATTERN]"
1742 #define pgrep_full_usage "\n\n" \
1743        "Display process(es) selected by regex PATTERN\n" \
1744      "\nOptions:" \
1745      "\n        -l      Show command name too" \
1746      "\n        -f      Match against entire command line" \
1747      "\n        -n      Show the newest process only" \
1748      "\n        -o      Show the oldest process only" \
1749      "\n        -v      Negate the match" \
1750      "\n        -x      Match whole name (not substring)" \
1751      "\n        -s      Match session ID (0 for current)" \
1752      "\n        -P      Match parent process ID" \
1753
1754 #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
1755 #define pidof_trivial_usage \
1756        "[OPTIONS] [NAME]..."
1757 #define USAGE_PIDOF "\n\nOptions:"
1758 #else
1759 #define pidof_trivial_usage \
1760        "[NAME]..."
1761 #define USAGE_PIDOF /* none */
1762 #endif
1763 #define pidof_full_usage "\n\n" \
1764        "List PIDs of all processes with names that match NAMEs" \
1765         USAGE_PIDOF \
1766         IF_FEATURE_PIDOF_SINGLE( \
1767      "\n        -s      Show only one PID" \
1768         ) \
1769         IF_FEATURE_PIDOF_OMIT( \
1770      "\n        -o PID  Omit given pid" \
1771      "\n                Use %PPID to omit pid of pidof's parent" \
1772         ) \
1773
1774 #define pidof_example_usage \
1775        "$ pidof init\n" \
1776        "1\n" \
1777         IF_FEATURE_PIDOF_OMIT( \
1778        "$ pidof /bin/sh\n20351 5973 5950\n") \
1779         IF_FEATURE_PIDOF_OMIT( \
1780        "$ pidof /bin/sh -o %PPID\n20351 5950")
1781
1782 #define pipe_progress_trivial_usage NOUSAGE_STR
1783 #define pipe_progress_full_usage ""
1784
1785 #define pivot_root_trivial_usage \
1786        "NEW_ROOT PUT_OLD"
1787 #define pivot_root_full_usage "\n\n" \
1788        "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \
1789        "the new root file system"
1790
1791 #define pkill_trivial_usage \
1792        "[-l|-SIGNAL] [-fnovx] [-s SID|-P PPID|PATTERN]"
1793 #define pkill_full_usage "\n\n" \
1794        "Send a signal to process(es) selected by regex PATTERN\n" \
1795      "\nOptions:" \
1796      "\n        -l      List all signals" \
1797      "\n        -f      Match against entire command line" \
1798      "\n        -n      Signal the newest process only" \
1799      "\n        -o      Signal the oldest process only" \
1800      "\n        -v      Negate the match" \
1801      "\n        -x      Match whole name (not substring)" \
1802      "\n        -s      Match session ID (0 for current)" \
1803      "\n        -P      Match parent process ID" \
1804
1805 #define popmaildir_trivial_usage \
1806        "[OPTIONS] MAILDIR [CONN_HELPER ARGS]"
1807 #define popmaildir_full_usage "\n\n" \
1808        "Fetch content of remote mailbox to local maildir\n" \
1809      "\nOptions:" \
1810 /*   "\n        -b              Binary mode. Ignored" */ \
1811 /*   "\n        -d              Debug. Ignored" */ \
1812 /*   "\n        -m              Show used memory. Ignored" */ \
1813 /*   "\n        -V              Show version. Ignored" */ \
1814 /*   "\n        -c              Use tcpclient. Ignored" */ \
1815 /*   "\n        -a              Use APOP protocol. Implied. If server supports APOP -> use it" */ \
1816      "\n        -s              Skip authorization" \
1817      "\n        -T              Get messages with TOP instead of RETR" \
1818      "\n        -k              Keep retrieved messages on the server" \
1819      "\n        -t SEC          Network timeout" \
1820         IF_FEATURE_POPMAILDIR_DELIVERY( \
1821      "\n        -F \"PROG ARGS\"        Filter program (may be repeated)" \
1822      "\n        -M \"PROG ARGS\"        Delivery program" \
1823         ) \
1824      "\n" \
1825      "\nFetch from plain POP3 server:" \
1826      "\npopmaildir -k DIR nc pop3.server.com 110 <user_and_pass.txt" \
1827      "\nFetch from SSLed POP3 server and delete fetched emails:" \
1828      "\npopmaildir DIR -- openssl s_client -quiet -connect pop3.server.com:995 <user_and_pass.txt"
1829 /*   "\n        -R BYTES        Remove old messages on the server >= BYTES. Ignored" */
1830 /*   "\n        -Z N1-N2        Remove messages from N1 to N2 (dangerous). Ignored" */
1831 /*   "\n        -L BYTES        Don't retrieve new messages >= BYTES. Ignored" */
1832 /*   "\n        -H LINES        Type first LINES of a message. Ignored" */
1833 #define popmaildir_example_usage \
1834        "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \
1835        "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
1836
1837
1838 #if ENABLE_DESKTOP
1839
1840 #define ps_trivial_usage \
1841        "[-o COL1,COL2=HEADER]" IF_FEATURE_SHOW_THREADS(" [-T]")
1842 #define ps_full_usage "\n\n" \
1843        "Show list of processes\n" \
1844      "\nOptions:" \
1845      "\n        -o COL1,COL2=HEADER     Select columns for display" \
1846         IF_FEATURE_SHOW_THREADS( \
1847      "\n        -T                      Show threads" \
1848         )
1849
1850 #else /* !ENABLE_DESKTOP */
1851
1852 #if !ENABLE_SELINUX && !ENABLE_FEATURE_PS_WIDE
1853 #define USAGE_PS "\nThis version of ps accepts no options"
1854 #else
1855 #define USAGE_PS "\nOptions:"
1856 #endif
1857
1858 #define ps_trivial_usage \
1859        ""
1860 #define ps_full_usage "\n\n" \
1861        "Show list of processes\n" \
1862         USAGE_PS \
1863         IF_SELINUX( \
1864      "\n        -Z      Show selinux context" \
1865         ) \
1866         IF_FEATURE_PS_WIDE( \
1867      "\n        w       Wide output" \
1868         )
1869
1870 #endif /* ENABLE_DESKTOP */
1871
1872 #define ps_example_usage \
1873        "$ ps\n" \
1874        "  PID  Uid      Gid State Command\n" \
1875        "    1 root     root     S init\n" \
1876        "    2 root     root     S [kflushd]\n" \
1877        "    3 root     root     S [kupdate]\n" \
1878        "    4 root     root     S [kpiod]\n" \
1879        "    5 root     root     S [kswapd]\n" \
1880        "  742 andersen andersen S [bash]\n" \
1881        "  743 andersen andersen S -bash\n" \
1882        "  745 root     root     S [getty]\n" \
1883        " 2990 andersen andersen R ps\n" \
1884
1885 #define pscan_trivial_usage \
1886        "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST"
1887 #define pscan_full_usage "\n\n" \
1888        "Scan a host, print all open ports\n" \
1889      "\nOptions:" \
1890      "\n        -c      Show closed ports too" \
1891      "\n        -b      Show blocked ports too" \
1892      "\n        -p      Scan from this port (default 1)" \
1893      "\n        -P      Scan up to this port (default 1024)" \
1894      "\n        -t      Timeout (default 5000 ms)" \
1895      "\n        -T      Minimum rtt (default 5 ms, increase for congested hosts)" \
1896
1897 #define raidautorun_trivial_usage \
1898        "DEVICE"
1899 #define raidautorun_full_usage "\n\n" \
1900        "Tell the kernel to automatically search and start RAID arrays"
1901 #define raidautorun_example_usage \
1902        "$ raidautorun /dev/md0"
1903
1904 #define rdate_trivial_usage \
1905        "[-sp] HOST"
1906 #define rdate_full_usage "\n\n" \
1907        "Get and possibly set the system date and time from a remote HOST\n" \
1908      "\nOptions:" \
1909      "\n        -s      Set the system date and time (default)" \
1910      "\n        -p      Print the date and time" \
1911
1912 #define rdev_trivial_usage \
1913        ""
1914 #define rdev_full_usage "\n\n" \
1915        "Print the device node associated with the filesystem mounted at '/'"
1916 #define rdev_example_usage \
1917        "$ rdev\n" \
1918        "/dev/mtdblock9 /\n"
1919
1920 #define readahead_trivial_usage \
1921        "[FILE]..."
1922 #define readahead_full_usage "\n\n" \
1923        "Preload FILEs to RAM"
1924
1925 #define readprofile_trivial_usage \
1926        "[OPTIONS]"
1927 #define readprofile_full_usage "\n\n" \
1928        "Options:" \
1929      "\n        -m mapfile      (Default: /boot/System.map)" \
1930      "\n        -p profile      (Default: /proc/profile)" \
1931      "\n        -M NUM          Set the profiling multiplier to NUM" \
1932      "\n        -i              Print only info about the sampling step" \
1933      "\n        -v              Verbose" \
1934      "\n        -a              Print all symbols, even if count is 0" \
1935      "\n        -b              Print individual histogram-bin counts" \
1936      "\n        -s              Print individual counters within functions" \
1937      "\n        -r              Reset all the counters (root only)" \
1938      "\n        -n              Disable byte order auto-detection" \
1939
1940 #define reformime_trivial_usage \
1941        "[OPTIONS] [FILE]..."
1942 #define reformime_full_usage "\n\n" \
1943        "Parse MIME-encoded message\n" \
1944      "\nOptions:" \
1945      "\n        -x PREFIX       Extract content of MIME sections to files" \
1946      "\n        -X PROG ARGS    Filter content of MIME sections through PROG" \
1947      "\n                        Must be the last option" \
1948      "\n" \
1949      "\nOther options are silently ignored" \
1950
1951 #define scriptreplay_trivial_usage \
1952        "timingfile [typescript [divisor]]"
1953 #define scriptreplay_full_usage "\n\n" \
1954        "Play back typescripts, using timing information"
1955
1956 #define restorecon_trivial_usage \
1957        "[-iFnRv] [-e EXCLUDEDIR]... [-o FILE] [-f FILE]"
1958 #define restorecon_full_usage "\n\n" \
1959        "Reset security contexts of files in pathname\n" \
1960      "\n        -i      Ignore files that don't exist" \
1961      "\n        -f FILE File with list of files to process" \
1962      "\n        -e DIR  Directory to exclude" \
1963      "\n        -R,-r   Recurse" \
1964      "\n        -n      Don't change any file labels" \
1965      "\n        -o FILE Save list of files with incorrect context" \
1966      "\n        -v      Verbose" \
1967      "\n        -vv     Show changed labels" \
1968      "\n        -F      Force reset of context to match file_context" \
1969      "\n                for customizable files, or the user section," \
1970      "\n                if it has changed" \
1971
1972 #define rfkill_trivial_usage \
1973        "COMMAND [INDEX|TYPE]"
1974 #define rfkill_full_usage "\n\n" \
1975        "Enable/disable wireless devices\n" \
1976        "\nCommands:" \
1977      "\n        list [INDEX|TYPE]       List current state" \
1978      "\n        block INDEX|TYPE        Disable device" \
1979      "\n        unblock INDEX|TYPE      Enable device" \
1980      "\n" \
1981      "\n        TYPE: all, wlan(wifi), bluetooth, uwb(ultrawideband)," \
1982      "\n                wimax, wwan, gps, fm" \
1983
1984 #define route_trivial_usage \
1985        "[{add|del|delete}]"
1986 #define route_full_usage "\n\n" \
1987        "Edit kernel routing tables\n" \
1988      "\nOptions:" \
1989      "\n        -n      Don't resolve names" \
1990      "\n        -e      Display other/more information" \
1991      "\n        -A inet" IF_FEATURE_IPV6("{6}") "       Select address family" \
1992
1993 #define rtcwake_trivial_usage \
1994        "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]"
1995 #define rtcwake_full_usage "\n\n" \
1996        "Enter a system sleep state until specified wakeup time\n" \
1997         IF_LONG_OPTS( \
1998      "\n        -a,--auto       Read clock mode from adjtime" \
1999      "\n        -l,--local      Clock is set to local time" \
2000      "\n        -u,--utc        Clock is set to UTC time" \
2001      "\n        -d,--device=DEV Specify the RTC device" \
2002      "\n        -m,--mode=MODE  Set the sleep state (default: standby)" \
2003      "\n        -s,--seconds=SEC Set the timeout in SEC seconds from now" \
2004      "\n        -t,--time=TIME  Set the timeout to TIME seconds from epoch" \
2005         ) \
2006         IF_NOT_LONG_OPTS( \
2007      "\n        -a      Read clock mode from adjtime" \
2008      "\n        -l      Clock is set to local time" \
2009      "\n        -u      Clock is set to UTC time" \
2010      "\n        -d DEV  Specify the RTC device" \
2011      "\n        -m MODE Set the sleep state (default: standby)" \
2012      "\n        -s SEC  Set the timeout in SEC seconds from now" \
2013      "\n        -t TIME Set the timeout to TIME seconds from epoch" \
2014         )
2015
2016 #define runcon_trivial_usage \
2017        "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] PROG ARGS\n" \
2018        "runcon CONTEXT PROG ARGS"
2019 #define runcon_full_usage "\n\n" \
2020        "Run PROG in a different security context\n" \
2021      "\n        CONTEXT         Complete security context\n" \
2022         IF_FEATURE_RUNCON_LONG_OPTIONS( \
2023      "\n        -c,--compute    Compute process transition context before modifying" \
2024      "\n        -t,--type=TYPE  Type (for same role as parent)" \
2025      "\n        -u,--user=USER  User identity" \
2026      "\n        -r,--role=ROLE  Role" \
2027      "\n        -l,--range=RNG  Levelrange" \
2028         ) \
2029         IF_NOT_FEATURE_RUNCON_LONG_OPTIONS( \
2030      "\n        -c      Compute process transition context before modifying" \
2031      "\n        -t TYPE Type (for same role as parent)" \
2032      "\n        -u USER User identity" \
2033      "\n        -r ROLE Role" \
2034      "\n        -l RNG  Levelrange" \
2035         )
2036
2037 #define run_parts_trivial_usage \
2038        "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
2039 #define run_parts_full_usage "\n\n" \
2040        "Run a bunch of scripts in DIRECTORY\n" \
2041      "\nOptions:" \
2042      "\n        -t      Print what would be run, but don't actually run anything" \
2043      "\n        -a ARG  Pass ARG as argument for every program" \
2044      "\n        -u MASK Set the umask to MASK before running every program" \
2045         IF_FEATURE_RUN_PARTS_FANCY( \
2046      "\n        -l      Print names of all matching files even if they are not executable" \
2047         )
2048
2049 #define run_parts_example_usage \
2050        "$ run-parts -a start /etc/init.d\n" \
2051        "$ run-parts -a stop=now /etc/init.d\n\n" \
2052        "Let's assume you have a script foo/dosomething:\n" \
2053        "#!/bin/sh\n" \
2054        "for i in $*; do eval $i; done; unset i\n" \
2055        "case \"$1\" in\n" \
2056        "start*) echo starting something;;\n" \
2057        "stop*) set -x; shutdown -h $stop;;\n" \
2058        "esac\n\n" \
2059        "Running this yields:\n" \
2060        "$run-parts -a stop=+4m foo/\n" \
2061        "+ shutdown -h +4m"
2062
2063 #define runlevel_trivial_usage \
2064        "[FILE]"
2065 #define runlevel_full_usage "\n\n" \
2066        "Find the current and previous system runlevel\n" \
2067        "\n" \
2068        "If no utmp FILE exists or if no runlevel record can be found,\n" \
2069        "print \"unknown\""
2070 #define runlevel_example_usage \
2071        "$ runlevel /var/run/utmp\n" \
2072        "N 2"
2073
2074 #define runsv_trivial_usage \
2075        "DIR"
2076 #define runsv_full_usage "\n\n" \
2077        "Start and monitor a service and optionally an appendant log service"
2078
2079 #define runsvdir_trivial_usage \
2080        "[-P] [-s SCRIPT] DIR"
2081 #define runsvdir_full_usage "\n\n" \
2082        "Start a runsv process for each subdirectory. If it exits, restart it.\n" \
2083      "\n        -P              Put each runsv in a new session" \
2084      "\n        -s SCRIPT       Run SCRIPT <signo> after signal is processed" \
2085
2086 #define rx_trivial_usage \
2087        "FILE"
2088 #define rx_full_usage "\n\n" \
2089        "Receive a file using the xmodem protocol"
2090 #define rx_example_usage \
2091        "$ rx /tmp/foo\n"
2092
2093 #define script_trivial_usage \
2094        "[-afq" IF_SCRIPTREPLAY("t") "] [-c PROG] [OUTFILE]"
2095 #define script_full_usage "\n\n" \
2096        "Options:" \
2097      "\n        -a      Append output" \
2098      "\n        -c PROG Run PROG, not shell" \
2099      "\n        -f      Flush output after each write" \
2100      "\n        -q      Quiet" \
2101         IF_SCRIPTREPLAY( \
2102      "\n        -t      Send timing to stderr" \
2103         )
2104
2105 #define sed_trivial_usage \
2106        "[-efinr] SED_CMD [FILE]..."
2107 #define sed_full_usage "\n\n" \
2108        "Options:" \
2109      "\n        -e CMD  Add CMD to sed commands to be executed" \
2110      "\n        -f FILE Add FILE contents to sed commands to be executed" \
2111      "\n        -i      Edit files in-place (else sends result to stdout)" \
2112      "\n        -n      Suppress automatic printing of pattern space" \
2113      "\n        -r      Use extended regex syntax" \
2114      "\n" \
2115      "\nIf no -e or -f, the first non-option argument is the sed command string." \
2116      "\nRemaining arguments are input files (stdin if none)."
2117
2118 #define sed_example_usage \
2119        "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
2120        "bar\n"
2121
2122 #define selinuxenabled_trivial_usage NOUSAGE_STR
2123 #define selinuxenabled_full_usage ""
2124
2125 #define sestatus_trivial_usage \
2126        "[-vb]"
2127 #define sestatus_full_usage "\n\n" \
2128        "        -v      Verbose" \
2129      "\n        -b      Display current state of booleans" \
2130
2131 #define setenforce_trivial_usage \
2132        "[Enforcing | Permissive | 1 | 0]"
2133 #define setenforce_full_usage ""
2134
2135 #define setfiles_trivial_usage \
2136        "[-dnpqsvW] [-e DIR]... [-o FILE] [-r alt_root_path]" \
2137         IF_FEATURE_SETFILES_CHECK_OPTION( \
2138        " [-c policyfile] spec_file" \
2139         ) \
2140        " pathname"
2141 #define setfiles_full_usage "\n\n" \
2142        "Reset file contexts under pathname according to spec_file\n" \
2143         IF_FEATURE_SETFILES_CHECK_OPTION( \
2144      "\n        -c FILE Check the validity of the contexts against the specified binary policy" \
2145         ) \
2146      "\n        -d      Show which specification matched each file" \
2147      "\n        -l      Log changes in file labels to syslog" \
2148      "\n        -n      Don't change any file labels" \
2149      "\n        -q      Suppress warnings" \
2150      "\n        -r DIR  Use an alternate root path" \
2151      "\n        -e DIR  Exclude DIR" \
2152      "\n        -F      Force reset of context to match file_context for customizable files" \
2153      "\n        -o FILE Save list of files with incorrect context" \
2154      "\n        -s      Take a list of files from stdin (instead of command line)" \
2155      "\n        -v      Show changes in file labels, if type or role are changing" \
2156      "\n        -vv     Show changes in file labels, if type, role, or user are changing" \
2157      "\n        -W      Display warnings about entries that had no matching files" \
2158
2159 #define setfont_trivial_usage \
2160        "FONT [-m MAPFILE] [-C TTY]"
2161 #define setfont_full_usage "\n\n" \
2162        "Load a console font\n" \
2163      "\nOptions:" \
2164      "\n        -m MAPFILE      Load console screen map" \
2165      "\n        -C TTY          Affect TTY instead of /dev/tty" \
2166
2167 #define setfont_example_usage \
2168        "$ setfont -m koi8-r /etc/i18n/fontname\n"
2169
2170 #define setsebool_trivial_usage \
2171        "boolean value"
2172
2173 #define setsebool_full_usage "\n\n" \
2174        "Change boolean setting"
2175
2176 #define setsid_trivial_usage \
2177        "PROG ARGS"
2178 #define setsid_full_usage "\n\n" \
2179        "Run PROG in a new session. PROG will have no controlling terminal\n" \
2180        "and will not be affected by keyboard signals (Ctrl-C etc).\n" \
2181        "See setsid(2) for details." \
2182
2183 #define last_trivial_usage \
2184        ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]")
2185 #define last_full_usage "\n\n" \
2186        "Show listing of the last users that logged into the system" \
2187         IF_FEATURE_LAST_FANCY( "\n" \
2188      "\nOptions:" \
2189 /*   "\n        -H      Show header line" */ \
2190      "\n        -W      Display with no host column truncation" \
2191      "\n        -f FILE Read from FILE instead of /var/log/wtmp" \
2192         )
2193
2194 #define slattach_trivial_usage \
2195        "[-cehmLF] [-s SPEED] [-p PROTOCOL] DEVICE"
2196 #define slattach_full_usage "\n\n" \
2197        "Attach network interface(s) to serial line(s)\n" \
2198      "\nOptions:" \
2199      "\n        -p PROT Set protocol (slip, cslip, slip6, clisp6 or adaptive)" \
2200      "\n        -s SPD  Set line speed" \
2201      "\n        -e      Exit after initializing device" \
2202      "\n        -h      Exit when the carrier is lost" \
2203      "\n        -c PROG Run PROG when the line is hung up" \
2204      "\n        -m      Do NOT initialize the line in raw 8 bits mode" \
2205      "\n        -L      Enable 3-wire operation" \
2206      "\n        -F      Disable RTS/CTS flow control" \
2207
2208 #define start_stop_daemon_trivial_usage \
2209        "[OPTIONS] [-S|-K] ... [-- ARGS...]"
2210 #define start_stop_daemon_full_usage "\n\n" \
2211        "Search for matching processes, and then\n" \
2212        "-K: stop all matching processes.\n" \
2213        "-S: start a process unless a matching process is found.\n" \
2214         IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
2215      "\nProcess matching:" \
2216      "\n        -u,--user USERNAME|UID  Match only this user's processes" \
2217      "\n        -n,--name NAME          Match processes with NAME" \
2218      "\n                                in comm field in /proc/PID/stat" \
2219      "\n        -x,--exec EXECUTABLE    Match processes with this command" \
2220      "\n                                in /proc/PID/cmdline" \
2221      "\n        -p,--pidfile FILE       Match a process with PID from the file" \
2222      "\n        All specified conditions must match" \
2223      "\n-S only:" \
2224      "\n        -x,--exec EXECUTABLE    Program to run" \
2225      "\n        -a,--startas NAME       Zeroth argument" \
2226      "\n        -b,--background         Background" \
2227         IF_FEATURE_START_STOP_DAEMON_FANCY( \
2228      "\n        -N,--nicelevel N        Change nice level" \
2229         ) \
2230      "\n        -c,--chuid USER[:[GRP]] Change to user/group" \
2231      "\n        -m,--make-pidfile       Write PID to the pidfile specified by -p" \
2232      "\n-K only:" \
2233      "\n        -s,--signal SIG         Signal to send" \
2234      "\n        -t,--test               Match only, exit with 0 if a process is found" \
2235      "\nOther:" \
2236         IF_FEATURE_START_STOP_DAEMON_FANCY( \
2237      "\n        -o,--oknodo             Exit with status 0 if nothing is done" \
2238      "\n        -v,--verbose            Verbose" \
2239         ) \
2240      "\n        -q,--quiet              Quiet" \
2241         ) \
2242         IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
2243      "\nProcess matching:" \
2244      "\n        -u USERNAME|UID Match only this user's processes" \
2245      "\n        -n NAME         Match processes with NAME" \
2246      "\n                        in comm field in /proc/PID/stat" \
2247      "\n        -x EXECUTABLE   Match processes with this command" \
2248      "\n                        command in /proc/PID/cmdline" \
2249      "\n        -p FILE         Match a process with PID from the file" \
2250      "\n        All specified conditions must match" \
2251      "\n-S only:" \
2252      "\n        -x EXECUTABLE   Program to run" \
2253      "\n        -a NAME         Zeroth argument" \
2254      "\n        -b              Background" \
2255         IF_FEATURE_START_STOP_DAEMON_FANCY( \
2256      "\n        -N N            Change nice level" \
2257         ) \
2258      "\n        -c USER[:[GRP]] Change to user/group" \
2259      "\n        -m              Write PID to the pidfile specified by -p" \
2260      "\n-K only:" \
2261      "\n        -s SIG          Signal to send" \
2262      "\n        -t              Match only, exit with 0 if a process is found" \
2263      "\nOther:" \
2264         IF_FEATURE_START_STOP_DAEMON_FANCY( \
2265      "\n        -o              Exit with status 0 if nothing is done" \
2266      "\n        -v              Verbose" \
2267         ) \
2268      "\n        -q              Quiet" \
2269         ) \
2270
2271 #define strings_trivial_usage \
2272        "[-afo] [-n LEN] [FILE]..."
2273 #define strings_full_usage "\n\n" \
2274        "Display printable strings in a binary file\n" \
2275      "\nOptions:" \
2276      "\n        -a      Scan whole file (default)" \
2277      "\n        -f      Precede strings with filenames" \
2278      "\n        -n LEN  At least LEN characters form a string (default 4)" \
2279      "\n        -o      Precede strings with decimal offsets" \
2280
2281 #define sulogin_trivial_usage \
2282        "[-t N] [TTY]"
2283 #define sulogin_full_usage "\n\n" \
2284        "Single user login\n" \
2285      "\nOptions:" \
2286      "\n        -t N    Timeout" \
2287
2288 #define sv_trivial_usage \
2289        "[-v] [-w SEC] CMD SERVICE_DIR..."
2290 #define sv_full_usage "\n\n" \
2291        "Control services monitored by runsv supervisor.\n" \
2292        "Commands (only first character is enough):\n" \
2293        "\n" \
2294        "status: query service status\n" \
2295        "up: if service isn't running, start it. If service stops, restart it\n" \
2296        "once: like 'up', but if service stops, don't restart it\n" \
2297        "down: send TERM and CONT signals. If ./run exits, start ./finish\n" \
2298        "        if it exists. After it stops, don't restart service\n" \
2299        "exit: send TERM and CONT signals to service and log service. If they exit,\n" \
2300        "        runsv exits too\n" \
2301        "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \
2302        "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" \
2303
2304 #define swapoff_trivial_usage \
2305        "[-a] [DEVICE]"
2306 #define swapoff_full_usage "\n\n" \
2307        "Stop swapping on DEVICE\n" \
2308      "\nOptions:" \
2309      "\n        -a      Stop swapping on all swap devices" \
2310
2311 #define swapon_trivial_usage \
2312        "[-a]" IF_FEATURE_SWAPON_PRI(" [-p PRI]") " [DEVICE]"
2313 #define swapon_full_usage "\n\n" \
2314        "Start swapping on DEVICE\n" \
2315      "\nOptions:" \
2316      "\n        -a      Start swapping on all swap devices" \
2317         IF_FEATURE_SWAPON_PRI( \
2318      "\n        -p PRI  Set swap device priority" \
2319         ) \
2320
2321 #define switch_root_trivial_usage \
2322        "[-c /dev/console] NEW_ROOT NEW_INIT [ARGS]"
2323 #define switch_root_full_usage "\n\n" \
2324        "Free initramfs and switch to another root fs:\n" \
2325        "chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,\n" \
2326        "execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.\n" \
2327      "\nOptions:" \
2328      "\n        -c DEV  Reopen stdio to DEV after switch" \
2329
2330 #define sysctl_trivial_usage \
2331        "[OPTIONS] [VALUE]..."
2332 #define sysctl_full_usage "\n\n" \
2333        "Configure kernel parameters at runtime\n" \
2334      "\nOptions:" \
2335      "\n        -n      Don't print key names" \
2336      "\n        -e      Don't warn about unknown keys" \
2337      "\n        -w      Change sysctl setting" \
2338      "\n        -p FILE Load sysctl settings from FILE (default /etc/sysctl.conf)" \
2339      "\n        -a      Display all values" \
2340      "\n        -A      Display all values in table form" \
2341
2342 #define sysctl_example_usage \
2343        "sysctl [-n] [-e] variable...\n" \
2344        "sysctl [-n] [-e] -w variable=value...\n" \
2345        "sysctl [-n] [-e] -a\n" \
2346        "sysctl [-n] [-e] -p file        (default /etc/sysctl.conf)\n" \
2347        "sysctl [-n] [-e] -A\n"
2348
2349 #define syslogd_trivial_usage \
2350        "[OPTIONS]"
2351 #define syslogd_full_usage "\n\n" \
2352        "System logging utility.\n" \
2353        "This version of syslogd ignores /etc/syslog.conf\n" \
2354      "\nOptions:" \
2355      "\n        -n              Run in foreground" \
2356      "\n        -O FILE         Log to given file (default:/var/log/messages)" \
2357      "\n        -l N            Set local log level" \
2358      "\n        -S              Smaller logging output" \
2359         IF_FEATURE_ROTATE_LOGFILE( \
2360      "\n        -s SIZE         Max size (KB) before rotate (default:200KB, 0=off)" \
2361      "\n        -b N            N rotated logs to keep (default:1, max=99, 0=purge)") \
2362         IF_FEATURE_REMOTE_LOG( \
2363      "\n        -R HOST[:PORT]  Log to IP or hostname on PORT (default PORT=514/UDP)" \
2364      "\n        -L              Log locally and via network (default is network only if -R)") \
2365         IF_FEATURE_SYSLOGD_DUP( \
2366      "\n        -D              Drop duplicates") \
2367         IF_FEATURE_IPC_SYSLOG( \
2368      "\n        -C[size(KiB)]   Log to shared mem buffer (read it using logread)") \
2369         /* NB: -Csize shouldn't have space (because size is optional) */
2370 /*   "\n        -m MIN          Minutes between MARK lines (default:20, 0=off)" */
2371
2372 #define syslogd_example_usage \
2373        "$ syslogd -R masterlog:514\n" \
2374        "$ syslogd -R 192.168.1.1:601\n"
2375
2376 #define taskset_trivial_usage \
2377        "[-p] [MASK] [PID | PROG ARGS]"
2378 #define taskset_full_usage "\n\n" \
2379        "Set or get CPU affinity\n" \
2380      "\nOptions:" \
2381      "\n        -p      Operate on an existing PID" \
2382
2383 #define taskset_example_usage \
2384        "$ taskset 0x7 ./dgemm_test&\n" \
2385        "$ taskset -p 0x1 $!\n" \
2386        "pid 4790's current affinity mask: 7\n" \
2387        "pid 4790's new affinity mask: 1\n" \
2388        "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \
2389        "pid 6671's current affinity mask: 1\n" \
2390        "pid 6671's new affinity mask: 1\n" \
2391        "$ taskset -p 1\n" \
2392        "pid 1's current affinity mask: 3\n"
2393
2394 #if ENABLE_FEATURE_TELNET_AUTOLOGIN
2395 #define telnet_trivial_usage \
2396        "[-a] [-l USER] HOST [PORT]"
2397 #define telnet_full_usage "\n\n" \
2398        "Connect to telnet server\n" \
2399      "\nOptions:" \
2400      "\n        -a      Automatic login with $USER variable" \
2401      "\n        -l USER Automatic login as USER" \
2402
2403 #else
2404 #define telnet_trivial_usage \
2405        "HOST [PORT]"
2406 #define telnet_full_usage "\n\n" \
2407        "Connect to telnet server"
2408 #endif
2409
2410 #define telnetd_trivial_usage \
2411        "[OPTIONS]"
2412 #define telnetd_full_usage "\n\n" \
2413        "Handle incoming telnet connections" \
2414         IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
2415      "\nOptions:" \
2416      "\n        -l LOGIN        Exec LOGIN on connect" \
2417      "\n        -f ISSUE_FILE   Display ISSUE_FILE instead of /etc/issue" \
2418      "\n        -K              Close connection as soon as login exits" \
2419      "\n                        (normally wait until all programs close slave pty)" \
2420         IF_FEATURE_TELNETD_STANDALONE( \
2421      "\n        -p PORT         Port to listen on" \
2422      "\n        -b ADDR[:PORT]  Address to bind to" \
2423      "\n        -F              Run in foreground" \
2424      "\n        -i              Inetd mode" \
2425         IF_FEATURE_TELNETD_INETD_WAIT( \
2426      "\n        -w SEC          Inetd 'wait' mode, linger time SEC" \
2427      "\n        -S              Log to syslog (implied by -i or without -F and -w)" \
2428         ) \
2429         )
2430
2431 #define tc_trivial_usage \
2432         /*"[OPTIONS] "*/"OBJECT CMD [dev STRING]"
2433 #define tc_full_usage "\n\n" \
2434         "OBJECT: {qdisc|class|filter}\n" \
2435         "CMD: {add|del|change|replace|show}\n" \
2436         "\n" \
2437         "qdisc [ handle QHANDLE ] [ root |"IF_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \
2438         /* "[ estimator INTERVAL TIME_CONSTANT ]\n" */ \
2439         "       [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
2440         "       QDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n" \
2441         "qdisc show [ dev STRING ]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" \
2442         "class [ classid CLASSID ] [ root | parent CLASSID ]\n" \
2443         "       [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
2444         "class show [ dev STRING ] [ root | parent CLASSID ]\n" \
2445         "filter [ pref PRIO ] [ protocol PROTO ]\n" \
2446         /* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \
2447         "       [ root | classid CLASSID ] [ handle FILTERID ]\n" \
2448         "       [ [ FILTER_TYPE ] [ help | OPTIONS ] ]\n" \
2449         "filter show [ dev STRING ] [ root | parent CLASSID ]"
2450
2451 #define tcpsvd_trivial_usage \
2452        "[-hEv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] IP PORT PROG"
2453 /* with not-implemented options: */
2454 /*     "[-hpEvv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] [-i DIR|-x CDB] [-t SEC] IP PORT PROG" */
2455 #define tcpsvd_full_usage "\n\n" \
2456        "Create TCP socket, bind to IP:PORT and listen\n" \
2457        "for incoming connection. Run PROG for each connection.\n" \
2458      "\n        IP              IP to listen on. '0' = all" \
2459      "\n        PORT            Port to listen on" \
2460      "\n        PROG ARGS       Program to run" \
2461      "\n        -l NAME         Local hostname (else looks up local hostname in DNS)" \
2462      "\n        -u USER[:GRP]   Change to user/group after bind" \
2463      "\n        -c N            Handle up to N connections simultaneously" \
2464      "\n        -b N            Allow a backlog of approximately N TCP SYNs" \
2465      "\n        -C N[:MSG]      Allow only up to N connections from the same IP." \
2466      "\n                        New connections from this IP address are closed" \
2467      "\n                        immediately. MSG is written to the peer before close" \
2468      "\n        -h              Look up peer's hostname" \
2469      "\n        -E              Don't set up environment variables" \
2470      "\n        -v              Verbose" \
2471
2472 #define udpsvd_trivial_usage \
2473        "[-hEv] [-c N] [-u USER] [-l NAME] IP PORT PROG"
2474 #define udpsvd_full_usage "\n\n" \
2475        "Create UDP socket, bind to IP:PORT and wait\n" \
2476        "for incoming packets. Run PROG for each packet,\n" \
2477        "redirecting all further packets with same peer ip:port to it.\n" \
2478      "\n        IP              IP to listen on. '0' = all" \
2479      "\n        PORT            Port to listen on" \
2480      "\n        PROG ARGS       Program to run" \
2481      "\n        -l NAME         Local hostname (else looks up local hostname in DNS)" \
2482      "\n        -u USER[:GRP]   Change to user/group after bind" \
2483      "\n        -c N            Handle up to N connections simultaneously" \
2484      "\n        -h              Look up peer's hostname" \
2485      "\n        -E              Don't set up environment variables" \
2486      "\n        -v              Verbose" \
2487
2488 #define tftp_trivial_usage \
2489        "[OPTIONS] HOST [PORT]"
2490 #define tftp_full_usage "\n\n" \
2491        "Transfer a file from/to tftp server\n" \
2492      "\nOptions:" \
2493      "\n        -l FILE Local FILE" \
2494      "\n        -r FILE Remote FILE" \
2495         IF_FEATURE_TFTP_GET( \
2496      "\n        -g      Get file" \
2497         ) \
2498         IF_FEATURE_TFTP_PUT( \
2499      "\n        -p      Put file" \
2500         ) \
2501         IF_FEATURE_TFTP_BLOCKSIZE( \
2502      "\n        -b SIZE Transfer blocks of SIZE octets" \
2503         )
2504
2505 #define tftpd_trivial_usage \
2506        "[-cr] [-u USER] [DIR]"
2507 #define tftpd_full_usage "\n\n" \
2508        "Transfer a file on tftp client's request\n" \
2509        "\n" \
2510        "tftpd should be used as an inetd service.\n" \
2511        "tftpd's line for inetd.conf:\n" \
2512        "        69 dgram udp nowait root tftpd tftpd /files/to/serve\n" \
2513        "It also can be ran from udpsvd:\n" \
2514        "        udpsvd -vE 0.0.0.0 69 tftpd /files/to/serve\n" \
2515      "\nOptions:" \
2516      "\n        -r      Prohibit upload" \
2517      "\n        -c      Allow file creation via upload" \
2518      "\n        -u      Access files as USER" \
2519
2520 #define time_trivial_usage \
2521        "[-v] PROG ARGS"
2522 #define time_full_usage "\n\n" \
2523        "Run PROG, display resource usage when it exits\n" \
2524      "\nOptions:" \
2525      "\n        -v      Verbose" \
2526
2527 #define timeout_trivial_usage \
2528        "[-t SECS] [-s SIG] PROG ARGS"
2529 #define timeout_full_usage "\n\n" \
2530        "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \
2531        "Defaults: SECS: 10, SIG: TERM." \
2532
2533 #define traceroute_trivial_usage \
2534        "[-"IF_TRACEROUTE6("46")"FIldnrv] [-f 1ST_TTL] [-m MAXTTL] [-p PORT] [-q PROBES]\n" \
2535        "        [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-g GATEWAY] [-i IFACE]\n" \
2536        "        [-z PAUSE_MSEC] HOST [BYTES]"
2537 #define traceroute_full_usage "\n\n" \
2538        "Trace the route to HOST\n" \
2539      "\nOptions:" \
2540         IF_TRACEROUTE6( \
2541      "\n        -4,-6   Force IP or IPv6 name resolution" \
2542         ) \
2543      "\n        -F      Set the don't fragment bit" \
2544      "\n        -I      Use ICMP ECHO instead of UDP datagrams" \
2545      "\n        -l      Display the TTL value of the returned packet" \
2546      "\n        -d      Set SO_DEBUG options to socket" \
2547      "\n        -n      Print numeric addresses" \
2548      "\n        -r      Bypass routing tables, send directly to HOST" \
2549      "\n        -v      Verbose" \
2550      "\n        -m      Max time-to-live (max number of hops)" \
2551      "\n        -p      Base UDP port number used in probes" \
2552      "\n                (default 33434)" \
2553      "\n        -q      Number of probes per TTL (default 3)" \
2554      "\n        -s      IP address to use as the source address" \
2555      "\n        -t      Type-of-service in probe packets (default 0)" \
2556      "\n        -w      Time in seconds to wait for a response (default 3)" \
2557      "\n        -g      Loose source route gateway (8 max)" \
2558
2559 #define traceroute6_trivial_usage \
2560        "[-dnrv] [-m MAXTTL] [-p PORT] [-q PROBES]\n" \
2561        "        [-s SRC_IP] [-t TOS] [-w WAIT_SEC] [-i IFACE]\n" \
2562        "        HOST [BYTES]"
2563 #define traceroute6_full_usage "\n\n" \
2564        "Trace the route to HOST\n" \
2565      "\nOptions:" \
2566      "\n        -d      Set SO_DEBUG options to socket" \
2567      "\n        -n      Print numeric addresses" \
2568      "\n        -r      Bypass routing tables, send directly to HOST" \
2569      "\n        -v      Verbose" \
2570      "\n        -m      Max time-to-live (max number of hops)" \
2571      "\n        -p      Base UDP port number used in probes" \
2572      "\n                (default is 33434)" \
2573      "\n        -q      Number of probes per TTL (default 3)" \
2574      "\n        -s      IP address to use as the source address" \
2575      "\n        -t      Type-of-service in probe packets (default 0)" \
2576      "\n        -w      Time in seconds to wait for a response (default 3)" \
2577
2578 #define ttysize_trivial_usage \
2579        "[w] [h]"
2580 #define ttysize_full_usage "\n\n" \
2581        "Print dimension(s) of stdin's terminal, on error return 80x25"
2582
2583 #define tunctl_trivial_usage \
2584        "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]")
2585 #define tunctl_full_usage "\n\n" \
2586        "Create or delete tun interfaces\n" \
2587      "\nOptions:" \
2588      "\n        -f name         tun device (/dev/net/tun)" \
2589      "\n        -t name         Create iface 'name'" \
2590      "\n        -d name         Delete iface 'name'" \
2591         IF_FEATURE_TUNCTL_UG( \
2592      "\n        -u owner        Set iface owner" \
2593      "\n        -g group        Set iface group" \
2594      "\n        -b              Brief output" \
2595         )
2596 #define tunctl_example_usage \
2597        "# tunctl\n" \
2598        "# tunctl -d tun0\n"
2599
2600 #define udhcpd_trivial_usage \
2601        "[-fS]" IF_FEATURE_UDHCP_PORT(" [-P N]") " [CONFFILE]" \
2602
2603 #define udhcpd_full_usage "\n\n" \
2604        "DHCP server\n" \
2605      "\n        -f      Run in foreground" \
2606      "\n        -S      Log to syslog too" \
2607         IF_FEATURE_UDHCP_PORT( \
2608      "\n        -P N    Use port N (default 67)" \
2609         )
2610
2611 #define umount_trivial_usage \
2612        "[OPTIONS] FILESYSTEM|DIRECTORY"
2613 #define umount_full_usage "\n\n" \
2614        "Unmount file systems\n" \
2615      "\nOptions:" \
2616         IF_FEATURE_UMOUNT_ALL( \
2617      "\n        -a      Unmount all file systems" IF_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \
2618         ) \
2619         IF_FEATURE_MTAB_SUPPORT( \
2620      "\n        -n      Don't erase /etc/mtab entries" \
2621         ) \
2622      "\n        -r      Try to remount devices as read-only if mount is busy" \
2623      "\n        -l      Lazy umount (detach filesystem)" \
2624      "\n        -f      Force umount (i.e., unreachable NFS server)" \
2625         IF_FEATURE_MOUNT_LOOP( \
2626      "\n        -d      Free loop device if it has been used" \
2627         )
2628
2629 #define umount_example_usage \
2630        "$ umount /dev/hdc1\n"
2631
2632 #define uptime_trivial_usage \
2633        ""
2634 #define uptime_full_usage "\n\n" \
2635        "Display the time since the last boot"
2636
2637 #define uptime_example_usage \
2638        "$ uptime\n" \
2639        "  1:55pm  up  2:30, load average: 0.09, 0.04, 0.00\n"
2640
2641 #define vconfig_trivial_usage \
2642        "COMMAND [OPTIONS]"
2643 #define vconfig_full_usage "\n\n" \
2644        "Create and remove virtual ethernet devices\n" \
2645      "\nOptions:" \
2646      "\n        add             [interface-name] [vlan_id]" \
2647      "\n        rem             [vlan-name]" \
2648      "\n        set_flag        [interface-name] [flag-num] [0 | 1]" \
2649      "\n        set_egress_map  [vlan-name] [skb_priority] [vlan_qos]" \
2650      "\n        set_ingress_map [vlan-name] [skb_priority] [vlan_qos]" \
2651      "\n        set_name_type   [name-type]" \
2652
2653 #define vi_trivial_usage \
2654        "[OPTIONS] [FILE]..."
2655 #define vi_full_usage "\n\n" \
2656        "Edit FILE\n" \
2657      "\nOptions:" \
2658         IF_FEATURE_VI_COLON( \
2659      "\n        -c      Initial command to run ($EXINIT also available)" \
2660         ) \
2661         IF_FEATURE_VI_READONLY( \
2662      "\n        -R      Read-only" \
2663         ) \
2664      "\n        -H      Short help regarding available features" \
2665
2666 #define vlock_trivial_usage \
2667        "[-a]"
2668 #define vlock_full_usage "\n\n" \
2669        "Lock a virtual terminal. A password is required to unlock.\n" \
2670      "\nOptions:" \
2671      "\n        -a      Lock all VTs" \
2672
2673 #define volname_trivial_usage \
2674        "[DEVICE]"
2675 #define volname_full_usage "\n\n" \
2676        "Show CD volume name of the DEVICE (default /dev/cdrom)"
2677
2678 #define wall_trivial_usage \
2679         "[FILE]"
2680 #define wall_full_usage "\n\n" \
2681         "Write content of FILE or stdin to all logged-in users"
2682 #define wall_sample_usage \
2683         "echo foo | wall\n" \
2684         "wall ./mymessage"
2685
2686 #define watch_trivial_usage \
2687        "[-n SEC] [-t] PROG ARGS"
2688 #define watch_full_usage "\n\n" \
2689        "Run PROG periodically\n" \
2690      "\nOptions:" \
2691      "\n        -n      Loop period in seconds (default 2)" \
2692      "\n        -t      Don't print header" \
2693
2694 #define watch_example_usage \
2695        "$ watch date\n" \
2696        "Mon Dec 17 10:31:40 GMT 2000\n" \
2697        "Mon Dec 17 10:31:42 GMT 2000\n" \
2698        "Mon Dec 17 10:31:44 GMT 2000"
2699
2700 #define watchdog_trivial_usage \
2701        "[-t N[ms]] [-T N[ms]] [-F] DEV"
2702 #define watchdog_full_usage "\n\n" \
2703        "Periodically write to watchdog device DEV\n" \
2704      "\nOptions:" \
2705      "\n        -T N    Reboot after N seconds if not reset (default 60)" \
2706      "\n        -t N    Reset every N seconds (default 30)" \
2707      "\n        -F      Run in foreground" \
2708      "\n" \
2709      "\nUse 500ms to specify period in milliseconds" \
2710
2711 #define which_trivial_usage \
2712        "[COMMAND]..."
2713 #define which_full_usage "\n\n" \
2714        "Locate a COMMAND"
2715 #define which_example_usage \
2716        "$ which login\n" \
2717        "/bin/login\n"
2718
2719 #define zcip_trivial_usage \
2720        "[OPTIONS] IFACE SCRIPT"
2721 #define zcip_full_usage "\n\n" \
2722        "Manage a ZeroConf IPv4 link-local address\n" \
2723      "\nOptions:" \
2724      "\n        -f              Run in foreground" \
2725      "\n        -q              Quit after obtaining address" \
2726      "\n        -r 169.254.x.x  Request this address first" \
2727      "\n        -v              Verbose" \
2728      "\n" \
2729      "\nWith no -q, runs continuously monitoring for ARP conflicts," \
2730      "\nexits only on I/O errors (link down etc)" \
2731
2732
2733 #endif