aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 08:55:44 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 08:55:44 +0000
commit397de617f38a58ca4659ee348faf1df574b3ec8d (patch)
tree8d629ddebd9ce35cff7fb97b1e8e436142dade41
parenta4522c5a66fab931328e2423f41716fba3a6fbfd (diff)
downloadbusybox-w32-397de617f38a58ca4659ee348faf1df574b3ec8d.tar.gz
busybox-w32-397de617f38a58ca4659ee348faf1df574b3ec8d.tar.bz2
busybox-w32-397de617f38a58ca4659ee348faf1df574b3ec8d.zip
help text: regularize format, and shrink
getty: shrink, and improve comments mount: OPT_ALL is superfluous, we already have OPT_a function old new delta bcode 47 25 -22 getty_main 2503 2349 -154 packed_usage 23928 23698 -230 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-406) Total: -406 bytes text data bss dec hex filename 798031 658 7428 806117 c4ce5 busybox_old 797604 658 7428 805690 c4b3a busybox_unstripped
-rw-r--r--include/usage.h3023
-rw-r--r--loginutils/getty.c172
-rw-r--r--util-linux/mount.c4
3 files changed, 1630 insertions, 1569 deletions
diff --git a/include/usage.h b/include/usage.h
index 2a49454a1..f94fa2f62 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -14,48 +14,47 @@
14#define __BB_USAGE_H__ 14#define __BB_USAGE_H__
15 15
16#define addgroup_trivial_usage \ 16#define addgroup_trivial_usage \
17 "[-g GID]"USE_FEATURE_ADDUSER_TO_GROUP(" [user_name]")" group_name" 17 "[-g GID] " USE_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name"
18#define addgroup_full_usage \ 18#define addgroup_full_usage \
19 "Add a group"USE_FEATURE_ADDUSER_TO_GROUP(" or add an user to a group") \ 19 "Add a group " USE_FEATURE_ADDUSER_TO_GROUP("or add an user to a group") "\n" \
20 "\n\nOptions:\n" \ 20 "\nOptions:" \
21 " -g GID Group id" 21 "\n -g GID Group id"
22 22
23#define adduser_trivial_usage \ 23#define adduser_trivial_usage \
24 "[OPTIONS] user_name" 24 "[OPTIONS] user_name"
25#define adduser_full_usage \ 25#define adduser_full_usage \
26 "Add an user" \ 26 "Add an user\n" \
27 "\n\nOptions:\n" \ 27 "\nOptions:" \
28 " -h DIR Home directory\n" \ 28 "\n -h DIR Home directory" \
29 " -g GECOS GECOS field\n" \ 29 "\n -g GECOS GECOS field" \
30 " -s SHELL Login shell\n" \ 30 "\n -s SHELL Login shell" \
31 " -G GROUP Add user to existing group\n" \ 31 "\n -G GROUP Add user to existing group" \
32 " -S Create a system user\n" \ 32 "\n -S Create a system user" \
33 " -D Do not assign a password\n" \ 33 "\n -D Do not assign a password" \
34 " -H Do not create home directory" 34 "\n -H Do not create home directory" \
35 35
36#define adjtimex_trivial_usage \ 36#define adjtimex_trivial_usage \
37 "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]" 37 "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]"
38#define adjtimex_full_usage \ 38#define adjtimex_full_usage \
39 "Read and optionally set system timebase parameters.\n" \ 39 "Read and optionally set system timebase parameters. See adjtimex(2).\n" \
40 "See adjtimex(2)." \ 40 "\nOptions:" \
41 "\n\nOptions:\n" \ 41 "\n -q Quiet" \
42 " -q Quiet\n" \ 42 "\n -o offset Time offset, microseconds" \
43 " -o offset Time offset, microseconds\n" \ 43 "\n -f frequency Frequency adjust, integer kernel units (65536 is 1ppm)" \
44 " -f frequency Frequency adjust, integer kernel units (65536 is 1ppm)\n" \ 44 "\n (positive values make clock run faster)" \
45 " (positive values make clock run faster)\n" \ 45 "\n -t tick Microseconds per tick, usually 10000" \
46 " -t tick Microseconds per tick, usually 10000\n" \ 46 "\n -p timeconstant" \
47 " -p timeconstant"
48 47
49#define ar_trivial_usage \ 48#define ar_trivial_usage \
50 "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES" 49 "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
51#define ar_full_usage \ 50#define ar_full_usage \
52 "Extract or list FILES from an ar archive" \ 51 "Extract or list FILES from an ar archive\n" \
53 "\n\nOptions:\n" \ 52 "\nOptions:" \
54 " -o Preserve original dates\n" \ 53 "\n -o Preserve original dates" \
55 " -p Extract to stdout\n" \ 54 "\n -p Extract to stdout" \
56 " -t List\n" \ 55 "\n -t List" \
57 " -x Extract\n" \ 56 "\n -x Extract" \
58 " -v Verbose" 57 "\n -v Verbose" \
59 58
60#define arp_trivial_usage \ 59#define arp_trivial_usage \
61 "\n" \ 60 "\n" \
@@ -65,8 +64,8 @@
65 "[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n" \ 64 "[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n" \
66 "[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub\n" 65 "[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub\n"
67#define arp_full_usage \ 66#define arp_full_usage \
68 "Manipulate ARP cache" \ 67 "Manipulate ARP cache\n" \
69 "\n\nOptions:" \ 68 "\nOptions:" \
70 "\n -a Display (all) hosts" \ 69 "\n -a Display (all) hosts" \
71 "\n -s Set new ARP entry" \ 70 "\n -s Set new ARP entry" \
72 "\n -d Delete a specified entry" \ 71 "\n -d Delete a specified entry" \
@@ -75,24 +74,24 @@
75 "\n -i IF Network interface" \ 74 "\n -i IF Network interface" \
76 "\n -D Read <hwaddr> from given device" \ 75 "\n -D Read <hwaddr> from given device" \
77 "\n -A, -p AF Protocol family" \ 76 "\n -A, -p AF Protocol family" \
78 "\n -H HWTYPE Hardware address type" 77 "\n -H HWTYPE Hardware address type" \
79 78
80#define arping_trivial_usage \ 79#define arping_trivial_usage \
81 "[-fqbDUA] [-c count] [-w timeout] [-I dev] [-s sender] target" 80 "[-fqbDUA] [-c count] [-w timeout] [-I dev] [-s sender] target"
82#define arping_full_usage \ 81#define arping_full_usage \
83 "Ping hosts by ARP requests/replies" \ 82 "Send ARP requests/replies\n" \
84 "\n\nOptions:\n" \ 83 "\nOptions:" \
85 " -f Quit on first ARP reply\n" \ 84 "\n -f Quit on first ARP reply" \
86 " -q Quiet\n" \ 85 "\n -q Quiet" \
87 " -b Keep broadcasting, don't go unicast\n" \ 86 "\n -b Keep broadcasting, don't go unicast" \
88 " -D Duplicated address detection mode\n" \ 87 "\n -D Duplicated address detection mode" \
89 " -U Unsolicited ARP mode, update your neighbors\n" \ 88 "\n -U Unsolicited ARP mode, update your neighbors" \
90 " -A ARP answer mode, update your neighbors\n" \ 89 "\n -A ARP answer mode, update your neighbors" \
91 " -c N Stop after sending N ARP requests\n" \ 90 "\n -c N Stop after sending N ARP requests" \
92 " -w timeout Time to wait for ARP reply, in seconds\n" \ 91 "\n -w timeout Time to wait for ARP reply, in seconds" \
93 " -I dev Interface to use (default eth0)\n" \ 92 "\n -I dev Interface to use (default eth0)" \
94 " -s sender Sender IP address\n" \ 93 "\n -s sender Sender IP address" \
95 " target Target IP address" 94 "\n target Target IP address" \
96 95
97#define ash_trivial_usage \ 96#define ash_trivial_usage \
98 "[FILE]...\n" \ 97 "[FILE]...\n" \
@@ -103,10 +102,10 @@
103#define awk_trivial_usage \ 102#define awk_trivial_usage \
104 "[OPTION]... [program-text] [FILE...]" 103 "[OPTION]... [program-text] [FILE...]"
105#define awk_full_usage \ 104#define awk_full_usage \
106 "Options:\n" \ 105 "Options:" \
107 " -v var=val Set variable\n" \ 106 "\n -v var=val Set variable" \
108 " -F sep Use sep as field separator\n" \ 107 "\n -F sep Use sep as field separator" \
109 " -f file Read program from file" 108 "\n -f file Read program from file" \
110 109
111#define basename_trivial_usage \ 110#define basename_trivial_usage \
112 "FILE [SUFFIX]" 111 "FILE [SUFFIX]"
@@ -124,29 +123,29 @@
124#define brctl_trivial_usage \ 123#define brctl_trivial_usage \
125 "COMMAND [BRIDGE [INTERFACE]]" 124 "COMMAND [BRIDGE [INTERFACE]]"
126#define brctl_full_usage \ 125#define brctl_full_usage \
127 "Manage ethernet bridges." \ 126 "Manage ethernet bridges.\n" \
128 "\n\nCommands:\n" \ 127 "\nCommands:" \
129 " addbr BRIDGE Create BRIDGE\n" \ 128 "\n addbr BRIDGE Create BRIDGE" \
130 " delbr BRIDGE Delete BRIDGE\n" \ 129 "\n delbr BRIDGE Delete BRIDGE" \
131 " addif BRIDGE IFACE Add IFACE to BRIDGE\n" \ 130 "\n addif BRIDGE IFACE Add IFACE to BRIDGE" \
132 " delif BRIDGE IFACE Delete IFACE from BRIDGE" \ 131 "\n delif BRIDGE IFACE Delete IFACE from BRIDGE" \
133USE_FEATURE_BRCTL_FANCY("\n" \ 132 USE_FEATURE_BRCTL_FANCY( \
134 " setageing BRIDGE TIME Set ageing time\n" \ 133 "\n setageing BRIDGE TIME Set ageing time" \
135 " setfd BRIDGE TIME Set bridge forward delay\n" \ 134 "\n setfd BRIDGE TIME Set bridge forward delay" \
136 " sethello BRIDGE TIME Set hello time\n" \ 135 "\n sethello BRIDGE TIME Set hello time" \
137 " setmaxage BRIDGE TIME Set max message age\n" \ 136 "\n setmaxage BRIDGE TIME Set max message age" \
138 " setpathcost BRIDGE COST Set path cost\n" \ 137 "\n setpathcost BRIDGE COST Set path cost" \
139 " setportprio BRIDGE PRIO Set port priority\n" \ 138 "\n setportprio BRIDGE PRIO Set port priority" \
140 " setbridgeprio BRIDGE PRIO Set bridge priority\n" \ 139 "\n setbridgeprio BRIDGE PRIO Set bridge priority" \
141 " stp BRIDGE [1|0] STP on/off\n" \ 140 "\n stp BRIDGE [1|0] STP on/off" \
142) 141 )
143#define bunzip2_trivial_usage \ 142#define bunzip2_trivial_usage \
144 "[OPTION]... [FILE]" 143 "[OPTION]... [FILE]"
145#define bunzip2_full_usage \ 144#define bunzip2_full_usage \
146 "Uncompress FILE (or standard input if FILE is '-' or omitted)" \ 145 "Uncompress FILE (or standard input if FILE is '-' or omitted)\n" \
147 "\n\nOptions:\n" \ 146 "\nOptions:" \
148 " -c Write to standard output\n" \ 147 "\n -c Write to standard output" \
149 " -f Force" 148 "\n -f Force" \
150 149
151#define bzip2_trivial_usage \ 150#define bzip2_trivial_usage \
152 "[OPTION]... [FILE]..." 151 "[OPTION]... [FILE]..."
@@ -157,7 +156,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
157 "\n -c Write to standard output" \ 156 "\n -c Write to standard output" \
158 "\n -d Decompress" \ 157 "\n -d Decompress" \
159 "\n -f Force" \ 158 "\n -f Force" \
160 "\n -1..-9 Compression level" 159 "\n -1..-9 Compression level" \
161 160
162#define busybox_notes_usage \ 161#define busybox_notes_usage \
163 "Hello world!\n" 162 "Hello world!\n"
@@ -170,10 +169,10 @@ USE_FEATURE_BRCTL_FANCY("\n" \
170#define unlzma_trivial_usage \ 169#define unlzma_trivial_usage \
171 "[OPTION]... [FILE]" 170 "[OPTION]... [FILE]"
172#define unlzma_full_usage \ 171#define unlzma_full_usage \
173 "Uncompress FILE (or standard input if FILE is '-' or omitted)" \ 172 "Uncompress FILE (or standard input if FILE is '-' or omitted)\n" \
174 "\n\nOptions:\n" \ 173 "\nOptions:" \
175 " -c Write to standard output\n" \ 174 "\n -c Write to standard output" \
176 " -f Force" 175 "\n -f Force" \
177 176
178#define lzmacat_trivial_usage \ 177#define lzmacat_trivial_usage \
179 "FILE" 178 "FILE"
@@ -183,17 +182,18 @@ USE_FEATURE_BRCTL_FANCY("\n" \
183#define cal_trivial_usage \ 182#define cal_trivial_usage \
184 "[-jy] [[month] year]" 183 "[-jy] [[month] year]"
185#define cal_full_usage \ 184#define cal_full_usage \
186 "Display a calendar" \ 185 "Display a calendar\n" \
187 "\n\nOptions:" \ 186 "\nOptions:" \
188 "\n -j Use julian dates" \ 187 "\n -j Use julian dates" \
189 "\n -y Display the entire year" 188 "\n -y Display the entire year" \
190 189
191#define cat_trivial_usage \ 190#define cat_trivial_usage \
192 "[-u] [FILE]..." 191 "[-u] [FILE]..."
193#define cat_full_usage \ 192#define cat_full_usage \
194 "Concatenate FILE(s) and print them to stdout" \ 193 "Concatenate FILE(s) and print them to stdout\n" \
195 "\n\nOptions:" \ 194 "\nOptions:" \
196 "\n -u Use unbuffered i/o (ignored)" 195 "\n -u Use unbuffered i/o (ignored)" \
196
197#define cat_example_usage \ 197#define cat_example_usage \
198 "$ cat /proc/uptime\n" \ 198 "$ cat /proc/uptime\n" \
199 "110716.72 17.67" 199 "110716.72 17.67"
@@ -201,11 +201,11 @@ USE_FEATURE_BRCTL_FANCY("\n" \
201#define catv_trivial_usage \ 201#define catv_trivial_usage \
202 "[-etv] [FILE]..." 202 "[-etv] [FILE]..."
203#define catv_full_usage \ 203#define catv_full_usage \
204 "Display nonprinting characters as ^x or M-x" \ 204 "Display nonprinting characters as ^x or M-x\n" \
205 "\n\nOptions:\n" \ 205 "\nOptions:" \
206 " -e End each line with $\n" \ 206 "\n -e End each line with $" \
207 " -t Show tabs as ^I\n" \ 207 "\n -t Show tabs as ^I" \
208 " -v Don't use ^x or M-x escapes" 208 "\n -v Don't use ^x or M-x escapes" \
209 209
210#define chat_trivial_usage \ 210#define chat_trivial_usage \
211 "EXPECT [SEND [EXPECT [SEND...]]]" 211 "EXPECT [SEND [EXPECT [SEND...]]]"
@@ -218,26 +218,26 @@ USE_FEATURE_BRCTL_FANCY("\n" \
218#define chattr_trivial_usage \ 218#define chattr_trivial_usage \
219 "[-R] [-+=AacDdijsStTu] [-v version] files..." 219 "[-R] [-+=AacDdijsStTu] [-v version] files..."
220#define chattr_full_usage \ 220#define chattr_full_usage \
221 "Change file attributes on an ext2 fs\n\n" \ 221 "Change file attributes on an ext2 fs\n" \
222 "Modifiers:\n" \ 222 "\nModifiers:" \
223 " - Remove attributes\n" \ 223 "\n - Remove attributes" \
224 " + Add attributes\n" \ 224 "\n + Add attributes" \
225 " = Set attributes\n" \ 225 "\n = Set attributes" \
226 "Attributes:\n" \ 226 "\nAttributes:" \
227 " A Don't track atime\n" \ 227 "\n A Don't track atime" \
228 " a Append mode only\n" \ 228 "\n a Append mode only" \
229 " c Enable compress\n" \ 229 "\n c Enable compress" \
230 " D Write dir contents synchronously\n" \ 230 "\n D Write dir contents synchronously" \
231 " d Do not backup with dump\n" \ 231 "\n d Do not backup with dump" \
232 " i Cannot be modified (immutable)\n" \ 232 "\n i Cannot be modified (immutable)" \
233 " j Write all data to journal first\n" \ 233 "\n j Write all data to journal first" \
234 " s Zero disk storage when deleted\n" \ 234 "\n s Zero disk storage when deleted" \
235 " S Write file contents synchronously\n" \ 235 "\n S Write file contents synchronously" \
236 " t Disable tail-merging of partial blocks with other files\n" \ 236 "\n t Disable tail-merging of partial blocks with other files" \
237 " u Allow file to be undeleted\n" \ 237 "\n u Allow file to be undeleted" \
238 "Options:\n" \ 238 "\nOptions:" \
239 " -R Recursively list subdirectories\n" \ 239 "\n -R Recursively list subdirectories" \
240 " -v Set the file's version/generation number" 240 "\n -v Set the file's version/generation number" \
241 241
242#define chcon_trivial_usage \ 242#define chcon_trivial_usage \
243 "[OPTIONS] CONTEXT FILE..." \ 243 "[OPTIONS] CONTEXT FILE..." \
@@ -248,41 +248,40 @@ USE_FEATURE_BRCTL_FANCY("\n" \
248#define chcon_full_usage \ 248#define chcon_full_usage \
249 "Change the security context of each FILE to CONTEXT\n" \ 249 "Change the security context of each FILE to CONTEXT\n" \
250 USE_FEATURE_CHCON_LONG_OPTIONS( \ 250 USE_FEATURE_CHCON_LONG_OPTIONS( \
251 "\n -v,--verbose Verbose" \ 251 "\n -v,--verbose Verbose" \
252 "\n -c,--changes Report changes made" \ 252 "\n -c,--changes Report changes made" \
253 "\n -h,--no-dereference Affect symlinks instead of their targets" \ 253 "\n -h,--no-dereference Affect symlinks instead of their targets" \
254 "\n -f,--silent,--quiet Suppress most error messages" \ 254 "\n -f,--silent,--quiet Suppress most error messages" \
255 "\n --reference=RFILE Use RFILE's group instead of using a CONTEXT value" \ 255 "\n --reference=RFILE Use RFILE's group instead of using a CONTEXT value" \
256 "\n -u,--user=USER Set user USER in the target security context" \ 256 "\n -u,--user=USER Set user/role/type/range in the target" \
257 "\n -r,--role=ROLE Set role ROLE in the target security context" \ 257 "\n -r,--role=ROLE security context" \
258 "\n -t,--type=TYPE Set type TYPE in the target security context" \ 258 "\n -t,--type=TYPE" \
259 "\n -l,--range=RANGE Set range RANGE in the target security context" \ 259 "\n -l,--range=RANGE" \
260 "\n -R,--recursive Recurse subdirectories" \ 260 "\n -R,--recursive Recurse subdirectories" \
261 ) \ 261 ) \
262 SKIP_FEATURE_CHCON_LONG_OPTIONS( \ 262 SKIP_FEATURE_CHCON_LONG_OPTIONS( \
263 "\n -v Verbose" \ 263 "\n -v Verbose" \
264 "\n -c Report changes made" \ 264 "\n -c Report changes made" \
265 "\n -h Affect symlinks instead of their targets" \ 265 "\n -h Affect symlinks instead of their targets" \
266 "\n -f Suppress most error messages" \ 266 "\n -f Suppress most error messages" \
267 "\n -u USER Set user USER in the target security context" \ 267 "\n -u USER Set user/role/type/range in the target security context" \
268 "\n -r ROLE Set role ROLE in the target security context" \ 268 "\n -r ROLE" \
269 "\n -t TYPE Set type TYPE in the target security context" \ 269 "\n -t TYPE" \
270 "\n -l RNG Set range RNE in the target security context" \ 270 "\n -l RNG" \
271 "\n -R Recurse subdirectories" \ 271 "\n -R Recurse subdirectories" \
272 ) 272 )
273 273
274
275#define chmod_trivial_usage \ 274#define chmod_trivial_usage \
276 "[-R"USE_DESKTOP("cvf")"] MODE[,MODE]... FILE..." 275 "[-R"USE_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
277#define chmod_full_usage \ 276#define chmod_full_usage \
278 "Each MODE is one or more of the letters ugoa, one of the\n" \ 277 "Each MODE is one or more of the letters ugoa, one of the\n" \
279 "symbols +-= and one or more of the letters rwxst" \ 278 "symbols +-= and one or more of the letters rwxst\n" \
280 "\n\nOptions:" \ 279 "\nOptions:" \
281 "\n -R Recurse directories" \ 280 "\n -R Recurse directories" \
282 USE_DESKTOP( \ 281 USE_DESKTOP( \
283 "\n -c List changed files" \ 282 "\n -c List changed files" \
284 "\n -v List all files" \ 283 "\n -v List all files" \
285 "\n -f Hide errors" \ 284 "\n -f Hide errors" \
286 ) 285 )
287#define chmod_example_usage \ 286#define chmod_example_usage \
288 "$ ls -l /tmp/foo\n" \ 287 "$ ls -l /tmp/foo\n" \
@@ -297,17 +296,17 @@ USE_FEATURE_BRCTL_FANCY("\n" \
297#define chgrp_trivial_usage \ 296#define chgrp_trivial_usage \
298 "[-RhLHP"USE_DESKTOP("cvf")"]... GROUP FILE..." 297 "[-RhLHP"USE_DESKTOP("cvf")"]... GROUP FILE..."
299#define chgrp_full_usage \ 298#define chgrp_full_usage \
300 "Change the group membership of each FILE to GROUP" \ 299 "Change the group membership of each FILE to GROUP\n" \
301 "\n\nOptions:" \ 300 "\nOptions:" \
302 "\n -R Recurse directories" \ 301 "\n -R Recurse directories" \
303 "\n -h Affect symlinks instead of symlink targets" \ 302 "\n -h Affect symlinks instead of symlink targets" \
304 "\n -L Traverse all symlinks to directories" \ 303 "\n -L Traverse all symlinks to directories" \
305 "\n -H Traverse symlinks on command line only" \ 304 "\n -H Traverse symlinks on command line only" \
306 "\n -P Do not traverse symlinks (default)" \ 305 "\n -P Do not traverse symlinks (default)" \
307 USE_DESKTOP( \ 306 USE_DESKTOP( \
308 "\n -c List changed files" \ 307 "\n -c List changed files" \
309 "\n -v Verbose" \ 308 "\n -v Verbose" \
310 "\n -f Hide errors" \ 309 "\n -f Hide errors" \
311 ) 310 )
312#define chgrp_example_usage \ 311#define chgrp_example_usage \
313 "$ ls -l /tmp/foo\n" \ 312 "$ ls -l /tmp/foo\n" \
@@ -319,17 +318,17 @@ USE_FEATURE_BRCTL_FANCY("\n" \
319#define chown_trivial_usage \ 318#define chown_trivial_usage \
320 "[-RhLHP"USE_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..." 319 "[-RhLHP"USE_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
321#define chown_full_usage \ 320#define chown_full_usage \
322 "Change the owner and/or group of each FILE to OWNER and/or GROUP" \ 321 "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" \
323 "\n\nOptions:" \ 322 "\nOptions:" \
324 "\n -R Recurse directories" \ 323 "\n -R Recurse directories" \
325 "\n -h Affect symlinks instead of symlink targets" \ 324 "\n -h Affect symlinks instead of symlink targets" \
326 "\n -L Traverse all symlinks to directories" \ 325 "\n -L Traverse all symlinks to directories" \
327 "\n -H Traverse symlinks on command line only" \ 326 "\n -H Traverse symlinks on command line only" \
328 "\n -P Do not traverse symlinks (default)" \ 327 "\n -P Do not traverse symlinks (default)" \
329 USE_DESKTOP( \ 328 USE_DESKTOP( \
330 "\n -c List changed files" \ 329 "\n -c List changed files" \
331 "\n -v List all files" \ 330 "\n -v List all files" \
332 "\n -f Hide errors" \ 331 "\n -f Hide errors" \
333 ) 332 )
334#define chown_example_usage \ 333#define chown_example_usage \
335 "$ ls -l /tmp/foo\n" \ 334 "$ ls -l /tmp/foo\n" \
@@ -346,26 +345,27 @@ USE_FEATURE_BRCTL_FANCY("\n" \
346 "[-/ dir] [-n nice] [-m bytes] [-d bytes] [-o files] " \ 345 "[-/ dir] [-n nice] [-m bytes] [-d bytes] [-o files] " \
347 "[-p processes] [-f bytes] [-c bytes] prog args" 346 "[-p processes] [-f bytes] [-c bytes] prog args"
348#define chpst_full_usage \ 347#define chpst_full_usage \
349 "Change the process state and run specified program" \ 348 "Change the process state and run specified program\n" \
350 "\n\nOptions:\n" \ 349 "\nOptions:" \
351 " -u user[:grp] Set uid and gid\n" \ 350 "\n -u USER[:GRP] Set uid and gid" \
352 " -U user[:grp] Set environment variables UID and GID\n" \ 351 "\n -U USER[:GRP] Set $UID and $GID in environment" \
353 " -e dir Set environment variables as specified by files\n" \ 352 "\n -e DIR Set environment variables as specified by files" \
354 " in the directory: file=1st_line_of_file\n" \ 353 "\n in DIR: file=1st_line_of_file" \
355 " -/ dir Chroot to dir\n" \ 354 "\n -/ DIR Chroot to DIR" \
356 " -n inc Add inc to nice value\n" \ 355 "\n -n INC Add INC to nice value" \
357 " -m bytes Limit data segment, stack segment, locked physical pages,\n" \ 356 "\n -m BYTES Limit data segment, stack segment, locked physical pages," \
358 " and total of all segment per process to bytes bytes each\n" \ 357 "\n and total of all segment per process to BYTES each" \
359 " -d bytes Limit data segment\n" \ 358 "\n -d BYTES Limit data segment" \
360 " -o n Limit the number of open file descriptors per process to n\n" \ 359 "\n -o N Limit the number of open file descriptors per process to N" \
361 " -p n Limit number of processes per uid to n\n" \ 360 "\n -p N Limit number of processes per uid to N" \
362 " -f bytes Limit output file size to bytes bytes\n" \ 361 "\n -f BYTES Limit output file size to BYTES" \
363 " -c bytes Limit core file size to bytes bytes\n" \ 362 "\n -c BYTES Limit core file size to BYTES" \
364 " -v Verbose\n" \ 363 "\n -v Verbose" \
365 " -P Run prog in a new process group\n" \ 364 "\n -P Run prog in a new process group" \
366 " -0 Close standard input\n" \ 365 "\n -0 Close standard input" \
367 " -1 Close standard output\n" \ 366 "\n -1 Close standard output" \
368 " -2 Close standard error" 367 "\n -2 Close standard error" \
368
369#define setuidgid_trivial_usage \ 369#define setuidgid_trivial_usage \
370 "account prog args" 370 "account prog args"
371#define setuidgid_full_usage \ 371#define setuidgid_full_usage \
@@ -385,26 +385,26 @@ USE_FEATURE_BRCTL_FANCY("\n" \
385 "[-l lockbytes] [-m membytes] [-o openfiles] [-p processes] " \ 385 "[-l lockbytes] [-m membytes] [-o openfiles] [-p processes] " \
386 "[-r residentbytes] [-s stackbytes] [-t cpusecs] prog args" 386 "[-r residentbytes] [-s stackbytes] [-t cpusecs] prog args"
387#define softlimit_full_usage \ 387#define softlimit_full_usage \
388 "Set soft resource limits, then run prog" \ 388 "Set soft resource limits, then run prog\n" \
389 "\n\nOptions:\n" \ 389 "\nOptions:" \
390 " -m n Same as -d n -s n -l n -a n\n" \ 390 "\n -m n Same as -d n -s n -l n -a n" \
391 " -d n Limit the data segment per process to n bytes\n" \ 391 "\n -d n Limit the data segment per process to n bytes" \
392 " -s n Limit the stack segment per process to n bytes\n" \ 392 "\n -s n Limit the stack segment per process to n bytes" \
393 " -l n Limit the locked physical pages per process to n bytes\n" \ 393 "\n -l n Limit the locked physical pages per process to n bytes" \
394 " -a n Limit the total of all segments per process to n bytes\n" \ 394 "\n -a n Limit the total of all segments per process to n bytes" \
395 " -o n Limit the number of open file descriptors per process to n\n" \ 395 "\n -o n Limit the number of open file descriptors per process to n" \
396 " -p n Limit the number of processes per uid to n\n" \ 396 "\n -p n Limit the number of processes per uid to n" \
397 "Options controlling file sizes:\n" \ 397 "\nOptions controlling file sizes:" \
398 " -f n Limit output file sizes to n bytes\n" \ 398 "\n -f n Limit output file sizes to n bytes" \
399 " -c n Limit core file sizes to n bytes\n" \ 399 "\n -c n Limit core file sizes to n bytes" \
400 "Efficiency opts:\n" \ 400 "\nEfficiency opts:" \
401 " -r n Limit the resident set size to n bytes. This limit is not\n" \ 401 "\n -r n Limit the resident set size to n bytes. This limit is not" \
402 " enforced unless physical memory is full\n" \ 402 "\n enforced unless physical memory is full" \
403 " -t n Limit the CPU time to n seconds. This limit is not enforced\n" \ 403 "\n -t n Limit the CPU time to n seconds. This limit is not enforced" \
404 " except that the process receives a SIGXCPU signal after n seconds\n" \ 404 "\n except that the process receives a SIGXCPU signal after n seconds" \
405 "\n" \ 405 "\n" \
406 "Some options may have no effect on some operating systems\n" \ 406 "\nSome options may have no effect on some operating systems" \
407 "n may be =, indicating that soft limit should be set equal to hard limit" 407 "\nn may be =, indicating that soft limit should be set equal to hard limit" \
408 408
409#define chroot_trivial_usage \ 409#define chroot_trivial_usage \
410 "NEWROOT [COMMAND...]" 410 "NEWROOT [COMMAND...]"
@@ -436,20 +436,20 @@ USE_FEATURE_BRCTL_FANCY("\n" \
436#define cmp_trivial_usage \ 436#define cmp_trivial_usage \
437 "[-l] [-s] FILE1 [FILE2" USE_DESKTOP(" [SKIP1 [SKIP2]") "]]" 437 "[-l] [-s] FILE1 [FILE2" USE_DESKTOP(" [SKIP1 [SKIP2]") "]]"
438#define cmp_full_usage \ 438#define cmp_full_usage \
439 "Compares FILE1 vs stdin if FILE2 is not specified" \ 439 "Compares FILE1 vs stdin if FILE2 is not specified\n" \
440 "\n\nOptions:\n" \ 440 "\nOptions:" \
441 " -l Write the byte numbers (decimal) and values (octal)\n" \ 441 "\n -l Write the byte numbers (decimal) and values (octal)" \
442 " for all differing bytes\n" \ 442 "\n for all differing bytes" \
443 " -s Quiet" 443 "\n -s Quiet" \
444 444
445#define comm_trivial_usage \ 445#define comm_trivial_usage \
446 "[-123] FILE1 FILE2" 446 "[-123] FILE1 FILE2"
447#define comm_full_usage \ 447#define comm_full_usage \
448 "Compare FILE1 to FILE2, or to stdin if - is specified" \ 448 "Compare FILE1 to FILE2, or to stdin if - is specified\n" \
449 "\n\nOptions:\n" \ 449 "\nOptions:" \
450 " -1 Suppress lines unique to FILE1\n" \ 450 "\n -1 Suppress lines unique to FILE1" \
451 " -2 Suppress lines unique to FILE2\n" \ 451 "\n -2 Suppress lines unique to FILE2" \
452 " -3 Suppress lines common to both files" 452 "\n -3 Suppress lines common to both files" \
453 453
454#define bbconfig_trivial_usage \ 454#define bbconfig_trivial_usage \
455 "" 455 ""
@@ -465,13 +465,13 @@ USE_FEATURE_BRCTL_FANCY("\n" \
465#define chrt_trivial_usage \ 465#define chrt_trivial_usage \
466 "[OPTION]... [prio] [pid | command [arg]...]" 466 "[OPTION]... [prio] [pid | command [arg]...]"
467#define chrt_full_usage \ 467#define chrt_full_usage \
468 "manipulate real-time attributes of a process" \ 468 "Manipulate real-time attributes of a process\n" \
469 "\n\nOptions:\n" \ 469 "\nOptions:" \
470 " -p operate on pid\n" \ 470 "\n -p Operate on pid" \
471 " -r set scheduling policy to SCHED_RR\n" \ 471 "\n -r Set scheduling policy to SCHED_RR" \
472 " -f set scheduling policy to SCHED_FIFO\n" \ 472 "\n -f Set scheduling policy to SCHED_FIFO" \
473 " -o set scheduling policy to SCHED_OTHER\n" \ 473 "\n -o Set scheduling policy to SCHED_OTHER" \
474 " -m show min and max priorities" 474 "\n -m Show min and max priorities" \
475 475
476#define chrt_example_usage \ 476#define chrt_example_usage \
477 "$ chrt -r 4 sleep 900; x=$!\n" \ 477 "$ chrt -r 4 sleep 900; x=$!\n" \
@@ -481,45 +481,45 @@ USE_FEATURE_BRCTL_FANCY("\n" \
481#define cp_trivial_usage \ 481#define cp_trivial_usage \
482 "[OPTION]... SOURCE DEST" 482 "[OPTION]... SOURCE DEST"
483#define cp_full_usage \ 483#define cp_full_usage \
484 "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY" \ 484 "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" \
485 "\n\nOptions:" \ 485 "\nOptions:" \
486 "\n -a Same as -dpR" \ 486 "\n -a Same as -dpR" \
487 USE_SELINUX( \ 487 USE_SELINUX( \
488 "\n -c Preserves security context" \ 488 "\n -c Preserve security context" \
489 ) \ 489 ) \
490 "\n -d,-P Preserve links" \ 490 "\n -d,-P Preserve links" \
491 "\n -H,-L Dereference all symlinks (default)" \ 491 "\n -H,-L Dereference all symlinks (default)" \
492 "\n -p Preserve file attributes if possible" \ 492 "\n -p Preserve file attributes if possible" \
493 "\n -f Force overwrite" \ 493 "\n -f Force overwrite" \
494 "\n -i Prompt before overwrite" \ 494 "\n -i Prompt before overwrite" \
495 "\n -R,-r Recurse directories" \ 495 "\n -R,-r Recurse directories" \
496 "\n -l,-s Create (sym)links" 496 "\n -l,-s Create (sym)links" \
497 497
498#define cpio_trivial_usage \ 498#define cpio_trivial_usage \
499 "-[dimtuv][F cpiofile]" 499 "-[dimtuv][F cpiofile]"
500#define cpio_full_usage \ 500#define cpio_full_usage \
501 "Extract or list files from a cpio archive\n" \ 501 "Extract or list files from a cpio archive\n" \
502 "Main operation mode:\n" \ 502 "Main operation mode:" \
503 " d Make leading directories\n" \ 503 "\n d Make leading directories" \
504 " i Extract\n" \ 504 "\n i Extract" \
505 " m Preserve mtime\n" \ 505 "\n m Preserve mtime" \
506 " t List\n" \ 506 "\n t List" \
507 " v Verbose\n" \ 507 "\n v Verbose" \
508 " u Unconditional overwrite\n" \ 508 "\n u Unconditional overwrite" \
509 " F Input from file" 509 "\n F Input from file" \
510 510
511#define crond_trivial_usage \ 511#define crond_trivial_usage \
512 "-fbS -l N " USE_DEBUG_CROND_OPTION("-d N ") "-L LOGFILE -c DIR" 512 "-fbS -l N " USE_DEBUG_CROND_OPTION("-d N ") "-L LOGFILE -c DIR"
513#define crond_full_usage \ 513#define crond_full_usage \
514 " -f Foreground\n" \ 514 " -f Foreground" \
515 " -b Background (default)\n" \ 515 "\n -b Background (default)" \
516 " -S Log to syslog (default)\n" \ 516 "\n -S Log to syslog (default)" \
517 " -l Set log level. 0 is the most verbose, default 8\n" \ 517 "\n -l Set log level. 0 is the most verbose, default 8" \
518 USE_DEBUG_CROND_OPTION( \ 518 USE_DEBUG_CROND_OPTION( \
519 " -d Set log level, log to stderr\n" \ 519 "\n -d Set log level, log to stderr" \
520 ) \ 520 ) \
521 " -L Log to file\n" \ 521 "\n -L Log to file" \
522 " -c Working dir" 522 "\n -c Working dir" \
523 523
524#define crontab_trivial_usage \ 524#define crontab_trivial_usage \
525 "[-c DIR] [-u USER] [-ler]|[FILE]" 525 "[-c DIR] [-u USER] [-ler]|[FILE]"
@@ -534,22 +534,23 @@ USE_FEATURE_BRCTL_FANCY("\n" \
534#define cryptpw_trivial_usage \ 534#define cryptpw_trivial_usage \
535 "[-a des|md5] [string]" 535 "[-a des|md5] [string]"
536#define cryptpw_full_usage \ 536#define cryptpw_full_usage \
537 "Outputs crypted string.\n" \ 537 "Output crypted string.\n" \
538 "If string isn't supplied on cmdline, reads it from stdin.\n" \ 538 "If string isn't supplied on cmdline, read it from stdin.\n" \
539 "\nOptions:" \ 539 "\nOptions:" \
540 "\n -a Algorithm to use (default: md5)" 540 "\n -a Algorithm to use (default: md5)" \
541 541
542#define cut_trivial_usage \ 542#define cut_trivial_usage \
543 "[OPTION]... [FILE]..." 543 "[OPTION]... [FILE]..."
544#define cut_full_usage \ 544#define cut_full_usage \
545 "Print selected fields from each input FILE to standard output" \ 545 "Print selected fields from each input FILE to standard output\n" \
546 "\n\nOptions:\n" \ 546 "\nOptions:" \
547 " -b LIST Output only bytes from LIST\n" \ 547 "\n -b LIST Output only bytes from LIST" \
548 " -c LIST Output only characters from LIST\n" \ 548 "\n -c LIST Output only characters from LIST" \
549 " -d CHAR Use CHAR instead of tab as the field delimiter\n" \ 549 "\n -d CHAR Use CHAR instead of tab as the field delimiter" \
550 " -s Output only the lines containing delimiter\n" \ 550 "\n -s Output only the lines containing delimiter" \
551 " -f N Print only these fields\n" \ 551 "\n -f N Print only these fields" \
552 " -n Ignored" 552 "\n -n Ignored" \
553
553#define cut_example_usage \ 554#define cut_example_usage \
554 "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \ 555 "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \
555 "Hello\n" \ 556 "Hello\n" \
@@ -559,20 +560,21 @@ USE_FEATURE_BRCTL_FANCY("\n" \
559#define date_trivial_usage \ 560#define date_trivial_usage \
560 "[OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]" 561 "[OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]"
561#define date_full_usage \ 562#define date_full_usage \
562 "Display current time in the given FORMAT, or set system date" \ 563 "Display current time in the given FORMAT, or set system date\n" \
563 "\n\nOptions:\n" \ 564 "\nOptions:" \
564 " -R Outputs RFC-822 compliant date string\n" \ 565 "\n -R Output RFC-822 compliant date string" \
565 " -d STRING Displays time described by STRING, not 'now'\n" \ 566 "\n -d STRING Display time described by STRING, not 'now'" \
566 USE_FEATURE_DATE_ISOFMT( \ 567 USE_FEATURE_DATE_ISOFMT( \
567 " -I[TIMESPEC] Outputs an ISO-8601 compliant date/time string\n" \ 568 "\n -I[TIMESPEC] Output an ISO-8601 compliant date/time string" \
568 " TIMESPEC='date' (or missing) for date only,\n" \ 569 "\n TIMESPEC='date' (or missing) for date only," \
569 " 'hours', 'minutes', or 'seconds' for date and\n" \ 570 "\n 'hours', 'minutes', or 'seconds' for date and" \
570 " time to the indicated precision\n" \ 571 "\n time to the indicated precision" \
571 " -D hint Use 'hint' as date format, via strptime()\n" \ 572 "\n -D hint Use 'hint' as date format, via strptime()" \
572 ) \ 573 ) \
573 " -s STRING Sets time described by STRING\n" \ 574 "\n -s STRING Set time described by STRING" \
574 " -r FILE Displays the last modification time of FILE\n" \ 575 "\n -r FILE Display the last modification time of FILE" \
575 " -u Prints or sets Coordinated Universal Time" 576 "\n -u Print or sets Coordinated Universal Time" \
577
576#define date_example_usage \ 578#define date_example_usage \
577 "$ date\n" \ 579 "$ date\n" \
578 "Wed Apr 12 18:52:41 MDT 2000\n" 580 "Wed Apr 12 18:52:41 MDT 2000\n"
@@ -580,15 +582,15 @@ USE_FEATURE_BRCTL_FANCY("\n" \
580#define dc_trivial_usage \ 582#define dc_trivial_usage \
581 "expression..." 583 "expression..."
582#define dc_full_usage \ 584#define dc_full_usage \
583 "This is a Tiny RPN calculator that understands the\n" \ 585 "This is a Tiny RPN calculator that understands the following operations:\n" \
584 "following operations: +, add, -, sub, *, mul, /, div, %, mod, " \ 586 "+, add, -, sub, *, mul, /, div, %, mod, **, exp, and, or, not, eor.\n" \
585 "**, exp, and, or, not, eor.\n" \ 587 "For example: 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16.\n" \
586 "For example: 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16." \ 588 "\nOptions:" \
587 "\n\nOptions:\n" \ 589 "\np - Print the value on the top of the stack, without altering the stack" \
588 "p - Prints the value on the top of the stack, without altering the stack\n" \ 590 "\nf - Print the entire contents of the stack without altering anything" \
589 "f - Prints the entire contents of the stack without altering anything\n" \ 591 "\no - Pop the value off the top of the stack and use it to set the output radix" \
590 "o - Pops the value off the top of the stack and uses it to set the output radix\n" \ 592 "\n Only 10 and 16 are supported" \
591 " Only 10 and 16 are supported" 593
592#define dc_example_usage \ 594#define dc_example_usage \
593 "$ dc 2 2 + p\n" \ 595 "$ dc 2 2 + p\n" \
594 "4\n" \ 596 "4\n" \
@@ -605,25 +607,26 @@ USE_FEATURE_BRCTL_FANCY("\n" \
605 "[if=FILE] [of=FILE] " USE_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \ 607 "[if=FILE] [of=FILE] " USE_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
606 " [seek=N]" USE_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync]") 608 " [seek=N]" USE_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync]")
607#define dd_full_usage \ 609#define dd_full_usage \
608 "Copy a file with converting and formatting" \ 610 "Copy a file with converting and formatting\n" \
609 "\n\nOptions:\n" \ 611 "\nOptions:" \
610 " if=FILE Read from FILE instead of stdin\n" \ 612 "\n if=FILE Read from FILE instead of stdin" \
611 " of=FILE Write to FILE instead of stdout\n" \ 613 "\n of=FILE Write to FILE instead of stdout" \
612 " bs=N Read and write N bytes at a time\n" \ 614 "\n bs=N Read and write N bytes at a time" \
613 USE_FEATURE_DD_IBS_OBS( \ 615 USE_FEATURE_DD_IBS_OBS( \
614 " ibs=N Read N bytes at a time\n") \ 616 "\n ibs=N Read N bytes at a time") \
615 USE_FEATURE_DD_IBS_OBS( \ 617 USE_FEATURE_DD_IBS_OBS( \
616 " obs=N Write N bytes at a time\n") \ 618 "\n obs=N Write N bytes at a time") \
617 " count=N Copy only N input blocks\n" \ 619 "\n count=N Copy only N input blocks" \
618 " skip=N Skip N input blocks\n" \ 620 "\n skip=N Skip N input blocks" \
619 " seek=N Skip N output blocks\n" \ 621 "\n seek=N Skip N output blocks" \
620 USE_FEATURE_DD_IBS_OBS( \ 622 USE_FEATURE_DD_IBS_OBS( \
621 " conv=notrunc Don't truncate output file\n" \ 623 "\n conv=notrunc Don't truncate output file" \
622 " conv=noerror Continue after read errors\n" \ 624 "\n conv=noerror Continue after read errors" \
623 " conv=sync Pad blocks with zeros\n") \ 625 "\n conv=sync Pad blocks with zeros") \
624 "\n" \ 626 "\n" \
625 "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n" \ 627 "\nNumbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024)," \
626 "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)" 628 "\nMD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)" \
629
627#define dd_example_usage \ 630#define dd_example_usage \
628 "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \ 631 "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \
629 "4+0 records in\n" \ 632 "4+0 records in\n" \
@@ -646,19 +649,19 @@ USE_FEATURE_BRCTL_FANCY("\n" \
646 "Delete user USER from the system" 649 "Delete user USER from the system"
647 650
648#define devfsd_trivial_usage \ 651#define devfsd_trivial_usage \
649 "mntpnt [-v]" \ 652 "mntpnt [-v]" USE_DEVFSD_FG_NP("[-fg][-np]")
650 USE_DEVFSD_FG_NP("[-fg][-np]")
651#define devfsd_full_usage \ 653#define devfsd_full_usage \
652 "Manage devfs permissions and old device name symlinks" \ 654 "Manage devfs permissions and old device name symlinks\n" \
653 "\n\nOptions:" \ 655 "\nOptions:" \
654 "\n mntpnt The mount point where devfs is mounted" \ 656 "\n mntpnt The mount point where devfs is mounted" \
655 "\n -v Print the protocol version numbers for devfsd" \ 657 "\n -v Print the protocol version numbers for devfsd" \
656 "\n and the kernel-side protocol version and exit" \ 658 "\n and the kernel-side protocol version and exit" \
657 USE_DEVFSD_FG_NP( \ 659 USE_DEVFSD_FG_NP( \
658 "\n -fg Run in foreground" \ 660 "\n -fg Run in foreground" \
659 "\n -np Exit after parsing the configuration file" \ 661 "\n -np Exit after parsing the configuration file" \
660 "\n and processing synthetic REGISTER events," \ 662 "\n and processing synthetic REGISTER events," \
661 "\n do not poll for events") 663 "\n do not poll for events" \
664 )
662 665
663/* -k is accepted but ignored for !HUMAN_READABLE, 666/* -k is accepted but ignored for !HUMAN_READABLE,
664 * but we won't mention this (unimportant) */ 667 * but we won't mention this (unimportant) */
@@ -672,15 +675,15 @@ USE_FEATURE_BRCTL_FANCY("\n" \
672 USE_FEATURE_HUMAN_READABLE("hmk") USE_FEATURE_DF_INODE("i") \ 675 USE_FEATURE_HUMAN_READABLE("hmk") USE_FEATURE_DF_INODE("i") \
673 DF_HAS_OPTIONS("] ") "[FILESYSTEM...]" 676 DF_HAS_OPTIONS("] ") "[FILESYSTEM...]"
674#define df_full_usage \ 677#define df_full_usage \
675 "Print filesystem usage statistics" \ 678 "Print filesystem usage statistics\n" \
676 DF_HAS_OPTIONS("\n\nOptions:") \ 679 DF_HAS_OPTIONS("\nOptions:") \
677 USE_FEATURE_HUMAN_READABLE( \ 680 USE_FEATURE_HUMAN_READABLE( \
678 "\n -h Human readable (e.g. 1K 243M 2G)" \ 681 "\n -h Human readable (e.g. 1K 243M 2G)" \
679 "\n -m 1024*1024 blocks" \ 682 "\n -m 1024*1024 blocks" \
680 "\n -k 1024 blocks" \ 683 "\n -k 1024 blocks" \
681 ) \ 684 ) \
682 USE_FEATURE_DF_INODE( \ 685 USE_FEATURE_DF_INODE( \
683 "\n -i Inodes" \ 686 "\n -i Inodes" \
684 ) 687 )
685#define df_example_usage \ 688#define df_example_usage \
686 "$ df\n" \ 689 "$ df\n" \
@@ -705,22 +708,22 @@ USE_FEATURE_BRCTL_FANCY("\n" \
705 "[-abdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2" 708 "[-abdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
706#define diff_full_usage \ 709#define diff_full_usage \
707 "Compare files line by line and output the differences between them.\n" \ 710 "Compare files line by line and output the differences between them.\n" \
708 "This diff implementation only supports unified diffs." \ 711 "This implementation supports unified diffs only.\n" \
709 "\n\nOptions:\n" \ 712 "\nOptions:" \
710 " -a Treat all files as text\n" \ 713 "\n -a Treat all files as text" \
711 " -b Ignore changes in the amount of whitespace\n" \ 714 "\n -b Ignore changes in the amount of whitespace" \
712 " -d Try hard to find a smaller set of changes\n" \ 715 "\n -d Try hard to find a smaller set of changes" \
713 " -i Ignore case differences\n" \ 716 "\n -i Ignore case differences" \
714 " -L Use LABEL instead of the filename in the unified header\n" \ 717 "\n -L Use LABEL instead of the filename in the unified header" \
715 " -N Treat absent files as empty\n" \ 718 "\n -N Treat absent files as empty" \
716 " -q Output only whether files differ\n" \ 719 "\n -q Output only whether files differ" \
717 " -r Recursively compare subdirectories\n" \ 720 "\n -r Recursively compare subdirectories" \
718 " -S Start with FILE when comparing directories\n" \ 721 "\n -S Start with FILE when comparing directories" \
719 " -T Make tabs line up by prefixing a tab when necessary\n" \ 722 "\n -T Make tabs line up by prefixing a tab when necessary" \
720 " -s Report when two files are the same\n" \ 723 "\n -s Report when two files are the same" \
721 " -t Expand tabs to spaces in output\n" \ 724 "\n -t Expand tabs to spaces in output" \
722 " -U Output LINES lines of context\n" \ 725 "\n -U Output LINES lines of context" \
723 " -w Ignore all whitespace" 726 "\n -w Ignore all whitespace" \
724 727
725#define dirname_trivial_usage \ 728#define dirname_trivial_usage \
726 "FILENAME" 729 "FILENAME"
@@ -735,22 +738,22 @@ USE_FEATURE_BRCTL_FANCY("\n" \
735#define dmesg_trivial_usage \ 738#define dmesg_trivial_usage \
736 "[-c] [-n LEVEL] [-s SIZE]" 739 "[-c] [-n LEVEL] [-s SIZE]"
737#define dmesg_full_usage \ 740#define dmesg_full_usage \
738 "Print or control the kernel ring buffer" \ 741 "Print or control the kernel ring buffer\n" \
739 "\n\nOptions:\n" \ 742 "\nOptions:" \
740 " -c Clear ring buffer after printing\n" \ 743 "\n -c Clear ring buffer after printing" \
741 " -n LEVEL Set console logging level\n" \ 744 "\n -n LEVEL Set console logging level" \
742 " -s SIZE Buffer size" 745 "\n -s SIZE Buffer size" \
743 746
744#define dnsd_trivial_usage \ 747#define dnsd_trivial_usage \
745 "[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]" 748 "[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]"
746#define dnsd_full_usage \ 749#define dnsd_full_usage \
747 "Small static DNS server daemon" \ 750 "Small static DNS server daemon\n" \
748 "\n\nOptions:\n" \ 751 "\nOptions:" \
749 " -c Config filename\n" \ 752 "\n -c Config filename" \
750 " -t TTL in seconds\n" \ 753 "\n -t TTL in seconds" \
751 " -p Listening port\n" \ 754 "\n -p Listening port" \
752 " -i Listening ip (default all)\n" \ 755 "\n -i Listening ip (default all)" \
753 " -d Daemonize" 756 "\n -d Daemonize" \
754 757
755#define dos2unix_trivial_usage \ 758#define dos2unix_trivial_usage \
756 "[option] [FILE]" 759 "[option] [FILE]"
@@ -759,31 +762,32 @@ USE_FEATURE_BRCTL_FANCY("\n" \
759 "When no file is given, use stdin/stdout.\n" \ 762 "When no file is given, use stdin/stdout.\n" \
760 "\nOptions:" \ 763 "\nOptions:" \
761 "\n -u dos2unix" \ 764 "\n -u dos2unix" \
762 "\n -d unix2dos" 765 "\n -d unix2dos" \
763 766
764#define dpkg_trivial_usage \ 767#define dpkg_trivial_usage \
765 "[-ilCPru] [-F option] package_name" 768 "[-ilCPru] [-F option] package_name"
766#define dpkg_full_usage \ 769#define dpkg_full_usage \
767 "Install, remove and manage Debian packages" \ 770 "Install, remove and manage Debian packages\n" \
768 "\n\nOptions:\n" \ 771 "\nOptions:" \
769 " -i Install the package\n" \ 772 "\n -i Install the package" \
770 " -l List of installed packages\n" \ 773 "\n -l List of installed packages" \
771 " -C Configure an unpackaged package\n" \ 774 "\n -C Configure an unpackaged package" \
772 " -F depends Ignore dependency problems\n" \ 775 "\n -F depends Ignore dependency problems" \
773 " -P Purge all files of a package\n" \ 776 "\n -P Purge all files of a package" \
774 " -r Remove all but the configuration files for a package\n" \ 777 "\n -r Remove all but the configuration files for a package" \
775 " -u Unpack a package, but don't configure it" 778 "\n -u Unpack a package, but don't configure it" \
776 779
777#define dpkg_deb_trivial_usage \ 780#define dpkg_deb_trivial_usage \
778 "[-cefxX] FILE [argument]" 781 "[-cefxX] FILE [argument]"
779#define dpkg_deb_full_usage \ 782#define dpkg_deb_full_usage \
780 "Perform actions on Debian packages (.debs)" \ 783 "Perform actions on Debian packages (.debs)\n" \
781 "\n\nOptions:\n" \ 784 "\nOptions:" \
782 " -c List contents of filesystem tree\n" \ 785 "\n -c List contents of filesystem tree" \
783 " -e Extract control files to [argument] directory\n" \ 786 "\n -e Extract control files to [argument] directory" \
784 " -f Display control field name starting with [argument]\n" \ 787 "\n -f Display control field name starting with [argument]" \
785 " -x Extract packages filesystem tree to directory\n" \ 788 "\n -x Extract packages filesystem tree to directory" \
786 " -X Verbose extract" 789 "\n -X Verbose extract" \
790
787#define dpkg_deb_example_usage \ 791#define dpkg_deb_example_usage \
788 "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n" 792 "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
789 793
@@ -794,22 +798,23 @@ USE_FEATURE_BRCTL_FANCY("\n" \
794 "Disk space is printed in units of " \ 798 "Disk space is printed in units of " \
795 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \ 799 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
796 SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \ 800 SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
797 " bytes." \ 801 " bytes.\n" \
798 "\n\nOptions:\n" \ 802 "\nOptions:" \
799 " -a Show file sizes too\n" \ 803 "\n -a Show file sizes too" \
800 " -H Follow symlinks on command line\n" \ 804 "\n -H Follow symlinks on command line" \
801 " -L Follow all symlinks\n" \ 805 "\n -L Follow all symlinks" \
802 " -d N Limit output to directories (and files with -a) of depth < N\n" \ 806 "\n -d N Limit output to directories (and files with -a) of depth < N" \
803 " -c Show grand total\n" \ 807 "\n -c Show grand total" \
804 " -l Count sizes many times if hard linked\n" \ 808 "\n -l Count sizes many times if hard linked" \
805 " -s Display only a total for each argument\n" \ 809 "\n -s Display only a total for each argument" \
806 " -x Skip directories on different filesystems\n" \ 810 "\n -x Skip directories on different filesystems" \
807 USE_FEATURE_HUMAN_READABLE( \ 811 USE_FEATURE_HUMAN_READABLE( \
808 " -h Sizes in human readable format (e.g., 1K 243M 2G )\n" \ 812 "\n -h Sizes in human readable format (e.g., 1K 243M 2G )" \
809 " -m Sizes in megabytes\n" \ 813 "\n -m Sizes in megabytes" \
810 ) \ 814 ) \
811 " -k Sizes in kilobytes" \ 815 "\n -k Sizes in kilobytes" \
812 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("(default)") 816 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \
817
813#define du_example_usage \ 818#define du_example_usage \
814 "$ du\n" \ 819 "$ du\n" \
815 "16 ./CVS\n" \ 820 "16 ./CVS\n" \
@@ -833,17 +838,17 @@ USE_FEATURE_BRCTL_FANCY("\n" \
833#define dumpleases_trivial_usage \ 838#define dumpleases_trivial_usage \
834 "[-r|-a] [-f LEASEFILE]" 839 "[-r|-a] [-f LEASEFILE]"
835#define dumpleases_full_usage \ 840#define dumpleases_full_usage \
836 "Display DHCP leases granted by udhcpd" \ 841 "Display DHCP leases granted by udhcpd\n" \
837 "\n\nOptions:\n" \ 842 "\nOptions:" \
838 USE_GETOPT_LONG( \ 843 USE_GETOPT_LONG( \
839 " -f,--file=FILE Leases file to load\n" \ 844 "\n -f,--file=FILE Leases file to load" \
840 " -r,--remaining Interpret lease times as time remaining\n" \ 845 "\n -r,--remaining Interpret lease times as time remaining" \
841 " -a,--absolute Interpret lease times as expire time" \ 846 "\n -a,--absolute Interpret lease times as expire time" \
842 ) \ 847 ) \
843 SKIP_GETOPT_LONG( \ 848 SKIP_GETOPT_LONG( \
844 " -f FILE Leases file to load\n" \ 849 "\n -f FILE Leases file to load" \
845 " -r Interpret lease times as time remaining\n" \ 850 "\n -r Interpret lease times as time remaining" \
846 " -a Interpret lease times as expire time" \ 851 "\n -a Interpret lease times as expire time" \
847 ) 852 )
848 853
849#define e2fsck_trivial_usage \ 854#define e2fsck_trivial_usage \
@@ -852,29 +857,29 @@ USE_FEATURE_BRCTL_FANCY("\n" \
852 "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \ 857 "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \
853 "[-E extended-options] device" 858 "[-E extended-options] device"
854#define e2fsck_full_usage \ 859#define e2fsck_full_usage \
855 "Check ext2/ext3 file system" \ 860 "Check ext2/ext3 file system\n" \
856 "\n\nOptions:\n" \ 861 "\nOptions:" \
857 " -p Automatic repair (no questions)\n" \ 862 "\n -p Automatic repair (no questions)" \
858 " -n Make no changes to the filesystem\n" \ 863 "\n -n Make no changes to the filesystem" \
859 " -y Assume 'yes' to all questions\n" \ 864 "\n -y Assume 'yes' to all questions" \
860 " -c Check for bad blocks and add them to the badblock list\n" \ 865 "\n -c Check for bad blocks and add them to the badblock list" \
861 " -f Force checking even if filesystem is marked clean\n" \ 866 "\n -f Force checking even if filesystem is marked clean" \
862 " -v Verbose\n" \ 867 "\n -v Verbose" \
863 " -b superblock Use alternative superblock\n" \ 868 "\n -b superblock Use alternative superblock" \
864 " -B blocksize Force blocksize when looking for superblock\n" \ 869 "\n -B blocksize Force blocksize when looking for superblock" \
865 " -j journal Set location of the external journal\n" \ 870 "\n -j journal Set location of the external journal" \
866 " -l file Add to badblocks list\n" \ 871 "\n -l file Add to badblocks list" \
867 " -L file Set badblocks list" 872 "\n -L file Set badblocks list" \
868 873
869#define echo_trivial_usage \ 874#define echo_trivial_usage \
870 USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG...]" 875 USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG...]"
871#define echo_full_usage \ 876#define echo_full_usage \
872 "Print the specified ARGs to stdout" \ 877 "Print the specified ARGs to stdout" \
873 USE_FEATURE_FANCY_ECHO( \ 878 USE_FEATURE_FANCY_ECHO( "\n" \
874 "\n\nOptions:\n" \ 879 "\nOptions:" \
875 " -n Suppress trailing newline\n" \ 880 "\n -n Suppress trailing newline" \
876 " -e Interpret backslash-escaped characters (i.e., \\t=tab)\n" \ 881 "\n -e Interpret backslash-escaped characters (i.e., \\t=tab)" \
877 " -E Disable interpretation of backslash-escaped characters" \ 882 "\n -E Disable interpretation of backslash-escaped characters" \
878 ) 883 )
879#define echo_example_usage \ 884#define echo_example_usage \
880 "$ echo \"Erik is cool\"\n" \ 885 "$ echo \"Erik is cool\"\n" \
@@ -889,13 +894,13 @@ USE_FEATURE_BRCTL_FANCY("\n" \
889#define eject_trivial_usage \ 894#define eject_trivial_usage \
890 "[-t] [-T] [DEVICE]" 895 "[-t] [-T] [DEVICE]"
891#define eject_full_usage \ 896#define eject_full_usage \
892 "Eject specified DEVICE (or default /dev/cdrom)" \ 897 "Eject specified DEVICE (or default /dev/cdrom)\n" \
893 "\n\nOptions:\n" \ 898 "\nOptions:" \
894 USE_FEATURE_EJECT_SCSI( \ 899 USE_FEATURE_EJECT_SCSI( \
895 " -s scsi device\n" \ 900 "\n -s SCSI device" \
896 ) \ 901 ) \
897 " -t Close tray\n" \ 902 "\n -t Close tray" \
898 " -T Open/close tray (toggle)" 903 "\n -T Open/close tray (toggle)" \
899 904
900#define ed_trivial_usage "" 905#define ed_trivial_usage ""
901#define ed_full_usage "" 906#define ed_full_usage ""
@@ -904,40 +909,41 @@ USE_FEATURE_BRCTL_FANCY("\n" \
904 "[-iu] [-] [name=value]... [command]" 909 "[-iu] [-] [name=value]... [command]"
905#define env_full_usage \ 910#define env_full_usage \
906 "Print the current environment or run a program after setting\n" \ 911 "Print the current environment or run a program after setting\n" \
907 "up the specified environment" \ 912 "up the specified environment\n" \
908 "\n\nOptions:\n" \ 913 "\nOptions:" \
909 " -, -i Start with an empty environment\n" \ 914 "\n -, -i Start with an empty environment" \
910 " -u Remove variable from the environment" 915 "\n -u Remove variable from the environment" \
911 916
912#define ether_wake_trivial_usage \ 917#define ether_wake_trivial_usage \
913 "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC" 918 "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
914#define ether_wake_full_usage \ 919#define ether_wake_full_usage \
915 "Send a magic packet to wake up sleeping machines.\n" \ 920 "Send a magic packet to wake up sleeping machines.\n" \
916 "MAC must be a station address (00:11:22:33:44:55) or\n" \ 921 "MAC must be a station address (00:11:22:33:44:55) or\n" \
917 "a hostname with a known 'ethers' entry." \ 922 "a hostname with a known 'ethers' entry.\n" \
918 "\n\nOptions:\n" \ 923 "\nOptions:" \
919 " -b Send wake-up packet to the broadcast address\n" \ 924 "\n -b Send wake-up packet to the broadcast address" \
920 " -i iface Use interface ifname instead of the default \"eth0\"\n" \ 925 "\n -i iface Interface to use (default eth0)" \
921 " -p pass Append the four or six byte password PW to the packet" 926 "\n -p pass Append four or six byte password PW to the packet" \
922 927
923#define expand_trivial_usage \ 928#define expand_trivial_usage \
924 "[-i] [-t NUM] [FILE|-]" 929 "[-i] [-t NUM] [FILE|-]"
925#define expand_full_usage \ 930#define expand_full_usage \
926 "Convert tabs to spaces, writing to standard output." \ 931 "Convert tabs to spaces, writing to standard output.\n" \
927 "\n\nOptions:" \ 932 "\nOptions:" \
928 USE_FEATURE_EXPAND_LONG_OPTIONS( \ 933 USE_FEATURE_EXPAND_LONG_OPTIONS( \
929 "\n -i,--initial Do not convert tabs after non blanks" \ 934 "\n -i,--initial Do not convert tabs after non blanks" \
930 "\n -t,--tabs=N Tabstops every N chars" \ 935 "\n -t,--tabs=N Tabstops every N chars" \
931 ) \ 936 ) \
932 SKIP_FEATURE_EXPAND_LONG_OPTIONS( \ 937 SKIP_FEATURE_EXPAND_LONG_OPTIONS( \
933 "\n -i Do not convert tabs after non blanks" \ 938 "\n -i Do not convert tabs after non blanks" \
934 "\n -t Tabstops every N chars" \ 939 "\n -t Tabstops every N chars" \
935 ) 940 )
936 941
937#define expr_trivial_usage \ 942#define expr_trivial_usage \
938 "EXPRESSION" 943 "EXPRESSION"
939#define expr_full_usage \ 944#define expr_full_usage \
940 "Print the value of EXPRESSION to standard output.\n\n" \ 945 "Print the value of EXPRESSION to standard output.\n" \
946 "\n" \
941 "EXPRESSION may be:\n" \ 947 "EXPRESSION may be:\n" \
942 " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \ 948 " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \
943 " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \ 949 " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \
@@ -960,7 +966,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
960 " quote TOKEN Interpret TOKEN as a string, even if\n" \ 966 " quote TOKEN Interpret TOKEN as a string, even if\n" \
961 " it is a keyword like 'match' or an\n" \ 967 " it is a keyword like 'match' or an\n" \
962 " operator like '/'\n" \ 968 " operator like '/'\n" \
963 " (EXPRESSION) Value of EXPRESSION\n\n" \ 969 " (EXPRESSION) Value of EXPRESSION\n" \
970 "\n" \
964 "Beware that many operators need to be escaped or quoted for shells.\n" \ 971 "Beware that many operators need to be escaped or quoted for shells.\n" \
965 "Comparisons are arithmetic if both ARGs are numbers, else\n" \ 972 "Comparisons are arithmetic if both ARGs are numbers, else\n" \
966 "lexicographical. Pattern matches return the string matched between\n" \ 973 "lexicographical. Pattern matches return the string matched between\n" \
@@ -970,13 +977,13 @@ USE_FEATURE_BRCTL_FANCY("\n" \
970#define fakeidentd_trivial_usage \ 977#define fakeidentd_trivial_usage \
971 "[-fiw] [-b ADDR] [STRING]" 978 "[-fiw] [-b ADDR] [STRING]"
972#define fakeidentd_full_usage \ 979#define fakeidentd_full_usage \
973 "Provide fake ident (auth) service" \ 980 "Provide fake ident (auth) service\n" \
974 "\n\nOptions:" \ 981 "\nOptions:" \
975 "\n -f Run in foreground" \ 982 "\n -f Run in foreground" \
976 "\n -i Inetd mode" \ 983 "\n -i Inetd mode" \
977 "\n -w Inetd 'wait' mode" \ 984 "\n -w Inetd 'wait' mode" \
978 "\n -b ADDR Bind to specified address" \ 985 "\n -b ADDR Bind to specified address" \
979 "\n STRING Ident answer string (default is 'nobody')" 986 "\n STRING Ident answer string (default is 'nobody')" \
980 987
981#define false_trivial_usage \ 988#define false_trivial_usage \
982 "" 989 ""
@@ -991,6 +998,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
991 "[options] [mode]" 998 "[options] [mode]"
992#define fbset_full_usage \ 999#define fbset_full_usage \
993 "Show and modify frame buffer settings" 1000 "Show and modify frame buffer settings"
1001
994#define fbset_example_usage \ 1002#define fbset_example_usage \
995 "$ fbset\n" \ 1003 "$ fbset\n" \
996 "mode \"1024x768-76\"\n" \ 1004 "mode \"1024x768-76\"\n" \
@@ -1009,9 +1017,9 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1009#define fdformat_trivial_usage \ 1017#define fdformat_trivial_usage \
1010 "[-n] DEVICE" 1018 "[-n] DEVICE"
1011#define fdformat_full_usage \ 1019#define fdformat_full_usage \
1012 "Format floppy disk" \ 1020 "Format floppy disk\n" \
1013 "\n\nOptions:\n" \ 1021 "\nOptions:" \
1014 " -n Don't verify after format" 1022 "\n -n Don't verify after format" \
1015 1023
1016/* Looks like someone forgot to add this to config system */ 1024/* Looks like someone forgot to add this to config system */
1017#ifndef ENABLE_FEATURE_FDISK_BLKSIZE 1025#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
@@ -1038,15 +1046,15 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1038#define fetchmail_trivial_usage \ 1046#define fetchmail_trivial_usage \
1039 "[-w timeout] [-U user] -P password [-X] [-t] [-z] server[:port] maildir [prog]" 1047 "[-w timeout] [-U user] -P password [-X] [-t] [-z] server[:port] maildir [prog]"
1040#define fetchmail_full_usage \ 1048#define fetchmail_full_usage \
1041 "Fetch content of remote mailbox to local Maildir." \ 1049 "Fetch content of remote mailbox to local Maildir.\n" \
1042 "\n\nOptions:\n" \ 1050 "\nOptions:" \
1043 " -w timeout Set timeout on network operations\n" \ 1051 "\n -w timeout Set timeout on network operations" \
1044 " -U username Authenticate with specified username/password\n" \ 1052 "\n -U username Authenticate with specified username/password" \
1045 " -P password\n" \ 1053 "\n -P password" \
1046 " -X Use openssl connection helper for secured servers\n" \ 1054 "\n -X Use openssl connection helper for secured servers" \
1047 " -t Get only headers\n" \ 1055 "\n -t Get only headers" \
1048 " -z Delete messages on server\n" \ 1056 "\n -z Delete messages on server" \
1049 " prog Run prog <message_file> on message delivery" 1057 "\n prog Run prog <message_file> on message delivery" \
1050 1058
1051#define findfs_trivial_usage \ 1059#define findfs_trivial_usage \
1052 "LABEL=label or UUID=uuid" 1060 "LABEL=label or UUID=uuid"
@@ -1121,11 +1129,11 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1121 "[-bs] [-w WIDTH] [FILE]" 1129 "[-bs] [-w WIDTH] [FILE]"
1122#define fold_full_usage \ 1130#define fold_full_usage \
1123 "Wrap input lines in each FILE (standard input by default), writing to\n" \ 1131 "Wrap input lines in each FILE (standard input by default), writing to\n" \
1124 "standard output" \ 1132 "standard output\n" \
1125 "\n\nOptions:\n" \ 1133 "\nOptions:" \
1126 " -b Count bytes rather than columns\n" \ 1134 "\n -b Count bytes rather than columns" \
1127 " -s Break at spaces\n" \ 1135 "\n -s Break at spaces" \
1128 " -w Use WIDTH columns instead of 80" 1136 "\n -w Use WIDTH columns instead of 80" \
1129 1137
1130#define free_trivial_usage \ 1138#define free_trivial_usage \
1131 "" 1139 ""
@@ -1148,66 +1156,66 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1148#define fsck_trivial_usage \ 1156#define fsck_trivial_usage \
1149 "[-ANPRTV] [-C fd] [-t fstype] [fs-options] [filesys...]" 1157 "[-ANPRTV] [-C fd] [-t fstype] [fs-options] [filesys...]"
1150#define fsck_full_usage \ 1158#define fsck_full_usage \
1151 "Check and repair filesystems" \ 1159 "Check and repair filesystems\n" \
1152 "\n\nOptions:\n" \ 1160 "\nOptions:" \
1153 " -A Walk /etc/fstab and check all filesystems\n" \ 1161 "\n -A Walk /etc/fstab and check all filesystems" \
1154 " -N Don't execute, just show what would be done\n" \ 1162 "\n -N Don't execute, just show what would be done" \
1155 " -P When using -A, check filesystems in parallel\n" \ 1163 "\n -P With -A, check filesystems in parallel" \
1156 " -R When using -A, skip the root filesystem\n" \ 1164 "\n -R With -A, skip the root filesystem" \
1157 " -T Don't show title on startup\n" \ 1165 "\n -T Don't show title on startup" \
1158 " -V Verbose\n" \ 1166 "\n -V Verbose" \
1159 " -C n Write status information to specified filedescriptor\n" \ 1167 "\n -C n Write status information to specified filedescriptor" \
1160 " -t type List of filesystem types to check" 1168 "\n -t type List of filesystem types to check" \
1161 1169
1162#define fsck_minix_trivial_usage \ 1170#define fsck_minix_trivial_usage \
1163 "[-larvsmf] /dev/name" 1171 "[-larvsmf] /dev/name"
1164#define fsck_minix_full_usage \ 1172#define fsck_minix_full_usage \
1165 "Perform a consistency check for MINIX filesystems" \ 1173 "Perform a consistency check for MINIX filesystems\n" \
1166 "\n\nOptions:\n" \ 1174 "\nOptions:" \
1167 " -l List all filenames\n" \ 1175 "\n -l List all filenames" \
1168 " -r Perform interactive repairs\n" \ 1176 "\n -r Perform interactive repairs" \
1169 " -a Perform automatic repairs\n" \ 1177 "\n -a Perform automatic repairs" \
1170 " -v Verbose\n" \ 1178 "\n -v Verbose" \
1171 " -s Output super-block information\n" \ 1179 "\n -s Output super-block information" \
1172 " -m Activate MINIX-like \"mode not cleared\" warnings\n" \ 1180 "\n -m Activate MINIX-like \"mode not cleared\" warnings" \
1173 " -f Force file system check" 1181 "\n -f Force file system check" \
1174 1182
1175#define ftpget_trivial_usage \ 1183#define ftpget_trivial_usage \
1176 "[options] remote-host local-file remote-file" 1184 "[options] remote-host local-file remote-file"
1177#define ftpget_full_usage \ 1185#define ftpget_full_usage \
1178 "Retrieve a remote file via FTP" \ 1186 "Retrieve a remote file via FTP\n" \
1179 "\n\nOptions:\n" \ 1187 "\nOptions:" \
1180 USE_GETOPT_LONG( \ 1188 USE_GETOPT_LONG( \
1181 " -c,--continue Continue previous transfer\n" \ 1189 "\n -c,--continue Continue previous transfer" \
1182 " -v,--verbose Verbose\n" \ 1190 "\n -v,--verbose Verbose" \
1183 " -u,--username Username\n" \ 1191 "\n -u,--username Username" \
1184 " -p,--password Password\n" \ 1192 "\n -p,--password Password" \
1185 " -P,--port Port number" \ 1193 "\n -P,--port Port number" \
1186 ) \ 1194 ) \
1187 SKIP_GETOPT_LONG( \ 1195 SKIP_GETOPT_LONG( \
1188 " -c Continue previous transfer\n" \ 1196 "\n -c Continue previous transfer" \
1189 " -v Verbose\n" \ 1197 "\n -v Verbose" \
1190 " -u Username\n" \ 1198 "\n -u Username" \
1191 " -p Password\n" \ 1199 "\n -p Password" \
1192 " -P Port number" \ 1200 "\n -P Port number" \
1193 ) 1201 )
1194 1202
1195#define ftpput_trivial_usage \ 1203#define ftpput_trivial_usage \
1196 "[options] remote-host remote-file local-file" 1204 "[options] remote-host remote-file local-file"
1197#define ftpput_full_usage \ 1205#define ftpput_full_usage \
1198 "Store a local file on a remote machine via FTP" \ 1206 "Store a local file on a remote machine via FTP\n" \
1199 "\n\nOptions:\n" \ 1207 "\nOptions:" \
1200 USE_GETOPT_LONG( \ 1208 USE_GETOPT_LONG( \
1201 " -v,--verbose Verbose\n" \ 1209 "\n -v,--verbose Verbose" \
1202 " -u,--username Username\n" \ 1210 "\n -u,--username Username" \
1203 " -p,--password Password\n" \ 1211 "\n -p,--password Password" \
1204 " -P,--port Port number" \ 1212 "\n -P,--port Port number" \
1205 ) \ 1213 ) \
1206 SKIP_GETOPT_LONG( \ 1214 SKIP_GETOPT_LONG( \
1207 " -v Verbose\n" \ 1215 "\n -v Verbose" \
1208 " -u Username\n" \ 1216 "\n -u Username" \
1209 " -p Password\n" \ 1217 "\n -p Password" \
1210 " -P Port number" \ 1218 "\n -P Port number" \
1211 ) 1219 )
1212 1220
1213#define fuser_trivial_usage \ 1221#define fuser_trivial_usage \
@@ -1220,7 +1228,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1220 "\n -6 Search only IPv6 space" \ 1228 "\n -6 Search only IPv6 space" \
1221 "\n -s Silent: just exit with 0 if any processes are found" \ 1229 "\n -s Silent: just exit with 0 if any processes are found" \
1222 "\n -k Kill found processes (otherwise display PIDs)" \ 1230 "\n -k Kill found processes (otherwise display PIDs)" \
1223 "\n -SIGNAL Signal to send (default: TERM)" 1231 "\n -SIGNAL Signal to send (default: TERM)" \
1224 1232
1225#define getenforce_trivial_usage 1233#define getenforce_trivial_usage
1226#define getenforce_full_usage 1234#define getenforce_full_usage
@@ -1230,26 +1238,26 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1230#define getopt_full_usage \ 1238#define getopt_full_usage \
1231 "Parse command options\n" \ 1239 "Parse command options\n" \
1232 USE_GETOPT_LONG( \ 1240 USE_GETOPT_LONG( \
1233 " -a,--alternative Allow long options starting with single -\n" \ 1241 "\n -a,--alternative Allow long options starting with single -" \
1234 " -l,--longoptions=longopts Long options to be recognized\n" \ 1242 "\n -l,--longoptions=longopts Long options to be recognized" \
1235 " -n,--name=progname The name under which errors are reported\n" \ 1243 "\n -n,--name=progname The name under which errors are reported" \
1236 " -o,--options=optstring Short options to be recognized\n" \ 1244 "\n -o,--options=optstring Short options to be recognized" \
1237 " -q,--quiet Disable error reporting by getopt(3)\n" \ 1245 "\n -q,--quiet Disable error reporting by getopt(3)" \
1238 " -Q,--quiet-output No normal output\n" \ 1246 "\n -Q,--quiet-output No normal output" \
1239 " -s,--shell=shell Set shell quoting conventions\n" \ 1247 "\n -s,--shell=shell Set shell quoting conventions" \
1240 " -T,--test Test for getopt(1) version\n" \ 1248 "\n -T,--test Test for getopt(1) version" \
1241 " -u,--unquoted Don't quote the output" \ 1249 "\n -u,--unquoted Don't quote the output" \
1242 ) \ 1250 ) \
1243 SKIP_GETOPT_LONG( \ 1251 SKIP_GETOPT_LONG( \
1244 " -a Allow long options starting with single -\n" \ 1252 "\n -a Allow long options starting with single -" \
1245 " -l longopts Long options to be recognized\n" \ 1253 "\n -l longopts Long options to be recognized" \
1246 " -n progname The name under which errors are reported\n" \ 1254 "\n -n progname The name under which errors are reported" \
1247 " -o optstring Short options to be recognized\n" \ 1255 "\n -o optstring Short options to be recognized" \
1248 " -q Disable error reporting by getopt(3)\n" \ 1256 "\n -q Disable error reporting by getopt(3)" \
1249 " -Q No normal output\n" \ 1257 "\n -Q No normal output" \
1250 " -s shell Set shell quoting conventions\n" \ 1258 "\n -s shell Set shell quoting conventions" \
1251 " -T Test for getopt(1) version\n" \ 1259 "\n -T Test for getopt(1) version" \
1252 " -u Don't quote the output" \ 1260 "\n -u Don't quote the output" \
1253 ) 1261 )
1254#define getopt_example_usage \ 1262#define getopt_example_usage \
1255 "$ cat getopt.test\n" \ 1263 "$ cat getopt.test\n" \
@@ -1278,21 +1286,21 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1278 " -a Show all SELinux booleans" 1286 " -a Show all SELinux booleans"
1279 1287
1280#define getty_trivial_usage \ 1288#define getty_trivial_usage \
1281 "[OPTIONS]... baud_rate,... line [termtype]" 1289 "[OPTIONS] BAUD_RATE TTY [TERMTYPE]"
1282#define getty_full_usage \ 1290#define getty_full_usage \
1283 "Open a tty, prompt for a login name, then invoke /bin/login" \ 1291 "Open a tty, prompt for a login name, then invoke /bin/login\n" \
1284 "\n\nOptions:\n" \ 1292 "\nOptions:" \
1285 " -h Enable hardware (RTS/CTS) flow control\n" \ 1293 "\n -h Enable hardware (RTS/CTS) flow control" \
1286 " -i Do not display /etc/issue before running login\n" \ 1294 "\n -i Do not display /etc/issue before running login" \
1287 " -L Local line, do not do carrier detect\n" \ 1295 "\n -L Local line, do not do carrier detect" \
1288 " -m Get baud rate from modem's CONNECT status message\n" \ 1296 "\n -m Get baud rate from modem's CONNECT status message" \
1289 " -w Wait for a CR or LF before sending /etc/issue\n" \ 1297 "\n -w Wait for a CR or LF before sending /etc/issue" \
1290 " -n Do not prompt the user for a login name\n" \ 1298 "\n -n Do not prompt the user for a login name" \
1291 " -f issue_file Display issue_file instead of /etc/issue\n" \ 1299 "\n -f issue_file Display issue_file instead of /etc/issue" \
1292 " -l login_app Invoke login_app instead of /bin/login\n" \ 1300 "\n -l login_app Invoke login_app instead of /bin/login" \
1293 " -t timeout Terminate after timeout if no username is read\n" \ 1301 "\n -t timeout Terminate after timeout if no username is read" \
1294 " -I initstring Sets the init string to send before anything else\n" \ 1302 "\n -I initstring Init string to send before anything else" \
1295 " -H login_host Log login_host into the utmp file as the hostname" 1303 "\n -H login_host Log login_host into the utmp file as the hostname" \
1296 1304
1297#define grep_trivial_usage \ 1305#define grep_trivial_usage \
1298 "[-HhrilLnqvso" \ 1306 "[-HhrilLnqvso" \
@@ -1302,32 +1310,32 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1302 USE_FEATURE_GREP_CONTEXT("ABC") \ 1310 USE_FEATURE_GREP_CONTEXT("ABC") \
1303 "] PATTERN [FILEs...]" 1311 "] PATTERN [FILEs...]"
1304#define grep_full_usage \ 1312#define grep_full_usage \
1305 "Search for PATTERN in each FILE or standard input" \ 1313 "Search for PATTERN in each FILE or standard input\n" \
1306 "\n\nOptions:" \ 1314 "\nOptions:" \
1307 "\n -H Prefix output lines with filename where match was found" \ 1315 "\n -H Prefix output lines with filename where match was found" \
1308 "\n -h Suppress the prefixing filename on output" \ 1316 "\n -h Suppress the prefixing filename on output" \
1309 "\n -r Recurse subdirectories" \ 1317 "\n -r Recurse subdirectories" \
1310 "\n -i Ignore case distinctions" \ 1318 "\n -i Ignore case distinctions" \
1311 "\n -l List names of files that match" \ 1319 "\n -l List names of files that match" \
1312 "\n -L List names of files that do not match" \ 1320 "\n -L List names of files that do not match" \
1313 "\n -n Print line number with output lines" \ 1321 "\n -n Print line number with output lines" \
1314 "\n -q Quiet. Returns 0 if PATTERN was found, 1 otherwise" \ 1322 "\n -q Quiet. Return 0 if PATTERN is found, 1 otherwise" \
1315 "\n -v Select non-matching lines" \ 1323 "\n -v Select non-matching lines" \
1316 "\n -s Suppress file open/read error messages" \ 1324 "\n -s Suppress file open/read error messages" \
1317 "\n -c Only print count of matching lines" \ 1325 "\n -c Only print count of matching lines" \
1318 "\n -o Show only the part of a line that matches PATTERN" \ 1326 "\n -o Show only the part of a line that matches PATTERN" \
1319 "\n -m MAX Match up to MAX times per file" \ 1327 "\n -m MAX Match up to MAX times per file" \
1320 USE_DESKTOP( \ 1328 USE_DESKTOP( \
1321 "\n -w Match whole words only") \ 1329 "\n -w Match whole words only") \
1322 "\n -F PATTERN is a set of newline-separated strings" \ 1330 "\n -F PATTERN is a set of newline-separated strings" \
1323 USE_FEATURE_GREP_EGREP_ALIAS( \ 1331 USE_FEATURE_GREP_EGREP_ALIAS( \
1324 "\n -E PATTERN is an extended regular expression") \ 1332 "\n -E PATTERN is an extended regular expression") \
1325 "\n -e PTRN Pattern to match" \ 1333 "\n -e PTRN Pattern to match" \
1326 "\n -f FILE Read pattern from file" \ 1334 "\n -f FILE Read pattern from file" \
1327 USE_FEATURE_GREP_CONTEXT( \ 1335 USE_FEATURE_GREP_CONTEXT( \
1328 "\n -A Print NUM lines of trailing context" \ 1336 "\n -A Print NUM lines of trailing context" \
1329 "\n -B Print NUM lines of leading context" \ 1337 "\n -B Print NUM lines of leading context" \
1330 "\n -C Print NUM lines of output context") \ 1338 "\n -C Print NUM lines of output context") \
1331 1339
1332#define grep_example_usage \ 1340#define grep_example_usage \
1333 "$ grep root /etc/passwd\n" \ 1341 "$ grep root /etc/passwd\n" \
@@ -1336,13 +1344,14 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1336 "root:x:0:0:root:/root:/bin/bash\n" 1344 "root:x:0:0:root:/root:/bin/bash\n"
1337 1345
1338#define gunzip_trivial_usage \ 1346#define gunzip_trivial_usage \
1339 "[OPTION]... FILE" 1347 "[OPTION]... [FILE]..."
1340#define gunzip_full_usage \ 1348#define gunzip_full_usage \
1341 "Uncompress FILE (or standard input if FILE is '-')" \ 1349 "Uncompress FILEs (or standard input)\n" \
1342 "\n\nOptions:\n" \ 1350 "\nOptions:" \
1343 " -c Write to standard output\n" \ 1351 "\n -c Write to standard output" \
1344 " -f Force\n" \ 1352 "\n -f Force" \
1345 " -t Test file integrity" 1353 "\n -t Test file integrity" \
1354
1346#define gunzip_example_usage \ 1355#define gunzip_example_usage \
1347 "$ ls -la /tmp/BusyBox*\n" \ 1356 "$ ls -la /tmp/BusyBox*\n" \
1348 "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \ 1357 "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \
@@ -1353,12 +1362,12 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1353#define gzip_trivial_usage \ 1362#define gzip_trivial_usage \
1354 "[OPTION]... [FILE]..." 1363 "[OPTION]... [FILE]..."
1355#define gzip_full_usage \ 1364#define gzip_full_usage \
1356 "Compress FILE(s) with maximum compression.\n" \ 1365 "Compress FILEs (or standard input)\n" \
1357 "When FILE is '-' or unspecified, reads standard input. Implies -c." \ 1366 "\nOptions:" \
1358 "\n\nOptions:\n" \ 1367 "\n -c Write to standard output" \
1359 " -c Write to standard output\n" \ 1368 "\n -d Decompress" \
1360 " -d Decompress\n" \ 1369 "\n -f Force" \
1361 " -f Force" 1370
1362#define gzip_example_usage \ 1371#define gzip_example_usage \
1363 "$ ls -la /tmp/busybox*\n" \ 1372 "$ ls -la /tmp/busybox*\n" \
1364 "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \ 1373 "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \
@@ -1369,80 +1378,79 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1369#define halt_trivial_usage \ 1378#define halt_trivial_usage \
1370 "[-d delay] [-n] [-f]" 1379 "[-d delay] [-n] [-f]"
1371#define halt_full_usage \ 1380#define halt_full_usage \
1372 "Halt the system" \ 1381 "Halt the system\n" \
1373 "\n\nOptions:" \ 1382 "\nOptions:" \
1374 "\n -d Delay interval for halting" \ 1383 "\n -d Delay interval for halting" \
1375 "\n -n No call to sync()" \ 1384 "\n -n No call to sync()" \
1376 "\n -f Force halt (don't go through init)" \ 1385 "\n -f Force halt (don't go through init)" \
1377 USE_FEATURE_WTMP( \ 1386 USE_FEATURE_WTMP( \
1378 "\n -w Only write a wtmp record" \ 1387 "\n -w Only write a wtmp record" \
1379 ) 1388 )
1380 1389
1381#define hdparm_trivial_usage \ 1390#define hdparm_trivial_usage \
1382 "[options] [device] .." 1391 "[options] [device] .."
1383#define hdparm_full_usage \ 1392#define hdparm_full_usage \
1384 USE_FEATURE_HDPARM_GET_IDENTITY( \ 1393 "Options:" \
1385 "If no device name is specified try to read from stdin.\n\n") \ 1394 "\n -a Get/set fs readahead" \
1386 "Options:\n" \ 1395 "\n -A Set drive read-lookahead flag (0/1)" \
1387 " -a Get/set fs readahead\n" \ 1396 "\n -b Get/set bus state (0 == off, 1 == on, 2 == tristate)" \
1388 " -A Set drive read-lookahead flag (0/1)\n" \ 1397 "\n -B Set Advanced Power Management setting (1-255)" \
1389 " -b Get/set bus state (0 == off, 1 == on, 2 == tristate)\n" \ 1398 "\n -c Get/set IDE 32-bit IO setting" \
1390 " -B Set Advanced Power Management setting (1-255)\n" \ 1399 "\n -C Check IDE power mode status" \
1391 " -c Get/set IDE 32-bit IO setting\n" \
1392 " -C Check IDE power mode status\n" \
1393 USE_FEATURE_HDPARM_HDIO_GETSET_DMA( \ 1400 USE_FEATURE_HDPARM_HDIO_GETSET_DMA( \
1394 " -d Get/set using_dma flag\n") \ 1401 "\n -d Get/set using_dma flag") \
1395 " -D Enable/disable drive defect-mgmt\n" \ 1402 "\n -D Enable/disable drive defect-mgmt" \
1396 " -f Flush buffer cache for device on exit\n" \ 1403 "\n -f Flush buffer cache for device on exit" \
1397 " -g Display drive geometry\n" \ 1404 "\n -g Display drive geometry" \
1398 " -h Display terse usage information\n" \ 1405 "\n -h Display terse usage information" \
1399 USE_FEATURE_HDPARM_GET_IDENTITY( \ 1406 USE_FEATURE_HDPARM_GET_IDENTITY( \
1400 " -i Display drive identification\n") \ 1407 "\n -i Display drive identification") \
1401 USE_FEATURE_HDPARM_GET_IDENTITY( \ 1408 USE_FEATURE_HDPARM_GET_IDENTITY( \
1402 " -I Detailed/current information directly from drive\n") \ 1409 "\n -I Detailed/current information directly from drive") \
1403 " -k Get/set keep_settings_over_reset flag (0/1)\n" \ 1410 "\n -k Get/set keep_settings_over_reset flag (0/1)" \
1404 " -K Set drive keep_features_over_reset flag (0/1)\n" \ 1411 "\n -K Set drive keep_features_over_reset flag (0/1)" \
1405 " -L Set drive doorlock (0/1) (removable harddisks only)\n" \ 1412 "\n -L Set drive doorlock (0/1) (removable harddisks only)" \
1406 " -m Get/set multiple sector count\n" \ 1413 "\n -m Get/set multiple sector count" \
1407 " -n Get/set ignore-write-errors flag (0/1)\n" \ 1414 "\n -n Get/set ignore-write-errors flag (0/1)" \
1408 " -p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)\n" \ 1415 "\n -p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)" \
1409 " -P Set drive prefetch count\n" \ 1416 "\n -P Set drive prefetch count" \
1410 " -q Change next setting quietly\n" \ 1417 "\n -q Change next setting quietly" \
1411 " -Q Get/set DMA tagged-queuing depth (if supported)\n" \ 1418 "\n -Q Get/set DMA tagged-queuing depth (if supported)" \
1412 " -r Get/set readonly flag (DANGEROUS to set)\n" \ 1419 "\n -r Get/set readonly flag (DANGEROUS to set)" \
1413 USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( \ 1420 USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
1414 " -R Register an IDE interface (DANGEROUS)\n") \ 1421 "\n -R Register an IDE interface (DANGEROUS)") \
1415 " -S Set standby (spindown) timeout\n" \ 1422 "\n -S Set standby (spindown) timeout" \
1416 " -t Perform device read timings\n" \ 1423 "\n -t Perform device read timings" \
1417 " -T Perform cache read timings\n" \ 1424 "\n -T Perform cache read timings" \
1418 " -u Get/set unmaskirq flag (0/1)\n" \ 1425 "\n -u Get/set unmaskirq flag (0/1)" \
1419 USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \ 1426 USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
1420 " -U Un-register an IDE interface (DANGEROUS)\n") \ 1427 "\n -U Un-register an IDE interface (DANGEROUS)") \
1421 " -v Defaults; same as -mcudkrag for IDE drives\n" \ 1428 "\n -v Defaults; same as -mcudkrag for IDE drives" \
1422 " -V Display program version and exit immediately\n" \ 1429 "\n -V Display program version and exit immediately" \
1423 USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( \ 1430 USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
1424 " -w Perform device reset (DANGEROUS)\n") \ 1431 "\n -w Perform device reset (DANGEROUS)") \
1425 " -W Set drive write-caching flag (0/1) (DANGEROUS)\n" \ 1432 "\n -W Set drive write-caching flag (0/1) (DANGEROUS)" \
1426 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \ 1433 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
1427 " -x Tristate device for hotswap (0/1) (DANGEROUS)\n") \ 1434 "\n -x Tristate device for hotswap (0/1) (DANGEROUS)") \
1428 " -X Set IDE xfer mode (DANGEROUS)\n" \ 1435 "\n -X Set IDE xfer mode (DANGEROUS)" \
1429 " -y Put IDE drive in standby mode\n" \ 1436 "\n -y Put IDE drive in standby mode" \
1430 " -Y Put IDE drive to sleep\n" \ 1437 "\n -Y Put IDE drive to sleep" \
1431 " -Z Disable Seagate auto-powersaving mode\n" \ 1438 "\n -Z Disable Seagate auto-powersaving mode" \
1432 " -z Re-read partition table" 1439 "\n -z Re-read partition table" \
1433 1440
1434#define head_trivial_usage \ 1441#define head_trivial_usage \
1435 "[OPTION]... [FILE]..." 1442 "[OPTION]... [FILE]..."
1436#define head_full_usage \ 1443#define head_full_usage \
1437 "Print first 10 lines of each FILE to standard output.\n" \ 1444 "Print first 10 lines of each FILE to standard output.\n" \
1438 "With more than one FILE, precede each with a header giving the\n" \ 1445 "With more than one FILE, precede each with a header giving the\n" \
1439 "file name. With no FILE, or when FILE is -, read standard input." \ 1446 "file name. With no FILE, or when FILE is -, read standard input.\n" \
1440 "\n\nOptions:" \ 1447 "\nOptions:" \
1441 "\n -n NUM Print first NUM lines instead of first 10" \ 1448 "\n -n NUM Print first NUM lines instead of first 10" \
1442 USE_FEATURE_FANCY_HEAD( \ 1449 USE_FEATURE_FANCY_HEAD( \
1443 "\n -c NUM Output the first NUM bytes" \ 1450 "\n -c NUM Output the first NUM bytes" \
1444 "\n -q Never output headers giving file names" \ 1451 "\n -q Never output headers giving file names" \
1445 "\n -v Always output headers giving file names") 1452 "\n -v Always output headers giving file names") \
1453
1446#define head_example_usage \ 1454#define head_example_usage \
1447 "$ head -n 2 /etc/passwd\n" \ 1455 "$ head -n 2 /etc/passwd\n" \
1448 "root:x:0:0:root:/root:/bin/bash\n" \ 1456 "root:x:0:0:root:/root:/bin/bash\n" \
@@ -1451,8 +1459,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1451#define hexdump_trivial_usage \ 1459#define hexdump_trivial_usage \
1452 "[-bcCdefnosvx" USE_FEATURE_HEXDUMP_REVERSE("R") "] FILE..." 1460 "[-bcCdefnosvx" USE_FEATURE_HEXDUMP_REVERSE("R") "] FILE..."
1453#define hexdump_full_usage \ 1461#define hexdump_full_usage \
1454 "Display file(s) or standard input in a user specified format" \ 1462 "Display file(s) or standard input in a user specified format\n" \
1455 "\n\nOptions:" \ 1463 "\nOptions:" \
1456 "\n -b One-byte octal display" \ 1464 "\n -b One-byte octal display" \
1457 "\n -c One-byte character display" \ 1465 "\n -c One-byte character display" \
1458 "\n -C Canonical hex+ASCII, 16 bytes per line" \ 1466 "\n -C Canonical hex+ASCII, 16 bytes per line" \
@@ -1478,16 +1486,16 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1478 "Print out a unique 32-bit identifier for the machine" 1486 "Print out a unique 32-bit identifier for the machine"
1479 1487
1480#define hostname_trivial_usage \ 1488#define hostname_trivial_usage \
1481 "[OPTION] {hostname | -F FILE}" 1489 "[OPTION] [hostname | -F FILE]"
1482#define hostname_full_usage \ 1490#define hostname_full_usage \
1483 "Get or set the hostname or DNS domain name. If a hostname is given\n" \ 1491 "Get or set hostname or DNS domain name\n" \
1484 "(or FILE with the -F parameter), the host name will be set." \ 1492 "\nOptions:" \
1485 "\n\nOptions:\n" \ 1493 "\n -s Short" \
1486 " -s Short\n" \ 1494 "\n -i Addresses for the hostname" \
1487 " -i Addresses for the hostname\n" \ 1495 "\n -d DNS domain name" \
1488 " -d DNS domain name\n" \ 1496 "\n -f Fully qualified domain name" \
1489 " -f Fully qualified domain name\n" \ 1497 "\n -F FILE Use the contents of FILE to specify the hostname" \
1490 " -F FILE Use the contents of FILE to specify the hostname" 1498
1491#define hostname_example_usage \ 1499#define hostname_example_usage \
1492 "$ hostname\n" \ 1500 "$ hostname\n" \
1493 "sage\n" 1501 "sage\n"
@@ -1502,22 +1510,22 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1502 " [-h home]" \ 1510 " [-h home]" \
1503 " [-d/-e string]" 1511 " [-d/-e string]"
1504#define httpd_full_usage \ 1512#define httpd_full_usage \
1505 "Listen for incoming HTTP requests" \ 1513 "Listen for incoming HTTP requests\n" \
1506 "\n\nOptions:" \ 1514 "\nOptions:" \
1507 "\n -c FILE Configuration file (default httpd.conf)" \ 1515 "\n -c FILE Configuration file (default httpd.conf)" \
1508 "\n -p [IP:]PORT Bind to ip:port (default *:80)" \ 1516 "\n -p [IP:]PORT Bind to ip:port (default *:80)" \
1509 "\n -i Inetd mode" \ 1517 "\n -i Inetd mode" \
1510 "\n -f Do not daemonize" \ 1518 "\n -f Do not daemonize" \
1511 "\n -v[v] Verbose" \ 1519 "\n -v[v] Verbose" \
1512 USE_FEATURE_HTTPD_SETUID( \ 1520 USE_FEATURE_HTTPD_SETUID( \
1513 "\n -u USER[:GRP] Set uid/gid after binding to port") \ 1521 "\n -u USER[:GRP] Set uid/gid after binding to port") \
1514 USE_FEATURE_HTTPD_BASIC_AUTH( \ 1522 USE_FEATURE_HTTPD_BASIC_AUTH( \
1515 "\n -r REALM Authentication Realm for Basic Authentication") \ 1523 "\n -r REALM Authentication Realm for Basic Authentication") \
1516 USE_FEATURE_HTTPD_AUTH_MD5( \ 1524 USE_FEATURE_HTTPD_AUTH_MD5( \
1517 "\n -m PASS Crypt PASS with md5 algorithm") \ 1525 "\n -m PASS Crypt PASS with md5 algorithm") \
1518 "\n -h HOME Home directory (default .)" \ 1526 "\n -h HOME Home directory (default .)" \
1519 "\n -e STRING HTML encode STRING" \ 1527 "\n -e STRING HTML encode STRING" \
1520 "\n -d STRING URL decode STRING" \ 1528 "\n -d STRING URL decode STRING" \
1521 1529
1522#define hwclock_trivial_usage \ 1530#define hwclock_trivial_usage \
1523 USE_GETOPT_LONG( \ 1531 USE_GETOPT_LONG( \
@@ -1529,27 +1537,28 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1529 "[-r] [-s] [-w] [-l] [-u] [-f FILE]" \ 1537 "[-r] [-s] [-w] [-l] [-u] [-f FILE]" \
1530 ) 1538 )
1531#define hwclock_full_usage \ 1539#define hwclock_full_usage \
1532 "Query and set a hardware clock (RTC)" \ 1540 "Query and set hardware clock (RTC)\n" \
1533 "\n\nOptions:\n" \ 1541 "\nOptions:" \
1534 " -r Show time from hardware clock\n" \ 1542 "\n -r Show time from hardware clock" \
1535 " -s Set system time from hardware clock\n" \ 1543 "\n -s Set system time from hardware clock" \
1536 " -w Set hardware clock to system time\n" \ 1544 "\n -w Set hardware clock to system time" \
1537 " -u Hardware clock is in UTC\n" \ 1545 "\n -u Hardware clock is in UTC" \
1538 " -l Hardware clock is in local time\n" \ 1546 "\n -l Hardware clock is in local time" \
1539 " -f FILE Use specified device (e.g. /dev/rtc2)" 1547 "\n -f FILE Use specified device (e.g. /dev/rtc2)" \
1540 1548
1541#define id_trivial_usage \ 1549#define id_trivial_usage \
1542 "[OPTIONS]... [USERNAME]" 1550 "[OPTIONS]... [USER]"
1543#define id_full_usage \ 1551#define id_full_usage \
1544 "Print information for USERNAME or the current user" \ 1552 "Print information about USER or the current user\n" \
1545 "\n\nOptions:\n" \ 1553 "\nOptions:" \
1546 USE_SELINUX( \ 1554 USE_SELINUX( \
1547 " -Z Prints only the security context\n" \ 1555 "\n -Z Print the security context" \
1548 ) \ 1556 ) \
1549 " -g Prints only the group ID\n" \ 1557 "\n -g Print group ID" \
1550 " -u Prints only the user ID\n" \ 1558 "\n -u Print user ID" \
1551 " -n Print a name instead of a number\n" \ 1559 "\n -n Print name instead of a number" \
1552 " -r Prints the real user ID instead of the effective ID" 1560 "\n -r Print real user ID instead of effective ID" \
1561
1553#define id_example_usage \ 1562#define id_example_usage \
1554 "$ id\n" \ 1563 "$ id\n" \
1555 "uid=1000(andersen) gid=1000(andersen)\n" 1564 "uid=1000(andersen) gid=1000(andersen)\n"
@@ -1557,8 +1566,9 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1557#define ifconfig_trivial_usage \ 1566#define ifconfig_trivial_usage \
1558 USE_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]" 1567 USE_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
1559#define ifconfig_full_usage \ 1568#define ifconfig_full_usage \
1560 "Configure a network interface" \ 1569 "Configure a network interface\n" \
1561 "\n\nOptions:\n" \ 1570 "\nOptions:" \
1571 "\n" \
1562 USE_FEATURE_IPV6( \ 1572 USE_FEATURE_IPV6( \
1563 " [add ADDRESS[/PREFIXLEN]]\n") \ 1573 " [add ADDRESS[/PREFIXLEN]]\n") \
1564 USE_FEATURE_IPV6( \ 1574 USE_FEATURE_IPV6( \
@@ -1577,12 +1587,13 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1577#define ifenslave_trivial_usage \ 1587#define ifenslave_trivial_usage \
1578 "[-cdf] master-iface <slave-iface...>" 1588 "[-cdf] master-iface <slave-iface...>"
1579#define ifenslave_full_usage \ 1589#define ifenslave_full_usage \
1580 "Configure network interfaces for parallel routing\n\n" \ 1590 "Configure network interfaces for parallel routing\n" \
1581 "Options:" \ 1591 "\nOptions:" \
1582 "\n -c, --change-active Change active slave" \ 1592 "\n -c, --change-active Change active slave" \
1583 "\n -d, --detach Remove slave interface from bonding device" \ 1593 "\n -d, --detach Remove slave interface from bonding device" \
1584 "\n -f, --force Force, even if interface is not Ethernet" \ 1594 "\n -f, --force Force, even if interface is not Ethernet" \
1585/* "\n -r, --receive-slave Create a receive-only slave" */ 1595/* "\n -r, --receive-slave Create a receive-only slave" */
1596
1586#define ifenslave_example_usage \ 1597#define ifenslave_example_usage \
1587 "To create a bond device, simply follow these three steps :\n" \ 1598 "To create a bond device, simply follow these three steps :\n" \
1588 "- ensure that the required drivers are properly loaded :\n" \ 1599 "- ensure that the required drivers are properly loaded :\n" \
@@ -1598,31 +1609,31 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1598 " To set the bond device down and automatically release all the slaves :\n" \ 1609 " To set the bond device down and automatically release all the slaves :\n" \
1599 " # ifconfig bond0 down\n\n" \ 1610 " # ifconfig bond0 down\n\n" \
1600 " To change active slave :\n" \ 1611 " To change active slave :\n" \
1601 " # ifenslave -c bond0 eth0\n" 1612 " # ifenslave -c bond0 eth0\n" \
1602 1613
1603#define ifup_trivial_usage \ 1614#define ifup_trivial_usage \
1604 "[-ahinv] ifaces..." 1615 "[-ahinv] ifaces..."
1605#define ifup_full_usage \ 1616#define ifup_full_usage \
1606 "Options:\n" \ 1617 "Options:" \
1607 " -a De/configure all interfaces automatically\n" \ 1618 "\n -a De/configure all interfaces automatically" \
1608 " -i FILE Use FILE for interface definitions\n" \ 1619 "\n -i FILE Use FILE for interface definitions" \
1609 " -n Print out what would happen, but don't do it\n" \ 1620 "\n -n Print out what would happen, but don't do it" \
1610 " (note: doesn't disable mappings)\n" \ 1621 "\n (note: doesn't disable mappings)" \
1611 " -v Print out what would happen before doing it\n" \ 1622 "\n -v Print out what would happen before doing it" \
1612 " -m Don't run any mappings\n" \ 1623 "\n -m Don't run any mappings" \
1613 " -f Force de/configuration" 1624 "\n -f Force de/configuration" \
1614 1625
1615#define ifdown_trivial_usage \ 1626#define ifdown_trivial_usage \
1616 "[-ahinv] ifaces..." 1627 "[-ahinv] ifaces..."
1617#define ifdown_full_usage \ 1628#define ifdown_full_usage \
1618 "Options:\n" \ 1629 "Options:" \
1619 " -a De/configure all interfaces automatically\n" \ 1630 "\n -a De/configure all interfaces automatically" \
1620 " -i FILE Use FILE for interface definitions\n" \ 1631 "\n -i FILE Use FILE for interface definitions" \
1621 " -n Print out what would happen, but don't do it\n" \ 1632 "\n -n Print out what would happen, but don't do it" \
1622 " (note: doesn't disable mappings)\n" \ 1633 "\n (note: doesn't disable mappings)" \
1623 " -v Print out what would happen before doing it\n" \ 1634 "\n -v Print out what would happen before doing it" \
1624 " -m Don't run any mappings\n" \ 1635 "\n -m Don't run any mappings" \
1625 " -f Force de/configuration" 1636 "\n -f Force de/configuration" \
1626 1637
1627#define inetd_trivial_usage \ 1638#define inetd_trivial_usage \
1628 "[-fe] [-q N] [-R N] [CONFFILE]" 1639 "[-fe] [-q N] [-R N] [CONFFILE]"
@@ -1633,12 +1644,13 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1633 "\n -e Log to stderr" \ 1644 "\n -e Log to stderr" \
1634 "\n -q N Socket listen queue (default: 128)" \ 1645 "\n -q N Socket listen queue (default: 128)" \
1635 "\n -R N Pause services after N connects/min" \ 1646 "\n -R N Pause services after N connects/min" \
1636 "\n (default: 0 - disabled)" 1647 "\n (default: 0 - disabled)" \
1637 1648
1638#define init_trivial_usage \ 1649#define init_trivial_usage \
1639 "" 1650 ""
1640#define init_full_usage \ 1651#define init_full_usage \
1641 "Init is the parent of all processes" 1652 "Init is the parent of all processes"
1653
1642#define init_notes_usage \ 1654#define init_notes_usage \
1643"This version of init is designed to be run only by the kernel.\n" \ 1655"This version of init is designed to be run only by the kernel.\n" \
1644"\n" \ 1656"\n" \
@@ -1770,36 +1782,37 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1770 USE_FEATURE_2_4_MODULES("[OPTION]... ") "MODULE [symbol=value]..." 1782 USE_FEATURE_2_4_MODULES("[OPTION]... ") "MODULE [symbol=value]..."
1771#define insmod_full_usage \ 1783#define insmod_full_usage \
1772 "Load the specified kernel modules into the kernel" \ 1784 "Load the specified kernel modules into the kernel" \
1773 USE_FEATURE_2_4_MODULES( \ 1785 USE_FEATURE_2_4_MODULES( "\n" \
1774 "\n\nOptions:\n" \ 1786 "\nOptions:" \
1775 " -f Force module to load into the wrong kernel version\n" \ 1787 "\n -f Force module to load into the wrong kernel version" \
1776 " -k Make module autoclean-able\n" \ 1788 "\n -k Make module autoclean-able" \
1777 " -v Verbose\n" \ 1789 "\n -v Verbose" \
1778 " -q Quiet\n" \ 1790 "\n -q Quiet" \
1779 " -L Lock to prevent simultaneous loads of a module\n" \ 1791 "\n -L Lock to prevent simultaneous loads of a module" \
1780 USE_FEATURE_INSMOD_LOAD_MAP( \ 1792 USE_FEATURE_INSMOD_LOAD_MAP( \
1781 " -m Output load map to stdout\n" \ 1793 "\n -m Output load map to stdout" \
1782 ) \ 1794 ) \
1783 " -o NAME Set internal module name to NAME\n" \ 1795 "\n -o NAME Set internal module name to NAME" \
1784 " -x Do not export externs" \ 1796 "\n -x Do not export externs" \
1785 ) 1797 )
1786 1798
1787#define install_trivial_usage \ 1799#define install_trivial_usage \
1788 "[-cgmops] [sources] dest|directory" 1800 "[-cgmops] [sources] dest|directory"
1789#define install_full_usage \ 1801#define install_full_usage \
1790 "Copy files and set attributes" \ 1802 "Copy files and set attributes\n" \
1791 "\n\nOptions:\n" \ 1803 "\nOptions:" \
1792 " -c Copy the file, default\n" \ 1804 "\n -c Copy the file, default" \
1793 " -d Create directories\n" \ 1805 "\n -d Create directories" \
1794 " -g Set group ownership\n" \ 1806 "\n -g Set group ownership" \
1795 " -m Set permissions\n" \ 1807 "\n -m Set permissions" \
1796 " -o Set ownership\n" \ 1808 "\n -o Set ownership" \
1797 " -p Preserve date\n" \ 1809 "\n -p Preserve date" \
1798 " -s Strip symbol tables" \ 1810 "\n -s Strip symbol tables" \
1799 USE_SELINUX( \ 1811 USE_SELINUX( \
1800 "\n -Z Set security context of copy" \ 1812 "\n -Z Set security context of copy" \
1801 ) 1813 )
1802/* would need to make the " | " optional depending on more than one selected */ 1814
1815/* would need to make the " | " optional depending on more than one selected: */
1803#define ip_trivial_usage \ 1816#define ip_trivial_usage \
1804 "[OPTIONS] {" \ 1817 "[OPTIONS] {" \
1805 USE_FEATURE_IP_ADDRESS("address | ") \ 1818 USE_FEATURE_IP_ADDRESS("address | ") \
@@ -1817,7 +1830,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1817 USE_FEATURE_IP_TUNNEL("tunnel | ") \ 1830 USE_FEATURE_IP_TUNNEL("tunnel | ") \
1818 USE_FEATURE_IP_RULE("rule") \ 1831 USE_FEATURE_IP_RULE("rule") \
1819 "}\n" \ 1832 "}\n" \
1820 "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" 1833 "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" \
1821 1834
1822#define ipaddr_trivial_usage \ 1835#define ipaddr_trivial_usage \
1823 "{ {add|del} IFADDR dev STRING | {show|flush}\n" \ 1836 "{ {add|del} IFADDR dev STRING | {show|flush}\n" \
@@ -1829,60 +1842,59 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1829 " IFADDR := PREFIX | ADDR peer PREFIX\n" \ 1842 " IFADDR := PREFIX | ADDR peer PREFIX\n" \
1830 " [broadcast ADDR] [anycast ADDR]\n" \ 1843 " [broadcast ADDR] [anycast ADDR]\n" \
1831 " [label STRING] [scope SCOPE-ID]\n" \ 1844 " [label STRING] [scope SCOPE-ID]\n" \
1832 " SCOPE-ID := [host | link | global | NUMBER]" 1845 " SCOPE-ID := [host | link | global | NUMBER]" \
1833 1846
1834#define ipcalc_trivial_usage \ 1847#define ipcalc_trivial_usage \
1835 "[OPTION]... ADDRESS[[/]NETMASK] [NETMASK]" 1848 "[OPTION]... ADDRESS[[/]NETMASK] [NETMASK]"
1836#define ipcalc_full_usage \ 1849#define ipcalc_full_usage \
1837 "Calculate IP network settings from a IP address" \ 1850 "Calculate IP network settings from a IP address\n" \
1838 "\n\nOptions:" \ 1851 "\nOptions:" \
1839 USE_FEATURE_IPCALC_LONG_OPTIONS( \ 1852 USE_FEATURE_IPCALC_LONG_OPTIONS( \
1840 "\n -b,--broadcast Display calculated broadcast address" \ 1853 "\n -b,--broadcast Display calculated broadcast address" \
1841 "\n -n,--network Display calculated network address" \ 1854 "\n -n,--network Display calculated network address" \
1842 "\n -m,--netmask Display default netmask for IP" \ 1855 "\n -m,--netmask Display default netmask for IP" \
1843 USE_FEATURE_IPCALC_FANCY( \ 1856 USE_FEATURE_IPCALC_FANCY( \
1844 "\n -p,--prefix Display the prefix for IP/NETMASK" \ 1857 "\n -p,--prefix Display the prefix for IP/NETMASK" \
1845 "\n -h,--hostname Display first resolved host name" \ 1858 "\n -h,--hostname Display first resolved host name" \
1846 "\n -s,--silent Don't ever display error messages" \ 1859 "\n -s,--silent Don't ever display error messages" \
1847 ) \ 1860 ) \
1848 ) \ 1861 ) \
1849 SKIP_FEATURE_IPCALC_LONG_OPTIONS( \ 1862 SKIP_FEATURE_IPCALC_LONG_OPTIONS( \
1850 "\n -b Display calculated broadcast address" \ 1863 "\n -b Display calculated broadcast address" \
1851 "\n -n Display calculated network address" \ 1864 "\n -n Display calculated network address" \
1852 "\n -m Display default netmask for IP" \ 1865 "\n -m Display default netmask for IP" \
1853 USE_FEATURE_IPCALC_FANCY( \ 1866 USE_FEATURE_IPCALC_FANCY( \
1854 "\n -p Display the prefix for IP/NETMASK" \ 1867 "\n -p Display the prefix for IP/NETMASK" \
1855 "\n -h Display first resolved host name" \ 1868 "\n -h Display first resolved host name" \
1856 "\n -s Don't ever display error messages" \ 1869 "\n -s Don't ever display error messages" \
1857 ) \ 1870 ) \
1858 ) 1871 )
1859 1872
1860#define ipcrm_trivial_usage \ 1873#define ipcrm_trivial_usage \
1861 "[-[MQS] key] [-[mqs] id]" 1874 "[-MQS key] [-mqs id]"
1862#define ipcrm_full_usage \ 1875#define ipcrm_full_usage \
1863 "The upper-case options MQS are used to remove a shared memory segment by a\n" \ 1876 "Upper-case options MQS remove an object by shmkey value.\n" \
1864 "segment by a shmkey value. The lower-case options mqs are used\n" \ 1877 "Lower-case options remove an object by shmid value.\n" \
1865 "to remove a segment by shmid value.\n" \ 1878 "\nOptions:" \
1866 "\n\nOptions:\n" \ 1879 "\n -mM Remove memory segment after last detach" \
1867 " -[mM] Remove the memory segment after the last detach\n" \ 1880 "\n -qQ Remove message queue" \
1868 " -[qQ] Remove the message queue\n" \ 1881 "\n -sS Remove semaphore" \
1869 " -[sS] Remove the semaphore"
1870 1882
1871#define ipcs_trivial_usage \ 1883#define ipcs_trivial_usage \
1872 "[[-smq] -i shmid] | [[-asmq] [-tcplu]]" 1884 "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
1873#define ipcs_full_usage \ 1885#define ipcs_full_usage \
1874 " -i Show a specific resource\n" \ 1886 " -i Show specific resource" \
1875 "Resource specification:\n" \ 1887 "\nResource specification:" \
1876 " -m Shared memory segments\n" \ 1888 "\n -m Shared memory segments" \
1877 " -q Message queues\n" \ 1889 "\n -q Message queues" \
1878 " -s Semaphore arrays\n" \ 1890 "\n -s Semaphore arrays" \
1879 " -a All (default)\n" \ 1891 "\n -a All (default)" \
1880 "Output format:\n" \ 1892 "\nOutput format:" \
1881 " -t Time\n" \ 1893 "\n -t Time" \
1882 " -c Creator\n" \ 1894 "\n -c Creator" \
1883 " -p Pid\n" \ 1895 "\n -p Pid" \
1884 " -l Limits\n" \ 1896 "\n -l Limits" \
1885 " -u Summary" 1897 "\n -u Summary" \
1886 1898
1887#define iplink_trivial_usage \ 1899#define iplink_trivial_usage \
1888 "{ set DEVICE { up | down | arp { on | off } | show [DEVICE] }" 1900 "{ set DEVICE { up | down | arp { on | off } | show [DEVICE] }"
@@ -1890,7 +1902,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1890 "iplink set DEVICE { up | down | arp | multicast { on | off } |\n" \ 1902 "iplink set DEVICE { up | down | arp | multicast { on | off } |\n" \
1891 " dynamic { on | off } |\n" \ 1903 " dynamic { on | off } |\n" \
1892 " mtu MTU }\n" \ 1904 " mtu MTU }\n" \
1893 "iplink show [DEVICE]" 1905 "iplink show [DEVICE]" \
1894 1906
1895#define iproute_trivial_usage \ 1907#define iproute_trivial_usage \
1896 "{ list | flush | { add | del | change | append |\n" \ 1908 "{ list | flush | { add | del | change | append |\n" \
@@ -1901,7 +1913,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1901 " [oif STRING] [tos TOS]\n" \ 1913 " [oif STRING] [tos TOS]\n" \
1902 "iproute { add | del | change | append | replace | monitor } ROUTE\n" \ 1914 "iproute { add | del | change | append | replace | monitor } ROUTE\n" \
1903 " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \ 1915 " SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO]\n" \
1904 " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]" 1916 " ROUTE := [TYPE] PREFIX [tos TOS] [proto RTPROTO]" \
1905 1917
1906#define iprule_trivial_usage \ 1918#define iprule_trivial_usage \
1907 "{[list | add | del] RULE}" 1919 "{[list | add | del] RULE}"
@@ -1912,7 +1924,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1912 " ACTION := [table TABLE_ID] [nat ADDRESS]\n" \ 1924 " ACTION := [table TABLE_ID] [nat ADDRESS]\n" \
1913 " [prohibit | reject | unreachable]\n" \ 1925 " [prohibit | reject | unreachable]\n" \
1914 " [realms [SRCREALM/]DSTREALM]\n" \ 1926 " [realms [SRCREALM/]DSTREALM]\n" \
1915 " TABLE_ID := [local | main | default | NUMBER]" 1927 " TABLE_ID := [local | main | default | NUMBER]" \
1916 1928
1917#define iptunnel_trivial_usage \ 1929#define iptunnel_trivial_usage \
1918 "{ add | change | del | show } [NAME]\n" \ 1930 "{ add | change | del | show } [NAME]\n" \
@@ -1922,24 +1934,25 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1922 "iptunnel { add | change | del | show } [NAME]\n" \ 1934 "iptunnel { add | change | del | show } [NAME]\n" \
1923 " [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n" \ 1935 " [mode { ipip | gre | sit }] [remote ADDR] [local ADDR]\n" \
1924 " [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n" \ 1936 " [[i|o]seq] [[i|o]key KEY] [[i|o]csum]\n" \
1925 " [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]" 1937 " [ttl TTL] [tos TOS] [[no]pmtudisc] [dev PHYS_DEV]" \
1926 1938
1927#define kbd_mode_trivial_usage \ 1939#define kbd_mode_trivial_usage \
1928 "[-a|k|s|u]" 1940 "[-a|k|s|u]"
1929#define kbd_mode_full_usage \ 1941#define kbd_mode_full_usage \
1930 "Report or set the keyboard mode" \ 1942 "Report or set the keyboard mode\n" \
1931 "\n\nOptions set mode:\n" \ 1943 "\nOptions set mode:" \
1932 " -a Default (ASCII)\n" \ 1944 "\n -a Default (ASCII)" \
1933 " -k Medium-raw (keyboard)\n" \ 1945 "\n -k Medium-raw (keyboard)" \
1934 " -s Raw (scancode)\n" \ 1946 "\n -s Raw (scancode)" \
1935 " -u Unicode (utf-8)" 1947 "\n -u Unicode (utf-8)" \
1936 1948
1937#define kill_trivial_usage \ 1949#define kill_trivial_usage \
1938 "[-l] [-signal] process-id [process-id...]" 1950 "[-l] [-signal] process-id..."
1939#define kill_full_usage \ 1951#define kill_full_usage \
1940 "Send a signal (default is TERM) to the specified process(es)" \ 1952 "Send a signal (default is TERM) to the specified process(es)\n" \
1941 "\n\nOptions:\n" \ 1953 "\nOptions:" \
1942 " -l List all signal names and numbers" 1954 "\n -l List all signal names and numbers" \
1955
1943#define kill_example_usage \ 1956#define kill_example_usage \
1944 "$ ps | grep apache\n" \ 1957 "$ ps | grep apache\n" \
1945 "252 root root S [apache]\n" \ 1958 "252 root root S [apache]\n" \
@@ -1951,34 +1964,36 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1951 "$ kill 252\n" 1964 "$ kill 252\n"
1952 1965
1953#define killall_trivial_usage \ 1966#define killall_trivial_usage \
1954 "[-l] [-q] [-signal] process-name [process-name...]" 1967 "[-l] [-q] [-signal] process-name..."
1955#define killall_full_usage \ 1968#define killall_full_usage \
1956 "Send a signal (default is TERM) to the specified process(es)" \ 1969 "Send a signal (default is TERM) to the specified process(es)\n" \
1957 "\n\nOptions:\n" \ 1970 "\nOptions:" \
1958 " -l List all signal names and numbers\n" \ 1971 "\n -l List all signal names and numbers" \
1959 " -q Do not complain if no processes were killed" 1972 "\n -q Do not complain if no processes were killed" \
1973
1960#define killall_example_usage \ 1974#define killall_example_usage \
1961 "$ killall apache\n" 1975 "$ killall apache\n"
1962 1976
1963#define killall5_trivial_usage \ 1977#define killall5_trivial_usage \
1964 "[-l] [-signal]" 1978 "[-l] [-signal]"
1965#define killall5_full_usage \ 1979#define killall5_full_usage \
1966 "Send a signal (default is TERM) to all processes outside current session" \ 1980 "Send a signal (default is TERM) to all processes outside current session\n" \
1967 "\n\nOptions:\n" \ 1981 "\nOptions:" \
1968 " -l List all signal names and numbers\n" \ 1982 "\n -l List all signal names and numbers" \
1969 1983
1970#define klogd_trivial_usage \ 1984#define klogd_trivial_usage \
1971 "[-c n] [-n]" 1985 "[-c n] [-n]"
1972#define klogd_full_usage \ 1986#define klogd_full_usage \
1973 "Kernel logger" \ 1987 "Kernel logger\n" \
1974 "\n\nOptions:\n" \ 1988 "\nOptions:" \
1975 " -c n Sets the default log level of console messages to n\n" \ 1989 "\n -c n Set the default log level of console messages to n" \
1976 " -n Run in foreground" 1990 "\n -n Run in foreground" \
1977 1991
1978#define length_trivial_usage \ 1992#define length_trivial_usage \
1979 "STRING" 1993 "STRING"
1980#define length_full_usage \ 1994#define length_full_usage \
1981 "Print out the length of the specified STRING" 1995 "Print STRING's length"
1996
1982#define length_example_usage \ 1997#define length_example_usage \
1983 "$ length Hello\n" \ 1998 "$ length Hello\n" \
1984 "5\n" 1999 "5\n"
@@ -1987,32 +2002,33 @@ USE_FEATURE_BRCTL_FANCY("\n" \
1987 "[-EMNmh~?] [FILE...]" 2002 "[-EMNmh~?] [FILE...]"
1988#define less_full_usage \ 2003#define less_full_usage \
1989 "View a file or list of files. The position within files can be\n" \ 2004 "View a file or list of files. The position within files can be\n" \
1990 "changed, and files can be manipulated in various ways." \ 2005 "changed, and files can be manipulated in various ways.\n" \
1991 "\n\nOptions:\n" \ 2006 "\nOptions:" \
1992 " -E Quit once the end of a file is reached\n" \ 2007 "\n -E Quit once the end of a file is reached" \
1993 " -M,-m Display a status line containing the line numbers\n" \ 2008 "\n -M,-m Display a status line containing the line numbers" \
1994 " and percentage through the file\n" \ 2009 "\n and percentage through the file" \
1995 " -N Prefix line numbers to each line\n" \ 2010 "\n -N Prefix line numbers to each line" \
1996 " -~ Suppress ~s displayed past the end of the file" \ 2011 "\n -~ Suppress ~s displayed past the end of the file" \
1997 2012
1998#define setarch_trivial_usage \ 2013#define setarch_trivial_usage \
1999 "personality program [args...]" 2014 "personality program [args...]"
2000#define setarch_full_usage \ 2015#define setarch_full_usage \
2001 "Personality may be:\n" \ 2016 "Personality may be:\n" \
2002 " linux32 Set 32bit uname emulation\n" \ 2017 " linux32 Set 32bit uname emulation\n" \
2003 " linux64 Set 64bit uname emulation" 2018 " linux64 Set 64bit uname emulation" \
2004 2019
2005#define ln_trivial_usage \ 2020#define ln_trivial_usage \
2006 "[OPTION] TARGET... LINK_NAME|DIRECTORY" 2021 "[OPTION] TARGET... LINK_NAME|DIRECTORY"
2007#define ln_full_usage \ 2022#define ln_full_usage \
2008 "Create a link named LINK_NAME or DIRECTORY to the specified TARGET.\n" \ 2023 "Create a link named LINK_NAME or DIRECTORY to the specified TARGET.\n" \
2009 "You may use '--' to indicate that all following arguments are non-options." \ 2024 "Use '--' to indicate that all following arguments are non-options.\n" \
2010 "\n\nOptions:\n" \ 2025 "\nOptions:" \
2011 " -s Make symlinks instead of hardlinks\n" \ 2026 "\n -s Make symlinks instead of hardlinks" \
2012 " -f Remove existing destination files\n" \ 2027 "\n -f Remove existing destination files" \
2013 " -n Don't dereference symlinks - treat like normal file\n" \ 2028 "\n -n Don't dereference symlinks - treat like normal file" \
2014 " -b Make a backup of the target (if exists) before link operation\n" \ 2029 "\n -b Make a backup of the target (if exists) before link operation" \
2015 " -S suf Use suffix instead of ~ when making backup files" 2030 "\n -S suf Use suffix instead of ~ when making backup files" \
2031
2016#define ln_example_usage \ 2032#define ln_example_usage \
2017 "$ ln -s BusyBox /tmp/ls\n" \ 2033 "$ ln -s BusyBox /tmp/ls\n" \
2018 "$ ls -l /tmp/ls\n" \ 2034 "$ ls -l /tmp/ls\n" \
@@ -2039,11 +2055,11 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2039#define logger_trivial_usage \ 2055#define logger_trivial_usage \
2040 "[OPTION]... [MESSAGE]" 2056 "[OPTION]... [MESSAGE]"
2041#define logger_full_usage \ 2057#define logger_full_usage \
2042 "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin." \ 2058 "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.\n" \
2043 "\n\nOptions:\n" \ 2059 "\nOptions:" \
2044 " -s Log to stderr as well as the system log\n" \ 2060 "\n -s Log to stderr as well as the system log" \
2045 " -t TAG Log using the specified tag (defaults to user name)\n" \ 2061 "\n -t TAG Log using the specified tag (defaults to user name)" \
2046 " -p PRIO Priority (numeric or facility.level pair)" 2062 "\n -p PRIO Priority (numeric or facility.level pair)" \
2047 2063
2048#define logger_example_usage \ 2064#define logger_example_usage \
2049 "$ logger \"hello\"\n" 2065 "$ logger \"hello\"\n"
@@ -2051,11 +2067,11 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2051#define login_trivial_usage \ 2067#define login_trivial_usage \
2052 "[-p] [-h HOST] [[-f] USER]" 2068 "[-p] [-h HOST] [[-f] USER]"
2053#define login_full_usage \ 2069#define login_full_usage \
2054 "Begin a new session on the system" \ 2070 "Begin a new session on the system\n" \
2055 "\n\nOptions:\n" \ 2071 "\nOptions:" \
2056 " -f Do not authenticate (user already authenticated)\n" \ 2072 "\n -f Do not authenticate (user already authenticated)" \
2057 " -h Name of the remote host\n" \ 2073 "\n -h Name of the remote host" \
2058 " -p Preserve environment" 2074 "\n -p Preserve environment" \
2059 2075
2060#define logname_trivial_usage \ 2076#define logname_trivial_usage \
2061 "" 2077 ""
@@ -2068,18 +2084,19 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2068#define logread_trivial_usage \ 2084#define logread_trivial_usage \
2069 "[OPTION]..." 2085 "[OPTION]..."
2070#define logread_full_usage \ 2086#define logread_full_usage \
2071 "Show messages in syslogd's circular buffer" \ 2087 "Show messages in syslogd's circular buffer\n" \
2072 "\n\nOptions:\n" \ 2088 "\nOptions:" \
2073 " -f Output data as log grows" 2089 "\n -f Output data as log grows" \
2074 2090
2075#define losetup_trivial_usage \ 2091#define losetup_trivial_usage \
2076 "[-o OFS] LOOPDEV FILE - associate loop devices\n" \ 2092 "[-o OFS] LOOPDEV FILE - associate loop devices\n" \
2077 " losetup -d LOOPDEV - disassociate\n" \ 2093 " losetup -d LOOPDEV - disassociate\n" \
2078 " losetup [-f] - show" 2094 " losetup [-f] - show"
2079#define losetup_full_usage \ 2095#define losetup_full_usage \
2080 "Options:\n" \ 2096 "Options:" \
2081 " -o OFS Start OFS bytes into FILE\n" \ 2097 "\n -o OFS Start OFS bytes into FILE" \
2082 " -f Show first free loop device" 2098 "\n -f Show first free loop device" \
2099
2083#define losetup_notes_usage \ 2100#define losetup_notes_usage \
2084 "No arguments will display all current associations.\n" \ 2101 "No arguments will display all current associations.\n" \
2085 "One argument (losetup /dev/loop1) will display the current association\n" \ 2102 "One argument (losetup /dev/loop1) will display the current association\n" \
@@ -2093,12 +2110,12 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2093 "SPOOLDIR" 2110 "SPOOLDIR"
2094#define lpd_full_usage \ 2111#define lpd_full_usage \
2095 "Example:" \ 2112 "Example:" \
2096 "\n tcpsvd -E 0 515 softlimit -m 99999 lpd /var/spool" 2113 "\n tcpsvd -E 0 515 softlimit -m 99999 lpd /var/spool"
2097 2114
2098#define lpq_trivial_usage \ 2115#define lpq_trivial_usage \
2099 "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID...] [-fs]" 2116 "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID...] [-fs]"
2100#define lpq_full_usage \ 2117#define lpq_full_usage \
2101 "Options:" \ 2118 "Options:" \
2102 "\n -P lp service to connect to (else uses $PRINTER)" \ 2119 "\n -P lp service to connect to (else uses $PRINTER)" \
2103 "\n -d Delete jobs" \ 2120 "\n -d Delete jobs" \
2104 "\n -f Force any waiting job to be printed" \ 2121 "\n -f Force any waiting job to be printed" \
@@ -2109,7 +2126,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2109/* -C CLASS exists too, not shown. 2126/* -C CLASS exists too, not shown.
2110 * CLASS is supposed to be printed on banner page, if one is requested */ 2127 * CLASS is supposed to be printed on banner page, if one is requested */
2111#define lpr_full_usage \ 2128#define lpr_full_usage \
2112 "Options:" \ 2129 "Options:" \
2113 "\n -P lp service to connect to (else uses $PRINTER)"\ 2130 "\n -P lp service to connect to (else uses $PRINTER)"\
2114 "\n -m Send mail on completion" \ 2131 "\n -m Send mail on completion" \
2115 "\n -h Print banner page too" \ 2132 "\n -h Print banner page too" \
@@ -2125,67 +2142,67 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2125 USE_FEATURE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" \ 2142 USE_FEATURE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" \
2126 USE_SELINUX("K") "] [filenames...]" 2143 USE_SELINUX("K") "] [filenames...]"
2127#define ls_full_usage \ 2144#define ls_full_usage \
2128 "List directory contents" \ 2145 "List directory contents\n" \
2129 "\n\nOptions:" \ 2146 "\nOptions:" \
2130 "\n -1 List files in a single column" \ 2147 "\n -1 List files in a single column" \
2131 "\n -A Do not list implied . and .." \ 2148 "\n -A Do not list implied . and .." \
2132 "\n -a Do not hide entries starting with ." \ 2149 "\n -a Do not hide entries starting with ." \
2133 "\n -C List entries by columns" \ 2150 "\n -C List entries by columns" \
2134 USE_FEATURE_LS_TIMESTAMPS( \ 2151 USE_FEATURE_LS_TIMESTAMPS( \
2135 "\n -c With -l: show ctime") \ 2152 "\n -c With -l: show ctime") \
2136 USE_FEATURE_LS_COLOR( \ 2153 USE_FEATURE_LS_COLOR( \
2137 "\n --color[={always,never,auto}] Control coloring") \ 2154 "\n --color[={always,never,auto}] Control coloring") \
2138 "\n -d List directory entries instead of contents" \ 2155 "\n -d List directory entries instead of contents" \
2139 USE_FEATURE_LS_TIMESTAMPS( \ 2156 USE_FEATURE_LS_TIMESTAMPS( \
2140 "\n -e List both full date and full time") \ 2157 "\n -e List both full date and full time") \
2141 USE_FEATURE_LS_FILETYPES( \ 2158 USE_FEATURE_LS_FILETYPES( \
2142 "\n -F Append indicator (one of */=@|) to entries") \ 2159 "\n -F Append indicator (one of */=@|) to entries") \
2143 "\n -i List the i-node for each file" \ 2160 "\n -i List the i-node for each file" \
2144 "\n -l Use a long listing format" \ 2161 "\n -l Use a long listing format" \
2145 "\n -n List numeric UIDs and GIDs instead of names" \ 2162 "\n -n List numeric UIDs and GIDs instead of names" \
2146 USE_FEATURE_LS_FILETYPES( \ 2163 USE_FEATURE_LS_FILETYPES( \
2147 "\n -p Append indicator (one of /=@|) to entries") \ 2164 "\n -p Append indicator (one of /=@|) to entries") \
2148 USE_FEATURE_LS_FOLLOWLINKS( \ 2165 USE_FEATURE_LS_FOLLOWLINKS( \
2149 "\n -L List entries pointed to by symlinks") \ 2166 "\n -L List entries pointed to by symlinks") \
2150 USE_FEATURE_LS_RECURSIVE( \ 2167 USE_FEATURE_LS_RECURSIVE( \
2151 "\n -R List subdirectories recursively") \ 2168 "\n -R List subdirectories recursively") \
2152 USE_FEATURE_LS_SORTFILES( \ 2169 USE_FEATURE_LS_SORTFILES( \
2153 "\n -r Sort the listing in reverse order") \ 2170 "\n -r Sort the listing in reverse order") \
2154 USE_FEATURE_LS_SORTFILES( \ 2171 USE_FEATURE_LS_SORTFILES( \
2155 "\n -S Sort the listing by file size") \ 2172 "\n -S Sort the listing by file size") \
2156 "\n -s List the size of each file, in blocks" \ 2173 "\n -s List the size of each file, in blocks" \
2157 USE_FEATURE_AUTOWIDTH( \ 2174 USE_FEATURE_AUTOWIDTH( \
2158 "\n -T NUM Assume Tabstop every NUM columns") \ 2175 "\n -T NUM Assume Tabstop every NUM columns") \
2159 USE_FEATURE_LS_TIMESTAMPS( \ 2176 USE_FEATURE_LS_TIMESTAMPS( \
2160 "\n -t With -l: show modification time") \ 2177 "\n -t With -l: show modification time") \
2161 USE_FEATURE_LS_TIMESTAMPS( \ 2178 USE_FEATURE_LS_TIMESTAMPS( \
2162 "\n -u With -l: show access time") \ 2179 "\n -u With -l: show access time") \
2163 USE_FEATURE_LS_SORTFILES( \ 2180 USE_FEATURE_LS_SORTFILES( \
2164 "\n -v Sort the listing by version") \ 2181 "\n -v Sort the listing by version") \
2165 USE_FEATURE_AUTOWIDTH( \ 2182 USE_FEATURE_AUTOWIDTH( \
2166 "\n -w NUM Assume the terminal is NUM columns wide") \ 2183 "\n -w NUM Assume the terminal is NUM columns wide") \
2167 "\n -x List entries by lines instead of by columns" \ 2184 "\n -x List entries by lines instead of by columns" \
2168 USE_FEATURE_LS_SORTFILES( \ 2185 USE_FEATURE_LS_SORTFILES( \
2169 "\n -X Sort the listing by extension") \ 2186 "\n -X Sort the listing by extension") \
2170 USE_FEATURE_HUMAN_READABLE( \ 2187 USE_FEATURE_HUMAN_READABLE( \
2171 "\n -h Print sizes in human readable format (e.g., 1K 243M 2G)") \ 2188 "\n -h Print sizes in human readable format (e.g., 1K 243M 2G)") \
2172 USE_SELINUX( \ 2189 USE_SELINUX( \
2173 "\n -k Print security context") \ 2190 "\n -k Print security context") \
2174 USE_SELINUX( \ 2191 USE_SELINUX( \
2175 "\n -K Print security context in long format") \ 2192 "\n -K Print security context in long format") \
2176 USE_SELINUX( \ 2193 USE_SELINUX( \
2177 "\n -Z Print security context and permission") 2194 "\n -Z Print security context and permission") \
2178 2195
2179#define lsattr_trivial_usage \ 2196#define lsattr_trivial_usage \
2180 "[-Radlv] [files...]" 2197 "[-Radlv] [files...]"
2181#define lsattr_full_usage \ 2198#define lsattr_full_usage \
2182 "List file attributes on an ext2 fs" \ 2199 "List file attributes on an ext2 fs\n" \
2183 "\n\nOptions:\n" \ 2200 "\nOptions:" \
2184 " -R Recursively list subdirectories\n" \ 2201 "\n -R Recursively list subdirectories" \
2185 " -a Do not hide entries starting with .\n" \ 2202 "\n -a Do not hide entries starting with ." \
2186 " -d List directory entries instead of contents\n" \ 2203 "\n -d List directory entries instead of contents" \
2187 " -l Print long flag names\n" \ 2204 "\n -l Print long flag names" \
2188 " -v List the file's version/generation number" 2205 "\n -v List the file's version/generation number" \
2189 2206
2190#define lsmod_trivial_usage \ 2207#define lsmod_trivial_usage \
2191 "" 2208 ""
@@ -2253,23 +2270,22 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2253 "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]" 2270 "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]"
2254#define matchpathcon_full_usage \ 2271#define matchpathcon_full_usage \
2255 " -n Do not display path" \ 2272 " -n Do not display path" \
2256 "\n -N Do not use translations" \ 2273 "\n -N Do not use translations" \
2257 "\n -f Use alternate file_context file" \ 2274 "\n -f Use alternate file_context file" \
2258 "\n -p Use prefix to speed translations" \ 2275 "\n -p Use prefix to speed translations" \
2259 "\n -V Verify file context on disk matches defaults" 2276 "\n -V Verify file context on disk matches defaults" \
2260 2277
2261#define md5sum_trivial_usage \ 2278#define md5sum_trivial_usage \
2262 "[OPTION] [FILEs...]" \ 2279 "[OPTION] [FILEs...]" \
2263 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]") 2280 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]")
2264#define md5sum_full_usage \ 2281#define md5sum_full_usage \
2265 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \ 2282 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
2266 "\n\nOptions:\n" \ 2283 USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
2267 "With no FILE, or when FILE is -, read standard input." \ 2284 "\nOptions:" \
2268 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n\n" \ 2285 "\n -c Check MD5 sums against given list" \
2269 " -c Check MD5 sums against given list\n" \ 2286 "\n -s Don't output anything, status code shows success" \
2270 "\nThe following two options are useful only when verifying checksums:\n" \ 2287 "\n -w Warn about improperly formatted MD5 checksum lines") \
2271 " -s Don't output anything, status code shows success\n" \ 2288
2272 " -w Warn about improperly formatted MD5 checksum lines")
2273#define md5sum_example_usage \ 2289#define md5sum_example_usage \
2274 "$ md5sum < busybox\n" \ 2290 "$ md5sum < busybox\n" \
2275 "6fd11e98b98a58f64ff3398d7b324003\n" \ 2291 "6fd11e98b98a58f64ff3398d7b324003\n" \
@@ -2283,9 +2299,11 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2283#define mdev_trivial_usage \ 2299#define mdev_trivial_usage \
2284 "[-s]" 2300 "[-s]"
2285#define mdev_full_usage \ 2301#define mdev_full_usage \
2286 " -s Scan /sys and populate /dev during system boot\n\n" \ 2302 " -s Scan /sys and populate /dev during system boot\n" \
2303 "\n" \
2287 "Called with no options (via hotplug) it uses environment variables\n" \ 2304 "Called with no options (via hotplug) it uses environment variables\n" \
2288 "to determine which device to add/remove." 2305 "to determine which device to add/remove."
2306
2289#define mdev_notes_usage "" \ 2307#define mdev_notes_usage "" \
2290 USE_FEATURE_MDEV_CONFIG( \ 2308 USE_FEATURE_MDEV_CONFIG( \
2291 "The mdev config file contains lines that look like:\n" \ 2309 "The mdev config file contains lines that look like:\n" \
@@ -2316,23 +2334,23 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2316#define microcom_trivial_usage \ 2334#define microcom_trivial_usage \
2317 "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" 2335 "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY"
2318#define microcom_full_usage \ 2336#define microcom_full_usage \
2319 "Copy bytes for stdin to TTY and from TTY to stdout" \ 2337 "Copy bytes for stdin to TTY and from TTY to stdout\n" \
2320 "\n\nOptions:" \ 2338 "\nOptions:" \
2321 "\n -d Wait up to DELAY ms for TTY output before sending every" \ 2339 "\n -d Wait up to DELAY ms for TTY output before sending every" \
2322 "\n next byte to it" \ 2340 "\n next byte to it" \
2323 "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms" \ 2341 "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms" \
2324 "\n -s Set serial line to SPEED" \ 2342 "\n -s Set serial line to SPEED" \
2325 "\n -X Disable special meaning of NUL and Ctrl-X from stdin" 2343 "\n -X Disable special meaning of NUL and Ctrl-X from stdin" \
2326 2344
2327#define mkdir_trivial_usage \ 2345#define mkdir_trivial_usage \
2328 "[OPTION] DIRECTORY..." 2346 "[OPTION] DIRECTORY..."
2329#define mkdir_full_usage \ 2347#define mkdir_full_usage \
2330 "Create the DIRECTORY(ies) if they do not already exist" \ 2348 "Create DIRECTORY\n" \
2331 "\n\nOptions:\n" \ 2349 "\nOptions:" \
2332 " -m Set permission mode (as in chmod), not rwxrwxrwx - umask\n" \ 2350 "\n -m Set permission mode (as in chmod), not rwxrwxrwx - umask" \
2333 " -p No error if existing, make parent directories as needed" \ 2351 "\n -p No error if existing, make parent directories as needed" \
2334 USE_SELINUX( \ 2352 USE_SELINUX( \
2335 "\n -Z Set security context" \ 2353 "\n -Z Set security context" \
2336 ) 2354 )
2337 2355
2338#define mkdir_example_usage \ 2356#define mkdir_example_usage \
@@ -2351,62 +2369,62 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2351 "[-M last-mounted-directory] [-S] [-T filesystem-type] " \ 2369 "[-M last-mounted-directory] [-S] [-T filesystem-type] " \
2352 "device [blocks-count]" 2370 "device [blocks-count]"
2353#define mke2fs_full_usage \ 2371#define mke2fs_full_usage \
2354 " -b size Block size in bytes\n" \ 2372 " -b size Block size in bytes" \
2355 " -c Check for bad blocks before creating\n" \ 2373 "\n -c Check for bad blocks before creating" \
2356 " -E opts Set extended options\n" \ 2374 "\n -E opts Set extended options" \
2357 " -f size Fragment size in bytes\n" \ 2375 "\n -f size Fragment size in bytes" \
2358 " -F Force (ignore sanity checks)\n" \ 2376 "\n -F Force (ignore sanity checks)" \
2359 " -g num Number of blocks in a block group\n" \ 2377 "\n -g num Number of blocks in a block group" \
2360 " -i ratio The bytes/inode ratio\n" \ 2378 "\n -i ratio The bytes/inode ratio" \
2361 " -j Create a journal (ext3)\n" \ 2379 "\n -j Create a journal (ext3)" \
2362 " -J opts Set journal options (size/device)\n" \ 2380 "\n -J opts Set journal options (size/device)" \
2363 " -l file Read bad blocks list from file\n" \ 2381 "\n -l file Read bad blocks list from file" \
2364 " -L lbl Set the volume label\n" \ 2382 "\n -L lbl Set the volume label" \
2365 " -m percent Percent of fs blocks to reserve for admin\n" \ 2383 "\n -m percent Percent of fs blocks to reserve for admin" \
2366 " -M dir Set last mounted directory\n" \ 2384 "\n -M dir Set last mounted directory" \
2367 " -n Do not actually create anything\n" \ 2385 "\n -n Do not actually create anything" \
2368 " -N num Number of inodes to create\n" \ 2386 "\n -N num Number of inodes to create" \
2369 " -o os Set the 'creator os' field\n" \ 2387 "\n -o os Set the 'creator os' field" \
2370 " -O features Dir_index/filetype/has_journal/journal_dev/sparse_super\n" \ 2388 "\n -O features Dir_index/filetype/has_journal/journal_dev/sparse_super" \
2371 " -q Quiet\n" \ 2389 "\n -q Quiet" \
2372 " -r rev Set filesystem revision\n" \ 2390 "\n -r rev Set filesystem revision" \
2373 " -S Write superblock and group descriptors only\n" \ 2391 "\n -S Write superblock and group descriptors only" \
2374 " -T fs-type Set usage type (news/largefile/largefile4)\n" \ 2392 "\n -T fs-type Set usage type (news/largefile/largefile4)" \
2375 " -v Verbose" 2393 "\n -v Verbose" \
2376 2394
2377#define mkfifo_trivial_usage \ 2395#define mkfifo_trivial_usage \
2378 "[OPTIONS] name" 2396 "[OPTIONS] name"
2379#define mkfifo_full_usage \ 2397#define mkfifo_full_usage \
2380 "Create a named pipe (identical to 'mknod name p')" \ 2398 "Create named pipe (identical to 'mknod name p')\n" \
2381 "\n\nOptions:\n" \ 2399 "\nOptions:" \
2382 " -m Create the pipe using the specified mode (default a=rw)" \ 2400 "\n -m MODE Mode (default a=rw)" \
2383 USE_SELINUX( \ 2401 USE_SELINUX( \
2384 "\n -Z Set security context" \ 2402 "\n -Z Set security context" \
2385 ) 2403 )
2386 2404
2387#define mkfs_minix_trivial_usage \ 2405#define mkfs_minix_trivial_usage \
2388 "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]" 2406 "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]"
2389#define mkfs_minix_full_usage \ 2407#define mkfs_minix_full_usage \
2390 "Make a MINIX filesystem" \ 2408 "Make a MINIX filesystem\n" \
2391 "\n\nOptions:\n" \ 2409 "\nOptions:" \
2392 " -c Check device for bad blocks\n" \ 2410 "\n -c Check device for bad blocks" \
2393 " -n [14|30] Maximum length of filenames\n" \ 2411 "\n -n [14|30] Maximum length of filenames" \
2394 " -i INODES Number of inodes for the filesystem\n" \ 2412 "\n -i INODES Number of inodes for the filesystem" \
2395 " -l FILENAME Read bad blocks list from FILENAME\n" \ 2413 "\n -l FILENAME Read bad blocks list from FILENAME" \
2396 " -v Make version 2 filesystem" 2414 "\n -v Make version 2 filesystem" \
2397 2415
2398#define mknod_trivial_usage \ 2416#define mknod_trivial_usage \
2399 "[OPTIONS] NAME TYPE MAJOR MINOR" 2417 "[OPTIONS] NAME TYPE MAJOR MINOR"
2400#define mknod_full_usage \ 2418#define mknod_full_usage \
2401 "Create a special file (block, character, or pipe)" \ 2419 "Create a special file (block, character, or pipe)\n" \
2402 "\n\nOptions:\n" \ 2420 "\nOptions:" \
2403 " -m Create the special file using the specified mode (default a=rw)" \ 2421 "\n -m Create the special file using the specified mode (default a=rw)" \
2404 "\n\nTYPEs include:\n" \ 2422 "\nTYPEs include:" \
2405 " b: Make a block (buffered) device\n" \ 2423 "\n b: Make a block device" \
2406 " c or u: Make a character (un-buffered) device\n" \ 2424 "\n c or u: Make a character device" \
2407 " p: Make a named pipe. MAJOR and MINOR are ignored for named pipes" \ 2425 "\n p: Make a named pipe (MAJOR and MINOR are ignored)" \
2408 USE_SELINUX( \ 2426 USE_SELINUX( \
2409 "\n -Z Set security context" \ 2427 "\n -Z Set security context" \
2410 ) 2428 )
2411 2429
2412#define mknod_example_usage \ 2430#define mknod_example_usage \
@@ -2419,7 +2437,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2419 "Prepare block device to be used as swap partition" 2437 "Prepare block device to be used as swap partition"
2420#if 0 2438#if 0
2421 "[-c] [-v0|-v1] DEVICE [BLOCKS]" 2439 "[-c] [-v0|-v1] DEVICE [BLOCKS]"
2422 "\n\nOptions:" 2440 "\nOptions:"
2423 "\n -c Check for readability" 2441 "\n -c Check for readability"
2424 "\n -v0 Make swap version 0 (max 128M)" 2442 "\n -v0 Make swap version 0 (max 128M)"
2425 "\n -v1 Make swap version 1 (default for kernels > 2.1.117)" 2443 "\n -v1 Make swap version 1 (default for kernels > 2.1.117)"
@@ -2430,15 +2448,16 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2430 "[-dt] [-p DIR] TEMPLATE" 2448 "[-dt] [-p DIR] TEMPLATE"
2431#define mktemp_full_usage \ 2449#define mktemp_full_usage \
2432 "Create a temporary file with its name based on TEMPLATE.\n" \ 2450 "Create a temporary file with its name based on TEMPLATE.\n" \
2433 "TEMPLATE is any name with six 'Xs' (i.e., /tmp/temp.XXXXXX)." \ 2451 "TEMPLATE is any name with six 'Xs' (i.e., /tmp/temp.XXXXXX).\n" \
2434 "\n\nOptions:\n" \ 2452 "\nOptions:" \
2435 " -d Make a directory instead of a file\n" \ 2453 "\n -d Make a directory instead of a file" \
2436 /* " -q Fail silently if an error occurs\n" - we ignore it */ \ 2454/* "\n -q Fail silently if an error occurs" - we ignore it */ \
2437 " -t Generate a path rooted in temporary directory\n" \ 2455 "\n -t Generate a path rooted in temporary directory" \
2438 " -p DIR Use DIR as a temporary directory (implies -t)\n" \ 2456 "\n -p DIR Use DIR as a temporary directory (implies -t)" \
2439 "\n" \ 2457 "\n" \
2458 "\n" \
2440 "For -t or -p, directory is chosen as follows:\n" \ 2459 "For -t or -p, directory is chosen as follows:\n" \
2441 "$TMPDIR if set, else -p DIR, else /tmp" 2460 "$TMPDIR if set, else -p DIR, else /tmp" \
2442 2461
2443#define mktemp_example_usage \ 2462#define mktemp_example_usage \
2444 "$ mktemp /tmp/temp.XXXXXX\n" \ 2463 "$ mktemp /tmp/temp.XXXXXX\n" \
@@ -2449,13 +2468,14 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2449#define modprobe_trivial_usage \ 2468#define modprobe_trivial_usage \
2450 "[-knqrsv] MODULE [symbol=value...]" 2469 "[-knqrsv] MODULE [symbol=value...]"
2451#define modprobe_full_usage \ 2470#define modprobe_full_usage \
2452 "Options:\n" \ 2471 "Options:" \
2453 " -k Make module autoclean-able\n" \ 2472 "\n -k Make module autoclean-able" \
2454 " -n Dry run\n" \ 2473 "\n -n Dry run" \
2455 " -q Quiet\n" \ 2474 "\n -q Quiet" \
2456 " -r Remove module (stacks) or do autoclean\n" \ 2475 "\n -r Remove module (stacks) or do autoclean" \
2457 " -s Report via syslog instead of stderr\n" \ 2476 "\n -s Report via syslog instead of stderr" \
2458 " -v Verbose" 2477 "\n -v Verbose" \
2478
2459#define modprobe_notes_usage \ 2479#define modprobe_notes_usage \
2460"modprobe can (un)load a stack of modules, passing each module options (when\n" \ 2480"modprobe can (un)load a stack of modules, passing each module options (when\n" \
2461"loading). modprobe uses a configuration file to determine what option(s) to\n" \ 2481"loading). modprobe uses a configuration file to determine what option(s) to\n" \
@@ -2520,24 +2540,25 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2520 "[FILE...]" 2540 "[FILE...]"
2521#define more_full_usage \ 2541#define more_full_usage \
2522 "View FILE or standard input one screenful at a time" 2542 "View FILE or standard input one screenful at a time"
2543
2523#define more_example_usage \ 2544#define more_example_usage \
2524 "$ dmesg | more\n" 2545 "$ dmesg | more\n"
2525 2546
2526#define mount_trivial_usage \ 2547#define mount_trivial_usage \
2527 "[flags] DEVICE NODE [-o options,more-options]" 2548 "[flags] DEVICE NODE [-o options,more-options]"
2528#define mount_full_usage \ 2549#define mount_full_usage \
2529 "Mount a filesystem. Filesystem autodetection requires /proc be mounted." \ 2550 "Mount a filesystem. Filesystem autodetection requires /proc be mounted.\n" \
2530 "\n\nOptions:\n" \ 2551 "\nOptions:" \
2531 " -a Mount all filesystems in fstab\n" \ 2552 "\n -a Mount all filesystems in fstab" \
2532 USE_FEATURE_MOUNT_FAKE( \ 2553 USE_FEATURE_MOUNT_FAKE( \
2533 " -f "USE_FEATURE_MTAB_SUPPORT("Update /etc/mtab, but ")"don't mount\n" \ 2554 "\n -f "USE_FEATURE_MTAB_SUPPORT("Update /etc/mtab, but ")"don't mount" \
2534 ) \ 2555 ) \
2535 USE_FEATURE_MTAB_SUPPORT( \ 2556 USE_FEATURE_MTAB_SUPPORT( \
2536 " -n Don't update /etc/mtab\n" \ 2557 "\n -n Don't update /etc/mtab" \
2537 ) \ 2558 ) \
2538 " -r Read-only mount\n" \ 2559 "\n -r Read-only mount" \
2539 " -t fs-type Filesystem type\n" \ 2560 "\n -t fs-type Filesystem type" \
2540 " -w Read-write mount (default)\n" \ 2561 "\n -w Read-write mount (default)" \
2541 "\n" \ 2562 "\n" \
2542 "-o option:\n" \ 2563 "-o option:\n" \
2543 USE_FEATURE_MOUNT_LOOP( \ 2564 USE_FEATURE_MOUNT_LOOP( \
@@ -2561,7 +2582,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2561 " ro/rw Mount for read-only / read-write\n" \ 2582 " ro/rw Mount for read-only / read-write\n" \
2562 "\n" \ 2583 "\n" \
2563 "There are EVEN MORE flags that are specific to each filesystem\n" \ 2584 "There are EVEN MORE flags that are specific to each filesystem\n" \
2564 "You'll have to see the written documentation for those filesystems" 2585 "You'll have to see the written documentation for those filesystems" \
2586
2565#define mount_example_usage \ 2587#define mount_example_usage \
2566 "$ mount\n" \ 2588 "$ mount\n" \
2567 "/dev/hda3 on / type minix (rw)\n" \ 2589 "/dev/hda3 on / type minix (rw)\n" \
@@ -2576,11 +2598,12 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2576#define mountpoint_trivial_usage \ 2598#define mountpoint_trivial_usage \
2577 "[-q] <[-d] DIR | -x DEVICE>" 2599 "[-q] <[-d] DIR | -x DEVICE>"
2578#define mountpoint_full_usage \ 2600#define mountpoint_full_usage \
2579 "mountpoint checks if the directory is a mountpoint" \ 2601 "mountpoint checks if the directory is a mountpoint\n" \
2580 "\n\nOptions:\n" \ 2602 "\nOptions:" \
2581 " -q Quiet\n" \ 2603 "\n -q Quiet" \
2582 " -d Print major/minor device number of the filesystem\n" \ 2604 "\n -d Print major/minor device number of the filesystem" \
2583 " -x Print major/minor device number of the blockdevice" 2605 "\n -x Print major/minor device number of the blockdevice" \
2606
2584#define mountpoint_example_usage \ 2607#define mountpoint_example_usage \
2585 "$ mountpoint /proc\n" \ 2608 "$ mountpoint /proc\n" \
2586 "/proc is not a mountpoint\n" \ 2609 "/proc is not a mountpoint\n" \
@@ -2591,31 +2614,35 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2591 "[-f device] opcode value" 2614 "[-f device] opcode value"
2592#define mt_full_usage \ 2615#define mt_full_usage \
2593 "Control magnetic tape drive operation\n" \ 2616 "Control magnetic tape drive operation\n" \
2594 "\nAvailable Opcodes:\n\n" \ 2617 "\n" \
2618 "Available Opcodes:\n" \
2619 "\n" \
2595 "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \ 2620 "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \
2596 "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \ 2621 "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \
2597 "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \ 2622 "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \
2598 "setpart tell unload unlock weof wset" 2623 "setpart tell unload unlock weof wset" \
2599 2624
2600#define mv_trivial_usage \ 2625#define mv_trivial_usage \
2601 "[OPTION]... SOURCE DEST\n" \ 2626 "[OPTION]... SOURCE DEST\n" \
2602 "or: mv [OPTION]... SOURCE... DIRECTORY" 2627 "or: mv [OPTION]... SOURCE... DIRECTORY"
2603#define mv_full_usage \ 2628#define mv_full_usage \
2604 "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY" \ 2629 "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" \
2605 "\n\nOptions:\n" \ 2630 "\nOptions:" \
2606 " -f Don't prompt before overwriting\n" \ 2631 "\n -f Don't prompt before overwriting" \
2607 " -i Interactive, prompt before overwrite" 2632 "\n -i Interactive, prompt before overwrite" \
2633
2608#define mv_example_usage \ 2634#define mv_example_usage \
2609 "$ mv /tmp/foo /bin/bar\n" 2635 "$ mv /tmp/foo /bin/bar\n"
2610 2636
2611#define nameif_trivial_usage \ 2637#define nameif_trivial_usage \
2612 "[-s] [-c FILE] [{IFNAME MACADDR}]" 2638 "[-s] [-c FILE] [{IFNAME MACADDR}]"
2613#define nameif_full_usage \ 2639#define nameif_full_usage \
2614 "Rename network interface while it in the down state" \ 2640 "Rename network interface while it in the down state\n" \
2615 "\n\nOptions:\n" \ 2641 "\nOptions:" \
2616 " -c FILE Use configuration file (default is /etc/mactab)\n" \ 2642 "\n -c FILE Use configuration file (default is /etc/mactab)" \
2617 " -s Use syslog (LOCAL0 facility)\n" \ 2643 "\n -s Use syslog (LOCAL0 facility)" \
2618 " IFNAME MACADDR new_interface_name interface_mac_address" 2644 "\n IFNAME MACADDR new_interface_name interface_mac_address" \
2645
2619#define nameif_example_usage \ 2646#define nameif_example_usage \
2620 "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \ 2647 "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \
2621 " or\n" \ 2648 " or\n" \
@@ -2636,16 +2663,16 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2636 "Open a pipe to IP:port" USE_NC_EXTRA(" or file") \ 2663 "Open a pipe to IP:port" USE_NC_EXTRA(" or file") \
2637 NC_OPTIONS_STR \ 2664 NC_OPTIONS_STR \
2638 USE_NC_EXTRA( \ 2665 USE_NC_EXTRA( \
2639 "\n -e Exec rest of command line after connect" \ 2666 "\n -e Exec rest of command line after connect" \
2640 "\n -i SECS Delay interval for lines sent" \ 2667 "\n -i SECS Delay interval for lines sent" \
2641 "\n -w SECS Timeout for connect" \ 2668 "\n -w SECS Timeout for connect" \
2642 "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \ 2669 "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \
2643 ) \ 2670 ) \
2644 USE_NC_SERVER( \ 2671 USE_NC_SERVER( \
2645 "\n -l Listen mode, for inbound connects" \ 2672 "\n -l Listen mode, for inbound connects" \
2646 USE_NC_EXTRA( \ 2673 USE_NC_EXTRA( \
2647 "\n (use -l twice with -e for persistent server)") \ 2674 "\n (use -l twice with -e for persistent server)") \
2648 "\n -p PORT Local port number" \ 2675 "\n -p PORT Local port number" \
2649 ) 2676 )
2650 2677
2651#define nc_notes_usage "" \ 2678#define nc_notes_usage "" \
@@ -2669,26 +2696,28 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2669 2696
2670#define nc_trivial_usage \ 2697#define nc_trivial_usage \
2671 "[-options] hostname port - connect" \ 2698 "[-options] hostname port - connect" \
2672 USE_NC_SERVER("\nnc [-options] -l -p port [hostname] [port] - listen") 2699 USE_NC_SERVER("\n" \
2700 "nc [-options] -l -p port [hostname] [port] - listen")
2673#define nc_full_usage \ 2701#define nc_full_usage \
2702 "Options:" \
2703 "\n -e prog [args] Program to exec after connect (must be last)" \
2674 USE_NC_SERVER( \ 2704 USE_NC_SERVER( \
2675 "-l Listen mode, for inbound connects\n" \ 2705 "\n -l Listen mode, for inbound connects" \
2676 ) \ 2706 ) \
2677 "-n Don't do DNS resolution" \ 2707 "\n -n Don't do DNS resolution" \
2678 "\n-s addr Local address" \ 2708 "\n -s addr Local address" \
2679 "\n-p port Local port" \ 2709 "\n -p port Local port" \
2680 "\n-u UDP mode" \ 2710 "\n -u UDP mode" \
2681 "\n-v Verbose (cumulative: -vv)" \ 2711 "\n -v Verbose (cumulative: -vv)" \
2682 "\n-w secs Timeout for connects and final net reads" \ 2712 "\n -w secs Timeout for connects and final net reads" \
2683 USE_NC_EXTRA( \ 2713 USE_NC_EXTRA( \
2684 "\n-i sec Delay interval for lines sent" /* ", ports scanned" */ \ 2714 "\n -i sec Delay interval for lines sent" /* ", ports scanned" */ \
2685 "\n-o file Hex dump of traffic" \ 2715 "\n -o file Hex dump of traffic" \
2686 "\n-z Zero-I/O mode (scanning)" \ 2716 "\n -z Zero-I/O mode (scanning)" \
2687 ) \ 2717 ) \
2688 "\n-e prog [args] Program to exec after connect (must be last)" \ 2718/* "\n -r Randomize local and remote ports" */
2689/* "\n-r Randomize local and remote ports" */ 2719/* "\n -g gateway Source-routing hop point[s], up to 8" */
2690/* "\n-g gateway Source-routing hop point[s], up to 8" */ 2720/* "\n -G num Source-routing pointer: 4, 8, 12, ..." */
2691/* "\n-G num Source-routing pointer: 4, 8, 12, ..." */
2692/* "\nport numbers can be individual or ranges: lo-hi [inclusive]" */ 2721/* "\nport numbers can be individual or ranges: lo-hi [inclusive]" */
2693 2722
2694#endif 2723#endif
@@ -2696,8 +2725,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2696#define netstat_trivial_usage \ 2725#define netstat_trivial_usage \
2697 "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")"]" 2726 "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")"]"
2698#define netstat_full_usage \ 2727#define netstat_full_usage \
2699 "Display networking information" \ 2728 "Display networking information\n" \
2700 "\n\nOptions:" \ 2729 "\nOptions:" \
2701 "\n -l Display listening server sockets" \ 2730 "\n -l Display listening server sockets" \
2702 "\n -a Display all sockets (default: connected)" \ 2731 "\n -a Display all sockets (default: connected)" \
2703 "\n -e Display other/more information" \ 2732 "\n -e Display other/more information" \
@@ -2714,9 +2743,9 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2714#define nice_trivial_usage \ 2743#define nice_trivial_usage \
2715 "[-n ADJUST] [COMMAND [ARG]...]" 2744 "[-n ADJUST] [COMMAND [ARG]...]"
2716#define nice_full_usage \ 2745#define nice_full_usage \
2717 "Run a program with modified scheduling priority" \ 2746 "Run a program with modified scheduling priority\n" \
2718 "\n\nOptions:\n" \ 2747 "\nOptions:" \
2719 " -n ADJUST Adjust the scheduling priority by ADJUST" 2748 "\n -n ADJUST Adjust the scheduling priority by ADJUST" \
2720 2749
2721#define nmeter_trivial_usage \ 2750#define nmeter_trivial_usage \
2722 "format_string" 2751 "format_string"
@@ -2738,7 +2767,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2738 "%b Monitor block io\n" \ 2767 "%b Monitor block io\n" \
2739 "%Nt Show time (with N decimal points)\n" \ 2768 "%Nt Show time (with N decimal points)\n" \
2740 "%Nd Milliseconds between updates (default=1000)\n" \ 2769 "%Nd Milliseconds between updates (default=1000)\n" \
2741 "%r Print <cr> instead of <lf> at EOL" 2770 "%r Print <cr> instead of <lf> at EOL" \
2771
2742#define nmeter_example_usage \ 2772#define nmeter_example_usage \
2743 "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'" 2773 "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'"
2744 2774
@@ -2778,35 +2808,35 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2778#define passwd_trivial_usage \ 2808#define passwd_trivial_usage \
2779 "[OPTION] [name]" 2809 "[OPTION] [name]"
2780#define passwd_full_usage \ 2810#define passwd_full_usage \
2781 "Change a user password. If no name is specified,\n" \ 2811 "Change user's password. If no name is specified,\n" \
2782 "changes the password for the current user." \ 2812 "changes the password for the current user.\n" \
2783 "\n\nOptions:\n" \ 2813 "\nOptions:" \
2784 " -a Define which algorithm shall be used for the password\n" \ 2814 "\n -a Algorithm to use for password (choices: des, md5)" /* ", sha1)" */ \
2785 " (choices: des, md5)\n" /* ", sha1)" */ \ 2815 "\n -d Delete password for the account" \
2786 " -d Delete the password for the specified user account\n" \ 2816 "\n -l Lock (disable) account" \
2787 " -l Locks (disables) the specified user account\n" \ 2817 "\n -u Unlock (re-enable) account" \
2788 " -u Unlocks (re-enables) the specified user account"
2789 2818
2790#define chpasswd_trivial_usage \ 2819#define chpasswd_trivial_usage \
2791 USE_GETOPT_LONG("[--md5|--encrypt]") SKIP_GETOPT_LONG("[-m|-e]") 2820 USE_GETOPT_LONG("[--md5|--encrypt]") SKIP_GETOPT_LONG("[-m|-e]")
2792#define chpasswd_full_usage \ 2821#define chpasswd_full_usage \
2793 "Read user:password information from stdin\n" \ 2822 "Read user:password information from stdin\n" \
2794 "and update /etc/passwd accordingly." \ 2823 "and update /etc/passwd accordingly.\n" \
2795 "\n\nOptions:" \ 2824 "\nOptions:" \
2796 USE_GETOPT_LONG( \ 2825 USE_GETOPT_LONG( \
2797 "\n -e,--encrypt Supplied passwords are in encrypted form" \ 2826 "\n -e,--encrypt Supplied passwords are in encrypted form" \
2798 "\n -m,--md5 Use MD5 encryption instead of DES" \ 2827 "\n -m,--md5 Use MD5 encryption instead of DES" \
2799 ) \ 2828 ) \
2800 SKIP_GETOPT_LONG( \ 2829 SKIP_GETOPT_LONG( \
2801 "\n -e Supplied passwords are in encrypted form" \ 2830 "\n -e Supplied passwords are in encrypted form" \
2802 "\n -m Use MD5 encryption instead of DES" \ 2831 "\n -m Use MD5 encryption instead of DES" \
2803 ) 2832 )
2804 2833
2805#define patch_trivial_usage \ 2834#define patch_trivial_usage \
2806 "[-p num] [-i diff]" 2835 "[-p NUM] [-i DIFF]"
2807#define patch_full_usage \ 2836#define patch_full_usage \
2808 " -p NUM Strip NUM leading components from file names\n" \ 2837 " -p NUM Strip NUM leading components from file names" \
2809 " -i DIFF Read DIFF instead of stdin" 2838 "\n -i DIFF Read DIFF instead of stdin" \
2839
2810#define patch_example_usage \ 2840#define patch_example_usage \
2811 "$ patch -p1 < example.diff\n" \ 2841 "$ patch -p1 < example.diff\n" \
2812 "$ patch -p0 -i example.diff" 2842 "$ patch -p0 -i example.diff"
@@ -2814,14 +2844,14 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2814#define pgrep_trivial_usage \ 2844#define pgrep_trivial_usage \
2815 "[-flnovx] pattern" 2845 "[-flnovx] pattern"
2816#define pgrep_full_usage \ 2846#define pgrep_full_usage \
2817 "Display process(es) selected by regex pattern" \ 2847 "Display process(es) selected by regex pattern\n" \
2818 "\n\nOptions:\n" \ 2848 "\nOptions:" \
2819 " -l Show command name too\n" \ 2849 "\n -l Show command name too" \
2820 " -f Match against entire command line\n" \ 2850 "\n -f Match against entire command line" \
2821 " -n Show the newest process only\n" \ 2851 "\n -n Show the newest process only" \
2822 " -o Show the oldest process only\n" \ 2852 "\n -o Show the oldest process only" \
2823 " -v Negate the matching\n" \ 2853 "\n -v Negate the matching" \
2824 " -x Match whole name (not substring)" 2854 "\n -x Match whole name (not substring)" \
2825 2855
2826#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT) 2856#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT)
2827#define pidof_trivial_usage \ 2857#define pidof_trivial_usage \
@@ -2839,7 +2869,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2839 "\n -s Show only one PID") \ 2869 "\n -s Show only one PID") \
2840 USE_FEATURE_PIDOF_OMIT( \ 2870 USE_FEATURE_PIDOF_OMIT( \
2841 "\n -o PID Omit given pid" \ 2871 "\n -o PID Omit given pid" \
2842 "\n Use %PPID to omit pid of pidof's parent") 2872 "\n Use %PPID to omit pid of pidof's parent") \
2873
2843#define pidof_example_usage \ 2874#define pidof_example_usage \
2844 "$ pidof init\n" \ 2875 "$ pidof init\n" \
2845 "1\n" \ 2876 "1\n" \
@@ -2861,24 +2892,26 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2861#define ping_trivial_usage \ 2892#define ping_trivial_usage \
2862 "[OPTION]... host" 2893 "[OPTION]... host"
2863#define ping_full_usage \ 2894#define ping_full_usage \
2864 "Send ICMP ECHO_REQUEST packets to network hosts" \ 2895 "Send ICMP ECHO_REQUEST packets to network hosts\n" \
2865 "\n\nOptions:\n" \ 2896 "\nOptions:" \
2866 " -4, -6 Force IPv4 or IPv6 hostname resolution\n" \ 2897 "\n -4, -6 Force IPv4 or IPv6 hostname resolution" \
2867 " -c CNT Send only CNT pings\n" \ 2898 "\n -c CNT Send only CNT pings" \
2868 " -s SIZE Send SIZE data bytes in packets (default=56)\n" \ 2899 "\n -s SIZE Send SIZE data bytes in packets (default=56)" \
2869 " -I iface/IP Use interface or IP address as source\n" \ 2900 "\n -I iface/IP Use interface or IP address as source" \
2870 " -q Quiet, only displays output at start\n" \ 2901 "\n -q Quiet, only displays output at start" \
2871 " and when finished" 2902 "\n and when finished" \
2903
2872#define ping6_trivial_usage \ 2904#define ping6_trivial_usage \
2873 "[OPTION]... host" 2905 "[OPTION]... host"
2874#define ping6_full_usage \ 2906#define ping6_full_usage \
2875 "Send ICMP ECHO_REQUEST packets to network hosts" \ 2907 "Send ICMP ECHO_REQUEST packets to network hosts\n" \
2876 "\n\nOptions:\n" \ 2908 "\nOptions:" \
2877 " -c CNT Send only CNT pings\n" \ 2909 "\n -c CNT Send only CNT pings" \
2878 " -s SIZE Send SIZE data bytes in packets (default=56)\n" \ 2910 "\n -s SIZE Send SIZE data bytes in packets (default=56)" \
2879 " -I iface/IP Use interface or IP address as source\n" \ 2911 "\n -I iface/IP Use interface or IP address as source" \
2880 " -q Quiet, only displays output at start\n" \ 2912 "\n -q Quiet, only displays output at start" \
2881 " and when finished" 2913 "\n and when finished" \
2914
2882#endif 2915#endif
2883#define ping_example_usage \ 2916#define ping_example_usage \
2884 "$ ping localhost\n" \ 2917 "$ ping localhost\n" \
@@ -2906,23 +2939,23 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2906#define pkill_trivial_usage \ 2939#define pkill_trivial_usage \
2907 "[-l] | [-fnovx] [-signal] pattern" 2940 "[-l] | [-fnovx] [-signal] pattern"
2908#define pkill_full_usage \ 2941#define pkill_full_usage \
2909 "Send a signal to process(es) selected by regex pattern" \ 2942 "Send a signal to process(es) selected by regex pattern\n" \
2910 "\n\nOptions:\n" \ 2943 "\nOptions:" \
2911 " -l List all signals\n" \ 2944 "\n -l List all signals" \
2912 " -f Match against entire command line\n" \ 2945 "\n -f Match against entire command line" \
2913 " -n Signal the newest process only\n" \ 2946 "\n -n Signal the newest process only" \
2914 " -o Signal the oldest process only\n" \ 2947 "\n -o Signal the oldest process only" \
2915 " -v Negate the matching\n" \ 2948 "\n -v Negate the matching" \
2916 " -x Match whole name (not substring)" 2949 "\n -x Match whole name (not substring)" \
2917 2950
2918#define poweroff_trivial_usage \ 2951#define poweroff_trivial_usage \
2919 "[-d delay] [-n] [-f]" 2952 "[-d delay] [-n] [-f]"
2920#define poweroff_full_usage \ 2953#define poweroff_full_usage \
2921 "Halt and shut off power" \ 2954 "Halt and shut off power\n" \
2922 "\n\nOptions:\n" \ 2955 "\nOptions:" \
2923 " -d Delay interval for halting\n" \ 2956 "\n -d Delay interval for halting" \
2924 " -n No call to sync()\n" \ 2957 "\n -n No call to sync()" \
2925 " -f Force power off (don't go through init)" 2958 "\n -f Force power off (don't go through init)" \
2926 2959
2927#define printenv_trivial_usage \ 2960#define printenv_trivial_usage \
2928 "[VARIABLES...]" 2961 "[VARIABLES...]"
@@ -2945,13 +2978,13 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2945#define ps_trivial_usage \ 2978#define ps_trivial_usage \
2946 "" 2979 ""
2947#define ps_full_usage \ 2980#define ps_full_usage \
2948 "Report process status" \ 2981 "Report process status\n" \
2949 "\n\nOptions:" \ 2982 "\nOptions:" \
2950 "\n -o col1,col2=header Select columns for display" \ 2983 "\n -o col1,col2=header Select columns for display" \
2951 2984
2952#else /* !ENABLE_DESKTOP */ 2985#else /* !ENABLE_DESKTOP */
2953 2986
2954#if !defined CONFIG_SELINUX && !ENABLE_FEATURE_PS_WIDE 2987#if !ENABLE_SELINUX && !ENABLE_FEATURE_PS_WIDE
2955#define USAGE_PS "\nThis version of ps accepts no options" 2988#define USAGE_PS "\nThis version of ps accepts no options"
2956#else 2989#else
2957#define USAGE_PS "\nOptions:" 2990#define USAGE_PS "\nOptions:"
@@ -2963,9 +2996,11 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2963 "Report process status\n" \ 2996 "Report process status\n" \
2964 USAGE_PS \ 2997 USAGE_PS \
2965 USE_SELINUX( \ 2998 USE_SELINUX( \
2966 "\n -Z Show SE Linux context") \ 2999 "\n -Z Show SE Linux context" \
3000 ) \
2967 USE_FEATURE_PS_WIDE( \ 3001 USE_FEATURE_PS_WIDE( \
2968 "\n w Wide output") 3002 "\n w Wide output" \
3003 )
2969 3004
2970#endif /* ENABLE_DESKTOP */ 3005#endif /* ENABLE_DESKTOP */
2971 3006
@@ -2985,8 +3020,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2985#define pscan_trivial_usage \ 3020#define pscan_trivial_usage \
2986 "[-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST" 3021 "[-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST"
2987#define pscan_full_usage \ 3022#define pscan_full_usage \
2988 "Scan a host, print all open ports" \ 3023 "Scan a host, print all open ports\n" \
2989 "\n\nOptions:" \ 3024 "\nOptions:" \
2990 "\n -p Scan from this port (default 1)" \ 3025 "\n -p Scan from this port (default 1)" \
2991 "\n -P Scan up to this port (default 1024)" \ 3026 "\n -P Scan up to this port (default 1024)" \
2992 "\n -t Timeout (default 5000 ms)" \ 3027 "\n -t Timeout (default 5000 ms)" \
@@ -3010,10 +3045,10 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3010#define rdate_trivial_usage \ 3045#define rdate_trivial_usage \
3011 "[-sp] HOST" 3046 "[-sp] HOST"
3012#define rdate_full_usage \ 3047#define rdate_full_usage \
3013 "Get and possibly set the system date and time from a remote HOST" \ 3048 "Get and possibly set the system date and time from a remote HOST\n" \
3014 "\n\nOptions:\n" \ 3049 "\nOptions:" \
3015 " -s Set the system date and time (default)\n" \ 3050 "\n -s Set the system date and time (default)" \
3016 " -p Print the date and time" 3051 "\n -p Print the date and time" \
3017 3052
3018#define readahead_trivial_usage \ 3053#define readahead_trivial_usage \
3019 "[FILE]..." 3054 "[FILE]..."
@@ -3025,24 +3060,24 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3025 USE_FEATURE_READLINK_FOLLOW("[-f] ") "FILE" 3060 USE_FEATURE_READLINK_FOLLOW("[-f] ") "FILE"
3026#define readlink_full_usage \ 3061#define readlink_full_usage \
3027 "Display the value of a symlink" \ 3062 "Display the value of a symlink" \
3028 USE_FEATURE_READLINK_FOLLOW( \ 3063 USE_FEATURE_READLINK_FOLLOW( "\n" \
3029 "\n\nOptions:\n" \ 3064 "\nOptions:" \
3030 " -f Canonicalize by following all symlinks") 3065 "\n -f Canonicalize by following all symlinks") \
3031 3066
3032#define readprofile_trivial_usage \ 3067#define readprofile_trivial_usage \
3033 "[OPTIONS]..." 3068 "[OPTIONS]..."
3034#define readprofile_full_usage \ 3069#define readprofile_full_usage \
3035 "Options:\n" \ 3070 "Options:" \
3036 " -m mapfile (Default: /boot/System.map)\n" \ 3071 "\n -m mapfile (Default: /boot/System.map)" \
3037 " -p profile (Default: /proc/profile)\n" \ 3072 "\n -p profile (Default: /proc/profile)" \
3038 " -M mult Set the profiling multiplier to mult\n" \ 3073 "\n -M mult Set the profiling multiplier to mult" \
3039 " -i Print only info about the sampling step\n" \ 3074 "\n -i Print only info about the sampling step" \
3040 " -v Verbose\n" \ 3075 "\n -v Verbose" \
3041 " -a Print all symbols, even if count is 0\n" \ 3076 "\n -a Print all symbols, even if count is 0" \
3042 " -b Print individual histogram-bin counts\n" \ 3077 "\n -b Print individual histogram-bin counts" \
3043 " -s Print individual counters within functions\n" \ 3078 "\n -s Print individual counters within functions" \
3044 " -r Reset all the counters (root only)\n" \ 3079 "\n -r Reset all the counters (root only)" \
3045 " -n Disable byte order auto-detection" 3080 "\n -n Disable byte order auto-detection" \
3046 3081
3047#define realpath_trivial_usage \ 3082#define realpath_trivial_usage \
3048 "pathname..." 3083 "pathname..."
@@ -3052,21 +3087,21 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3052#define reboot_trivial_usage \ 3087#define reboot_trivial_usage \
3053 "[-d delay] [-n] [-f]" 3088 "[-d delay] [-n] [-f]"
3054#define reboot_full_usage \ 3089#define reboot_full_usage \
3055 "Reboot the system" \ 3090 "Reboot the system\n" \
3056 "\n\nOptions:\n" \ 3091 "\nOptions:" \
3057 " -d Delay interval for rebooting\n" \ 3092 "\n -d Delay interval for rebooting" \
3058 " -n No call to sync()\n" \ 3093 "\n -n No call to sync()" \
3059 " -f Force reboot (don't go through init)" 3094 "\n -f Force reboot (don't go through init)" \
3060 3095
3061#define renice_trivial_usage \ 3096#define renice_trivial_usage \
3062 "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]" 3097 "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]"
3063#define renice_full_usage \ 3098#define renice_full_usage \
3064 "Change priority of running processes" \ 3099 "Change priority of running processes\n" \
3065 "\n\nOptions:\n" \ 3100 "\nOptions:" \
3066 " -n Adjust current nice value (smaller is faster)\n" \ 3101 "\n -n Adjust current nice value (smaller is faster)" \
3067 " -p Process id(s) (default)\n" \ 3102 "\n -p Process id(s) (default)" \
3068 " -g Process group id(s)\n" \ 3103 "\n -g Process group id(s)" \
3069 " -u Process user name(s) and/or id(s)" 3104 "\n -u Process user name(s) and/or id(s)" \
3070 3105
3071#define reset_trivial_usage \ 3106#define reset_trivial_usage \
3072 "" 3107 ""
@@ -3082,27 +3117,28 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3082 "[-iFnrRv] [-e excludedir]... [-o filename] [-f filename | pathname]" 3117 "[-iFnrRv] [-e excludedir]... [-o filename] [-f filename | pathname]"
3083#define restorecon_full_usage \ 3118#define restorecon_full_usage \
3084 "Reset security contexts of files in pathname\n" \ 3119 "Reset security contexts of files in pathname\n" \
3085 "\n -i Ignore files that do not exist" \ 3120 "\n -i Ignore files that do not exist" \
3086 "\n -f file File with list of files to process. Use - for stdin" \ 3121 "\n -f file File with list of files to process. Use - for stdin" \
3087 "\n -e directory Directory to exclude" \ 3122 "\n -e directory Directory to exclude" \
3088 "\n -R,-r Recurse directories" \ 3123 "\n -R,-r Recurse directories" \
3089 "\n -n Don't change any file labels" \ 3124 "\n -n Don't change any file labels" \
3090 "\n -o file Save list of files with incorrect context" \ 3125 "\n -o file Save list of files with incorrect context" \
3091 "\n -v Verbose" \ 3126 "\n -v Verbose" \
3092 "\n -vv Show changed labels" \ 3127 "\n -vv Show changed labels" \
3093 "\n -F Force reset of context to match file_context" \ 3128 "\n -F Force reset of context to match file_context" \
3094 "\n for customizable files, or the user section," \ 3129 "\n for customizable files, or the user section," \
3095 "\n if it has changed" 3130 "\n if it has changed" \
3096 3131
3097#define rm_trivial_usage \ 3132#define rm_trivial_usage \
3098 "[OPTION]... FILE..." 3133 "[OPTION]... FILE..."
3099#define rm_full_usage \ 3134#define rm_full_usage \
3100 "Remove (unlink) the FILE(s). Use '--' to\n" \ 3135 "Remove (unlink) the FILE(s). Use '--' to\n" \
3101 "indicate that all following arguments are non-options." \ 3136 "indicate that all following arguments are non-options.\n" \
3102 "\n\nOptions:\n" \ 3137 "\nOptions:" \
3103 " -i Always prompt before removing\n" \ 3138 "\n -i Always prompt before removing" \
3104 " -f Never prompt\n" \ 3139 "\n -f Never prompt" \
3105 " -r,-R Remove directories recursively" 3140 "\n -r,-R Remove directories recursively" \
3141
3106#define rm_example_usage \ 3142#define rm_example_usage \
3107 "$ rm -rf /tmp/foo\n" 3143 "$ rm -rf /tmp/foo\n"
3108 3144
@@ -3116,33 +3152,34 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3116#define rmmod_trivial_usage \ 3152#define rmmod_trivial_usage \
3117 "[OPTION]... [MODULE]..." 3153 "[OPTION]... [MODULE]..."
3118#define rmmod_full_usage \ 3154#define rmmod_full_usage \
3119 "Unload the specified kernel modules from the kernel" \ 3155 "Unload the specified kernel modules from the kernel\n" \
3120 "\n\nOptions:\n" \ 3156 "\nOptions:" \
3121 " -a Remove all unused modules (recursively)" 3157 "\n -a Remove all unused modules (recursively)" \
3158
3122#define rmmod_example_usage \ 3159#define rmmod_example_usage \
3123 "$ rmmod tulip\n" 3160 "$ rmmod tulip\n"
3124 3161
3125#define route_trivial_usage \ 3162#define route_trivial_usage \
3126 "[{add|del|delete}]" 3163 "[{add|del|delete}]"
3127#define route_full_usage \ 3164#define route_full_usage \
3128 "Edit the kernel's routing tables" \ 3165 "Edit the kernel's routing tables\n" \
3129 "\n\nOptions:\n" \ 3166 "\nOptions:" \
3130 " -n Dont resolve names\n" \ 3167 "\n -n Dont resolve names" \
3131 " -e Display other/more information\n" \ 3168 "\n -e Display other/more information" \
3132 " -A inet" USE_FEATURE_IPV6("{6}") " Select address family" 3169 "\n -A inet" USE_FEATURE_IPV6("{6}") " Select address family" \
3133 3170
3134#define rpm_trivial_usage \ 3171#define rpm_trivial_usage \
3135 "-i -q[ildc]p package.rpm" 3172 "-i -q[ildc]p package.rpm"
3136#define rpm_full_usage \ 3173#define rpm_full_usage \
3137 "Manipulate RPM packages" \ 3174 "Manipulate RPM packages\n" \
3138 "\n\nOptions:" \ 3175 "\nOptions:" \
3139 "\n -i Install package" \ 3176 "\n -i Install package" \
3140 "\n -q Query package" \ 3177 "\n -q Query package" \
3141 "\n -p Query uninstalled package" \ 3178 "\n -p Query uninstalled package" \
3142 "\n -i Show information" \ 3179 "\n -i Show information" \
3143 "\n -l List contents" \ 3180 "\n -l List contents" \
3144 "\n -d List documents" \ 3181 "\n -d List documents" \
3145 "\n -c List config files" 3182 "\n -c List config files" \
3146 3183
3147#define rpm2cpio_trivial_usage \ 3184#define rpm2cpio_trivial_usage \
3148 "package.rpm" 3185 "package.rpm"
@@ -3152,45 +3189,45 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3152#define rtcwake_trivial_usage \ 3189#define rtcwake_trivial_usage \
3153 "[-a | -l | -u] [-d DEV] [-m MODE] [-s SECS | -t TIME]" 3190 "[-a | -l | -u] [-d DEV] [-m MODE] [-s SECS | -t TIME]"
3154#define rtcwake_full_usage \ 3191#define rtcwake_full_usage \
3155 "enter a system sleep state until specified wakeup time\n\n" \ 3192 "Enter a system sleep state until specified wakeup time\n" \
3156 USE_GETOPT_LONG( \ 3193 USE_GETOPT_LONG( \
3157 " -a,--auto Read clock mode from adjtime\n" \ 3194 "\n -a,--auto Read clock mode from adjtime" \
3158 " -l,--local Clock is set to local time\n" \ 3195 "\n -l,--local Clock is set to local time" \
3159 " -u,--utc Clock is set to UTC time\n" \ 3196 "\n -u,--utc Clock is set to UTC time" \
3160 " -d,--device=DEV Specify the RTC device\n" \ 3197 "\n -d,--device=DEV Specify the RTC device" \
3161 " -m,--mode=MODE Set the sleep state (default: standby)\n" \ 3198 "\n -m,--mode=MODE Set the sleep state (default: standby)" \
3162 " -s,--seconds=SEC Set the timeout in SEC seconds from now\n" \ 3199 "\n -s,--seconds=SEC Set the timeout in SEC seconds from now" \
3163 " -t,--time=TIME Set the timeout to TIME seconds from epoch" \ 3200 "\n -t,--time=TIME Set the timeout to TIME seconds from epoch" \
3164 ) \ 3201 ) \
3165 SKIP_GETOPT_LONG( \ 3202 SKIP_GETOPT_LONG( \
3166 " -a Read clock mode from adjtime\n" \ 3203 "\n -a Read clock mode from adjtime" \
3167 " -l Clock is set to local time\n" \ 3204 "\n -l Clock is set to local time" \
3168 " -u Clock is set to UTC time\n" \ 3205 "\n -u Clock is set to UTC time" \
3169 " -d DEV Specify the RTC device\n" \ 3206 "\n -d DEV Specify the RTC device" \
3170 " -m MODE Set the sleep state (default: standby)\n" \ 3207 "\n -m MODE Set the sleep state (default: standby)" \
3171 " -s SEC Set the timeout in SEC seconds from now\n" \ 3208 "\n -s SEC Set the timeout in SEC seconds from now" \
3172 " -t TIME Set the timeout to TIME seconds from epoch" \ 3209 "\n -t TIME Set the timeout to TIME seconds from epoch" \
3173 ) 3210 )
3174 3211
3175#define runcon_trivial_usage \ 3212#define runcon_trivial_usage \
3176 "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n" \ 3213 "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n" \
3177 " runcon CONTEXT COMMAND [args]" 3214 " runcon CONTEXT COMMAND [args]"
3178#define runcon_full_usage \ 3215#define runcon_full_usage \
3179 "Run a program in a different security context\n\n" \ 3216 "Run a program in a different security context\n" \
3180 " CONTEXT Complete security context\n" \ 3217 "\n CONTEXT Complete security context\n" \
3181 USE_GETOPT_LONG( \ 3218 USE_GETOPT_LONG( \
3182 " -c,--compute Compute process transition context before modifying\n" \ 3219 "\n -c,--compute Compute process transition context before modifying" \
3183 " -t,--type=TYPE Type (for same role as parent)\n" \ 3220 "\n -t,--type=TYPE Type (for same role as parent)" \
3184 " -u,--user=USER User identity\n" \ 3221 "\n -u,--user=USER User identity" \
3185 " -r,--role=ROLE Role\n" \ 3222 "\n -r,--role=ROLE Role" \
3186 " -l,--range=RNG Levelrange" \ 3223 "\n -l,--range=RNG Levelrange" \
3187 ) \ 3224 ) \
3188 SKIP_GETOPT_LONG( \ 3225 SKIP_GETOPT_LONG( \
3189 " -c Compute process transition context before modifying\n" \ 3226 "\n -c Compute process transition context before modifying" \
3190 " -t TYPE Type (for same role as parent)\n" \ 3227 "\n -t TYPE Type (for same role as parent)" \
3191 " -u USER User identity\n" \ 3228 "\n -u USER User identity" \
3192 " -r ROLE Role\n" \ 3229 "\n -r ROLE Role" \
3193 " -l RNG Levelrange" \ 3230 "\n -l RNG Levelrange" \
3194 ) 3231 )
3195 3232
3196#define run_parts_trivial_usage \ 3233#define run_parts_trivial_usage \
@@ -3253,23 +3290,23 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3253 "\n -a Append output" \ 3290 "\n -a Append output" \
3254 "\n -c Run COMMAND, not shell" \ 3291 "\n -c Run COMMAND, not shell" \
3255 "\n -f Flush output after each write" \ 3292 "\n -f Flush output after each write" \
3256 "\n -q Quiet" 3293 "\n -q Quiet" \
3257 3294
3258#define sed_trivial_usage \ 3295#define sed_trivial_usage \
3259 "[-efinr] pattern [files...]" 3296 "[-efinr] pattern [files...]"
3260#define sed_full_usage \ 3297#define sed_full_usage \
3261 "Options:\n" \ 3298 "Options:" \
3262 " -e script Add the script to the commands to be executed\n" \ 3299 "\n -e script Add the script to the commands to be executed" \
3263 " -f scriptfile Add scriptfile contents to the\n" \ 3300 "\n -f scriptfile Add scriptfile contents to the" \
3264 " commands to be executed\n" \ 3301 "\n commands to be executed" \
3265 " -i Edit files in-place\n" \ 3302 "\n -i Edit files in-place" \
3266 " -n Suppress automatic printing of pattern space\n" \ 3303 "\n -n Suppress automatic printing of pattern space" \
3267 " -r Use extended regular expression syntax\n" \ 3304 "\n -r Use extended regular expression syntax" \
3268 "\n" \ 3305 "\n" \
3269 "If no -e or -f is given, the first non-option argument is taken as the sed\n" \ 3306 "\nIf no -e or -f is given, the first non-option argument is taken as the sed" \
3270 "script to interpret. All remaining arguments are names of input files; if no\n" \ 3307 "\nscript to interpret. All remaining arguments are names of input files; if no" \
3271 "input files are specified, then the standard input is read. Source files\n" \ 3308 "\ninput files are specified, then the standard input is read. Source files" \
3272 "will not be modified unless -i option is given." 3309 "\nwill not be modified unless -i option is given." \
3273 3310
3274#define sed_example_usage \ 3311#define sed_example_usage \
3275 "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \ 3312 "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \
@@ -3282,16 +3319,16 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3282 "[-w timeout] [-U user] [-P password] [-X]\n" \ 3319 "[-w timeout] [-U user] [-P password] [-X]\n" \
3283 "-t to [-t to]... [-n] [-s subject] [-c charset] server[:port] from [body] [attachment ...]" 3320 "-t to [-t to]... [-n] [-s subject] [-c charset] server[:port] from [body] [attachment ...]"
3284#define sendmail_full_usage \ 3321#define sendmail_full_usage \
3285 "Send an email with optional attachments." \ 3322 "Send an email.\n" \
3286 "\n\nOptions:\n" \ 3323 "\nOptions:" \
3287 " -w timeout Set timeout on network operations\n" \ 3324 "\n -w timeout Set timeout on network operations" \
3288 " -U username Authenticate with specified username/password\n" \ 3325 "\n -U username Authenticate with specified username/password" \
3289 " -P password\n" \ 3326 "\n -P password" \
3290 " -t address Recipient(s). May be repeated\n" \ 3327 "\n -t address Recipient(s). May be repeated" \
3291 " -X Use openssl connection helper for secured servers\n" \ 3328 "\n -X Use openssl connection helper for secured servers" \
3292 " -n Request delivery notification to sender\n" \ 3329 "\n -n Request delivery notification to sender" \
3293 " -s subject Subject\n" \ 3330 "\n -s subject Subject" \
3294 " -c charset Assumed charset for body and subject [utf-8]" 3331 "\n -c charset Assumed charset for body and subject [utf-8]" \
3295 3332
3296#define seq_trivial_usage \ 3333#define seq_trivial_usage \
3297 "[first [increment]] last" 3334 "[first [increment]] last"
@@ -3306,15 +3343,15 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3306#define sestatus_trivial_usage \ 3343#define sestatus_trivial_usage \
3307 "[-vb]" 3344 "[-vb]"
3308#define sestatus_full_usage \ 3345#define sestatus_full_usage \
3309 "-v Verbose\n" \ 3346 " -v Verbose" \
3310 "-b Display current state of booleans" 3347 "\n -b Display current state of booleans" \
3311 3348
3312#define setconsole_trivial_usage \ 3349#define setconsole_trivial_usage \
3313 "[-r" USE_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]" 3350 "[-r" USE_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
3314#define setconsole_full_usage \ 3351#define setconsole_full_usage \
3315 "Redirect system console output to DEVICE (default: /dev/tty)" \ 3352 "Redirect system console output to DEVICE (default: /dev/tty)\n" \
3316 "\n\nOptions:\n" \ 3353 "\nOptions:" \
3317 " -r Reset output to /dev/console" 3354 "\n -r Reset output to /dev/console" \
3318 3355
3319#define setenforce_trivial_usage \ 3356#define setenforce_trivial_usage \
3320 "[Enforcing | Permissive | 1 | 0]" 3357 "[Enforcing | Permissive | 1 | 0]"
@@ -3326,24 +3363,23 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3326 " [-c policyfile] spec_file" \ 3363 " [-c policyfile] spec_file" \
3327 ) \ 3364 ) \
3328 " pathname" 3365 " pathname"
3329
3330#define setfiles_full_usage \ 3366#define setfiles_full_usage \
3331 "Reset file contexts under pathname according to spec_file" \ 3367 "Reset file contexts under pathname according to spec_file\n" \
3332 USE_FEATURE_SETFILES_CHECK_OPTION( \ 3368 USE_FEATURE_SETFILES_CHECK_OPTION( \
3333 "\n -c file Check the validity of the contexts against the specified binary policy" \ 3369 "\n -c file Check the validity of the contexts against the specified binary policy" \
3334 ) \ 3370 ) \
3335 "\n -d Show which specification matched each file" \ 3371 "\n -d Show which specification matched each file" \
3336 "\n -l Log changes in file labels to syslog" \ 3372 "\n -l Log changes in file labels to syslog" \
3337 "\n -n Don't change any file labels" \ 3373 "\n -n Don't change any file labels" \
3338 "\n -q Suppress warnings" \ 3374 "\n -q Suppress warnings" \
3339 "\n -r dir Use an altenate root path" \ 3375 "\n -r dir Use an altenate root path" \
3340 "\n -e dir Exclude directory" \ 3376 "\n -e dir Exclude directory" \
3341 "\n -F Force reset of context to match file_context for customizable files" \ 3377 "\n -F Force reset of context to match file_context for customizable files" \
3342 "\n -o file Save list of files with incorrect context" \ 3378 "\n -o file Save list of files with incorrect context" \
3343 "\n -s Take a list of files from standard input (instead of command line)" \ 3379 "\n -s Take a list of files from standard input (instead of command line)" \
3344 "\n -v Show changes in file labels, if type or role are changing" \ 3380 "\n -v Show changes in file labels, if type or role are changing" \
3345 "\n -vv Show changes in file labels, if type, role, or user are changing" \ 3381 "\n -vv Show changes in file labels, if type, role, or user are changing" \
3346 "\n -W Display warnings about entries that had no matching files" 3382 "\n -W Display warnings about entries that had no matching files" \
3347 3383
3348#define setkeycodes_trivial_usage \ 3384#define setkeycodes_trivial_usage \
3349 "SCANCODE KEYCODE..." 3385 "SCANCODE KEYCODE..."
@@ -3351,7 +3387,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3351 "Set entries into the kernel's scancode-to-keycode map,\n" \ 3387 "Set entries into the kernel's scancode-to-keycode map,\n" \
3352 "allowing unusual keyboards to generate usable keycodes.\n\n" \ 3388 "allowing unusual keyboards to generate usable keycodes.\n\n" \
3353 "SCANCODE may be either xx or e0xx (hexadecimal),\n" \ 3389 "SCANCODE may be either xx or e0xx (hexadecimal),\n" \
3354 "and KEYCODE is given in decimal" 3390 "and KEYCODE is given in decimal" \
3391
3355#define setkeycodes_example_usage \ 3392#define setkeycodes_example_usage \
3356 "$ setkeycodes e030 127\n" 3393 "$ setkeycodes e030 127\n"
3357 3394
@@ -3367,10 +3404,11 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3367 "Change boolean setting" 3404 "Change boolean setting"
3368 3405
3369#define setsid_trivial_usage \ 3406#define setsid_trivial_usage \
3370 "program [arg...]" 3407 "PROG [ARG...]"
3371#define setsid_full_usage \ 3408#define setsid_full_usage \
3372 "Run any program in a new session by calling setsid() before\n" \ 3409 "Run PROG in a new session. PROG will have no controlling terminal\n" \
3373 "exec'ing the rest of its arguments. See setsid(2) for details." 3410 "and will not be affected by keyboard signals (Ctrl-C etc).\n" \
3411 "See setsid(2) for details." \
3374 3412
3375#define lash_trivial_usage \ 3413#define lash_trivial_usage \
3376 "[FILE]...\n" \ 3414 "[FILE]...\n" \
@@ -3387,14 +3425,13 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3387 "[OPTION] [FILEs...]" \ 3425 "[OPTION] [FILEs...]" \
3388 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]") 3426 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
3389#define sha1sum_full_usage \ 3427#define sha1sum_full_usage \
3390 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums.\n" \ 3428 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
3391 "With no FILE, or when FILE is -, read standard input." \ 3429 USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
3392 "\n\nOptions:\n" \ 3430 "\nOptions:" \
3393 USE_FEATURE_MD5_SHA1_SUM_CHECK( \ 3431 "\n -c Check SHA1 sums against given list" \
3394 " -c Check SHA1 sums against given list\n" \ 3432 "\n -s Don't output anything, status code shows success" \
3395 "\nThe following two options are useful only when verifying checksums:\n" \ 3433 "\n -w Warn about improperly formatted SHA1 checksum lines" \
3396 " -s Don't output anything, status code shows success\n" \ 3434 )
3397 " -w Warn about improperly formatted SHA1 checksum lines")
3398 3435
3399#define slattach_trivial_usage \ 3436#define slattach_trivial_usage \
3400 "[-cehmLF] [-s speed] [-p protocol] DEVICEs" 3437 "[-cehmLF] [-s speed] [-p protocol] DEVICEs"
@@ -3429,8 +3466,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3429 USE_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \ 3466 USE_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \
3430 "] [FILE]..." 3467 "] [FILE]..."
3431#define sort_full_usage \ 3468#define sort_full_usage \
3432 "Sort lines of text in the specified files" \ 3469 "Sort lines of text\n" \
3433 "\n\nOptions:" \ 3470 "\nOptions:" \
3434 USE_FEATURE_SORT_BIG( \ 3471 USE_FEATURE_SORT_BIG( \
3435 "\n -b Ignore leading blanks" \ 3472 "\n -b Ignore leading blanks" \
3436 "\n -c Check whether input is sorted" \ 3473 "\n -c Check whether input is sorted" \
@@ -3476,9 +3513,10 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3476 "[OPTION] [INPUT [PREFIX]]" 3513 "[OPTION] [INPUT [PREFIX]]"
3477#define split_full_usage \ 3514#define split_full_usage \
3478 "Options:" \ 3515 "Options:" \
3479 "\n -b n[k|m] Split by bytes" \ 3516 "\n -b n[k|m] Split by bytes" \
3480 "\n -l n Split by lines" \ 3517 "\n -l n Split by lines" \
3481 "\n -a n Use n letters as suffix" 3518 "\n -a n Use n letters as suffix" \
3519
3482#define split_example_usage \ 3520#define split_example_usage \
3483 "$ split TODO foo\n" \ 3521 "$ split TODO foo\n" \
3484 "$ cat TODO | split -a 2 -l 2 TODO_\n" 3522 "$ cat TODO | split -a 2 -l 2 TODO_\n"
@@ -3488,59 +3526,60 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3488 USE_GETOPT_LONG("--start|--stop") SKIP_GETOPT_LONG("-S|-K") \ 3526 USE_GETOPT_LONG("--start|--stop") SKIP_GETOPT_LONG("-S|-K") \
3489 "] ... [-- arguments...]" 3527 "] ... [-- arguments...]"
3490#define start_stop_daemon_full_usage \ 3528#define start_stop_daemon_full_usage \
3491 "Start and stop services" \ 3529 "Start and stop services\n" \
3492 "\n\nOptions:" \ 3530 "\nOptions:" \
3493 USE_GETOPT_LONG( \ 3531 USE_GETOPT_LONG( \
3494 "\n -S,--start Start" \ 3532 "\n -S,--start Start" \
3495 "\n -K,--stop Stop" \ 3533 "\n -K,--stop Stop" \
3496 "\n -a,--startas pathname Starts process specified by pathname" \ 3534 "\n -a,--startas pathname Start process specified by pathname" \
3497 "\n -b,--background Put process into background" \ 3535 "\n -b,--background Put process into background" \
3498 "\n -u,--user username|uid Stop this user's processes" \ 3536 "\n -u,--user username|uid Stop this user's processes" \
3499 "\n -x,--exec executable Program to either start or check" \ 3537 "\n -x,--exec executable Program to either start or check" \
3500 "\n -n,--name process-name Stop processes with this name" \ 3538 "\n -n,--name process-name Stop processes with this name" \
3501 "\n -p,--pidfile pid-file Save or load pid using a pid-file" \ 3539 "\n -p,--pidfile pid-file Save or load pid using a pid-file" \
3502 "\n -m,--make-pidfile Create the -p file and enter pid in it" \ 3540 "\n -m,--make-pidfile Create the -p file and enter pid in it" \
3503 "\n -q,--quiet Quiet" \ 3541 "\n -q,--quiet Quiet" \
3504 USE_FEATURE_START_STOP_DAEMON_FANCY( \ 3542 USE_FEATURE_START_STOP_DAEMON_FANCY( \
3505 "\n -o,--oknodo Exit status 0 if nothing done" \ 3543 "\n -o,--oknodo Exit status 0 if nothing done" \
3506 "\n -v,--verbose Verbose" \ 3544 "\n -v,--verbose Verbose" \
3507 "\n -N,--nicelevel N Add N to process's nice level" \ 3545 "\n -N,--nicelevel N Add N to process's nice level" \
3508 ) \ 3546 ) \
3509 "\n -s,--signal signal Signal to send (default TERM)" \ 3547 "\n -s,--signal signal Signal to send (default TERM)" \
3510 "\n -c,--chuid user[:[grp]] Change to specified user/group" \ 3548 "\n -c,--chuid user[:[grp]] Change to specified user/group" \
3511 ) \ 3549 ) \
3512 SKIP_GETOPT_LONG( \ 3550 SKIP_GETOPT_LONG( \
3513 "\n -S Start" \ 3551 "\n -S Start" \
3514 "\n -K Stop" \ 3552 "\n -K Stop" \
3515 "\n -a pathname Starts process specified by pathname" \ 3553 "\n -a pathname Start process specified by pathname" \
3516 "\n -b Put process into background" \ 3554 "\n -b Put process into background" \
3517 "\n -u username|uid Stop this user's processes" \ 3555 "\n -u username|uid Stop this user's processes" \
3518 "\n -x executable Program to either start or check" \ 3556 "\n -x executable Program to either start or check" \
3519 "\n -n process-name Stop processes with this name" \ 3557 "\n -n process-name Stop processes with this name" \
3520 "\n -p pid-file Save or load pid using a pid-file" \ 3558 "\n -p pid-file Save or load pid using a pid-file" \
3521 "\n -m Create the -p file and enter pid in it" \ 3559 "\n -m Create the -p file and enter pid in it" \
3522 "\n -q Quiet" \ 3560 "\n -q Quiet" \
3523 USE_FEATURE_START_STOP_DAEMON_FANCY( \ 3561 USE_FEATURE_START_STOP_DAEMON_FANCY( \
3524 "\n -o Exit status 0 if nothing done" \ 3562 "\n -o Exit status 0 if nothing done" \
3525 "\n -v Verbose" \ 3563 "\n -v Verbose" \
3526 "\n -N N Add N to process's nice level" \ 3564 "\n -N N Add N to process's nice level" \
3527 ) \ 3565 ) \
3528 "\n -s signal Signal to send (default TERM)" \ 3566 "\n -s signal Signal to send (default TERM)" \
3529 "\n -c user[:[grp]] Change to specified user/group" \ 3567 "\n -c user[:[grp]] Change to specified user/group" \
3530 ) 3568 )
3531 3569
3532#define stat_trivial_usage \ 3570#define stat_trivial_usage \
3533 "[OPTION] FILE..." 3571 "[OPTION] FILE..."
3534#define stat_full_usage \ 3572#define stat_full_usage \
3535 "Display file (default) or filesystem status" \ 3573 "Display file (default) or filesystem status\n" \
3536 "\n\nOptions:\n" \ 3574 "\nOptions:" \
3537 USE_FEATURE_STAT_FORMAT( \ 3575 USE_FEATURE_STAT_FORMAT( \
3538 " -c fmt Use the specified format\n") \ 3576 "\n -c fmt Use the specified format" \
3539 " -f Display filesystem status\n" \ 3577 ) \
3540 " -L Dereference links\n" \ 3578 "\n -f Display filesystem status" \
3541 " -t Display info in terse form" \ 3579 "\n -L Dereference links" \
3580 "\n -t Display info in terse form" \
3542 USE_SELINUX( \ 3581 USE_SELINUX( \
3543 "\n -Z Print security context" \ 3582 "\n -Z Print security context" \
3544 ) \ 3583 ) \
3545 USE_FEATURE_STAT_FORMAT( \ 3584 USE_FEATURE_STAT_FORMAT( \
3546 "\n\nValid format sequences for files:\n" \ 3585 "\n\nValid format sequences for files:\n" \
@@ -3591,47 +3630,47 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3591#define strings_trivial_usage \ 3630#define strings_trivial_usage \
3592 "[-afo] [-n length] [file...]" 3631 "[-afo] [-n length] [file...]"
3593#define strings_full_usage \ 3632#define strings_full_usage \
3594 "Display printable strings in a binary file" \ 3633 "Display printable strings in a binary file\n" \
3595 "\n\nOptions:" \ 3634 "\nOptions:" \
3596 "\n -a Scan whole file (default)" \ 3635 "\n -a Scan whole file (default)" \
3597 "\n -f Precede strings with filenames" \ 3636 "\n -f Precede strings with filenames" \
3598 "\n -n N At least N characters form a string (default 4)" \ 3637 "\n -n N At least N characters form a string (default 4)" \
3599 "\n -o Precede strings with decimal offsets" 3638 "\n -o Precede strings with decimal offsets" \
3600 3639
3601#define stty_trivial_usage \ 3640#define stty_trivial_usage \
3602 "[-a|g] [-F DEVICE] [SETTING]..." 3641 "[-a|g] [-F DEVICE] [SETTING]..."
3603#define stty_full_usage \ 3642#define stty_full_usage \
3604 "Without arguments, prints baud rate, line discipline,\n" \ 3643 "Without arguments, prints baud rate, line discipline,\n" \
3605 "and deviations from stty sane" \ 3644 "and deviations from stty sane\n" \
3606 "\n\nOptions:" \ 3645 "\nOptions:" \
3607 "\n -F DEVICE Open device instead of stdin" \ 3646 "\n -F DEVICE Open device instead of stdin" \
3608 "\n -a Print all current settings in human-readable form" \ 3647 "\n -a Print all current settings in human-readable form" \
3609 "\n -g Print in stty-readable form" \ 3648 "\n -g Print in stty-readable form" \
3610 "\n [SETTING] See manpage" 3649 "\n [SETTING] See manpage" \
3611 3650
3612#define su_trivial_usage \ 3651#define su_trivial_usage \
3613 "[OPTION]... [-] [username]" 3652 "[OPTION]... [-] [username]"
3614#define su_full_usage \ 3653#define su_full_usage \
3615 "Change user id or become root" \ 3654 "Change user id or become root\n" \
3616 "\n\nOptions:" \ 3655 "\nOptions:" \
3617 "\n -p, -m Preserve environment" \ 3656 "\n -p, -m Preserve environment" \
3618 "\n -c Command to pass to 'sh -c'" \ 3657 "\n -c Command to pass to 'sh -c'" \
3619 "\n -s Shell to use instead of default shell" 3658 "\n -s Shell to use instead of default shell" \
3620 3659
3621#define sulogin_trivial_usage \ 3660#define sulogin_trivial_usage \
3622 "[OPTION]... [tty-device]" 3661 "[OPTION]... [tty-device]"
3623#define sulogin_full_usage \ 3662#define sulogin_full_usage \
3624 "Single user login" \ 3663 "Single user login\n" \
3625 "\n\nOptions:" \ 3664 "\nOptions:" \
3626 "\n -t Timeout" 3665 "\n -t Timeout" \
3627 3666
3628#define sum_trivial_usage \ 3667#define sum_trivial_usage \
3629 "[rs] [files...]" 3668 "[rs] [files...]"
3630#define sum_full_usage \ 3669#define sum_full_usage \
3631 "Checksum and count the blocks in a file" \ 3670 "Checksum and count the blocks in a file\n" \
3632 "\n\nOptions:\n" \ 3671 "\nOptions:" \
3633 " -r Use BSD sum algorithm (1K blocks)\n" \ 3672 "\n -r Use BSD sum algorithm (1K blocks)" \
3634 " -s Use System V sum algorithm (512byte blocks)" 3673 "\n -s Use System V sum algorithm (512byte blocks)" \
3635 3674
3636#define sv_trivial_usage \ 3675#define sv_trivial_usage \
3637 "[-v] [-w sec] command service..." 3676 "[-v] [-w sec] command service..."
@@ -3647,36 +3686,36 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3647 "exit: send TERM and CONT signals to service and log service. If they exit,\n" \ 3686 "exit: send TERM and CONT signals to service and log service. If they exit,\n" \
3648 " runsv exits too\n" \ 3687 " runsv exits too\n" \
3649 "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \ 3688 "pause, cont, hup, alarm, interrupt, quit, 1, 2, term, kill: send\n" \
3650 "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" 3689 "STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, KILL signal to service" \
3651 3690
3652#define svlogd_trivial_usage \ 3691#define svlogd_trivial_usage \
3653 "[-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir..." 3692 "[-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir..."
3654#define svlogd_full_usage \ 3693#define svlogd_full_usage \
3655 "Continuously read log data from standard input, optionally " \ 3694 "Continuously read log data from standard input, optionally " \
3656 "filter log messages, and write the data to one or more automatically " \ 3695 "filter log messages, and write the data to one or more automatically " \
3657 "rotated logs" 3696 "rotated logs" \
3658 3697
3659#define swapoff_trivial_usage \ 3698#define swapoff_trivial_usage \
3660 "[-a] [DEVICE]" 3699 "[-a] [DEVICE]"
3661#define swapoff_full_usage \ 3700#define swapoff_full_usage \
3662 "Stop swapping virtual memory pages on DEVICE" \ 3701 "Stop swapping on DEVICE\n" \
3663 "\n\nOptions:\n" \ 3702 "\nOptions:" \
3664 " -a Stop swapping on all swap devices" 3703 "\n -a Stop swapping on all swap devices" \
3665 3704
3666#define swapon_trivial_usage \ 3705#define swapon_trivial_usage \
3667 "[-a] [DEVICE]" 3706 "[-a] [DEVICE]"
3668#define swapon_full_usage \ 3707#define swapon_full_usage \
3669 "Start swapping virtual memory pages on DEVICE" \ 3708 "Start swapping on DEVICE\n" \
3670 "\n\nOptions:\n" \ 3709 "\nOptions:" \
3671 " -a Start swapping on all swap devices" 3710 "\n -a Start swapping on all swap devices" \
3672 3711
3673#define switch_root_trivial_usage \ 3712#define switch_root_trivial_usage \
3674 "[-c /dev/console] NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]" 3713 "[-c /dev/console] NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]"
3675#define switch_root_full_usage \ 3714#define switch_root_full_usage \
3676 "Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \ 3715 "Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \
3677 "and exec NEW_INIT" \ 3716 "and exec NEW_INIT\n" \
3678 "\n\nOptions:\n" \ 3717 "\nOptions:" \
3679 " -c Redirect console to device on new root" 3718 "\n -c Redirect console to device on new root" \
3680 3719
3681#define sync_trivial_usage \ 3720#define sync_trivial_usage \
3682 "" 3721 ""
@@ -3686,14 +3725,15 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3686#define sysctl_trivial_usage \ 3725#define sysctl_trivial_usage \
3687 "[OPTIONS]... [VALUE]..." 3726 "[OPTIONS]... [VALUE]..."
3688#define sysctl_full_usage \ 3727#define sysctl_full_usage \
3689 "Configure kernel parameters at runtime" \ 3728 "Configure kernel parameters at runtime\n" \
3690 "\n\nOptions:\n" \ 3729 "\nOptions:" \
3691 " -n Disable printing of key names\n" \ 3730 "\n -n Disable printing of key names" \
3692 " -e Don't warn about unknown keys\n" \ 3731 "\n -e Don't warn about unknown keys" \
3693 " -w Change sysctl setting\n" \ 3732 "\n -w Change sysctl setting" \
3694 " -p FILE Load sysctl settings from FILE (default /etc/sysctl.conf)\n" \ 3733 "\n -p FILE Load sysctl settings from FILE (default /etc/sysctl.conf)" \
3695 " -a Display all values\n" \ 3734 "\n -a Display all values" \
3696 " -A Display all values in table form" 3735 "\n -A Display all values in table form" \
3736
3697#define sysctl_example_usage \ 3737#define sysctl_example_usage \
3698 "sysctl [-n] [-e] variable...\n" \ 3738 "sysctl [-n] [-e] variable...\n" \
3699 "sysctl [-n] [-e] -w variable=value...\n" \ 3739 "sysctl [-n] [-e] -w variable=value...\n" \
@@ -3720,9 +3760,10 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3720 USE_FEATURE_SYSLOGD_DUP( \ 3760 USE_FEATURE_SYSLOGD_DUP( \
3721 "\n -D Drop duplicates") \ 3761 "\n -D Drop duplicates") \
3722 USE_FEATURE_IPC_SYSLOG( \ 3762 USE_FEATURE_IPC_SYSLOG( \
3723 "\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") 3763 "\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") \
3724 /* NB: -Csize shouldn't have space (because size is optional) */ 3764 /* NB: -Csize shouldn't have space (because size is optional) */
3725/* "\n -m MIN Minutes between MARK lines (default=20, 0=off)" */ 3765/* "\n -m MIN Minutes between MARK lines (default=20, 0=off)" */
3766
3726#define syslogd_example_usage \ 3767#define syslogd_example_usage \
3727 "$ syslogd -R masterlog:514\n" \ 3768 "$ syslogd -R masterlog:514\n" \
3728 "$ syslogd -R 192.168.1.1:601\n" 3769 "$ syslogd -R 192.168.1.1:601\n"
@@ -3730,27 +3771,28 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3730#define tac_trivial_usage \ 3771#define tac_trivial_usage \
3731 "[FILE]..." 3772 "[FILE]..."
3732#define tac_full_usage \ 3773#define tac_full_usage \
3733 "Concatenates FILE(s) and prints them to stdout in reverse" 3774 "Concatenate FILE(s) and print them in reverse"
3734 3775
3735#define tail_trivial_usage \ 3776#define tail_trivial_usage \
3736 "[OPTION]... [FILE]..." 3777 "[OPTION]... [FILE]..."
3737#define tail_full_usage \ 3778#define tail_full_usage \
3738 "Print last 10 lines of each FILE to standard output.\n" \ 3779 "Print last 10 lines of each FILE to standard output.\n" \
3739 "With more than one FILE, precede each with a header giving the\n" \ 3780 "With more than one FILE, precede each with a header giving the\n" \
3740 "file name. With no FILE, or when FILE is -, read standard input." \ 3781 "file name. With no FILE, or when FILE is -, read standard input.\n" \
3741 "\n\nOptions:" \ 3782 "\nOptions:" \
3742 USE_FEATURE_FANCY_TAIL( \ 3783 USE_FEATURE_FANCY_TAIL( \
3743 "\n -c N[kbm] Output the last N bytes") \ 3784 "\n -c N[kbm] Output the last N bytes") \
3744 "\n -n N[kbm] Print last N lines instead of last 10" \ 3785 "\n -n N[kbm] Print last N lines instead of last 10" \
3745 "\n -f Output data as the file grows" \ 3786 "\n -f Output data as the file grows" \
3746 USE_FEATURE_FANCY_TAIL( \ 3787 USE_FEATURE_FANCY_TAIL( \
3747 "\n -q Never output headers giving file names" \ 3788 "\n -q Never output headers giving file names" \
3748 "\n -s SEC Wait SEC seconds between reads with -f" \ 3789 "\n -s SEC Wait SEC seconds between reads with -f" \
3749 "\n -v Always output headers giving file names" \ 3790 "\n -v Always output headers giving file names" \
3750 "\n\n" \ 3791 "\n\n" \
3751 "If the first character of N (bytes or lines) is a '+', output begins with\n" \ 3792 "If the first character of N (bytes or lines) is a '+', output begins with\n" \
3752 "the Nth item from the start of each file, otherwise, print the last N items\n" \ 3793 "the Nth item from the start of each file, otherwise, print the last N items\n" \
3753 "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." ) 3794 "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." ) \
3795
3754#define tail_example_usage \ 3796#define tail_example_usage \
3755 "$ tail -n 1 /etc/resolv.conf\n" \ 3797 "$ tail -n 1 /etc/resolv.conf\n" \
3756 "nameserver 10.0.0.1\n" 3798 "nameserver 10.0.0.1\n"
@@ -3762,29 +3804,35 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3762 USE_FEATURE_TAR_FROM("[-X FILE] ") \ 3804 USE_FEATURE_TAR_FROM("[-X FILE] ") \
3763 "[-f TARFILE] [-C DIR] [FILE(s)]..." 3805 "[-f TARFILE] [-C DIR] [FILE(s)]..."
3764#define tar_full_usage \ 3806#define tar_full_usage \
3765 "Create, extract, or list files from a tar file" \ 3807 "Create, extract, or list files from a tar file\n" \
3766 "\n\nOptions:\n" \ 3808 "\nOptions:" \
3767 USE_FEATURE_TAR_CREATE( \ 3809 USE_FEATURE_TAR_CREATE( \
3768 " c Create\n") \ 3810 "\n c Create") \
3769 " x Extract\n" \ 3811 "\n x Extract" \
3770 " t List\n" \ 3812 "\n t List" \
3771 "\nArchive format selection:\n" \ 3813 "\nArchive format selection:" \
3772 USE_FEATURE_TAR_GZIP( \ 3814 USE_FEATURE_TAR_GZIP( \
3773 " z Filter the archive through gzip\n") \ 3815 "\n z Filter the archive through gzip" \
3816 ) \
3774 USE_FEATURE_TAR_BZIP2( \ 3817 USE_FEATURE_TAR_BZIP2( \
3775 " j Filter the archive through bzip2\n") \ 3818 "\n j Filter the archive through bzip2" \
3819 ) \
3776 USE_FEATURE_TAR_LZMA( \ 3820 USE_FEATURE_TAR_LZMA( \
3777 " a Filter the archive through lzma\n") \ 3821 "\n a Filter the archive through lzma" \
3822 ) \
3778 USE_FEATURE_TAR_COMPRESS( \ 3823 USE_FEATURE_TAR_COMPRESS( \
3779 " Z Filter the archive through compress\n") \ 3824 "\n Z Filter the archive through compress" \
3780 "\nFile selection:\n" \ 3825 ) \
3781 " f Name of TARFILE or \"-\" for stdin\n" \ 3826 "\nFile selection:" \
3782 " O Extract to stdout\n" \ 3827 "\n f Name of TARFILE or \"-\" for stdin" \
3828 "\n O Extract to stdout" \
3783 USE_FEATURE_TAR_FROM( \ 3829 USE_FEATURE_TAR_FROM( \
3784 " exclude File to exclude\n" \ 3830 "\n exclude File to exclude" \
3785 " X File with names to exclude\n") \ 3831 "\n X File with names to exclude" \
3786 " C Change to directory DIR before operation\n" \ 3832 ) \
3787 " v Verbose" 3833 "\n C Change to directory DIR before operation" \
3834 "\n v Verbose" \
3835
3788#define tar_example_usage \ 3836#define tar_example_usage \
3789 "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \ 3837 "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \
3790 "$ tar -cf /tmp/tarball.tar /usr/local\n" 3838 "$ tar -cf /tmp/tarball.tar /usr/local\n"
@@ -3792,9 +3840,10 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3792#define taskset_trivial_usage \ 3840#define taskset_trivial_usage \
3793 "[OPTIONS] [mask] [pid | command [arg]...]" 3841 "[OPTIONS] [mask] [pid | command [arg]...]"
3794#define taskset_full_usage \ 3842#define taskset_full_usage \
3795 "Set or get CPU affinity" \ 3843 "Set or get CPU affinity\n" \
3796 "\n\nOptions:\n" \ 3844 "\nOptions:" \
3797 " -p Operate on an existing PID" 3845 "\n -p Operate on an existing PID" \
3846
3798#define taskset_example_usage \ 3847#define taskset_example_usage \
3799 "$ taskset 0x7 ./dgemm_test&\n" \ 3848 "$ taskset 0x7 ./dgemm_test&\n" \
3800 "$ taskset -p 0x1 $!\n" \ 3849 "$ taskset -p 0x1 $!\n" \
@@ -3809,10 +3858,11 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3809#define tee_trivial_usage \ 3858#define tee_trivial_usage \
3810 "[OPTION]... [FILE]..." 3859 "[OPTION]... [FILE]..."
3811#define tee_full_usage \ 3860#define tee_full_usage \
3812 "Copy standard input to each FILE, and also to standard output" \ 3861 "Copy standard input to each FILE, and also to standard output\n" \
3813 "\n\nOptions:\n" \ 3862 "\nOptions:" \
3814 " -a Append to the given FILEs, do not overwrite\n" \ 3863 "\n -a Append to the given FILEs, do not overwrite" \
3815 " -i Ignore interrupt signals (SIGINT)" 3864 "\n -i Ignore interrupt signals (SIGINT)" \
3865
3816#define tee_example_usage \ 3866#define tee_example_usage \
3817 "$ echo \"Hello\" | tee /tmp/foo\n" \ 3867 "$ echo \"Hello\" | tee /tmp/foo\n" \
3818 "$ cat /tmp/foo\n" \ 3868 "$ cat /tmp/foo\n" \
@@ -3825,7 +3875,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3825 "Connect to telnet server\n" \ 3875 "Connect to telnet server\n" \
3826 "\nOptions:" \ 3876 "\nOptions:" \
3827 "\n -a Attempt an automatic login with USER variable" \ 3877 "\n -a Attempt an automatic login with USER variable" \
3828 "\n -l USER Attempt an automatic login with USER argument" 3878 "\n -l USER Attempt an automatic login with USER argument" \
3879
3829#else 3880#else
3830#define telnet_trivial_usage \ 3881#define telnet_trivial_usage \
3831 "HOST [PORT]" 3882 "HOST [PORT]"
@@ -3837,17 +3888,17 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3837 "[OPTION]" 3888 "[OPTION]"
3838#define telnetd_full_usage \ 3889#define telnetd_full_usage \
3839 "Handle incoming telnet connections" \ 3890 "Handle incoming telnet connections" \
3840 SKIP_FEATURE_TELNETD_STANDALONE(" via inetd") \ 3891 SKIP_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
3841 "\n\nOptions:" \ 3892 "\nOptions:" \
3842 "\n -l LOGIN Exec LOGIN on connect" \ 3893 "\n -l LOGIN Exec LOGIN on connect" \
3843 "\n -f issue_file Display issue_file instead of /etc/issue" \ 3894 "\n -f issue_file Display issue_file instead of /etc/issue" \
3844 "\n -K Close connection as soon as login exits" \ 3895 "\n -K Close connection as soon as login exits" \
3845 "\n (normally wait until all programs close slave pty)" \ 3896 "\n (normally wait until all programs close slave pty)" \
3846 USE_FEATURE_TELNETD_STANDALONE( \ 3897 USE_FEATURE_TELNETD_STANDALONE( \
3847 "\n -p PORT Port to listen to" \ 3898 "\n -p PORT Port to listen on" \
3848 "\n -b ADDR Address to bind to" \ 3899 "\n -b ADDR Address to bind to" \
3849 "\n -F Run in foreground" \ 3900 "\n -F Run in foreground" \
3850 "\n -i Run as inetd subservice" \ 3901 "\n -i Run as inetd subservice" \
3851 ) 3902 )
3852 3903
3853#define test_trivial_usage \ 3904#define test_trivial_usage \
@@ -3888,7 +3939,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3888 "\n immediately. 'msg' is written to the peer before close" \ 3939 "\n immediately. 'msg' is written to the peer before close" \
3889 "\n-h Look up peer's hostname" \ 3940 "\n-h Look up peer's hostname" \
3890 "\n-E Do not set up environment variables" \ 3941 "\n-E Do not set up environment variables" \
3891 "\n-v Verbose" 3942 "\n-v Verbose" \
3892 3943
3893#define udpsvd_trivial_usage \ 3944#define udpsvd_trivial_usage \
3894 "[-hEv] [-c n] [-u user] [-l name] ip port prog" 3945 "[-hEv] [-c n] [-u user] [-l name] ip port prog"
@@ -3904,45 +3955,46 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3904 "\n-c n Handle up to n connections simultaneously" \ 3955 "\n-c n Handle up to n connections simultaneously" \
3905 "\n-h Look up peer's hostname" \ 3956 "\n-h Look up peer's hostname" \
3906 "\n-E Do not set up environment variables" \ 3957 "\n-E Do not set up environment variables" \
3907 "\n-v Verbose" 3958 "\n-v Verbose" \
3908 3959
3909#define tftp_trivial_usage \ 3960#define tftp_trivial_usage \
3910 "[OPTION]... HOST [PORT]" 3961 "[OPTION]... HOST [PORT]"
3911#define tftp_full_usage \ 3962#define tftp_full_usage \
3912 "Transfer a file from/to tftp server using \"octet\" mode" \ 3963 "Transfer a file from/to tftp server using \"octet\" mode\n" \
3913 "\n\nOptions:" \ 3964 "\nOptions:" \
3914 "\n -l FILE Local FILE" \ 3965 "\n -l FILE Local FILE" \
3915 "\n -r FILE Remote FILE" \ 3966 "\n -r FILE Remote FILE" \
3916 USE_FEATURE_TFTP_GET( \ 3967 USE_FEATURE_TFTP_GET( \
3917 "\n -g Get file" \ 3968 "\n -g Get file" \
3918 ) \ 3969 ) \
3919 USE_FEATURE_TFTP_PUT( \ 3970 USE_FEATURE_TFTP_PUT( \
3920 "\n -p Put file" \ 3971 "\n -p Put file" \
3921 ) \ 3972 ) \
3922 USE_FEATURE_TFTP_BLOCKSIZE( \ 3973 USE_FEATURE_TFTP_BLOCKSIZE( \
3923 "\n -b SIZE Transfer blocks of SIZE octets" \ 3974 "\n -b SIZE Transfer blocks of SIZE octets" \
3924 ) 3975 )
3925#define time_trivial_usage \ 3976#define time_trivial_usage \
3926 "[OPTION]... COMMAND [ARGS...]" 3977 "[OPTION]... COMMAND [ARGS...]"
3927#define time_full_usage \ 3978#define time_full_usage \
3928 "Run the program COMMAND with arguments ARGS. When COMMAND finishes,\n" \ 3979 "Run the program COMMAND with arguments ARGS. When COMMAND finishes,\n" \
3929 "COMMAND's resource usage information is displayed." \ 3980 "COMMAND's resource usage information is displayed.\n" \
3930 "\n\nOptions:\n" \ 3981 "\nOptions:" \
3931 " -v Verbose" 3982 "\n -v Verbose" \
3932 3983
3933#define top_trivial_usage \ 3984#define top_trivial_usage \
3934 "[-b] [-n COUNT] [-d SECONDS]" 3985 "[-b] [-n COUNT] [-d SECONDS]"
3935#define top_full_usage \ 3986#define top_full_usage \
3936 "Provide a view of process activity in real time.\n" \ 3987 "Provide a view of process activity in real time.\n" \
3937 "Read the status of all processes from /proc each SECONDS\n" \ 3988 "Read the status of all processes from /proc each SECONDS\n" \
3938 "and show the status for however many processes will fit on the screen." 3989 "and show the status for however many processes will fit on the screen." \
3939 3990
3940#define touch_trivial_usage \ 3991#define touch_trivial_usage \
3941 "[-c] FILE [FILE...]" 3992 "[-c] FILE [FILE...]"
3942#define touch_full_usage \ 3993#define touch_full_usage \
3943 "Update the last-modified date on the given FILE[s]" \ 3994 "Update the last-modified date on the given FILE[s]\n" \
3944 "\n\nOptions:\n" \ 3995 "\nOptions:" \
3945 " -c Do not create any files" 3996 "\n -c Do not create any files" \
3997
3946#define touch_example_usage \ 3998#define touch_example_usage \
3947 "$ ls -l /tmp/foo\n" \ 3999 "$ ls -l /tmp/foo\n" \
3948 "/bin/ls: /tmp/foo: No such file or directory\n" \ 4000 "/bin/ls: /tmp/foo: No such file or directory\n" \
@@ -3954,11 +4006,12 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3954 "[-cds] STRING1 [STRING2]" 4006 "[-cds] STRING1 [STRING2]"
3955#define tr_full_usage \ 4007#define tr_full_usage \
3956 "Translate, squeeze, and/or delete characters from\n" \ 4008 "Translate, squeeze, and/or delete characters from\n" \
3957 "standard input, writing to standard output" \ 4009 "standard input, writing to standard output\n" \
3958 "\n\nOptions:\n" \ 4010 "\nOptions:" \
3959 " -c Take complement of STRING1\n" \ 4011 "\n -c Take complement of STRING1" \
3960 " -d Delete input characters coded STRING1\n" \ 4012 "\n -d Delete input characters coded STRING1" \
3961 " -s Squeeze multiple output characters of STRING2 into one character" 4013 "\n -s Squeeze multiple output characters of STRING2 into one character" \
4014
3962#define tr_example_usage \ 4015#define tr_example_usage \
3963 "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \ 4016 "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \
3964 "hello world\n" 4017 "hello world\n"
@@ -3966,26 +4019,26 @@ USE_FEATURE_BRCTL_FANCY("\n" \
3966#define traceroute_trivial_usage \ 4019#define traceroute_trivial_usage \
3967 "[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \ 4020 "[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \
3968 " [-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \ 4021 " [-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \
3969 " [-z pausemsecs] host [data size]" 4022 " [-z pausemsecs] HOST [data size]"
3970#define traceroute_full_usage \ 4023#define traceroute_full_usage \
3971 "Trace the route to \"host\"" \ 4024 "Trace the route to HOST\n" \
3972 "\n\nOptions:\n" \ 4025 "\nOptions:" \
3973 " -F Set the don't fragment bit\n" \ 4026 "\n -F Set the don't fragment bit" \
3974 " -I Use ICMP ECHO instead of UDP datagrams\n" \ 4027 "\n -I Use ICMP ECHO instead of UDP datagrams" \
3975 " -l Display the ttl value of the returned packet\n" \ 4028 "\n -l Display the ttl value of the returned packet" \
3976 " -d Set SO_DEBUG options to socket\n" \ 4029 "\n -d Set SO_DEBUG options to socket" \
3977 " -n Print hop addresses numerically rather than symbolically\n" \ 4030 "\n -n Print hop addresses numerically rather than symbolically" \
3978 " -r Bypass the normal routing tables and send directly to a host\n" \ 4031 "\n -r Bypass the normal routing tables and send directly to a host" \
3979 " -v Verbose\n" \ 4032 "\n -v Verbose" \
3980 " -m max_ttl Max time-to-live (max number of hops)\n" \ 4033 "\n -m max_ttl Max time-to-live (max number of hops)" \
3981 " -p port# Base UDP port number used in probes\n" \ 4034 "\n -p port# Base UDP port number used in probes" \
3982 " (default is 33434)\n" \ 4035 "\n (default is 33434)" \
3983 " -q nqueries Number of probes per 'ttl' (default 3)\n" \ 4036 "\n -q nqueries Number of probes per 'ttl' (default 3)" \
3984 " -s src_addr IP address to use as the source address\n" \ 4037 "\n -s src_addr IP address to use as the source address" \
3985 " -t tos Type-of-service in probe packets (default 0)\n" \ 4038 "\n -t tos Type-of-service in probe packets (default 0)" \
3986 " -w wait Time in seconds to wait for a response\n" \ 4039 "\n -w wait Time in seconds to wait for a response" \
3987 " (default 3 sec)\n" \ 4040 "\n (default 3 sec)" \
3988 " -g Loose source route gateway (8 max)" 4041 "\n -g Loose source route gateway (8 max)" \
3989 4042
3990#define true_trivial_usage \ 4043#define true_trivial_usage \
3991 "" 4044 ""
@@ -4000,9 +4053,10 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4000 "" 4053 ""
4001#define tty_full_usage \ 4054#define tty_full_usage \
4002 "Print file name of standard input's terminal" \ 4055 "Print file name of standard input's terminal" \
4003 USE_INCLUDE_SUSv2( \ 4056 USE_INCLUDE_SUSv2( "\n" \
4004 "\n\nOptions:\n" \ 4057 "\nOptions:" \
4005 " -s Print nothing, only return exit status") 4058 "\n -s Print nothing, only return exit status" \
4059 )
4006#define tty_example_usage \ 4060#define tty_example_usage \
4007 "$ tty\n" \ 4061 "$ tty\n" \
4008 "/dev/tty2\n" 4062 "/dev/tty2\n"
@@ -4028,54 +4082,54 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4028#define udhcpc_full_usage \ 4082#define udhcpc_full_usage \
4029 USE_GETOPT_LONG( \ 4083 USE_GETOPT_LONG( \
4030 " -V,--vendorclass=CLASSID Vendor class identifier" \ 4084 " -V,--vendorclass=CLASSID Vendor class identifier" \
4031 "\n -i,--interface=INTERFACE Interface to use (default eth0)" \ 4085 "\n -i,--interface=INTERFACE Interface to use (default eth0)" \
4032 "\n -H,-h,--hostname=HOSTNAME Client hostname" \ 4086 "\n -H,-h,--hostname=HOSTNAME Client hostname" \
4033 "\n -c,--clientid=CLIENTID Client identifier" \ 4087 "\n -c,--clientid=CLIENTID Client identifier" \
4034 "\n -C,--clientid-none Suppress default client identifier" \ 4088 "\n -C,--clientid-none Suppress default client identifier" \
4035 "\n -p,--pidfile=file Create pidfile" \ 4089 "\n -p,--pidfile=file Create pidfile" \
4036 "\n -r,--request=IP IP address to request" \ 4090 "\n -r,--request=IP IP address to request" \
4037 "\n -s,--script=file Run file at dhcp events (default /usr/share/udhcpc/default.script)" \ 4091 "\n -s,--script=file Run file at dhcp events (default /usr/share/udhcpc/default.script)" \
4038 "\n -t,--retries=N Send up to N request packets" \ 4092 "\n -t,--retries=N Send up to N request packets" \
4039 "\n -T,--timeout=N Try to get a lease for N seconds (default 3)" \ 4093 "\n -T,--timeout=N Try to get a lease for N seconds (default 3)" \
4040 "\n -A,--tryagain=N Wait N seconds (default 20) after failure" \ 4094 "\n -A,--tryagain=N Wait N seconds (default 20) after failure" \
4041 "\n -f,--foreground Run in foreground" \ 4095 "\n -f,--foreground Run in foreground" \
4042 "\n -b,--background Background if lease is not immediately obtained" \ 4096 "\n -b,--background Background if lease is not immediately obtained" \
4043 "\n -S,--syslog Log to syslog too" \ 4097 "\n -S,--syslog Log to syslog too" \
4044 "\n -n,--now Exit with failure if lease is not immediately obtained" \ 4098 "\n -n,--now Exit with failure if lease is not immediately obtained" \
4045 "\n -q,--quit Quit after obtaining lease" \ 4099 "\n -q,--quit Quit after obtaining lease" \
4046 "\n -R,--release Release IP on quit" \ 4100 "\n -R,--release Release IP on quit" \
4047 "\n -O,--request-option=OPT Request DHCP option OPT from server" \ 4101 "\n -O,--request-option=OPT Request DHCP option OPT from server" \
4048 USE_FEATURE_UDHCP_PORT( \ 4102 USE_FEATURE_UDHCP_PORT( \
4049 "\n -P,--client-port N Use port N instead of default 68" \ 4103 "\n -P,--client-port N Use port N instead of default 68" \
4050 ) \ 4104 ) \
4051 USE_FEATURE_UDHCPC_ARPING( \ 4105 USE_FEATURE_UDHCPC_ARPING( \
4052 "\n -a,--arping Use arping to validate offered address" \ 4106 "\n -a,--arping Use arping to validate offered address" \
4053 ) \ 4107 ) \
4054 ) \ 4108 ) \
4055 SKIP_GETOPT_LONG( \ 4109 SKIP_GETOPT_LONG( \
4056 " -V CLASSID Vendor class identifier" \ 4110 " -V CLASSID Vendor class identifier" \
4057 "\n -i INTERFACE Interface to use (default: eth0)" \ 4111 "\n -i INTERFACE Interface to use (default: eth0)" \
4058 "\n -H,-h HOSTNAME Client hostname" \ 4112 "\n -H,-h HOSTNAME Client hostname" \
4059 "\n -c CLIENTID Client identifier" \ 4113 "\n -c CLIENTID Client identifier" \
4060 "\n -C Suppress default client identifier" \ 4114 "\n -C Suppress default client identifier" \
4061 "\n -p file Create pidfile" \ 4115 "\n -p file Create pidfile" \
4062 "\n -r IP IP address to request" \ 4116 "\n -r IP IP address to request" \
4063 "\n -s file Run file at dhcp events (default /usr/share/udhcpc/default.script)" \ 4117 "\n -s file Run file at dhcp events (default /usr/share/udhcpc/default.script)" \
4064 "\n -t N Send up to N request packets" \ 4118 "\n -t N Send up to N request packets" \
4065 "\n -T N Try to get a lease for N seconds (default 3)" \ 4119 "\n -T N Try to get a lease for N seconds (default 3)" \
4066 "\n -A N Wait N seconds (default 20) after failure" \ 4120 "\n -A N Wait N seconds (default 20) after failure" \
4067 "\n -f Run in foreground" \ 4121 "\n -f Run in foreground" \
4068 "\n -b Background if lease is not immediately obtained" \ 4122 "\n -b Background if lease is not immediately obtained" \
4069 "\n -S Log to syslog too" \ 4123 "\n -S Log to syslog too" \
4070 "\n -n Exit with failure if lease is not immediately obtained" \ 4124 "\n -n Exit with failure if lease is not immediately obtained" \
4071 "\n -q Quit after obtaining lease" \ 4125 "\n -q Quit after obtaining lease" \
4072 "\n -R Release IP on quit" \ 4126 "\n -R Release IP on quit" \
4073 "\n -O OPT Request DHCP option OPT from server" \ 4127 "\n -O OPT Request DHCP option OPT from server" \
4074 USE_FEATURE_UDHCP_PORT( \ 4128 USE_FEATURE_UDHCP_PORT( \
4075 "\n -P N Use port N instead of default 68" \ 4129 "\n -P N Use port N instead of default 68" \
4076 ) \ 4130 ) \
4077 USE_FEATURE_UDHCPC_ARPING( \ 4131 USE_FEATURE_UDHCPC_ARPING( \
4078 "\n -a Use arping to validate offered address" \ 4132 "\n -a Use arping to validate offered address" \
4079 ) \ 4133 ) \
4080 ) 4134 )
4081 4135
@@ -4083,42 +4137,47 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4083 "[-fS]" USE_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \ 4137 "[-fS]" USE_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \
4084 4138
4085#define udhcpd_full_usage \ 4139#define udhcpd_full_usage \
4086 "DHCP server" \ 4140 "DHCP server\n" \
4087 "\n -f Run in foreground" \ 4141 "\n -f Run in foreground" \
4088 "\n -S Log to syslog too" \ 4142 "\n -S Log to syslog too" \
4089 USE_FEATURE_UDHCP_PORT( \ 4143 USE_FEATURE_UDHCP_PORT( \
4090 "\n -P N Use port N instead of default 67" \ 4144 "\n -P N Use port N instead of default 67" \
4091 ) 4145 )
4092 4146
4093#define umount_trivial_usage \ 4147#define umount_trivial_usage \
4094 "[flags] FILESYSTEM|DIRECTORY" 4148 "[flags] FILESYSTEM|DIRECTORY"
4095#define umount_full_usage \ 4149#define umount_full_usage \
4096 "Unmount file systems" \ 4150 "Unmount file systems\n" \
4097 "\n\nOptions:" \ 4151 "\nOptions:" \
4098 USE_FEATURE_UMOUNT_ALL( \ 4152 USE_FEATURE_UMOUNT_ALL( \
4099 "\n -a Unmount all file systems" USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab")) \ 4153 "\n -a Unmount all file systems" USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \
4154 ) \
4100 USE_FEATURE_MTAB_SUPPORT( \ 4155 USE_FEATURE_MTAB_SUPPORT( \
4101 "\n -n Don't erase /etc/mtab entries") \ 4156 "\n -n Don't erase /etc/mtab entries" \
4102 "\n -r Try to remount devices as read-only if mount is busy" \ 4157 ) \
4103 "\n -l Lazy umount (detach filesystem)" \ 4158 "\n -r Try to remount devices as read-only if mount is busy" \
4104 "\n -f Force umount (i.e., unreachable NFS server)" \ 4159 "\n -l Lazy umount (detach filesystem)" \
4160 "\n -f Force umount (i.e., unreachable NFS server)" \
4105 USE_FEATURE_MOUNT_LOOP( \ 4161 USE_FEATURE_MOUNT_LOOP( \
4106 "\n -d Free loop device if it has been used") 4162 "\n -d Free loop device if it has been used" \
4163 )
4164
4107#define umount_example_usage \ 4165#define umount_example_usage \
4108 "$ umount /dev/hdc1\n" 4166 "$ umount /dev/hdc1\n"
4109 4167
4110#define uname_trivial_usage \ 4168#define uname_trivial_usage \
4111 "[-amnrspv]" 4169 "[-amnrspv]"
4112#define uname_full_usage \ 4170#define uname_full_usage \
4113 "Print system information." \ 4171 "Print system information.\n" \
4114 "\n\nOptions:\n" \ 4172 "\nOptions:" \
4115 " -a Print all\n" \ 4173 "\n -a Print all" \
4116 " -m The machine (hardware) type\n" \ 4174 "\n -m The machine (hardware) type" \
4117 " -n Hostname\n" \ 4175 "\n -n Hostname" \
4118 " -r OS release\n" \ 4176 "\n -r OS release" \
4119 " -s OS name (default)\n" \ 4177 "\n -s OS name (default)" \
4120 " -p Processor type\n" \ 4178 "\n -p Processor type" \
4121 " -v OS version" 4179 "\n -v OS version" \
4180
4122#define uname_example_usage \ 4181#define uname_example_usage \
4123 "$ uname -a\n" \ 4182 "$ uname -a\n" \
4124 "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" 4183 "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n"
@@ -4126,38 +4185,39 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4126#define uncompress_trivial_usage \ 4185#define uncompress_trivial_usage \
4127 "[-c] [-f] [name...]" 4186 "[-c] [-f] [name...]"
4128#define uncompress_full_usage \ 4187#define uncompress_full_usage \
4129 "Uncompress .Z file[s]" \ 4188 "Uncompress .Z file[s]\n" \
4130 "\n\nOptions:\n" \ 4189 "\nOptions:" \
4131 " -c Extract to stdout\n" \ 4190 "\n -c Extract to stdout" \
4132 " -f Overwrite an existing file" 4191 "\n -f Overwrite an existing file" \
4133 4192
4134#define unexpand_trivial_usage \ 4193#define unexpand_trivial_usage \
4135 "[-f][-a][-t NUM] [FILE|-]" 4194 "[-f][-a][-t NUM] [FILE|-]"
4136#define unexpand_full_usage \ 4195#define unexpand_full_usage \
4137 "Convert spaces to tabs, writing to standard output." \ 4196 "Convert spaces to tabs, writing to standard output.\n" \
4138 "\n\nOptions:" \ 4197 "\nOptions:" \
4139 USE_FEATURE_UNEXPAND_LONG_OPTIONS( \ 4198 USE_FEATURE_UNEXPAND_LONG_OPTIONS( \
4140 "\n -a,--all Convert all blanks" \ 4199 "\n -a,--all Convert all blanks" \
4141 "\n -f,--first-only Convert only leading blanks" \ 4200 "\n -f,--first-only Convert only leading blanks" \
4142 "\n -t,--tabs=N Tabstops every N chars" \ 4201 "\n -t,--tabs=N Tabstops every N chars" \
4143 ) \ 4202 ) \
4144 SKIP_FEATURE_UNEXPAND_LONG_OPTIONS( \ 4203 SKIP_FEATURE_UNEXPAND_LONG_OPTIONS( \
4145 "\n -a Convert all blanks" \ 4204 "\n -a Convert all blanks" \
4146 "\n -f Convert only leading blanks" \ 4205 "\n -f Convert only leading blanks" \
4147 "\n -t N Tabstops every N chars" \ 4206 "\n -t N Tabstops every N chars" \
4148 ) 4207 )
4149 4208
4150#define uniq_trivial_usage \ 4209#define uniq_trivial_usage \
4151 "[-fscdu]... [INPUT [OUTPUT]]" 4210 "[-fscdu]... [INPUT [OUTPUT]]"
4152#define uniq_full_usage \ 4211#define uniq_full_usage \
4153 "Discard all but one of successive identical lines from INPUT\n" \ 4212 "Discard all but one of successive identical lines from INPUT\n" \
4154 "(or standard input), writing to OUTPUT (or standard output)" \ 4213 "(or standard input), writing to OUTPUT (or standard output)\n" \
4155 "\n\nOptions:\n" \ 4214 "\nOptions:" \
4156 " -c Prefix lines by the number of occurrences\n" \ 4215 "\n -c Prefix lines by the number of occurrences" \
4157 " -d Only print duplicate lines\n" \ 4216 "\n -d Only print duplicate lines" \
4158 " -u Only print unique lines\n" \ 4217 "\n -u Only print unique lines" \
4159 " -f N Skip the first N fields\n" \ 4218 "\n -f N Skip the first N fields" \
4160 " -s N Skip the first N chars (after any skipped fields)" 4219 "\n -s N Skip the first N chars (after any skipped fields)" \
4220
4161#define uniq_example_usage \ 4221#define uniq_example_usage \
4162 "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \ 4222 "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \
4163 "a\n" \ 4223 "a\n" \
@@ -4171,25 +4231,26 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4171 "When no file is given, use stdin/stdout.\n" \ 4231 "When no file is given, use stdin/stdout.\n" \
4172 "\nOptions:" \ 4232 "\nOptions:" \
4173 "\n -u dos2unix" \ 4233 "\n -u dos2unix" \
4174 "\n -d unix2dos" 4234 "\n -d unix2dos" \
4175 4235
4176#define unzip_trivial_usage \ 4236#define unzip_trivial_usage \
4177 "[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]" 4237 "[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]"
4178#define unzip_full_usage \ 4238#define unzip_full_usage \
4179 "Extract files from ZIP archives" \ 4239 "Extract files from ZIP archives\n" \
4180 "\n\nOptions:\n" \ 4240 "\nOptions:" \
4181 " -l List archive contents (with -q for short form)\n" \ 4241 "\n -l List archive contents (with -q for short form)" \
4182 " -n Never overwrite existing files (default)\n" \ 4242 "\n -n Never overwrite existing files (default)" \
4183 " -o Overwrite files without prompting\n" \ 4243 "\n -o Overwrite files without prompting" \
4184 " -p Send output to stdout\n" \ 4244 "\n -p Send output to stdout" \
4185 " -q Quiet\n" \ 4245 "\n -q Quiet" \
4186 " -x Exclude these files\n" \ 4246 "\n -x Exclude these files" \
4187 " -d Extract files into this directory" 4247 "\n -d Extract files into this directory" \
4188 4248
4189#define uptime_trivial_usage \ 4249#define uptime_trivial_usage \
4190 "" 4250 ""
4191#define uptime_full_usage \ 4251#define uptime_full_usage \
4192 "Display the time since the last boot" 4252 "Display the time since the last boot"
4253
4193#define uptime_example_usage \ 4254#define uptime_example_usage \
4194 "$ uptime\n" \ 4255 "$ uptime\n" \
4195 " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n" 4256 " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n"
@@ -4198,6 +4259,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4198 "N" 4259 "N"
4199#define usleep_full_usage \ 4260#define usleep_full_usage \
4200 "Pause for N microseconds" 4261 "Pause for N microseconds"
4262
4201#define usleep_example_usage \ 4263#define usleep_example_usage \
4202 "$ usleep 1000000\n" \ 4264 "$ usleep 1000000\n" \
4203 "[pauses for 1 second]\n" 4265 "[pauses for 1 second]\n"
@@ -4206,7 +4268,8 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4206 "[-o outfile] [infile]" 4268 "[-o outfile] [infile]"
4207#define uudecode_full_usage \ 4269#define uudecode_full_usage \
4208 "Uudecode a file\n" \ 4270 "Uudecode a file\n" \
4209 "NB: finds outfile name in uuencoded source unless -o is given" 4271 "Finds outfile name in uuencoded source unless -o is given"
4272
4210#define uudecode_example_usage \ 4273#define uudecode_example_usage \
4211 "$ uudecode -o busybox busybox.uu\n" \ 4274 "$ uudecode -o busybox busybox.uu\n" \
4212 "$ ls -l busybox\n" \ 4275 "$ ls -l busybox\n" \
@@ -4215,9 +4278,10 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4215#define uuencode_trivial_usage \ 4278#define uuencode_trivial_usage \
4216 "[-m] [infile] stored_filename" 4279 "[-m] [infile] stored_filename"
4217#define uuencode_full_usage \ 4280#define uuencode_full_usage \
4218 "Uuencode a file to stdout" \ 4281 "Uuencode a file to stdout\n" \
4219 "\n\nOptions:\n" \ 4282 "\nOptions:" \
4220 " -m Use base64 encoding per RFC1521" 4283 "\n -m Use base64 encoding per RFC1521" \
4284
4221#define uuencode_example_usage \ 4285#define uuencode_example_usage \
4222 "$ uuencode busybox busybox\n" \ 4286 "$ uuencode busybox busybox\n" \
4223 "begin 755 busybox\n" \ 4287 "begin 755 busybox\n" \
@@ -4228,40 +4292,41 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4228#define vconfig_trivial_usage \ 4292#define vconfig_trivial_usage \
4229 "COMMAND [OPTIONS]..." 4293 "COMMAND [OPTIONS]..."
4230#define vconfig_full_usage \ 4294#define vconfig_full_usage \
4231 "Create and remove virtual ethernet devices" \ 4295 "Create and remove virtual ethernet devices\n" \
4232 "\n\nOptions:\n" \ 4296 "\nOptions:" \
4233 " add [interface-name] [vlan_id]\n" \ 4297 "\n add [interface-name] [vlan_id]" \
4234 " rem [vlan-name]\n" \ 4298 "\n rem [vlan-name]" \
4235 " set_flag [interface-name] [flag-num] [0 | 1]\n" \ 4299 "\n set_flag [interface-name] [flag-num] [0 | 1]" \
4236 " set_egress_map [vlan-name] [skb_priority] [vlan_qos]\n" \ 4300 "\n set_egress_map [vlan-name] [skb_priority] [vlan_qos]" \
4237 " set_ingress_map [vlan-name] [skb_priority] [vlan_qos]\n" \ 4301 "\n set_ingress_map [vlan-name] [skb_priority] [vlan_qos]" \
4238 " set_name_type [name-type]" 4302 "\n set_name_type [name-type]" \
4239 4303
4240#define vi_trivial_usage \ 4304#define vi_trivial_usage \
4241 "[OPTION] [FILE]..." 4305 "[OPTION] [FILE]..."
4242#define vi_full_usage \ 4306#define vi_full_usage \
4243 "Edit FILE" \ 4307 "Edit FILE\n" \
4244 "\n\nOptions:\n" \ 4308 "\nOptions:" \
4245 USE_FEATURE_VI_COLON( \ 4309 USE_FEATURE_VI_COLON( \
4246 " -c Initial command to run ($EXINIT also available)\n") \ 4310 "\n -c Initial command to run ($EXINIT also available)") \
4247 USE_FEATURE_VI_READONLY( \ 4311 USE_FEATURE_VI_READONLY( \
4248 " -R Read-only - do not write to the file\n") \ 4312 "\n -R Read-only - do not write to the file") \
4249 " -H Short help regarding available features" 4313 "\n -H Short help regarding available features" \
4250 4314
4251#define vlock_trivial_usage \ 4315#define vlock_trivial_usage \
4252 "[OPTIONS]" 4316 "[OPTIONS]"
4253#define vlock_full_usage \ 4317#define vlock_full_usage \
4254 "Lock a virtual terminal. A password is required to unlock." \ 4318 "Lock a virtual terminal. A password is required to unlock.\n" \
4255 "\n\nOptions:\n" \ 4319 "\nOptions:" \
4256 " -a Lock all VTs" 4320 "\n -a Lock all VTs" \
4257 4321
4258#define watch_trivial_usage \ 4322#define watch_trivial_usage \
4259 "[-n seconds] [-t] COMMAND..." 4323 "[-n seconds] [-t] COMMAND..."
4260#define watch_full_usage \ 4324#define watch_full_usage \
4261 "Execute a program periodically" \ 4325 "Execute a program periodically\n" \
4262 "\n\nOptions:\n" \ 4326 "\nOptions:" \
4263 " -n Loop period in seconds (default 2)\n" \ 4327 "\n -n Loop period in seconds (default 2)" \
4264 " -t Don't print header" 4328 "\n -t Don't print header" \
4329
4265#define watch_example_usage \ 4330#define watch_example_usage \
4266 "$ watch date\n" \ 4331 "$ watch date\n" \
4267 "Mon Dec 17 10:31:40 GMT 2000\n" \ 4332 "Mon Dec 17 10:31:40 GMT 2000\n" \
@@ -4271,23 +4336,24 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4271#define watchdog_trivial_usage \ 4336#define watchdog_trivial_usage \
4272 "[-t N[ms]] [-F] DEV" 4337 "[-t N[ms]] [-F] DEV"
4273#define watchdog_full_usage \ 4338#define watchdog_full_usage \
4274 "Periodically write to watchdog device DEV" \ 4339 "Periodically write to watchdog device DEV\n" \
4275 "\n\nOptions:" \ 4340 "\nOptions:" \
4276 "\n -t N Timer period (default 30)" \ 4341 "\n -t N Timer period (default 30)" \
4277 "\n -F Run in foreground" \ 4342 "\n -F Run in foreground" \
4278 "\n" \ 4343 "\n" \
4279 "\nUse -t 500ms to specify period in milliseconds" 4344 "\nUse -t 500ms to specify period in milliseconds" \
4280 4345
4281#define wc_trivial_usage \ 4346#define wc_trivial_usage \
4282 "[OPTION]... [FILE]..." 4347 "[OPTION]... [FILE]..."
4283#define wc_full_usage \ 4348#define wc_full_usage \
4284 "Print line, word, and byte counts for each FILE, and a total line if\n" \ 4349 "Print line, word, and byte counts for each FILE, and a total line if\n" \
4285 "more than one FILE is specified. With no FILE, read standard input." \ 4350 "more than one FILE is specified. With no FILE, read standard input.\n" \
4286 "\n\nOptions:\n" \ 4351 "\nOptions:" \
4287 " -c Print the byte counts\n" \ 4352 "\n -c Print the byte counts" \
4288 " -l Print the newline counts\n" \ 4353 "\n -l Print the newline counts" \
4289 " -L Print the length of the longest line\n" \ 4354 "\n -L Print the length of the longest line" \
4290 " -w Print the word counts" 4355 "\n -w Print the word counts" \
4356
4291#define wc_example_usage \ 4357#define wc_example_usage \
4292 "$ wc /etc/passwd\n" \ 4358 "$ wc /etc/passwd\n" \
4293 " 31 46 1365 /etc/passwd\n" 4359 " 31 46 1365 /etc/passwd\n"
@@ -4302,15 +4368,15 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4302 "[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \ 4368 "[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \
4303 ) 4369 )
4304#define wget_full_usage \ 4370#define wget_full_usage \
4305 "Retrieve files via HTTP or FTP" \ 4371 "Retrieve files via HTTP or FTP\n" \
4306 "\n\nOptions:\n" \ 4372 "\nOptions:" \
4307 " -s Spider mode - only check file existence\n" \ 4373 "\n -s Spider mode - only check file existence" \
4308 " -c Continue retrieval of aborted transfer\n" \ 4374 "\n -c Continue retrieval of aborted transfer" \
4309 " -q Quiet\n" \ 4375 "\n -q Quiet" \
4310 " -P Set directory prefix to DIR\n" \ 4376 "\n -P Set directory prefix to DIR" \
4311 " -O Save to filename ('-' for stdout)\n" \ 4377 "\n -O Save to filename ('-' for stdout)" \
4312 " -U Adjust 'User-Agent' field\n" \ 4378 "\n -U Adjust 'User-Agent' field" \
4313 " -Y Use proxy ('on' or 'off')" 4379 "\n -Y Use proxy ('on' or 'off')" \
4314 4380
4315#define which_trivial_usage \ 4381#define which_trivial_usage \
4316 "[COMMAND...]" 4382 "[COMMAND...]"
@@ -4323,9 +4389,9 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4323#define who_trivial_usage \ 4389#define who_trivial_usage \
4324 "[-a]" 4390 "[-a]"
4325#define who_full_usage \ 4391#define who_full_usage \
4326 "Show who is logged on" \ 4392 "Show who is logged on\n" \
4327 "\n\nOptions:\n" \ 4393 "\nOptions:" \
4328 " -a show all" 4394 "\n -a show all" \
4329 4395
4330#define whoami_trivial_usage \ 4396#define whoami_trivial_usage \
4331 "" 4397 ""
@@ -4335,16 +4401,17 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4335#define xargs_trivial_usage \ 4401#define xargs_trivial_usage \
4336 "[OPTIONS] [COMMAND] [ARGS...]" 4402 "[OPTIONS] [COMMAND] [ARGS...]"
4337#define xargs_full_usage \ 4403#define xargs_full_usage \
4338 "Execute COMMAND on every item given by standard input" \ 4404 "Execute COMMAND on every item given by standard input\n" \
4339 "\n\nOptions:\n" \ 4405 "\nOptions:" \
4340 USE_FEATURE_XARGS_SUPPORT_CONFIRMATION( \ 4406 USE_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
4341 " -p Prompt the user about whether to run each command\n") \ 4407 "\n -p Prompt the user about whether to run each command") \
4342 " -r Do not run command for empty read lines\n" \ 4408 "\n -r Do not run command for empty read lines" \
4343 USE_FEATURE_XARGS_SUPPORT_TERMOPT( \ 4409 USE_FEATURE_XARGS_SUPPORT_TERMOPT( \
4344 " -x Exit if the size is exceeded\n") \ 4410 "\n -x Exit if the size is exceeded") \
4345 USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( \ 4411 USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
4346 " -0 Input filenames are terminated by a null character\n") \ 4412 "\n -0 Input filenames are terminated by a null character") \
4347 " -t Print the command line on stderr before executing it" 4413 "\n -t Print the command line on stderr before executing it" \
4414
4348#define xargs_example_usage \ 4415#define xargs_example_usage \
4349 "$ ls | xargs gzip\n" \ 4416 "$ ls | xargs gzip\n" \
4350 "$ find . -name '*.c' -print | xargs rm\n" 4417 "$ find . -name '*.c' -print | xargs rm\n"
@@ -4362,11 +4429,11 @@ USE_FEATURE_BRCTL_FANCY("\n" \
4362#define zcip_trivial_usage \ 4429#define zcip_trivial_usage \
4363 "[OPTIONS] ifname script" 4430 "[OPTIONS] ifname script"
4364#define zcip_full_usage \ 4431#define zcip_full_usage \
4365 "Manage a ZeroConf IPv4 link-local address" \ 4432 "Manage a ZeroConf IPv4 link-local address\n" \
4366 "\n\nOptions:\n" \ 4433 "\nOptions:" \
4367 " -f Run in foreground\n" \ 4434 "\n -f Run in foreground" \
4368 " -q Quit after address (no daemon)\n" \ 4435 "\n -q Quit after address (no daemon)" \
4369 " -r 169.254.x.x Request this address first\n" \ 4436 "\n -r 169.254.x.x Request this address first" \
4370 " -v Verbose" 4437 "\n -v Verbose" \
4371 4438
4372#endif /* __BB_USAGE_H__ */ 4439#endif /* __BB_USAGE_H__ */
diff --git a/loginutils/getty.c b/loginutils/getty.c
index f033b5afd..246bb4711 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -61,7 +61,7 @@ extern void updwtmp(const char *filename, const struct utmp *ut);
61#define ISSUE "/etc/issue" /* displayed before the login prompt */ 61#define ISSUE "/etc/issue" /* displayed before the login prompt */
62 62
63/* Some shorthands for control characters. */ 63/* Some shorthands for control characters. */
64#define CTL(x) (x ^ 0100) /* Assumes ASCII dialect */ 64#define CTL(x) ((x) ^ 0100) /* Assumes ASCII dialect */
65#define CR CTL('M') /* carriage return */ 65#define CR CTL('M') /* carriage return */
66#define NL CTL('J') /* line feed */ 66#define NL CTL('J') /* line feed */
67#define BS CTL('H') /* back space */ 67#define BS CTL('H') /* back space */
@@ -100,6 +100,13 @@ struct chardata {
100 unsigned char kill; /* kill character */ 100 unsigned char kill; /* kill character */
101 unsigned char eol; /* end-of-line character */ 101 unsigned char eol; /* end-of-line character */
102 unsigned char parity; /* what parity did we see */ 102 unsigned char parity; /* what parity did we see */
103 /* (parity & 1): saw odd parity char with 7th bit set */
104 /* (parity & 2): saw even parity char with 7th bit set */
105 /* parity == 0: probably 7-bit, space parity? */
106 /* parity == 1: probably 7-bit, odd parity? */
107 /* parity == 2: probably 7-bit, even parity? */
108 /* parity == 3: definitely 8 bit, no parity! */
109 /* Hmm... with any value of "parity" 8 bit, no parity is possible */
103#ifdef HANDLE_ALLCAPS 110#ifdef HANDLE_ALLCAPS
104 unsigned char capslock; /* upper case without lower case */ 111 unsigned char capslock; /* upper case without lower case */
105#endif 112#endif
@@ -135,27 +142,21 @@ static const char opt_string[] ALIGN1 = "I:LH:f:hil:mt:wn";
135 142
136/* The following is used for understandable diagnostics. */ 143/* The following is used for understandable diagnostics. */
137#ifdef DEBUGGING 144#ifdef DEBUGGING
138#define debug(s) fprintf(dbf,s); fflush(dbf)
139#define DEBUGTERM "/dev/ttyp0"
140static FILE *dbf; 145static FILE *dbf;
146#define DEBUGTERM "/dev/ttyp0"
147#define debug(...) do { fprintf(dbf, __VA_ARGS__); fflush(dbf); } while (0)
141#else 148#else
142#define debug(s) /* nothing */ 149#define debug(...) ((void)0)
143#endif 150#endif
144 151
145 152
146/* bcode - convert speed string to speed code; return 0 on failure */ 153/* bcode - convert speed string to speed code; return <= 0 on failure */
147static int bcode(const char *s) 154static int bcode(const char *s)
148{ 155{
149 int r; 156 int value = bb_strtou(s, NULL, 10); /* yes, int is intended! */
150 unsigned value = bb_strtou(s, NULL, 10); 157 if (value < 0) /* bad terminating char, overflow, etc */
151 if (errno) { 158 return value;
152 return -1; 159 return tty_value_to_baud(value);
153 }
154 r = tty_value_to_baud(value);
155 if (r > 0) {
156 return r;
157 }
158 return 0;
159} 160}
160 161
161/* parse_speeds - parse alternate baud rates */ 162/* parse_speeds - parse alternate baud rates */
@@ -181,10 +182,10 @@ static void parse_args(char **argv, struct options *op, char **fakehost_p)
181{ 182{
182 char *ts; 183 char *ts;
183 184
184 opt_complementary = "-2"; /* at least 2 args */ 185 opt_complementary = "-2:t+"; /* at least 2 args; -t N */
185 op->flags = getopt32(argv, opt_string, 186 op->flags = getopt32(argv, opt_string,
186 &(op->initstring), fakehost_p, &(op->issue), 187 &(op->initstring), fakehost_p, &(op->issue),
187 &(op->login), &ts); 188 &(op->login), &op->timeout);
188 argv += optind; 189 argv += optind;
189 if (op->flags & F_INITSTRING) { 190 if (op->flags & F_INITSTRING) {
190 const char *p = op->initstring; 191 const char *p = op->initstring;
@@ -203,10 +204,7 @@ static void parse_args(char **argv, struct options *op, char **fakehost_p)
203 } 204 }
204 *q = '\0'; 205 *q = '\0';
205 } 206 }
206 op->flags ^= F_ISSUE; /* invert flag show /etc/issue */ 207 op->flags ^= F_ISSUE; /* invert flag "show /etc/issue" */
207 if (op->flags & F_TIMEOUT) {
208 op->timeout = xatoi_u(ts);
209 }
210 debug("after getopt\n"); 208 debug("after getopt\n");
211 209
212 /* we loosen up a bit and accept both "baudrate tty" and "tty baudrate" */ 210 /* we loosen up a bit and accept both "baudrate tty" and "tty baudrate" */
@@ -219,8 +217,11 @@ static void parse_args(char **argv, struct options *op, char **fakehost_p)
219 } 217 }
220 parse_speeds(op, ts); 218 parse_speeds(op, ts);
221 219
220// TODO: if applet_name is set to "getty: TTY", bb_error_msg's get simpler!
221// grep for "%s:"
222
222 if (argv[2]) 223 if (argv[2])
223 setenv("TERM", argv[2], 1); 224 xsetenv("TERM", argv[2]);
224 225
225 debug("exiting parse_args\n"); 226 debug("exiting parse_args\n");
226} 227}
@@ -230,37 +231,37 @@ static void open_tty(const char *tty)
230{ 231{
231 /* Set up new standard input, unless we are given an already opened port. */ 232 /* Set up new standard input, unless we are given an already opened port. */
232 if (NOT_LONE_DASH(tty)) { 233 if (NOT_LONE_DASH(tty)) {
233 struct stat st; 234// struct stat st;
234 int cur_dir_fd; 235// int cur_dir_fd;
235 int fd; 236// int fd;
236 237
237 /* Sanity checks... */ 238 /* Sanity checks... */
238 cur_dir_fd = xopen(".", O_DIRECTORY | O_NONBLOCK); 239// cur_dir_fd = xopen(".", O_DIRECTORY | O_NONBLOCK);
239 xchdir("/dev"); 240// xchdir("/dev");
240 xstat(tty, &st); 241// xstat(tty, &st);
241 if ((st.st_mode & S_IFMT) != S_IFCHR) 242// if ((st.st_mode & S_IFMT) != S_IFCHR)
242 bb_error_msg_and_die("%s: not a character device", tty); 243// bb_error_msg_and_die("%s: not a character device", tty);
244
245 if (tty[0] != '/')
246 tty = xasprintf("/dev/%s", tty); /* will leak it */
243 247
244 /* Open the tty as standard input. */ 248 /* Open the tty as standard input. */
245 debug("open(2)\n"); 249 debug("open(2)\n");
246 fd = xopen(tty, O_RDWR | O_NONBLOCK); 250 close(0);
251 /*fd =*/ xopen(tty, O_RDWR | O_NONBLOCK); /* uses fd 0 */
247 252
248 /* Restore current directory */ 253// /* Restore current directory */
249 fchdir(cur_dir_fd); 254// fchdir(cur_dir_fd);
250 255
251 /* Open the tty as standard input, continued */ 256 /* Open the tty as standard input, continued */
252 xdup2(fd, 0); 257// xmove_fd(fd, 0);
253 /* fd is >= cur_dir_fd, and cur_dir_fd gets closed too here: */ 258// /* fd is >= cur_dir_fd, and cur_dir_fd gets closed too here: */
254 while (fd > 2) 259// while (fd > 2)
255 close(fd--); 260// close(fd--);
256 261
257 /* Set proper protections and ownership. Mode 0622 262 /* Set proper protections and ownership. */
258 * is suitable for SYSV < 4 because /bin/login does not change
259 * protections. SunOS 4 login will change the protections to 0620
260 * (write access for group tty) after the login has succeeded.
261 */
262 fchown(0, 0, 0); /* 0:0 */ 263 fchown(0, 0, 0); /* 0:0 */
263 fchmod(0, 0622); /* crw--w--w- */ 264 fchmod(0, 0620); /* crw--w---- */
264 } else { 265 } else {
265 /* 266 /*
266 * Standard input should already be connected to an open port. Make 267 * Standard input should already be connected to an open port. Make
@@ -286,9 +287,8 @@ static void termios_init(struct termios *tp, int speed, struct options *op)
286#endif 287#endif
287 288
288 tp->c_cflag = CS8 | HUPCL | CREAD | speed; 289 tp->c_cflag = CS8 | HUPCL | CREAD | speed;
289 if (op->flags & F_LOCAL) { 290 if (op->flags & F_LOCAL)
290 tp->c_cflag |= CLOCAL; 291 tp->c_cflag |= CLOCAL;
291 }
292 292
293 tp->c_iflag = tp->c_lflag = tp->c_line = 0; 293 tp->c_iflag = tp->c_lflag = tp->c_line = 0;
294 tp->c_oflag = OPOST | ONLCR; 294 tp->c_oflag = OPOST | ONLCR;
@@ -397,11 +397,11 @@ static char *get_logname(char *logname, unsigned size_logname,
397 char ascval; /* low 7 bits of input character */ 397 char ascval; /* low 7 bits of input character */
398 int bits; /* # of "1" bits per character */ 398 int bits; /* # of "1" bits per character */
399 int mask; /* mask with 1 bit up */ 399 int mask; /* mask with 1 bit up */
400 static const char erase[][3] = { /* backspace-space-backspace */ 400 static const char erase[][3] = {/* backspace-space-backspace */
401 "\010\040\010", /* space parity */ 401 "\010\040\010", /* space parity */
402 "\010\040\010", /* odd parity */ 402 "\010\040\010", /* odd parity */
403 "\210\240\210", /* even parity */ 403 "\210\240\210", /* even parity */
404 "\210\240\210", /* no parity */ 404 "\010\040\010", /* 8 bit no parity */
405 }; 405 };
406 406
407 /* NB: *cp is pre-initialized with init_chardata */ 407 /* NB: *cp is pre-initialized with init_chardata */
@@ -434,12 +434,11 @@ static char *get_logname(char *logname, unsigned size_logname,
434 return NULL; 434 return NULL;
435 435
436 /* Do parity bit handling. */ 436 /* Do parity bit handling. */
437 ascval = c & 0177; 437 if (!(op->flags & F_LOCAL) && (c & 0x80)) { /* "parity" bit on? */
438 if (!(op->flags & F_LOCAL) && (c != ascval)) { /* "parity" bit on ? */
439 bits = 1; 438 bits = 1;
440 mask = 1; 439 mask = 1;
441 while (mask & 0177) { 440 while (mask & 0x7f) {
442 if (mask & ascval) 441 if (mask & c)
443 bits++; /* count "1" bits */ 442 bits++; /* count "1" bits */
444 mask <<= 1; 443 mask <<= 1;
445 } 444 }
@@ -448,6 +447,7 @@ static char *get_logname(char *logname, unsigned size_logname,
448 } 447 }
449 448
450 /* Do erase, kill and end-of-line processing. */ 449 /* Do erase, kill and end-of-line processing. */
450 ascval = c & 0x7f;
451 switch (ascval) { 451 switch (ascval) {
452 case CR: 452 case CR:
453 case NL: 453 case NL:
@@ -507,7 +507,6 @@ static char *get_logname(char *logname, unsigned size_logname,
507static void termios_final(struct options *op, struct termios *tp, struct chardata *cp) 507static void termios_final(struct options *op, struct termios *tp, struct chardata *cp)
508{ 508{
509 /* General terminal-independent stuff. */ 509 /* General terminal-independent stuff. */
510
511 tp->c_iflag |= IXON | IXOFF; /* 2-way flow control */ 510 tp->c_iflag |= IXON | IXOFF; /* 2-way flow control */
512 tp->c_lflag |= ICANON | ISIG | ECHO | ECHOE | ECHOK | ECHOKE; 511 tp->c_lflag |= ICANON | ISIG | ECHO | ECHOE | ECHOK | ECHOKE;
513 /* no longer| ECHOCTL | ECHOPRT */ 512 /* no longer| ECHOCTL | ECHOPRT */
@@ -520,7 +519,6 @@ static void termios_final(struct options *op, struct termios *tp, struct chardat
520 tp->c_cc[VSWTC] = DEF_SWITCH; /* default switch character */ 519 tp->c_cc[VSWTC] = DEF_SWITCH; /* default switch character */
521 520
522 /* Account for special characters seen in input. */ 521 /* Account for special characters seen in input. */
523
524 if (cp->eol == CR) { 522 if (cp->eol == CR) {
525 tp->c_iflag |= ICRNL; /* map CR in input to NL */ 523 tp->c_iflag |= ICRNL; /* map CR in input to NL */
526 tp->c_oflag |= ONLCR; /* map NL in output to CR-NL */ 524 tp->c_oflag |= ONLCR; /* map NL in output to CR-NL */
@@ -529,9 +527,9 @@ static void termios_final(struct options *op, struct termios *tp, struct chardat
529 tp->c_cc[VKILL] = cp->kill; /* set kill character */ 527 tp->c_cc[VKILL] = cp->kill; /* set kill character */
530 528
531 /* Account for the presence or absence of parity bits in input. */ 529 /* Account for the presence or absence of parity bits in input. */
532
533 switch (cp->parity) { 530 switch (cp->parity) {
534 case 0: /* space (always 0) parity */ 531 case 0: /* space (always 0) parity */
532// I bet most people go here - they use only 7-bit chars in usernames....
535 break; 533 break;
536 case 1: /* odd parity */ 534 case 1: /* odd parity */
537 tp->c_cflag |= PARODD; 535 tp->c_cflag |= PARODD;
@@ -543,6 +541,9 @@ static void termios_final(struct options *op, struct termios *tp, struct chardat
543 case (1 | 2): /* no parity bit */ 541 case (1 | 2): /* no parity bit */
544 tp->c_cflag &= ~CSIZE; 542 tp->c_cflag &= ~CSIZE;
545 tp->c_cflag |= CS7; 543 tp->c_cflag |= CS7;
544// FIXME: wtf? case 3: we saw both even and odd 8-bit bytes -
545// it's probably some umlauts etc, but definitely NOT 7-bit!!!
546// Entire parity detection madness here just begs for deletion...
546 break; 547 break;
547 } 548 }
548 549
@@ -555,14 +556,12 @@ static void termios_final(struct options *op, struct termios *tp, struct chardat
555 } 556 }
556#endif 557#endif
557 /* Optionally enable hardware flow control */ 558 /* Optionally enable hardware flow control */
558
559#ifdef CRTSCTS 559#ifdef CRTSCTS
560 if (op->flags & F_RTSCTS) 560 if (op->flags & F_RTSCTS)
561 tp->c_cflag |= CRTSCTS; 561 tp->c_cflag |= CRTSCTS;
562#endif 562#endif
563 563
564 /* Finally, make the new settings effective */ 564 /* Finally, make the new settings effective */
565
566 ioctl_or_perror_and_die(0, TCSETS, tp, "%s: TCSETS", op->tty); 565 ioctl_or_perror_and_die(0, TCSETS, tp, "%s: TCSETS", op->tty);
567} 566}
568 567
@@ -634,6 +633,8 @@ int getty_main(int argc, char **argv)
634 struct termios termios; /* terminal mode bits */ 633 struct termios termios; /* terminal mode bits */
635 struct options options; 634 struct options options;
636 635
636 chardata = init_chardata;
637
637 memset(&options, 0, sizeof(options)); 638 memset(&options, 0, sizeof(options));
638 options.login = _PATH_LOGIN; /* default login program */ 639 options.login = _PATH_LOGIN; /* default login program */
639 options.tty = "tty1"; /* default tty line */ 640 options.tty = "tty1"; /* default tty line */
@@ -642,9 +643,9 @@ int getty_main(int argc, char **argv)
642 options.issue = ISSUE; /* default issue file */ 643 options.issue = ISSUE; /* default issue file */
643#endif 644#endif
644 645
645 /* Already too late because of theoretical 646 /* Parse command-line arguments. */
646 * possibility of getty --help somehow triggered 647 parse_args(argv, &options, &fakehost);
647 * inadvertently before we reach this. Oh well. */ 648
648 logmode = LOGMODE_NONE; 649 logmode = LOGMODE_NONE;
649 650
650 /* Create new session, lose controlling tty, if any */ 651 /* Create new session, lose controlling tty, if any */
@@ -652,16 +653,18 @@ int getty_main(int argc, char **argv)
652 * "This is allowed only when the current process 653 * "This is allowed only when the current process
653 * is not a process group leader" - is this a problem? */ 654 * is not a process group leader" - is this a problem? */
654 setsid(); 655 setsid();
655 656 /* close stdio, and stray descriptors, just in case */
656 n = xopen(bb_dev_null, O_RDWR); 657 n = xopen(bb_dev_null, O_RDWR);
657 /* dup2(n, 0); - no, because of possible "getty - 9600" */ 658 /* dup2(n, 0); - no, we need to handle "getty - 9600" too */
658 dup2(n, 1); 659 xdup2(n, 1);
659 dup2(n, 2); 660 xdup2(n, 2);
660 while (n > 2) 661 while (n > 2)
661 close(n--); 662 close(n--);
662 /* We want special flavor of error_msg_and_die */ 663
664 /* Logging. We want special flavor of error_msg_and_die */
663 die_sleep = 10; 665 die_sleep = 10;
664 msg_eol = "\r\n"; 666 msg_eol = "\r\n";
667 /* most likely will internally use fd #3 in CLOEXEC mode: */
665 openlog(applet_name, LOG_PID, LOG_AUTH); 668 openlog(applet_name, LOG_PID, LOG_AUTH);
666 logmode = LOGMODE_BOTH; 669 logmode = LOGMODE_BOTH;
667 670
@@ -673,15 +676,12 @@ int getty_main(int argc, char **argv)
673 } 676 }
674#endif 677#endif
675 678
676 /* Parse command-line arguments. */
677 parse_args(argv, &options, &fakehost);
678
679 debug("calling open_tty\n");
680 /* Open the tty as standard input, if it is not "-" */ 679 /* Open the tty as standard input, if it is not "-" */
680 /* If it's not "-" and not taken yet, it will become our ctty */
681 debug("calling open_tty\n");
681 open_tty(options.tty); 682 open_tty(options.tty);
682
683 debug("duping\n");
684 ndelay_off(0); 683 ndelay_off(0);
684 debug("duping\n");
685 xdup2(0, 1); 685 xdup2(0, 1);
686 xdup2(0, 2); 686 xdup2(0, 2);
687 687
@@ -695,17 +695,18 @@ int getty_main(int argc, char **argv)
695 */ 695 */
696 ioctl_or_perror_and_die(0, TCGETS, &termios, "%s: TCGETS", options.tty); 696 ioctl_or_perror_and_die(0, TCGETS, &termios, "%s: TCGETS", options.tty);
697 697
698#if ENABLE_FEATURE_UTMP
699 /* Update the utmp file */
700 update_utmp(options.tty, fakehost);
701#endif
702
703#ifdef __linux__ 698#ifdef __linux__
704 /* Make ourself a foreground process group within our session */ 699// FIXME: do we need this? Otherwise "-" case seems to be broken...
705 tcsetpgrp(0, getpid());
706 // /* Forcibly make fd 0 our controlling tty, even if another session 700 // /* Forcibly make fd 0 our controlling tty, even if another session
707 // * has it as a ctty. (Another session loses ctty). */ 701 // * has it as a ctty. (Another session loses ctty). */
708 // ioctl(0, TIOCSCTTY, (void*)1); 702 // ioctl(0, TIOCSCTTY, (void*)1);
703 /* Make ourself a foreground process group within our session */
704 tcsetpgrp(0, getpid());
705#endif
706
707#if ENABLE_FEATURE_UTMP
708 /* Update the utmp file. This tty is ours now! */
709 update_utmp(options.tty, fakehost);
709#endif 710#endif
710 711
711 /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */ 712 /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */
@@ -724,8 +725,7 @@ int getty_main(int argc, char **argv)
724 auto_baud(line_buf, sizeof(line_buf), &termios); 725 auto_baud(line_buf, sizeof(line_buf), &termios);
725 726
726 /* Set the optional timer */ 727 /* Set the optional timer */
727 if (options.timeout) 728 alarm(options.timeout); /* if 0, alarm is not set */
728 alarm(options.timeout);
729 729
730 /* Optionally wait for CR or LF before writing /etc/issue */ 730 /* Optionally wait for CR or LF before writing /etc/issue */
731 if (options.flags & F_WAITCRLF) { 731 if (options.flags & F_WAITCRLF) {
@@ -733,17 +733,14 @@ int getty_main(int argc, char **argv)
733 733
734 debug("waiting for cr-lf\n"); 734 debug("waiting for cr-lf\n");
735 while (safe_read(0, &ch, 1) == 1) { 735 while (safe_read(0, &ch, 1) == 1) {
736 debug("read %x\n", (unsigned char)ch);
736 ch &= 0x7f; /* strip "parity bit" */ 737 ch &= 0x7f; /* strip "parity bit" */
737#ifdef DEBUGGING
738 fprintf(dbf, "read %c\n", ch);
739#endif
740 if (ch == '\n' || ch == '\r') 738 if (ch == '\n' || ch == '\r')
741 break; 739 break;
742 } 740 }
743 } 741 }
744 742
745 logname = NULL; 743 logname = NULL;
746 chardata = init_chardata;
747 if (!(options.flags & F_NOPROMPT)) { 744 if (!(options.flags & F_NOPROMPT)) {
748 /* NB:termios_init already set line speed 745 /* NB:termios_init already set line speed
749 * to options.speeds[0] */ 746 * to options.speeds[0] */
@@ -753,7 +750,7 @@ int getty_main(int argc, char **argv)
753 /* Read the login name. */ 750 /* Read the login name. */
754 debug("reading login name\n"); 751 debug("reading login name\n");
755 logname = get_logname(line_buf, sizeof(line_buf), 752 logname = get_logname(line_buf, sizeof(line_buf),
756 &options, &chardata, &termios); 753 &options, &chardata, &termios);
757 if (logname) 754 if (logname)
758 break; 755 break;
759 /* we are here only if options.numspeed > 1 */ 756 /* we are here only if options.numspeed > 1 */
@@ -765,8 +762,7 @@ int getty_main(int argc, char **argv)
765 } 762 }
766 763
767 /* Disable timer. */ 764 /* Disable timer. */
768 if (options.timeout) 765 alarm(0);
769 alarm(0);
770 766
771 /* Finalize the termios settings. */ 767 /* Finalize the termios settings. */
772 termios_final(&options, &termios, &chardata); 768 termios_final(&options, &termios, &chardata);
@@ -777,7 +773,7 @@ int getty_main(int argc, char **argv)
777 /* Let the login program take care of password validation. */ 773 /* Let the login program take care of password validation. */
778 /* We use PATH because we trust that root doesn't set "bad" PATH, 774 /* We use PATH because we trust that root doesn't set "bad" PATH,
779 * and getty is not suid-root applet. */ 775 * and getty is not suid-root applet. */
780 /* Hmm... with -n, logname == NULL! Is it ok? */ 776 /* With -n, logname == NULL, and login will ask for username instead */
781 BB_EXECLP(options.login, options.login, "--", logname, NULL); 777 BB_EXECLP(options.login, options.login, "--", logname, NULL);
782 bb_error_msg_and_die("%s: can't exec %s", options.tty, options.login); 778 bb_error_msg_and_die("%s: can't exec %s", options.tty, options.login);
783} 779}
diff --git a/util-linux/mount.c b/util-linux/mount.c
index e41707e38..796e1e103 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -1725,8 +1725,6 @@ static const char must_be_root[] ALIGN1 = "you must be root";
1725int mount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 1725int mount_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
1726int mount_main(int argc, char **argv) 1726int mount_main(int argc, char **argv)
1727{ 1727{
1728 enum { OPT_ALL = 0x10 };
1729
1730 char *cmdopts = xstrdup(""); 1728 char *cmdopts = xstrdup("");
1731 char *fstype = NULL; 1729 char *fstype = NULL;
1732 char *storage_path = NULL; 1730 char *storage_path = NULL;
@@ -1771,7 +1769,7 @@ int mount_main(int argc, char **argv)
1771 // If we have no arguments, show currently mounted filesystems 1769 // If we have no arguments, show currently mounted filesystems
1772 1770
1773 if (!argc) { 1771 if (!argc) {
1774 if (!(opt & OPT_ALL)) { 1772 if (!(opt & OPT_a)) {
1775 FILE *mountTable = setmntent(bb_path_mtab_file, "r"); 1773 FILE *mountTable = setmntent(bb_path_mtab_file, "r");
1776 1774
1777 if (!mountTable) bb_error_msg_and_die("no %s", bb_path_mtab_file); 1775 if (!mountTable) bb_error_msg_and_die("no %s", bb_path_mtab_file);