aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/bbunzip.c16
-rw-r--r--archival/bzip2.c10
-rw-r--r--archival/cpio.c4
-rw-r--r--archival/gzip.c4
-rw-r--r--archival/libunarchive/decompress_bunzip2.c10
-rw-r--r--archival/libunarchive/decompress_uncompress.c12
-rw-r--r--archival/libunarchive/decompress_unlzma.c16
-rw-r--r--archival/libunarchive/decompress_unzip.c16
-rw-r--r--archival/libunarchive/get_header_tar.c12
-rw-r--r--archival/libunarchive/open_transformer.c2
-rw-r--r--archival/rpm.c4
-rw-r--r--archival/tar.c54
-rw-r--r--coreutils/chmod.c8
-rw-r--r--coreutils/chown.c14
-rw-r--r--coreutils/date.c6
-rw-r--r--coreutils/df.c6
-rw-r--r--coreutils/du.c8
-rw-r--r--coreutils/expand.c8
-rw-r--r--coreutils/id.c4
-rw-r--r--coreutils/install.c6
-rw-r--r--coreutils/libcoreutils/getopt_mk_fifo_nod.c2
-rw-r--r--coreutils/ls.c48
-rw-r--r--coreutils/mkdir.c2
-rw-r--r--coreutils/readlink.c4
-rw-r--r--coreutils/stat.c24
-rw-r--r--coreutils/tail.c6
-rw-r--r--coreutils/touch.c4
-rw-r--r--coreutils/tty.c14
-rw-r--r--coreutils/uname.c2
-rw-r--r--debianutils/run_parts.c2
-rw-r--r--debianutils/start_stop_daemon.c10
-rw-r--r--debianutils/which.c4
-rwxr-xr-xdocs/autodocifier.pl4
-rw-r--r--docs/new-applet-HOWTO.txt2
-rw-r--r--editors/cmp.c6
-rw-r--r--editors/diff.c4
-rw-r--r--editors/vi.c16
-rw-r--r--findutils/find.c150
-rw-r--r--findutils/grep.c38
-rw-r--r--findutils/xargs.c20
-rw-r--r--include/applets.h688
-rw-r--r--include/libbb.h20
-rw-r--r--include/unarchive.h18
-rw-r--r--include/usage.h616
-rw-r--r--libbb/appletlib.c16
-rw-r--r--libbb/lineedit.c14
-rw-r--r--libbb/mtab_file.c2
-rw-r--r--libbb/procps.c2
-rw-r--r--libbb/read.c4
-rw-r--r--libbb/xconnect.c10
-rw-r--r--libbb/xfuncs_printf.c2
-rw-r--r--loginutils/chpasswd.c2
-rw-r--r--loginutils/login.c10
-rw-r--r--loginutils/su.c4
-rw-r--r--loginutils/sulogin.c2
-rw-r--r--mailutils/mime.c6
-rw-r--r--mailutils/popmaildir.c4
-rw-r--r--miscutils/crond.c6
-rw-r--r--miscutils/eject.c2
-rw-r--r--miscutils/hdparm.c46
-rw-r--r--miscutils/less.c6
-rw-r--r--modutils/insmod.c2
-rw-r--r--modutils/modprobe-small.c8
-rw-r--r--modutils/modprobe.c2
-rw-r--r--modutils/modutils.h6
-rw-r--r--networking/brctl.c8
-rw-r--r--networking/ftpd.c4
-rw-r--r--networking/httpd.c70
-rw-r--r--networking/ifconfig.c2
-rw-r--r--networking/ifupdown.c2
-rw-r--r--networking/ip.c20
-rw-r--r--networking/ipcalc.c2
-rw-r--r--networking/libiproute/iproute.c4
-rw-r--r--networking/nc.c26
-rw-r--r--networking/nc_bloaty.c8
-rw-r--r--networking/netstat.c18
-rw-r--r--networking/ping.c2
-rw-r--r--networking/telnetd.c10
-rw-r--r--networking/telnetd.ctrlSQ.patch2
-rw-r--r--networking/tftp.c52
-rw-r--r--networking/tunctl.c4
-rw-r--r--networking/udhcp/dhcpc.c26
-rw-r--r--networking/udhcp/dhcpc.h2
-rw-r--r--networking/udhcp/dhcpd.c4
-rw-r--r--networking/udhcp/files.c6
-rw-r--r--networking/wget.c6
-rw-r--r--procps/pidof.c12
-rw-r--r--procps/ps.c14
-rw-r--r--procps/top.c10
-rw-r--r--runit/chpst.c4
-rw-r--r--scripts/basic/fixdep.c30
-rw-r--r--scripts/kconfig/confdata.c20
-rw-r--r--selinux/setfiles.c4
-rw-r--r--shell/ash.c40
-rw-r--r--shell/hush.c22
-rw-r--r--sysklogd/syslogd.c56
-rwxr-xr-xtestsuite/all_sourcecode.tests2
-rw-r--r--util-linux/acpid.c4
-rw-r--r--util-linux/fdisk.c12
-rw-r--r--util-linux/fsck_minix.c2
-rw-r--r--util-linux/hexdump.c2
-rw-r--r--util-linux/mount.c28
102 files changed, 1312 insertions, 1308 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index 75489f2a5..d25f50939 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -30,11 +30,11 @@ int open_to_or_warn(int to_fd, const char *filename, int flags, int mode)
30 30
31int FAST_FUNC bbunpack(char **argv, 31int FAST_FUNC bbunpack(char **argv,
32 char* (*make_new_name)(char *filename), 32 char* (*make_new_name)(char *filename),
33 USE_DESKTOP(long long) int (*unpacker)(unpack_info_t *info) 33 IF_DESKTOP(long long) int (*unpacker)(unpack_info_t *info)
34) 34)
35{ 35{
36 struct stat stat_buf; 36 struct stat stat_buf;
37 USE_DESKTOP(long long) int status; 37 IF_DESKTOP(long long) int status;
38 char *filename, *new_name; 38 char *filename, *new_name;
39 smallint exitcode = 0; 39 smallint exitcode = 0;
40 unpack_info_t info; 40 unpack_info_t info;
@@ -175,7 +175,7 @@ char* make_new_name_bunzip2(char *filename)
175} 175}
176 176
177static 177static
178USE_DESKTOP(long long) int unpack_bunzip2(unpack_info_t *info UNUSED_PARAM) 178IF_DESKTOP(long long) int unpack_bunzip2(unpack_info_t *info UNUSED_PARAM)
179{ 179{
180 return unpack_bz2_stream_prime(STDIN_FILENO, STDOUT_FILENO); 180 return unpack_bz2_stream_prime(STDIN_FILENO, STDOUT_FILENO);
181} 181}
@@ -251,9 +251,9 @@ char* make_new_name_gunzip(char *filename)
251} 251}
252 252
253static 253static
254USE_DESKTOP(long long) int unpack_gunzip(unpack_info_t *info) 254IF_DESKTOP(long long) int unpack_gunzip(unpack_info_t *info)
255{ 255{
256 USE_DESKTOP(long long) int status = -1; 256 IF_DESKTOP(long long) int status = -1;
257 257
258 /* do the decompression, and cleanup */ 258 /* do the decompression, and cleanup */
259 if (xread_char(STDIN_FILENO) == 0x1f) { 259 if (xread_char(STDIN_FILENO) == 0x1f) {
@@ -325,7 +325,7 @@ char* make_new_name_unlzma(char *filename)
325} 325}
326 326
327static 327static
328USE_DESKTOP(long long) int unpack_unlzma(unpack_info_t *info UNUSED_PARAM) 328IF_DESKTOP(long long) int unpack_unlzma(unpack_info_t *info UNUSED_PARAM)
329{ 329{
330 return unpack_lzma_stream(STDIN_FILENO, STDOUT_FILENO); 330 return unpack_lzma_stream(STDIN_FILENO, STDOUT_FILENO);
331} 331}
@@ -360,9 +360,9 @@ char* make_new_name_uncompress(char *filename)
360} 360}
361 361
362static 362static
363USE_DESKTOP(long long) int unpack_uncompress(unpack_info_t *info UNUSED_PARAM) 363IF_DESKTOP(long long) int unpack_uncompress(unpack_info_t *info UNUSED_PARAM)
364{ 364{
365 USE_DESKTOP(long long) int status = -1; 365 IF_DESKTOP(long long) int status = -1;
366 366
367 if ((xread_char(STDIN_FILENO) != 0x1f) || (xread_char(STDIN_FILENO) != 0x9d)) { 367 if ((xread_char(STDIN_FILENO) != 0x1f) || (xread_char(STDIN_FILENO) != 0x9d)) {
368 bb_error_msg("invalid magic"); 368 bb_error_msg("invalid magic");
diff --git a/archival/bzip2.c b/archival/bzip2.c
index 8eb5ca9ae..bbaf56669 100644
--- a/archival/bzip2.c
+++ b/archival/bzip2.c
@@ -64,7 +64,7 @@ static uint8_t level;
64 * total written bytes so far otherwise 64 * total written bytes so far otherwise
65 */ 65 */
66static 66static
67USE_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, void *wbuf) 67IF_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, void *wbuf)
68{ 68{
69 int n, n2, ret; 69 int n, n2, ret;
70 70
@@ -98,13 +98,13 @@ USE_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, v
98 if (rlen && strm->avail_in == 0) 98 if (rlen && strm->avail_in == 0)
99 break; 99 break;
100 } 100 }
101 return 0 USE_DESKTOP( + strm->total_out ); 101 return 0 IF_DESKTOP( + strm->total_out );
102} 102}
103 103
104static 104static
105USE_DESKTOP(long long) int compressStream(unpack_info_t *info UNUSED_PARAM) 105IF_DESKTOP(long long) int compressStream(unpack_info_t *info UNUSED_PARAM)
106{ 106{
107 USE_DESKTOP(long long) int total; 107 IF_DESKTOP(long long) int total;
108 ssize_t count; 108 ssize_t count;
109 bz_stream bzs; /* it's small */ 109 bz_stream bzs; /* it's small */
110#define strm (&bzs) 110#define strm (&bzs)
@@ -163,7 +163,7 @@ int bzip2_main(int argc UNUSED_PARAM, char **argv)
163 163
164 opt_complementary = "s2"; /* -s means -2 (compatibility) */ 164 opt_complementary = "s2"; /* -s means -2 (compatibility) */
165 /* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */ 165 /* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */
166 opt = getopt32(argv, "cfv" USE_BUNZIP2("dt") "123456789qzs"); 166 opt = getopt32(argv, "cfv" IF_BUNZIP2("dt") "123456789qzs");
167#if ENABLE_BUNZIP2 /* bunzip2_main may not be visible... */ 167#if ENABLE_BUNZIP2 /* bunzip2_main may not be visible... */
168 if (opt & 0x18) // -d and/or -t 168 if (opt & 0x18) // -d and/or -t
169 return bunzip2_main(argc, argv); 169 return bunzip2_main(argc, argv);
diff --git a/archival/cpio.c b/archival/cpio.c
index 11b22e478..4cf3c2c50 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -270,7 +270,7 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
270{ 270{
271 archive_handle_t *archive_handle; 271 archive_handle_t *archive_handle;
272 char *cpio_filename; 272 char *cpio_filename;
273 USE_FEATURE_CPIO_O(const char *cpio_fmt = "";) 273 IF_FEATURE_CPIO_O(const char *cpio_fmt = "";)
274 unsigned opt; 274 unsigned opt;
275 275
276#if ENABLE_GETOPT_LONG 276#if ENABLE_GETOPT_LONG
@@ -295,7 +295,7 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
295#if !ENABLE_FEATURE_CPIO_O 295#if !ENABLE_FEATURE_CPIO_O
296 opt = getopt32(argv, OPTION_STR, &cpio_filename); 296 opt = getopt32(argv, OPTION_STR, &cpio_filename);
297#else 297#else
298 opt = getopt32(argv, OPTION_STR "oH:" USE_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt); 298 opt = getopt32(argv, OPTION_STR "oH:" IF_FEATURE_CPIO_P("p"), &cpio_filename, &cpio_fmt);
299 if (opt & CPIO_OPT_PASSTHROUGH) { 299 if (opt & CPIO_OPT_PASSTHROUGH) {
300 pid_t pid; 300 pid_t pid;
301 struct fd_pair pp; 301 struct fd_pair pp;
diff --git a/archival/gzip.c b/archival/gzip.c
index 43804b2e4..a8f8fa4a5 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -2015,7 +2015,7 @@ char* make_new_name_gzip(char *filename)
2015} 2015}
2016 2016
2017static 2017static
2018USE_DESKTOP(long long) int pack_gzip(unpack_info_t *info UNUSED_PARAM) 2018IF_DESKTOP(long long) int pack_gzip(unpack_info_t *info UNUSED_PARAM)
2019{ 2019{
2020 struct stat s; 2020 struct stat s;
2021 2021
@@ -2050,7 +2050,7 @@ int gzip_main(int argc UNUSED_PARAM, char **argv)
2050 unsigned opt; 2050 unsigned opt;
2051 2051
2052 /* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */ 2052 /* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */
2053 opt = getopt32(argv, "cfv" USE_GUNZIP("dt") "q123456789n"); 2053 opt = getopt32(argv, "cfv" IF_GUNZIP("dt") "q123456789n");
2054#if ENABLE_GUNZIP /* gunzip_main may not be visible... */ 2054#if ENABLE_GUNZIP /* gunzip_main may not be visible... */
2055 if (opt & 0x18) // -d and/or -t 2055 if (opt & 0x18) // -d and/or -t
2056 return gunzip_main(argc, argv); 2056 return gunzip_main(argc, argv);
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index b53720f23..cd8df086e 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -648,10 +648,10 @@ void FAST_FUNC dealloc_bunzip(bunzip_data *bd)
648 648
649 649
650/* Decompress src_fd to dst_fd. Stops at end of bzip data, not end of file. */ 650/* Decompress src_fd to dst_fd. Stops at end of bzip data, not end of file. */
651USE_DESKTOP(long long) int FAST_FUNC 651IF_DESKTOP(long long) int FAST_FUNC
652unpack_bz2_stream(int src_fd, int dst_fd) 652unpack_bz2_stream(int src_fd, int dst_fd)
653{ 653{
654 USE_DESKTOP(long long total_written = 0;) 654 IF_DESKTOP(long long total_written = 0;)
655 char *outbuf; 655 char *outbuf;
656 bunzip_data *bd; 656 bunzip_data *bd;
657 int i; 657 int i;
@@ -666,7 +666,7 @@ unpack_bz2_stream(int src_fd, int dst_fd)
666 i = RETVAL_SHORT_WRITE; 666 i = RETVAL_SHORT_WRITE;
667 break; 667 break;
668 } 668 }
669 USE_DESKTOP(total_written += i;) 669 IF_DESKTOP(total_written += i;)
670 } 670 }
671 } 671 }
672 672
@@ -686,10 +686,10 @@ unpack_bz2_stream(int src_fd, int dst_fd)
686 dealloc_bunzip(bd); 686 dealloc_bunzip(bd);
687 free(outbuf); 687 free(outbuf);
688 688
689 return i ? i : USE_DESKTOP(total_written) + 0; 689 return i ? i : IF_DESKTOP(total_written) + 0;
690} 690}
691 691
692USE_DESKTOP(long long) int FAST_FUNC 692IF_DESKTOP(long long) int FAST_FUNC
693unpack_bz2_stream_prime(int src_fd, int dst_fd) 693unpack_bz2_stream_prime(int src_fd, int dst_fd)
694{ 694{
695 unsigned char magic[2]; 695 unsigned char magic[2];
diff --git a/archival/libunarchive/decompress_uncompress.c b/archival/libunarchive/decompress_uncompress.c
index fe1491e71..2877c8981 100644
--- a/archival/libunarchive/decompress_uncompress.c
+++ b/archival/libunarchive/decompress_uncompress.c
@@ -72,11 +72,11 @@
72 * be stored in the compressed file. 72 * be stored in the compressed file.
73 */ 73 */
74 74
75USE_DESKTOP(long long) int FAST_FUNC 75IF_DESKTOP(long long) int FAST_FUNC
76unpack_Z_stream(int fd_in, int fd_out) 76unpack_Z_stream(int fd_in, int fd_out)
77{ 77{
78 USE_DESKTOP(long long total_written = 0;) 78 IF_DESKTOP(long long total_written = 0;)
79 USE_DESKTOP(long long) int retval = -1; 79 IF_DESKTOP(long long) int retval = -1;
80 unsigned char *stackp; 80 unsigned char *stackp;
81 long code; 81 long code;
82 int finchar; 82 int finchar;
@@ -265,7 +265,7 @@ unpack_Z_stream(int fd_in, int fd_out)
265 if (outpos >= OBUFSIZ) { 265 if (outpos >= OBUFSIZ) {
266 full_write(fd_out, outbuf, outpos); 266 full_write(fd_out, outbuf, outpos);
267//error check?? 267//error check??
268 USE_DESKTOP(total_written += outpos;) 268 IF_DESKTOP(total_written += outpos;)
269 outpos = 0; 269 outpos = 0;
270 } 270 }
271 stackp += i; 271 stackp += i;
@@ -294,10 +294,10 @@ unpack_Z_stream(int fd_in, int fd_out)
294 if (outpos > 0) { 294 if (outpos > 0) {
295 full_write(fd_out, outbuf, outpos); 295 full_write(fd_out, outbuf, outpos);
296//error check?? 296//error check??
297 USE_DESKTOP(total_written += outpos;) 297 IF_DESKTOP(total_written += outpos;)
298 } 298 }
299 299
300 retval = USE_DESKTOP(total_written) + 0; 300 retval = IF_DESKTOP(total_written) + 0;
301 err: 301 err:
302 free(inbuf); 302 free(inbuf);
303 free(outbuf); 303 free(outbuf);
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c
index 2cfcd9b7d..33e5cd65d 100644
--- a/archival/libunarchive/decompress_unlzma.c
+++ b/archival/libunarchive/decompress_unlzma.c
@@ -228,10 +228,10 @@ enum {
228}; 228};
229 229
230 230
231USE_DESKTOP(long long) int FAST_FUNC 231IF_DESKTOP(long long) int FAST_FUNC
232unpack_lzma_stream(int src_fd, int dst_fd) 232unpack_lzma_stream(int src_fd, int dst_fd)
233{ 233{
234 USE_DESKTOP(long long total_written = 0;) 234 IF_DESKTOP(long long total_written = 0;)
235 lzma_header_t header; 235 lzma_header_t header;
236 int lc, pb, lp; 236 int lc, pb, lp;
237 uint32_t pos_state_mask; 237 uint32_t pos_state_mask;
@@ -330,7 +330,7 @@ unpack_lzma_stream(int src_fd, int dst_fd)
330 global_pos += header.dict_size; 330 global_pos += header.dict_size;
331 if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size) 331 if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size)
332 goto bad; 332 goto bad;
333 USE_DESKTOP(total_written += header.dict_size;) 333 IF_DESKTOP(total_written += header.dict_size;)
334 } 334 }
335#else 335#else
336 len = 1; 336 len = 1;
@@ -468,20 +468,20 @@ unpack_lzma_stream(int src_fd, int dst_fd)
468 } 468 }
469 469
470 len += LZMA_MATCH_MIN_LEN; 470 len += LZMA_MATCH_MIN_LEN;
471 SKIP_FEATURE_LZMA_FAST(string:) 471 IF_NOT_FEATURE_LZMA_FAST(string:)
472 do { 472 do {
473 pos = buffer_pos - rep0; 473 pos = buffer_pos - rep0;
474 while (pos >= header.dict_size) 474 while (pos >= header.dict_size)
475 pos += header.dict_size; 475 pos += header.dict_size;
476 previous_byte = buffer[pos]; 476 previous_byte = buffer[pos];
477 SKIP_FEATURE_LZMA_FAST(one_byte2:) 477 IF_NOT_FEATURE_LZMA_FAST(one_byte2:)
478 buffer[buffer_pos++] = previous_byte; 478 buffer[buffer_pos++] = previous_byte;
479 if (buffer_pos == header.dict_size) { 479 if (buffer_pos == header.dict_size) {
480 buffer_pos = 0; 480 buffer_pos = 0;
481 global_pos += header.dict_size; 481 global_pos += header.dict_size;
482 if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size) 482 if (full_write(dst_fd, buffer, header.dict_size) != (ssize_t)header.dict_size)
483 goto bad; 483 goto bad;
484 USE_DESKTOP(total_written += header.dict_size;) 484 IF_DESKTOP(total_written += header.dict_size;)
485 } 485 }
486 len--; 486 len--;
487 } while (len != 0 && buffer_pos < header.dst_size); 487 } while (len != 0 && buffer_pos < header.dst_size);
@@ -489,8 +489,8 @@ unpack_lzma_stream(int src_fd, int dst_fd)
489 } 489 }
490 490
491 { 491 {
492 SKIP_DESKTOP(int total_written = 0; /* success */) 492 IF_NOT_DESKTOP(int total_written = 0; /* success */)
493 USE_DESKTOP(total_written += buffer_pos;) 493 IF_DESKTOP(total_written += buffer_pos;)
494 if (full_write(dst_fd, buffer, buffer_pos) != (ssize_t)buffer_pos) { 494 if (full_write(dst_fd, buffer, buffer_pos) != (ssize_t)buffer_pos) {
495 bad: 495 bad:
496 total_written = -1; /* failure */ 496 total_written = -1; /* failure */
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index 86969251e..b090f26eb 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -970,10 +970,10 @@ static int inflate_get_next_window(STATE_PARAM_ONLY)
970 970
971 971
972/* Called from unpack_gz_stream() and inflate_unzip() */ 972/* Called from unpack_gz_stream() and inflate_unzip() */
973static USE_DESKTOP(long long) int 973static IF_DESKTOP(long long) int
974inflate_unzip_internal(STATE_PARAM int in, int out) 974inflate_unzip_internal(STATE_PARAM int in, int out)
975{ 975{
976 USE_DESKTOP(long long) int n = 0; 976 IF_DESKTOP(long long) int n = 0;
977 ssize_t nwrote; 977 ssize_t nwrote;
978 978
979 /* Allocate all global buffers (for DYN_ALLOC option) */ 979 /* Allocate all global buffers (for DYN_ALLOC option) */
@@ -1008,7 +1008,7 @@ inflate_unzip_internal(STATE_PARAM int in, int out)
1008 n = -1; 1008 n = -1;
1009 goto ret; 1009 goto ret;
1010 } 1010 }
1011 USE_DESKTOP(n += nwrote;) 1011 IF_DESKTOP(n += nwrote;)
1012 if (r == 0) break; 1012 if (r == 0) break;
1013 } 1013 }
1014 1014
@@ -1033,10 +1033,10 @@ inflate_unzip_internal(STATE_PARAM int in, int out)
1033 1033
1034/* For unzip */ 1034/* For unzip */
1035 1035
1036USE_DESKTOP(long long) int FAST_FUNC 1036IF_DESKTOP(long long) int FAST_FUNC
1037inflate_unzip(inflate_unzip_result *res, off_t compr_size, int in, int out) 1037inflate_unzip(inflate_unzip_result *res, off_t compr_size, int in, int out)
1038{ 1038{
1039 USE_DESKTOP(long long) int n; 1039 IF_DESKTOP(long long) int n;
1040 DECLARE_STATE; 1040 DECLARE_STATE;
1041 1041
1042 ALLOC_STATE; 1042 ALLOC_STATE;
@@ -1181,11 +1181,11 @@ static int check_header_gzip(STATE_PARAM unpack_info_t *info)
1181 return 1; 1181 return 1;
1182} 1182}
1183 1183
1184USE_DESKTOP(long long) int FAST_FUNC 1184IF_DESKTOP(long long) int FAST_FUNC
1185unpack_gz_stream_with_info(int in, int out, unpack_info_t *info) 1185unpack_gz_stream_with_info(int in, int out, unpack_info_t *info)
1186{ 1186{
1187 uint32_t v32; 1187 uint32_t v32;
1188 USE_DESKTOP(long long) int n; 1188 IF_DESKTOP(long long) int n;
1189 DECLARE_STATE; 1189 DECLARE_STATE;
1190 1190
1191 n = 0; 1191 n = 0;
@@ -1245,7 +1245,7 @@ unpack_gz_stream_with_info(int in, int out, unpack_info_t *info)
1245 return n; 1245 return n;
1246} 1246}
1247 1247
1248USE_DESKTOP(long long) int FAST_FUNC 1248IF_DESKTOP(long long) int FAST_FUNC
1249unpack_gz_stream(int in, int out) 1249unpack_gz_stream(int in, int out)
1250{ 1250{
1251 return unpack_gz_stream_with_info(in, out, NULL); 1251 return unpack_gz_stream_with_info(in, out, NULL);
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index 443052f7e..16e2de440 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -144,8 +144,8 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
144// if (!archive_handle->ah_priv_inited) { 144// if (!archive_handle->ah_priv_inited) {
145// archive_handle->ah_priv_inited = 1; 145// archive_handle->ah_priv_inited = 1;
146// p_end = 0; 146// p_end = 0;
147// USE_FEATURE_TAR_GNU_EXTENSIONS(p_longname = NULL;) 147// IF_FEATURE_TAR_GNU_EXTENSIONS(p_longname = NULL;)
148// USE_FEATURE_TAR_GNU_EXTENSIONS(p_linkname = NULL;) 148// IF_FEATURE_TAR_GNU_EXTENSIONS(p_linkname = NULL;)
149// } 149// }
150 150
151 if (sizeof(tar) != 512) 151 if (sizeof(tar) != 512)
@@ -176,7 +176,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
176 bb_error_msg_and_die("short read"); 176 bb_error_msg_and_die("short read");
177 } 177 }
178 if (i != 512) { 178 if (i != 512) {
179 USE_FEATURE_TAR_AUTODETECT(goto autodetect;) 179 IF_FEATURE_TAR_AUTODETECT(goto autodetect;)
180 goto short_read; 180 goto short_read;
181 } 181 }
182 182
@@ -265,14 +265,14 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
265#if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY 265#if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
266 sum = strtoul(tar.chksum, &cp, 8); 266 sum = strtoul(tar.chksum, &cp, 8);
267 if ((*cp && *cp != ' ') 267 if ((*cp && *cp != ' ')
268 || (sum_u != sum USE_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum)) 268 || (sum_u != sum IF_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum))
269 ) { 269 ) {
270 bb_error_msg_and_die("invalid tar header checksum"); 270 bb_error_msg_and_die("invalid tar header checksum");
271 } 271 }
272#else 272#else
273 /* This field does not need special treatment (getOctal) */ 273 /* This field does not need special treatment (getOctal) */
274 sum = xstrtoul(tar.chksum, 8); 274 sum = xstrtoul(tar.chksum, 8);
275 if (sum_u != sum USE_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum)) { 275 if (sum_u != sum IF_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum)) {
276 bb_error_msg_and_die("invalid tar header checksum"); 276 bb_error_msg_and_die("invalid tar header checksum");
277 } 277 }
278#endif 278#endif
@@ -356,7 +356,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
356 file_header->mode |= S_IFBLK; 356 file_header->mode |= S_IFBLK;
357 goto size0; 357 goto size0;
358 case '5': 358 case '5':
359 USE_FEATURE_TAR_OLDGNU_COMPATIBILITY(set_dir:) 359 IF_FEATURE_TAR_OLDGNU_COMPATIBILITY(set_dir:)
360 file_header->mode |= S_IFDIR; 360 file_header->mode |= S_IFDIR;
361 goto size0; 361 goto size0;
362 case '6': 362 case '6':
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c
index 42fdd96a6..fae589ee0 100644
--- a/archival/libunarchive/open_transformer.c
+++ b/archival/libunarchive/open_transformer.c
@@ -12,7 +12,7 @@
12 * in include/unarchive.h. On NOMMU, transformer is removed. 12 * in include/unarchive.h. On NOMMU, transformer is removed.
13 */ 13 */
14void FAST_FUNC open_transformer(int fd, 14void FAST_FUNC open_transformer(int fd,
15 USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd), 15 IF_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd),
16 const char *transform_prog) 16 const char *transform_prog)
17{ 17{
18 struct fd_pair fd_pipe; 18 struct fd_pair fd_pipe;
diff --git a/archival/rpm.c b/archival/rpm.c
index 4c36067c4..569bcddf2 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -190,7 +190,7 @@ static void extract_cpio_gz(int fd)
190 archive_handle_t *archive_handle; 190 archive_handle_t *archive_handle;
191 unsigned char magic[2]; 191 unsigned char magic[2];
192#if BB_MMU 192#if BB_MMU
193 USE_DESKTOP(long long) int FAST_FUNC (*xformer)(int src_fd, int dst_fd); 193 IF_DESKTOP(long long) int FAST_FUNC (*xformer)(int src_fd, int dst_fd);
194 enum { xformer_prog = 0 }; 194 enum { xformer_prog = 0 };
195#else 195#else
196 enum { xformer = 0 }; 196 enum { xformer = 0 };
@@ -224,7 +224,7 @@ static void extract_cpio_gz(int fd)
224 || magic[0] != 'B' || magic[1] != 'Z' 224 || magic[0] != 'B' || magic[1] != 'Z'
225 ) { 225 ) {
226 bb_error_msg_and_die("no gzip" 226 bb_error_msg_and_die("no gzip"
227 USE_FEATURE_SEAMLESS_BZ2("/bzip2") 227 IF_FEATURE_SEAMLESS_BZ2("/bzip2")
228 " magic"); 228 " magic");
229 } 229 }
230#if BB_MMU 230#if BB_MMU
diff --git a/archival/tar.c b/archival/tar.c
index 03d66a692..379028bd9 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -728,14 +728,14 @@ static void handle_SIGCHLD(int status)
728 728
729enum { 729enum {
730 OPTBIT_KEEP_OLD = 7, 730 OPTBIT_KEEP_OLD = 7,
731 USE_FEATURE_TAR_CREATE( OPTBIT_CREATE ,) 731 IF_FEATURE_TAR_CREATE( OPTBIT_CREATE ,)
732 USE_FEATURE_TAR_CREATE( OPTBIT_DEREFERENCE ,) 732 IF_FEATURE_TAR_CREATE( OPTBIT_DEREFERENCE ,)
733 USE_FEATURE_SEAMLESS_BZ2( OPTBIT_BZIP2 ,) 733 IF_FEATURE_SEAMLESS_BZ2( OPTBIT_BZIP2 ,)
734 USE_FEATURE_SEAMLESS_LZMA(OPTBIT_LZMA ,) 734 IF_FEATURE_SEAMLESS_LZMA(OPTBIT_LZMA ,)
735 USE_FEATURE_TAR_FROM( OPTBIT_INCLUDE_FROM,) 735 IF_FEATURE_TAR_FROM( OPTBIT_INCLUDE_FROM,)
736 USE_FEATURE_TAR_FROM( OPTBIT_EXCLUDE_FROM,) 736 IF_FEATURE_TAR_FROM( OPTBIT_EXCLUDE_FROM,)
737 USE_FEATURE_SEAMLESS_GZ( OPTBIT_GZIP ,) 737 IF_FEATURE_SEAMLESS_GZ( OPTBIT_GZIP ,)
738 USE_FEATURE_SEAMLESS_Z( OPTBIT_COMPRESS ,) 738 IF_FEATURE_SEAMLESS_Z( OPTBIT_COMPRESS ,)
739 OPTBIT_NOPRESERVE_OWN, 739 OPTBIT_NOPRESERVE_OWN,
740 OPTBIT_NOPRESERVE_PERM, 740 OPTBIT_NOPRESERVE_PERM,
741 OPTBIT_NUMERIC_OWNER, 741 OPTBIT_NUMERIC_OWNER,
@@ -747,14 +747,14 @@ enum {
747 OPT_P = 1 << 5, // p 747 OPT_P = 1 << 5, // p
748 OPT_VERBOSE = 1 << 6, // v 748 OPT_VERBOSE = 1 << 6, // v
749 OPT_KEEP_OLD = 1 << 7, // k 749 OPT_KEEP_OLD = 1 << 7, // k
750 OPT_CREATE = USE_FEATURE_TAR_CREATE( (1 << OPTBIT_CREATE )) + 0, // c 750 OPT_CREATE = IF_FEATURE_TAR_CREATE( (1 << OPTBIT_CREATE )) + 0, // c
751 OPT_DEREFERENCE = USE_FEATURE_TAR_CREATE( (1 << OPTBIT_DEREFERENCE )) + 0, // h 751 OPT_DEREFERENCE = IF_FEATURE_TAR_CREATE( (1 << OPTBIT_DEREFERENCE )) + 0, // h
752 OPT_BZIP2 = USE_FEATURE_SEAMLESS_BZ2( (1 << OPTBIT_BZIP2 )) + 0, // j 752 OPT_BZIP2 = IF_FEATURE_SEAMLESS_BZ2( (1 << OPTBIT_BZIP2 )) + 0, // j
753 OPT_LZMA = USE_FEATURE_SEAMLESS_LZMA((1 << OPTBIT_LZMA )) + 0, // a 753 OPT_LZMA = IF_FEATURE_SEAMLESS_LZMA((1 << OPTBIT_LZMA )) + 0, // a
754 OPT_INCLUDE_FROM = USE_FEATURE_TAR_FROM( (1 << OPTBIT_INCLUDE_FROM)) + 0, // T 754 OPT_INCLUDE_FROM = IF_FEATURE_TAR_FROM( (1 << OPTBIT_INCLUDE_FROM)) + 0, // T
755 OPT_EXCLUDE_FROM = USE_FEATURE_TAR_FROM( (1 << OPTBIT_EXCLUDE_FROM)) + 0, // X 755 OPT_EXCLUDE_FROM = IF_FEATURE_TAR_FROM( (1 << OPTBIT_EXCLUDE_FROM)) + 0, // X
756 OPT_GZIP = USE_FEATURE_SEAMLESS_GZ( (1 << OPTBIT_GZIP )) + 0, // z 756 OPT_GZIP = IF_FEATURE_SEAMLESS_GZ( (1 << OPTBIT_GZIP )) + 0, // z
757 OPT_COMPRESS = USE_FEATURE_SEAMLESS_Z( (1 << OPTBIT_COMPRESS )) + 0, // Z 757 OPT_COMPRESS = IF_FEATURE_SEAMLESS_Z( (1 << OPTBIT_COMPRESS )) + 0, // Z
758 OPT_NOPRESERVE_OWN = 1 << OPTBIT_NOPRESERVE_OWN , // no-same-owner 758 OPT_NOPRESERVE_OWN = 1 << OPTBIT_NOPRESERVE_OWN , // no-same-owner
759 OPT_NOPRESERVE_PERM = 1 << OPTBIT_NOPRESERVE_PERM, // no-same-permissions 759 OPT_NOPRESERVE_PERM = 1 << OPTBIT_NOPRESERVE_PERM, // no-same-permissions
760 OPT_NUMERIC_OWNER = 1 << OPTBIT_NUMERIC_OWNER, 760 OPT_NUMERIC_OWNER = 1 << OPTBIT_NUMERIC_OWNER,
@@ -832,24 +832,24 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
832#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM 832#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM
833 "\xff::" // cumulative lists for --exclude 833 "\xff::" // cumulative lists for --exclude
834#endif 834#endif
835 USE_FEATURE_TAR_CREATE("c:") "t:x:" // at least one of these is reqd 835 IF_FEATURE_TAR_CREATE("c:") "t:x:" // at least one of these is reqd
836 USE_FEATURE_TAR_CREATE("c--tx:t--cx:x--ct") // mutually exclusive 836 IF_FEATURE_TAR_CREATE("c--tx:t--cx:x--ct") // mutually exclusive
837 SKIP_FEATURE_TAR_CREATE("t--x:x--t"); // mutually exclusive 837 IF_NOT_FEATURE_TAR_CREATE("t--x:x--t"); // mutually exclusive
838#if ENABLE_FEATURE_TAR_LONG_OPTIONS 838#if ENABLE_FEATURE_TAR_LONG_OPTIONS
839 applet_long_options = tar_longopts; 839 applet_long_options = tar_longopts;
840#endif 840#endif
841 opt = getopt32(argv, 841 opt = getopt32(argv,
842 "txC:f:Opvk" 842 "txC:f:Opvk"
843 USE_FEATURE_TAR_CREATE( "ch" ) 843 IF_FEATURE_TAR_CREATE( "ch" )
844 USE_FEATURE_SEAMLESS_BZ2( "j" ) 844 IF_FEATURE_SEAMLESS_BZ2( "j" )
845 USE_FEATURE_SEAMLESS_LZMA("a" ) 845 IF_FEATURE_SEAMLESS_LZMA("a" )
846 USE_FEATURE_TAR_FROM( "T:X:") 846 IF_FEATURE_TAR_FROM( "T:X:")
847 USE_FEATURE_SEAMLESS_GZ( "z" ) 847 IF_FEATURE_SEAMLESS_GZ( "z" )
848 USE_FEATURE_SEAMLESS_Z( "Z" ) 848 IF_FEATURE_SEAMLESS_Z( "Z" )
849 , &base_dir // -C dir 849 , &base_dir // -C dir
850 , &tar_filename // -f filename 850 , &tar_filename // -f filename
851 USE_FEATURE_TAR_FROM(, &(tar_handle->accept)) // T 851 IF_FEATURE_TAR_FROM(, &(tar_handle->accept)) // T
852 USE_FEATURE_TAR_FROM(, &(tar_handle->reject)) // X 852 IF_FEATURE_TAR_FROM(, &(tar_handle->reject)) // X
853#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM 853#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM
854 , &excludes // --exclude 854 , &excludes // --exclude
855#endif 855#endif
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index 40f681fb6..9c1c76047 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -20,10 +20,10 @@
20 20
21 21
22#define OPT_RECURSE (option_mask32 & 1) 22#define OPT_RECURSE (option_mask32 & 1)
23#define OPT_VERBOSE (USE_DESKTOP(option_mask32 & 2) SKIP_DESKTOP(0)) 23#define OPT_VERBOSE (IF_DESKTOP(option_mask32 & 2) IF_NOT_DESKTOP(0))
24#define OPT_CHANGED (USE_DESKTOP(option_mask32 & 4) SKIP_DESKTOP(0)) 24#define OPT_CHANGED (IF_DESKTOP(option_mask32 & 4) IF_NOT_DESKTOP(0))
25#define OPT_QUIET (USE_DESKTOP(option_mask32 & 8) SKIP_DESKTOP(0)) 25#define OPT_QUIET (IF_DESKTOP(option_mask32 & 8) IF_NOT_DESKTOP(0))
26#define OPT_STR "R" USE_DESKTOP("vcf") 26#define OPT_STR "R" IF_DESKTOP("vcf")
27 27
28/* coreutils: 28/* coreutils:
29 * chmod never changes the permissions of symbolic links; the chmod 29 * chmod never changes the permissions of symbolic links; the chmod
diff --git a/coreutils/chown.c b/coreutils/chown.c
index 345249261..2d8e556f0 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -16,13 +16,13 @@
16/* This is a NOEXEC applet. Be very careful! */ 16/* This is a NOEXEC applet. Be very careful! */
17 17
18 18
19#define OPT_STR ("Rh" USE_DESKTOP("vcfLHP")) 19#define OPT_STR ("Rh" IF_DESKTOP("vcfLHP"))
20#define BIT_RECURSE 1 20#define BIT_RECURSE 1
21#define OPT_RECURSE (opt & 1) 21#define OPT_RECURSE (opt & 1)
22#define OPT_NODEREF (opt & 2) 22#define OPT_NODEREF (opt & 2)
23#define OPT_VERBOSE (USE_DESKTOP(opt & 0x04) SKIP_DESKTOP(0)) 23#define OPT_VERBOSE (IF_DESKTOP(opt & 0x04) IF_NOT_DESKTOP(0))
24#define OPT_CHANGED (USE_DESKTOP(opt & 0x08) SKIP_DESKTOP(0)) 24#define OPT_CHANGED (IF_DESKTOP(opt & 0x08) IF_NOT_DESKTOP(0))
25#define OPT_QUIET (USE_DESKTOP(opt & 0x10) SKIP_DESKTOP(0)) 25#define OPT_QUIET (IF_DESKTOP(opt & 0x10) IF_NOT_DESKTOP(0))
26/* POSIX options 26/* POSIX options
27 * -L traverse every symbolic link to a directory encountered 27 * -L traverse every symbolic link to a directory encountered
28 * -H if a command line argument is a symbolic link to a directory, traverse it 28 * -H if a command line argument is a symbolic link to a directory, traverse it
@@ -32,10 +32,10 @@
32 * The last option specified shall determine the behavior of the utility." */ 32 * The last option specified shall determine the behavior of the utility." */
33/* -L */ 33/* -L */
34#define BIT_TRAVERSE 0x20 34#define BIT_TRAVERSE 0x20
35#define OPT_TRAVERSE (USE_DESKTOP(opt & BIT_TRAVERSE) SKIP_DESKTOP(0)) 35#define OPT_TRAVERSE (IF_DESKTOP(opt & BIT_TRAVERSE) IF_NOT_DESKTOP(0))
36/* -H or -L */ 36/* -H or -L */
37#define BIT_TRAVERSE_TOP (0x20|0x40) 37#define BIT_TRAVERSE_TOP (0x20|0x40)
38#define OPT_TRAVERSE_TOP (USE_DESKTOP(opt & BIT_TRAVERSE_TOP) SKIP_DESKTOP(0)) 38#define OPT_TRAVERSE_TOP (IF_DESKTOP(opt & BIT_TRAVERSE_TOP) IF_NOT_DESKTOP(0))
39 39
40typedef int (*chown_fptr)(const char *, uid_t, gid_t); 40typedef int (*chown_fptr)(const char *, uid_t, gid_t);
41 41
@@ -85,7 +85,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
85 /* This matches coreutils behavior (almost - see below) */ 85 /* This matches coreutils behavior (almost - see below) */
86 if (OPT_NODEREF 86 if (OPT_NODEREF
87 /* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */ 87 /* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */
88 USE_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE) 88 IF_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE)
89 ) { 89 ) {
90 param.chown_func = lchown; 90 param.chown_func = lchown;
91 } 91 }
diff --git a/coreutils/date.c b/coreutils/date.c
index 177b7d075..3a536dbe5 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -52,11 +52,11 @@ int date_main(int argc UNUSED_PARAM, char **argv)
52 char *isofmt_arg = NULL; 52 char *isofmt_arg = NULL;
53 53
54 opt_complementary = "d--s:s--d" 54 opt_complementary = "d--s:s--d"
55 USE_FEATURE_DATE_ISOFMT(":R--I:I--R"); 55 IF_FEATURE_DATE_ISOFMT(":R--I:I--R");
56 opt = getopt32(argv, "Rs:ud:r:" 56 opt = getopt32(argv, "Rs:ud:r:"
57 USE_FEATURE_DATE_ISOFMT("I::D:"), 57 IF_FEATURE_DATE_ISOFMT("I::D:"),
58 &date_str, &date_str, &filename 58 &date_str, &date_str, &filename
59 USE_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt)); 59 IF_FEATURE_DATE_ISOFMT(, &isofmt_arg, &fmt_str2dt));
60 argv += optind; 60 argv += optind;
61 maybe_set_utc(opt); 61 maybe_set_utc(opt);
62 62
diff --git a/coreutils/df.c b/coreutils/df.c
index dfd6e0b41..34b015090 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -64,9 +64,9 @@ int df_main(int argc, char **argv)
64 opt_complementary = "k-m:m-k"; 64 opt_complementary = "k-m:m-k";
65#endif 65#endif
66 opt = getopt32(argv, "kP" 66 opt = getopt32(argv, "kP"
67 USE_FEATURE_DF_FANCY("aiB:") 67 IF_FEATURE_DF_FANCY("aiB:")
68 USE_FEATURE_HUMAN_READABLE("hm") 68 IF_FEATURE_HUMAN_READABLE("hm")
69 USE_FEATURE_DF_FANCY(, &chp)); 69 IF_FEATURE_DF_FANCY(, &chp));
70 if (opt & OPT_MEGA) 70 if (opt & OPT_MEGA)
71 df_disp_hr = 1024*1024; 71 df_disp_hr = 1024*1024;
72 72
diff --git a/coreutils/du.c b/coreutils/du.c
index 16c773243..ec283f85e 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -155,13 +155,13 @@ int du_main(int argc UNUSED_PARAM, char **argv)
155 unsigned opt; 155 unsigned opt;
156 156
157#if ENABLE_FEATURE_HUMAN_READABLE 157#if ENABLE_FEATURE_HUMAN_READABLE
158 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 1024;) 158 IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 1024;)
159 SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 512;) 159 IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 512;)
160 if (getenv("POSIXLY_CORRECT")) /* TODO - a new libbb function? */ 160 if (getenv("POSIXLY_CORRECT")) /* TODO - a new libbb function? */
161 G.disp_hr = 512; 161 G.disp_hr = 512;
162#else 162#else
163 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_k = 1;) 163 IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_k = 1;)
164 /* SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_k = 0;) - G is pre-zeroed */ 164 /* IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_k = 0;) - G is pre-zeroed */
165#endif 165#endif
166 G.max_print_depth = INT_MAX; 166 G.max_print_depth = INT_MAX;
167 167
diff --git a/coreutils/expand.c b/coreutils/expand.c
index 0967e2534..7137c3b89 100644
--- a/coreutils/expand.c
+++ b/coreutils/expand.c
@@ -132,10 +132,10 @@ int expand_main(int argc UNUSED_PARAM, char **argv)
132#endif 132#endif
133 133
134 if (ENABLE_EXPAND && (!ENABLE_UNEXPAND || applet_name[0] == 'e')) { 134 if (ENABLE_EXPAND && (!ENABLE_UNEXPAND || applet_name[0] == 'e')) {
135 USE_FEATURE_EXPAND_LONG_OPTIONS(applet_long_options = expand_longopts); 135 IF_FEATURE_EXPAND_LONG_OPTIONS(applet_long_options = expand_longopts);
136 opt = getopt32(argv, "it:", &opt_t); 136 opt = getopt32(argv, "it:", &opt_t);
137 } else { 137 } else {
138 USE_FEATURE_UNEXPAND_LONG_OPTIONS(applet_long_options = unexpand_longopts); 138 IF_FEATURE_UNEXPAND_LONG_OPTIONS(applet_long_options = unexpand_longopts);
139 /* -t NUM sets also -a */ 139 /* -t NUM sets also -a */
140 opt_complementary = "ta"; 140 opt_complementary = "ta";
141 opt = getopt32(argv, "ft:a", &opt_t); 141 opt = getopt32(argv, "ft:a", &opt_t);
@@ -157,9 +157,9 @@ int expand_main(int argc UNUSED_PARAM, char **argv)
157 } 157 }
158 158
159 if (ENABLE_EXPAND && (!ENABLE_UNEXPAND || applet_name[0] == 'e')) 159 if (ENABLE_EXPAND && (!ENABLE_UNEXPAND || applet_name[0] == 'e'))
160 USE_EXPAND(expand(file, tab_size, opt)); 160 IF_EXPAND(expand(file, tab_size, opt));
161 else 161 else
162 USE_UNEXPAND(unexpand(file, tab_size, opt)); 162 IF_UNEXPAND(unexpand(file, tab_size, opt));
163 163
164 /* Check and close the file */ 164 /* Check and close the file */
165 if (fclose_if_not_stdin(file)) { 165 if (fclose_if_not_stdin(file)) {
diff --git a/coreutils/id.c b/coreutils/id.c
index 43f403fa3..6022c9fa4 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -119,8 +119,8 @@ int id_main(int argc UNUSED_PARAM, char **argv)
119 /* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/ 119 /* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/
120 /* Don't allow more than one username */ 120 /* Don't allow more than one username */
121 opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG" 121 opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG"
122 USE_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G"); 122 IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
123 opt = getopt32(argv, "rnugG" USE_SELINUX("Z")); 123 opt = getopt32(argv, "rnugG" IF_SELINUX("Z"));
124 124
125 username = argv[optind]; 125 username = argv[optind];
126 if (username) { 126 if (username) {
diff --git a/coreutils/install.c b/coreutils/install.c
index 2b796e2a1..24fb402af 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -101,12 +101,12 @@ int install_main(int argc, char **argv)
101#if ENABLE_FEATURE_INSTALL_LONG_OPTIONS 101#if ENABLE_FEATURE_INSTALL_LONG_OPTIONS
102 applet_long_options = install_longopts; 102 applet_long_options = install_longopts;
103#endif 103#endif
104 opt_complementary = "s--d:d--s" USE_SELINUX(":Z--\xff:\xff--Z"); 104 opt_complementary = "s--d:d--s" IF_SELINUX(":Z--\xff:\xff--Z");
105 /* -c exists for backwards compatibility, it's needed */ 105 /* -c exists for backwards compatibility, it's needed */
106 /* -v is ignored ("print name of each created directory") */ 106 /* -v is ignored ("print name of each created directory") */
107 /* -b is ignored ("make a backup of each existing destination file") */ 107 /* -b is ignored ("make a backup of each existing destination file") */
108 opts = getopt32(argv, "cvb" "Ddpsg:m:o:" USE_SELINUX("Z:"), 108 opts = getopt32(argv, "cvb" "Ddpsg:m:o:" IF_SELINUX("Z:"),
109 &gid_str, &mode_str, &uid_str USE_SELINUX(, &scontext)); 109 &gid_str, &mode_str, &uid_str IF_SELINUX(, &scontext));
110 argc -= optind; 110 argc -= optind;
111 argv += optind; 111 argv += optind;
112 112
diff --git a/coreutils/libcoreutils/getopt_mk_fifo_nod.c b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
index ba3222e46..222717149 100644
--- a/coreutils/libcoreutils/getopt_mk_fifo_nod.c
+++ b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
@@ -31,7 +31,7 @@ mode_t FAST_FUNC getopt_mk_fifo_nod(char **argv)
31 security_context_t scontext; 31 security_context_t scontext;
32#endif 32#endif
33 int opt; 33 int opt;
34 opt = getopt32(argv, "m:" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext)); 34 opt = getopt32(argv, "m:" IF_SELINUX("Z:"), &smode IF_SELINUX(,&scontext));
35 if (opt & 1) { 35 if (opt & 1) {
36 if (bb_parse_mode(smode, &mode)) 36 if (bb_parse_mode(smode, &mode))
37 umask(0); 37 umask(0);
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 61baa9a11..379b0f94f 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -46,12 +46,12 @@
46 */ 46 */
47# undef CONFIG_FEATURE_LS_TIMESTAMPS 47# undef CONFIG_FEATURE_LS_TIMESTAMPS
48# undef ENABLE_FEATURE_LS_TIMESTAMPS 48# undef ENABLE_FEATURE_LS_TIMESTAMPS
49# undef USE_FEATURE_LS_TIMESTAMPS 49# undef IF_FEATURE_LS_TIMESTAMPS
50# undef SKIP_FEATURE_LS_TIMESTAMPS 50# undef IF_NOT_FEATURE_LS_TIMESTAMPS
51# define CONFIG_FEATURE_LS_TIMESTAMPS 1 51# define CONFIG_FEATURE_LS_TIMESTAMPS 1
52# define ENABLE_FEATURE_LS_TIMESTAMPS 1 52# define ENABLE_FEATURE_LS_TIMESTAMPS 1
53# define USE_FEATURE_LS_TIMESTAMPS(...) __VA_ARGS__ 53# define IF_FEATURE_LS_TIMESTAMPS(...) __VA_ARGS__
54# define SKIP_FEATURE_LS_TIMESTAMPS(...) 54# define IF_NOT_FEATURE_LS_TIMESTAMPS(...)
55#endif 55#endif
56 56
57 57
@@ -138,15 +138,15 @@ SPLIT_SUBDIR = 2,
138/* "[-]e", I think we made this one up */ 138/* "[-]e", I think we made this one up */
139static const char ls_options[] ALIGN1 = 139static const char ls_options[] ALIGN1 =
140 "Cadil1gnsxQAk" /* 13 opts, total 13 */ 140 "Cadil1gnsxQAk" /* 13 opts, total 13 */
141 USE_FEATURE_LS_TIMESTAMPS("cetu") /* 4, 17 */ 141 IF_FEATURE_LS_TIMESTAMPS("cetu") /* 4, 17 */
142 USE_FEATURE_LS_SORTFILES("SXrv") /* 4, 21 */ 142 IF_FEATURE_LS_SORTFILES("SXrv") /* 4, 21 */
143 USE_FEATURE_LS_FILETYPES("Fp") /* 2, 23 */ 143 IF_FEATURE_LS_FILETYPES("Fp") /* 2, 23 */
144 USE_FEATURE_LS_FOLLOWLINKS("L") /* 1, 24 */ 144 IF_FEATURE_LS_FOLLOWLINKS("L") /* 1, 24 */
145 USE_FEATURE_LS_RECURSIVE("R") /* 1, 25 */ 145 IF_FEATURE_LS_RECURSIVE("R") /* 1, 25 */
146 USE_FEATURE_HUMAN_READABLE("h") /* 1, 26 */ 146 IF_FEATURE_HUMAN_READABLE("h") /* 1, 26 */
147 USE_SELINUX("K") /* 1, 27 */ 147 IF_SELINUX("K") /* 1, 27 */
148 USE_SELINUX("Z") /* 1, 28 */ 148 IF_SELINUX("Z") /* 1, 28 */
149 USE_FEATURE_AUTOWIDTH("T:w:") /* 2, 30 */ 149 IF_FEATURE_AUTOWIDTH("T:w:") /* 2, 30 */
150 ; 150 ;
151enum { 151enum {
152 //OPT_C = (1 << 0), 152 //OPT_C = (1 << 0),
@@ -232,7 +232,7 @@ struct dnode { /* the basic node */
232 const char *fullname; /* the dir entry name */ 232 const char *fullname; /* the dir entry name */
233 int allocated; 233 int allocated;
234 struct stat dstat; /* the file stat info */ 234 struct stat dstat; /* the file stat info */
235 USE_SELINUX(security_context_t sid;) 235 IF_SELINUX(security_context_t sid;)
236 struct dnode *next; /* point at the next node */ 236 struct dnode *next; /* point at the next node */
237}; 237};
238 238
@@ -277,9 +277,9 @@ enum {
277/* memset: we have to zero it out because of NOEXEC */ 277/* memset: we have to zero it out because of NOEXEC */
278#define INIT_G() do { \ 278#define INIT_G() do { \
279 memset(&G, 0, sizeof(G)); \ 279 memset(&G, 0, sizeof(G)); \
280 USE_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \ 280 IF_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \
281 USE_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \ 281 IF_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \
282 USE_FEATURE_LS_TIMESTAMPS(time(&current_time_t);) \ 282 IF_FEATURE_LS_TIMESTAMPS(time(&current_time_t);) \
283} while (0) 283} while (0)
284 284
285 285
@@ -302,7 +302,7 @@ static struct dnode *my_stat(const char *fullname, const char *name, int force_f
302{ 302{
303 struct stat dstat; 303 struct stat dstat;
304 struct dnode *cur; 304 struct dnode *cur;
305 USE_SELINUX(security_context_t sid = NULL;) 305 IF_SELINUX(security_context_t sid = NULL;)
306 306
307 if ((all_fmt & FOLLOW_LINKS) || force_follow) { 307 if ((all_fmt & FOLLOW_LINKS) || force_follow) {
308#if ENABLE_SELINUX 308#if ENABLE_SELINUX
@@ -332,7 +332,7 @@ static struct dnode *my_stat(const char *fullname, const char *name, int force_f
332 cur->fullname = fullname; 332 cur->fullname = fullname;
333 cur->name = name; 333 cur->name = name;
334 cur->dstat = dstat; 334 cur->dstat = dstat;
335 USE_SELINUX(cur->sid = sid;) 335 IF_SELINUX(cur->sid = sid;)
336 return cur; 336 return cur;
337} 337}
338 338
@@ -570,7 +570,7 @@ static void showfiles(struct dnode **dn, int nfiles)
570 column_width = len; 570 column_width = len;
571 } 571 }
572 column_width += tabstops + 572 column_width += tabstops +
573 USE_SELINUX( ((all_fmt & LIST_CONTEXT) ? 33 : 0) + ) 573 IF_SELINUX( ((all_fmt & LIST_CONTEXT) ? 33 : 0) + )
574 ((all_fmt & LIST_INO) ? 8 : 0) + 574 ((all_fmt & LIST_INO) ? 8 : 0) +
575 ((all_fmt & LIST_BLOCKS) ? 5 : 0); 575 ((all_fmt & LIST_BLOCKS) ? 5 : 0);
576 ncols = (int) (terminal_width / column_width); 576 ncols = (int) (terminal_width / column_width);
@@ -912,7 +912,7 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
912 int dndirs; 912 int dndirs;
913 int i; 913 int i;
914 /* need to initialize since --color has _an optional_ argument */ 914 /* need to initialize since --color has _an optional_ argument */
915 USE_FEATURE_LS_COLOR(const char *color_opt = "always";) 915 IF_FEATURE_LS_COLOR(const char *color_opt = "always";)
916 916
917 INIT_G(); 917 INIT_G();
918 918
@@ -927,13 +927,13 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
927#endif 927#endif
928 928
929 /* process options */ 929 /* process options */
930 USE_FEATURE_LS_COLOR(applet_long_options = ls_color_opt;) 930 IF_FEATURE_LS_COLOR(applet_long_options = ls_color_opt;)
931#if ENABLE_FEATURE_AUTOWIDTH 931#if ENABLE_FEATURE_AUTOWIDTH
932 opt_complementary = "T+:w+"; /* -T N, -w N */ 932 opt_complementary = "T+:w+"; /* -T N, -w N */
933 opt = getopt32(argv, ls_options, &tabstops, &terminal_width 933 opt = getopt32(argv, ls_options, &tabstops, &terminal_width
934 USE_FEATURE_LS_COLOR(, &color_opt)); 934 IF_FEATURE_LS_COLOR(, &color_opt));
935#else 935#else
936 opt = getopt32(argv, ls_options USE_FEATURE_LS_COLOR(, &color_opt)); 936 opt = getopt32(argv, ls_options IF_FEATURE_LS_COLOR(, &color_opt));
937#endif 937#endif
938 for (i = 0; opt_flags[i] != (1U<<31); i++) { 938 for (i = 0; opt_flags[i] != (1U<<31); i++) {
939 if (opt & (1 << i)) { 939 if (opt & (1 << i)) {
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 72bd10581..a110165db 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -48,7 +48,7 @@ int mkdir_main(int argc, char **argv)
48#if ENABLE_FEATURE_MKDIR_LONG_OPTIONS 48#if ENABLE_FEATURE_MKDIR_LONG_OPTIONS
49 applet_long_options = mkdir_longopts; 49 applet_long_options = mkdir_longopts;
50#endif 50#endif
51 opt = getopt32(argv, "m:p" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext)); 51 opt = getopt32(argv, "m:p" IF_SELINUX("Z:"), &smode IF_SELINUX(,&scontext));
52 if (opt & 1) { 52 if (opt & 1) {
53 mode = 0777; 53 mode = 0777;
54 if (!bb_parse_mode(smode, &mode)) { 54 if (!bb_parse_mode(smode, &mode)) {
diff --git a/coreutils/readlink.c b/coreutils/readlink.c
index 721fd8597..8d4456214 100644
--- a/coreutils/readlink.c
+++ b/coreutils/readlink.c
@@ -16,14 +16,14 @@ int readlink_main(int argc UNUSED_PARAM, char **argv)
16 char *fname; 16 char *fname;
17 char pathbuf[PATH_MAX]; 17 char pathbuf[PATH_MAX];
18 18
19 USE_FEATURE_READLINK_FOLLOW( 19 IF_FEATURE_READLINK_FOLLOW(
20 unsigned opt; 20 unsigned opt;
21 /* We need exactly one non-option argument. */ 21 /* We need exactly one non-option argument. */
22 opt_complementary = "=1"; 22 opt_complementary = "=1";
23 opt = getopt32(argv, "f"); 23 opt = getopt32(argv, "f");
24 fname = argv[optind]; 24 fname = argv[optind];
25 ) 25 )
26 SKIP_FEATURE_READLINK_FOLLOW( 26 IF_NOT_FEATURE_READLINK_FOLLOW(
27 const unsigned opt = 0; 27 const unsigned opt = 0;
28 if (argc != 2) bb_show_usage(); 28 if (argc != 2) bb_show_usage();
29 fname = argv[1]; 29 fname = argv[1];
diff --git a/coreutils/stat.c b/coreutils/stat.c
index 32e8b42f3..44a03e5e7 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -156,7 +156,7 @@ static void printfs(char *pformat, const char *msg)
156/* print statfs info */ 156/* print statfs info */
157static void print_statfs(char *pformat, const char m, 157static void print_statfs(char *pformat, const char m,
158 const char *const filename, const void *data 158 const char *const filename, const void *data
159 USE_SELINUX(, security_context_t scontext)) 159 IF_SELINUX(, security_context_t scontext))
160{ 160{
161 const struct statfs *statfsbuf = data; 161 const struct statfs *statfsbuf = data;
162 if (m == 'n') { 162 if (m == 'n') {
@@ -203,7 +203,7 @@ static void print_statfs(char *pformat, const char m,
203/* print stat info */ 203/* print stat info */
204static void print_stat(char *pformat, const char m, 204static void print_stat(char *pformat, const char m,
205 const char *const filename, const void *data 205 const char *const filename, const void *data
206 USE_SELINUX(, security_context_t scontext)) 206 IF_SELINUX(, security_context_t scontext))
207{ 207{
208#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) 208#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
209 struct stat *statbuf = (struct stat *) data; 209 struct stat *statbuf = (struct stat *) data;
@@ -306,9 +306,9 @@ static void print_stat(char *pformat, const char m,
306} 306}
307 307
308static void print_it(const char *masterformat, const char *filename, 308static void print_it(const char *masterformat, const char *filename,
309 void (*print_func) (char*, char, const char*, const void* USE_SELINUX(, security_context_t scontext)), 309 void (*print_func) (char*, char, const char*, const void* IF_SELINUX(, security_context_t scontext)),
310 const void *data 310 const void *data
311 USE_SELINUX(, security_context_t scontext) ) 311 IF_SELINUX(, security_context_t scontext) )
312{ 312{
313 /* Create a working copy of the format string */ 313 /* Create a working copy of the format string */
314 char *format = xstrdup(masterformat); 314 char *format = xstrdup(masterformat);
@@ -347,7 +347,7 @@ static void print_it(const char *masterformat, const char *filename,
347 break; 347 break;
348 default: 348 default:
349 /* Completes "%<modifiers>" with specifier and printfs */ 349 /* Completes "%<modifiers>" with specifier and printfs */
350 print_func(dest, *p, filename, data USE_SELINUX(,scontext)); 350 print_func(dest, *p, filename, data IF_SELINUX(,scontext));
351 break; 351 break;
352 } 352 }
353 } 353 }
@@ -416,7 +416,7 @@ static bool do_statfs(const char *filename, const char *format)
416 ); 416 );
417#endif /* SELINUX */ 417#endif /* SELINUX */
418 } 418 }
419 print_it(format, filename, print_statfs, &statfsbuf USE_SELINUX(, scontext)); 419 print_it(format, filename, print_statfs, &statfsbuf IF_SELINUX(, scontext));
420#else /* FEATURE_STAT_FORMAT */ 420#else /* FEATURE_STAT_FORMAT */
421 format = (option_mask32 & OPT_TERSE 421 format = (option_mask32 & OPT_TERSE
422 ? "%s %llx %lu " 422 ? "%s %llx %lu "
@@ -560,11 +560,11 @@ static bool do_stat(const char *filename, const char *format)
560 } 560 }
561#endif 561#endif
562 } 562 }
563 print_it(format, filename, print_stat, &statbuf USE_SELINUX(, scontext)); 563 print_it(format, filename, print_stat, &statbuf IF_SELINUX(, scontext));
564#else /* FEATURE_STAT_FORMAT */ 564#else /* FEATURE_STAT_FORMAT */
565 if (option_mask32 & OPT_TERSE) { 565 if (option_mask32 & OPT_TERSE) {
566 printf("%s %ju %ju %lx %lu %lu %jx %ju %lu %lx %lx %lu %lu %lu %lu" 566 printf("%s %ju %ju %lx %lu %lu %jx %ju %lu %lx %lx %lu %lu %lu %lu"
567 SKIP_SELINUX("\n"), 567 IF_NOT_SELINUX("\n"),
568 filename, 568 filename,
569 (uintmax_t) (statbuf.st_size), 569 (uintmax_t) (statbuf.st_size),
570 (uintmax_t) statbuf.st_blocks, 570 (uintmax_t) statbuf.st_blocks,
@@ -642,14 +642,14 @@ static bool do_stat(const char *filename, const char *format)
642int stat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 642int stat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
643int stat_main(int argc, char **argv) 643int stat_main(int argc, char **argv)
644{ 644{
645 USE_FEATURE_STAT_FORMAT(char *format = NULL;) 645 IF_FEATURE_STAT_FORMAT(char *format = NULL;)
646 int i; 646 int i;
647 int ok = 1; 647 int ok = 1;
648 statfunc_ptr statfunc = do_stat; 648 statfunc_ptr statfunc = do_stat;
649 649
650 getopt32(argv, "ftL" 650 getopt32(argv, "ftL"
651 USE_SELINUX("Z") 651 IF_SELINUX("Z")
652 USE_FEATURE_STAT_FORMAT("c:", &format) 652 IF_FEATURE_STAT_FORMAT("c:", &format)
653 ); 653 );
654 654
655 if (option_mask32 & OPT_FILESYS) /* -f */ 655 if (option_mask32 & OPT_FILESYS) /* -f */
@@ -663,7 +663,7 @@ int stat_main(int argc, char **argv)
663 } 663 }
664#endif /* ENABLE_SELINUX */ 664#endif /* ENABLE_SELINUX */
665 for (i = optind; i < argc; ++i) 665 for (i = optind; i < argc; ++i)
666 ok &= statfunc(argv[i] USE_FEATURE_STAT_FORMAT(, format)); 666 ok &= statfunc(argv[i] IF_FEATURE_STAT_FORMAT(, format));
667 667
668 return (ok ? EXIT_SUCCESS : EXIT_FAILURE); 668 return (ok ? EXIT_SUCCESS : EXIT_FAILURE);
669} 669}
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 5dae2d35b..3ce6be0bd 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -110,9 +110,9 @@ int tail_main(int argc, char **argv)
110 } 110 }
111#endif 111#endif
112 112
113 USE_FEATURE_FANCY_TAIL(opt_complementary = "s+";) /* -s N */ 113 IF_FEATURE_FANCY_TAIL(opt_complementary = "s+";) /* -s N */
114 opt = getopt32(argv, "fc:n:" USE_FEATURE_FANCY_TAIL("qs:v"), 114 opt = getopt32(argv, "fc:n:" IF_FEATURE_FANCY_TAIL("qs:v"),
115 &str_c, &str_n USE_FEATURE_FANCY_TAIL(,&sleep_period)); 115 &str_c, &str_n IF_FEATURE_FANCY_TAIL(,&sleep_period));
116#define FOLLOW (opt & 0x1) 116#define FOLLOW (opt & 0x1)
117#define COUNT_BYTES (opt & 0x2) 117#define COUNT_BYTES (opt & 0x2)
118 //if (opt & 0x1) // -f 118 //if (opt & 0x1) // -f
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 20191546c..1d5541710 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -63,9 +63,9 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
63 applet_long_options = longopts; 63 applet_long_options = longopts;
64#endif 64#endif
65#endif 65#endif
66 opts = getopt32(argv, "c" USE_DESKTOP("r:") 66 opts = getopt32(argv, "c" IF_DESKTOP("r:")
67 /*ignored:*/ "fma" 67 /*ignored:*/ "fma"
68 USE_DESKTOP(, &reference_file)); 68 IF_DESKTOP(, &reference_file));
69 69
70 opts &= 1; /* only -c bit is left */ 70 opts &= 1; /* only -c bit is left */
71 argv += optind; 71 argv += optind;
diff --git a/coreutils/tty.c b/coreutils/tty.c
index d49fb50b6..74a4ea3d6 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -13,17 +13,17 @@
13#include "libbb.h" 13#include "libbb.h"
14 14
15int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 15int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
16int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(UNUSED_PARAM)) 16int tty_main(int argc, char **argv IF_NOT_INCLUDE_SUSv2(UNUSED_PARAM))
17{ 17{
18 const char *s; 18 const char *s;
19 USE_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */ 19 IF_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */
20 int retval; 20 int retval;
21 21
22 xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */ 22 xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */
23 23
24 USE_INCLUDE_SUSv2(silent = getopt32(argv, "s");) 24 IF_INCLUDE_SUSv2(silent = getopt32(argv, "s");)
25 USE_INCLUDE_SUSv2(argc -= optind;) 25 IF_INCLUDE_SUSv2(argc -= optind;)
26 SKIP_INCLUDE_SUSv2(argc -= 1;) 26 IF_NOT_INCLUDE_SUSv2(argc -= 1;)
27 27
28 /* gnu tty outputs a warning that it is ignoring all args. */ 28 /* gnu tty outputs a warning that it is ignoring all args. */
29 bb_warn_ignoring_args(argc); 29 bb_warn_ignoring_args(argc);
@@ -37,8 +37,8 @@ int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(UNUSED_PARAM))
37 s = "not a tty"; 37 s = "not a tty";
38 retval = 1; 38 retval = 1;
39 } 39 }
40 USE_INCLUDE_SUSv2(if (!silent) puts(s);) 40 IF_INCLUDE_SUSv2(if (!silent) puts(s);)
41 SKIP_INCLUDE_SUSv2(puts(s);) 41 IF_NOT_INCLUDE_SUSv2(puts(s);)
42 42
43 fflush_stdout_and_exit(retval); 43 fflush_stdout_and_exit(retval);
44} 44}
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 33d026f18..5a790fb70 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -97,7 +97,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv)
97 const unsigned short *delta; 97 const unsigned short *delta;
98 unsigned toprint; 98 unsigned toprint;
99 99
100 USE_GETOPT_LONG(applet_long_options = longopts); 100 IF_GETOPT_LONG(applet_long_options = longopts);
101 toprint = getopt32(argv, options); 101 toprint = getopt32(argv, options);
102 102
103 if (argv[optind]) { /* coreutils-6.9 compat */ 103 if (argv[optind]) { /* coreutils-6.9 compat */
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index 7c38fa11f..77fdcccb0 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -124,7 +124,7 @@ int run_parts_main(int argc UNUSED_PARAM, char **argv)
124 /* We require exactly one argument: the directory name */ 124 /* We require exactly one argument: the directory name */
125 /* We require exactly one argument: the directory name */ 125 /* We require exactly one argument: the directory name */
126 opt_complementary = "=1:a::"; 126 opt_complementary = "=1:a::";
127 getopt32(argv, "ra:u:t"USE_FEATURE_RUN_PARTS_FANCY("l"), &arg_list, &umask_p); 127 getopt32(argv, "ra:u:t"IF_FEATURE_RUN_PARTS_FANCY("l"), &arg_list, &umask_p);
128 128
129 umask(xstrtou_range(umask_p, 8, 0, 07777)); 129 umask(xstrtou_range(umask_p, 8, 0, 07777));
130 130
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index ab607bde0..6726fc7c9 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -347,13 +347,13 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
347 /* -xa (at least one) is required if -S is given */ 347 /* -xa (at least one) is required if -S is given */
348 /* -q turns off -v */ 348 /* -q turns off -v */
349 opt_complementary = "K:S:K--S:S--K:m?p:K?xpun:S?xa" 349 opt_complementary = "K:S:K--S:S--K:m?p:K?xpun:S?xa"
350 USE_FEATURE_START_STOP_DAEMON_FANCY("q-v"); 350 IF_FEATURE_START_STOP_DAEMON_FANCY("q-v");
351 opt = getopt32(argv, "KSbqtma:n:s:u:c:x:p:" 351 opt = getopt32(argv, "KSbqtma:n:s:u:c:x:p:"
352 USE_FEATURE_START_STOP_DAEMON_FANCY("ovN:R:"), 352 IF_FEATURE_START_STOP_DAEMON_FANCY("ovN:R:"),
353 &startas, &cmdname, &signame, &userspec, &chuid, &execname, &pidfile 353 &startas, &cmdname, &signame, &userspec, &chuid, &execname, &pidfile
354 USE_FEATURE_START_STOP_DAEMON_FANCY(,&opt_N) 354 IF_FEATURE_START_STOP_DAEMON_FANCY(,&opt_N)
355 /* We accept and ignore -R <param> / --retry <param> */ 355 /* We accept and ignore -R <param> / --retry <param> */
356 USE_FEATURE_START_STOP_DAEMON_FANCY(,NULL) 356 IF_FEATURE_START_STOP_DAEMON_FANCY(,NULL)
357 ); 357 );
358 358
359 if (opt & OPT_s) { 359 if (opt & OPT_s) {
@@ -366,7 +366,7 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
366 if (!execname) /* in case -a is given and -x is not */ 366 if (!execname) /* in case -a is given and -x is not */
367 execname = startas; 367 execname = startas;
368 368
369// USE_FEATURE_START_STOP_DAEMON_FANCY( 369// IF_FEATURE_START_STOP_DAEMON_FANCY(
370// if (retry_arg) 370// if (retry_arg)
371// retries = xatoi_u(retry_arg); 371// retries = xatoi_u(retry_arg);
372// ) 372// )
diff --git a/debianutils/which.c b/debianutils/which.c
index 748e6dc25..1558e5c6d 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -15,13 +15,13 @@
15int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 15int which_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
16int which_main(int argc UNUSED_PARAM, char **argv) 16int which_main(int argc UNUSED_PARAM, char **argv)
17{ 17{
18 USE_DESKTOP(int opt;) 18 IF_DESKTOP(int opt;)
19 int status = EXIT_SUCCESS; 19 int status = EXIT_SUCCESS;
20 char *path; 20 char *path;
21 char *p; 21 char *p;
22 22
23 opt_complementary = "-1"; /* at least one argument */ 23 opt_complementary = "-1"; /* at least one argument */
24 USE_DESKTOP(opt =) getopt32(argv, "a"); 24 IF_DESKTOP(opt =) getopt32(argv, "a");
25 argv += optind; 25 argv += optind;
26 26
27 /* This matches what is seen on e.g. ubuntu. 27 /* This matches what is seen on e.g. ubuntu.
diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl
index 576e31281..e3ba5c94b 100755
--- a/docs/autodocifier.pl
+++ b/docs/autodocifier.pl
@@ -24,8 +24,8 @@ sub beautify {
24 my $text = shift; 24 my $text = shift;
25 for (;;) { 25 for (;;) {
26 my $text2 = $text; 26 my $text2 = $text;
27 $text =~ s/SKIP_\w+\(.*?"\s*\)//sxg; 27 $text =~ s/IF_NOT_\w+\(.*?"\s*\)//sxg;
28 $text =~ s/USE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg; 28 $text =~ s/IF_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
29 $text =~ s/USAGE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg; 29 $text =~ s/USAGE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
30 last if ( $text2 eq $text ); 30 last if ( $text2 eq $text );
31 } 31 }
diff --git a/docs/new-applet-HOWTO.txt b/docs/new-applet-HOWTO.txt
index 6f89cbe1d..89df7d8f0 100644
--- a/docs/new-applet-HOWTO.txt
+++ b/docs/new-applet-HOWTO.txt
@@ -162,7 +162,7 @@ algorithm in busybox.c and the Gods of BusyBox smite you. Yea, verily:
162Be sure to read the top of applets.h before adding your applet. 162Be sure to read the top of applets.h before adding your applet.
163 163
164 /* all programs above here are alphabetically "less than" 'mu' */ 164 /* all programs above here are alphabetically "less than" 'mu' */
165 USE_MU(APPLET(mu, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 165 IF_MU(APPLET(mu, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
166 /* all programs below here are alphabetically "greater than" 'mu' */ 166 /* all programs below here are alphabetically "greater than" 'mu' */
167 167
168 168
diff --git a/editors/cmp.c b/editors/cmp.c
index 2e98e6e24..a20bb8836 100644
--- a/editors/cmp.c
+++ b/editors/cmp.c
@@ -37,7 +37,7 @@ int cmp_main(int argc UNUSED_PARAM, char **argv)
37{ 37{
38 FILE *fp1, *fp2, *outfile = stdout; 38 FILE *fp1, *fp2, *outfile = stdout;
39 const char *filename1, *filename2 = "-"; 39 const char *filename1, *filename2 = "-";
40 USE_DESKTOP(off_t skip1 = 0, skip2 = 0;) 40 IF_DESKTOP(off_t skip1 = 0, skip2 = 0;)
41 off_t char_pos = 0; 41 off_t char_pos = 0;
42 int line_pos = 1; /* Hopefully won't overflow... */ 42 int line_pos = 1; /* Hopefully won't overflow... */
43 const char *fmt; 43 const char *fmt;
@@ -48,8 +48,8 @@ int cmp_main(int argc UNUSED_PARAM, char **argv)
48 xfunc_error_retval = 2; /* 1 is returned if files are different. */ 48 xfunc_error_retval = 2; /* 1 is returned if files are different. */
49 49
50 opt_complementary = "-1" 50 opt_complementary = "-1"
51 USE_DESKTOP(":?4") 51 IF_DESKTOP(":?4")
52 SKIP_DESKTOP(":?2") 52 IF_NOT_DESKTOP(":?2")
53 ":l--s:s--l"; 53 ":l--s:s--l";
54 opt = getopt32(argv, opt_chars); 54 opt = getopt32(argv, opt_chars);
55 argv += optind; 55 argv += optind;
diff --git a/editors/diff.c b/editors/diff.c
index 7fce70d08..00ecdd8c6 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -103,8 +103,8 @@ struct globals {
103 smallint exit_status; 103 smallint exit_status;
104 int opt_U_context; 104 int opt_U_context;
105 size_t max_context; /* size of context_vec_start */ 105 size_t max_context; /* size of context_vec_start */
106 USE_FEATURE_DIFF_DIR(int dl_count;) 106 IF_FEATURE_DIFF_DIR(int dl_count;)
107 USE_FEATURE_DIFF_DIR(char **dl;) 107 IF_FEATURE_DIFF_DIR(char **dl;)
108 char *opt_S_start; 108 char *opt_S_start;
109 const char *label1; 109 const char *label1;
110 const char *label2; 110 const char *label2;
diff --git a/editors/vi.c b/editors/vi.c
index 0497bc251..ccc53fb58 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -271,7 +271,7 @@ struct globals {
271 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ 271 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
272 last_file_modified = -1; \ 272 last_file_modified = -1; \
273 /* "" but has space for 2 chars: */ \ 273 /* "" but has space for 2 chars: */ \
274 USE_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \ 274 IF_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \
275} while (0) 275} while (0)
276 276
277 277
@@ -426,7 +426,7 @@ int vi_main(int argc, char **argv)
426 initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN); 426 initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN);
427 } 427 }
428#endif 428#endif
429 while ((c = getopt(argc, argv, "hCRH" USE_FEATURE_VI_COLON("c:"))) != -1) { 429 while ((c = getopt(argc, argv, "hCRH" IF_FEATURE_VI_COLON("c:"))) != -1) {
430 switch (c) { 430 switch (c) {
431#if ENABLE_FEATURE_VI_CRASHME 431#if ENABLE_FEATURE_VI_CRASHME
432 case 'C': 432 case 'C':
@@ -643,8 +643,8 @@ static char *get_one_address(char *p, int *addr) // get colon addr, if present
643{ 643{
644 int st; 644 int st;
645 char *q; 645 char *q;
646 USE_FEATURE_VI_YANKMARK(char c;) 646 IF_FEATURE_VI_YANKMARK(char c;)
647 USE_FEATURE_VI_SEARCH(char *pat;) 647 IF_FEATURE_VI_SEARCH(char *pat;)
648 648
649 *addr = -1; // assume no addr 649 *addr = -1; // assume no addr
650 if (*p == '.') { // the current line 650 if (*p == '.') { // the current line
@@ -883,10 +883,10 @@ static void colon(char *buf)
883 // how many lines in text[]? 883 // how many lines in text[]?
884 li = count_lines(text, end - 1); 884 li = count_lines(text, end - 1);
885 status_line("\"%s\"%s" 885 status_line("\"%s\"%s"
886 USE_FEATURE_VI_READONLY("%s") 886 IF_FEATURE_VI_READONLY("%s")
887 " %dL, %dC", current_filename, 887 " %dL, %dC", current_filename,
888 (file_size(fn) < 0 ? " [New file]" : ""), 888 (file_size(fn) < 0 ? " [New file]" : ""),
889 USE_FEATURE_VI_READONLY( 889 IF_FEATURE_VI_READONLY(
890 ((readonly_mode) ? " [Readonly]" : ""), 890 ((readonly_mode) ? " [Readonly]" : ""),
891 ) 891 )
892 li, ch); 892 li, ch);
@@ -992,9 +992,9 @@ static void colon(char *buf)
992 // how many lines in text[]? 992 // how many lines in text[]?
993 li = count_lines(q, q + ch - 1); 993 li = count_lines(q, q + ch - 1);
994 status_line("\"%s\"" 994 status_line("\"%s\""
995 USE_FEATURE_VI_READONLY("%s") 995 IF_FEATURE_VI_READONLY("%s")
996 " %dL, %dC", fn, 996 " %dL, %dC", fn,
997 USE_FEATURE_VI_READONLY((readonly_mode ? " [Readonly]" : ""),) 997 IF_FEATURE_VI_READONLY((readonly_mode ? " [Readonly]" : ""),)
998 li, ch); 998 li, ch);
999 if (ch > 0) { 999 if (ch > 0) {
1000 // if the insert is before "dot" then we need to update 1000 // if the insert is before "dot" then we need to update
diff --git a/findutils/find.c b/findutils/find.c
index df632f219..da024afbf 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -62,8 +62,8 @@
62/* This is a NOEXEC applet. Be very careful! */ 62/* This is a NOEXEC applet. Be very careful! */
63 63
64 64
65USE_FEATURE_FIND_XDEV(static dev_t *xdev_dev;) 65IF_FEATURE_FIND_XDEV(static dev_t *xdev_dev;)
66USE_FEATURE_FIND_XDEV(static int xdev_count;) 66IF_FEATURE_FIND_XDEV(static int xdev_count;)
67 67
68typedef int (*action_fp)(const char *fileName, struct stat *statbuf, void *); 68typedef int (*action_fp)(const char *fileName, struct stat *statbuf, void *);
69 69
@@ -79,23 +79,23 @@ typedef struct {
79 action_##name* ap UNUSED_PARAM) 79 action_##name* ap UNUSED_PARAM)
80 ACTS(print) 80 ACTS(print)
81 ACTS(name, const char *pattern; bool iname;) 81 ACTS(name, const char *pattern; bool iname;)
82USE_FEATURE_FIND_PATH( ACTS(path, const char *pattern;)) 82IF_FEATURE_FIND_PATH( ACTS(path, const char *pattern;))
83USE_FEATURE_FIND_REGEX( ACTS(regex, regex_t compiled_pattern;)) 83IF_FEATURE_FIND_REGEX( ACTS(regex, regex_t compiled_pattern;))
84USE_FEATURE_FIND_PRINT0( ACTS(print0)) 84IF_FEATURE_FIND_PRINT0( ACTS(print0))
85USE_FEATURE_FIND_TYPE( ACTS(type, int type_mask;)) 85IF_FEATURE_FIND_TYPE( ACTS(type, int type_mask;))
86USE_FEATURE_FIND_PERM( ACTS(perm, char perm_char; mode_t perm_mask;)) 86IF_FEATURE_FIND_PERM( ACTS(perm, char perm_char; mode_t perm_mask;))
87USE_FEATURE_FIND_MTIME( ACTS(mtime, char mtime_char; unsigned mtime_days;)) 87IF_FEATURE_FIND_MTIME( ACTS(mtime, char mtime_char; unsigned mtime_days;))
88USE_FEATURE_FIND_MMIN( ACTS(mmin, char mmin_char; unsigned mmin_mins;)) 88IF_FEATURE_FIND_MMIN( ACTS(mmin, char mmin_char; unsigned mmin_mins;))
89USE_FEATURE_FIND_NEWER( ACTS(newer, time_t newer_mtime;)) 89IF_FEATURE_FIND_NEWER( ACTS(newer, time_t newer_mtime;))
90USE_FEATURE_FIND_INUM( ACTS(inum, ino_t inode_num;)) 90IF_FEATURE_FIND_INUM( ACTS(inum, ino_t inode_num;))
91USE_FEATURE_FIND_USER( ACTS(user, uid_t uid;)) 91IF_FEATURE_FIND_USER( ACTS(user, uid_t uid;))
92USE_FEATURE_FIND_SIZE( ACTS(size, char size_char; off_t size;)) 92IF_FEATURE_FIND_SIZE( ACTS(size, char size_char; off_t size;))
93USE_FEATURE_FIND_CONTEXT(ACTS(context, security_context_t context;)) 93IF_FEATURE_FIND_CONTEXT(ACTS(context, security_context_t context;))
94USE_FEATURE_FIND_PAREN( ACTS(paren, action ***subexpr;)) 94IF_FEATURE_FIND_PAREN( ACTS(paren, action ***subexpr;))
95USE_FEATURE_FIND_PRUNE( ACTS(prune)) 95IF_FEATURE_FIND_PRUNE( ACTS(prune))
96USE_FEATURE_FIND_DELETE( ACTS(delete)) 96IF_FEATURE_FIND_DELETE( ACTS(delete))
97USE_FEATURE_FIND_EXEC( ACTS(exec, char **exec_argv; unsigned *subst_count; int exec_argc;)) 97IF_FEATURE_FIND_EXEC( ACTS(exec, char **exec_argv; unsigned *subst_count; int exec_argc;))
98USE_FEATURE_FIND_GROUP( ACTS(group, gid_t gid;)) 98IF_FEATURE_FIND_GROUP( ACTS(group, gid_t gid;))
99 99
100static action ***actions; 100static action ***actions;
101static bool need_print = 1; 101static bool need_print = 1;
@@ -376,8 +376,8 @@ ACTF(context)
376 376
377static int FAST_FUNC fileAction(const char *fileName, 377static int FAST_FUNC fileAction(const char *fileName,
378 struct stat *statbuf, 378 struct stat *statbuf,
379 void *userData SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM), 379 void *userData IF_NOT_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM),
380 int depth SKIP_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM)) 380 int depth IF_NOT_FEATURE_FIND_MAXDEPTH(UNUSED_PARAM))
381{ 381{
382 int i; 382 int i;
383#if ENABLE_FEATURE_FIND_MAXDEPTH 383#if ENABLE_FEATURE_FIND_MAXDEPTH
@@ -451,73 +451,73 @@ static action*** parse_params(char **argv)
451 enum { 451 enum {
452 PARM_a , 452 PARM_a ,
453 PARM_o , 453 PARM_o ,
454 USE_FEATURE_FIND_NOT( PARM_char_not ,) 454 IF_FEATURE_FIND_NOT( PARM_char_not ,)
455#if ENABLE_DESKTOP 455#if ENABLE_DESKTOP
456 PARM_and , 456 PARM_and ,
457 PARM_or , 457 PARM_or ,
458 USE_FEATURE_FIND_NOT( PARM_not ,) 458 IF_FEATURE_FIND_NOT( PARM_not ,)
459#endif 459#endif
460 PARM_print , 460 PARM_print ,
461 USE_FEATURE_FIND_PRINT0( PARM_print0 ,) 461 IF_FEATURE_FIND_PRINT0( PARM_print0 ,)
462 USE_FEATURE_FIND_DEPTH( PARM_depth ,) 462 IF_FEATURE_FIND_DEPTH( PARM_depth ,)
463 USE_FEATURE_FIND_PRUNE( PARM_prune ,) 463 IF_FEATURE_FIND_PRUNE( PARM_prune ,)
464 USE_FEATURE_FIND_DELETE( PARM_delete ,) 464 IF_FEATURE_FIND_DELETE( PARM_delete ,)
465 USE_FEATURE_FIND_EXEC( PARM_exec ,) 465 IF_FEATURE_FIND_EXEC( PARM_exec ,)
466 USE_FEATURE_FIND_PAREN( PARM_char_brace,) 466 IF_FEATURE_FIND_PAREN( PARM_char_brace,)
467 /* All options starting from here require argument */ 467 /* All options starting from here require argument */
468 PARM_name , 468 PARM_name ,
469 PARM_iname , 469 PARM_iname ,
470 USE_FEATURE_FIND_PATH( PARM_path ,) 470 IF_FEATURE_FIND_PATH( PARM_path ,)
471 USE_FEATURE_FIND_REGEX( PARM_regex ,) 471 IF_FEATURE_FIND_REGEX( PARM_regex ,)
472 USE_FEATURE_FIND_TYPE( PARM_type ,) 472 IF_FEATURE_FIND_TYPE( PARM_type ,)
473 USE_FEATURE_FIND_PERM( PARM_perm ,) 473 IF_FEATURE_FIND_PERM( PARM_perm ,)
474 USE_FEATURE_FIND_MTIME( PARM_mtime ,) 474 IF_FEATURE_FIND_MTIME( PARM_mtime ,)
475 USE_FEATURE_FIND_MMIN( PARM_mmin ,) 475 IF_FEATURE_FIND_MMIN( PARM_mmin ,)
476 USE_FEATURE_FIND_NEWER( PARM_newer ,) 476 IF_FEATURE_FIND_NEWER( PARM_newer ,)
477 USE_FEATURE_FIND_INUM( PARM_inum ,) 477 IF_FEATURE_FIND_INUM( PARM_inum ,)
478 USE_FEATURE_FIND_USER( PARM_user ,) 478 IF_FEATURE_FIND_USER( PARM_user ,)
479 USE_FEATURE_FIND_GROUP( PARM_group ,) 479 IF_FEATURE_FIND_GROUP( PARM_group ,)
480 USE_FEATURE_FIND_SIZE( PARM_size ,) 480 IF_FEATURE_FIND_SIZE( PARM_size ,)
481 USE_FEATURE_FIND_CONTEXT(PARM_context ,) 481 IF_FEATURE_FIND_CONTEXT(PARM_context ,)
482 }; 482 };
483 483
484 static const char params[] ALIGN1 = 484 static const char params[] ALIGN1 =
485 "-a\0" 485 "-a\0"
486 "-o\0" 486 "-o\0"
487 USE_FEATURE_FIND_NOT( "!\0" ) 487 IF_FEATURE_FIND_NOT( "!\0" )
488#if ENABLE_DESKTOP 488#if ENABLE_DESKTOP
489 "-and\0" 489 "-and\0"
490 "-or\0" 490 "-or\0"
491 USE_FEATURE_FIND_NOT( "-not\0" ) 491 IF_FEATURE_FIND_NOT( "-not\0" )
492#endif 492#endif
493 "-print\0" 493 "-print\0"
494 USE_FEATURE_FIND_PRINT0( "-print0\0" ) 494 IF_FEATURE_FIND_PRINT0( "-print0\0" )
495 USE_FEATURE_FIND_DEPTH( "-depth\0" ) 495 IF_FEATURE_FIND_DEPTH( "-depth\0" )
496 USE_FEATURE_FIND_PRUNE( "-prune\0" ) 496 IF_FEATURE_FIND_PRUNE( "-prune\0" )
497 USE_FEATURE_FIND_DELETE( "-delete\0" ) 497 IF_FEATURE_FIND_DELETE( "-delete\0" )
498 USE_FEATURE_FIND_EXEC( "-exec\0" ) 498 IF_FEATURE_FIND_EXEC( "-exec\0" )
499 USE_FEATURE_FIND_PAREN( "(\0" ) 499 IF_FEATURE_FIND_PAREN( "(\0" )
500 /* All options starting from here require argument */ 500 /* All options starting from here require argument */
501 "-name\0" 501 "-name\0"
502 "-iname\0" 502 "-iname\0"
503 USE_FEATURE_FIND_PATH( "-path\0" ) 503 IF_FEATURE_FIND_PATH( "-path\0" )
504 USE_FEATURE_FIND_REGEX( "-regex\0" ) 504 IF_FEATURE_FIND_REGEX( "-regex\0" )
505 USE_FEATURE_FIND_TYPE( "-type\0" ) 505 IF_FEATURE_FIND_TYPE( "-type\0" )
506 USE_FEATURE_FIND_PERM( "-perm\0" ) 506 IF_FEATURE_FIND_PERM( "-perm\0" )
507 USE_FEATURE_FIND_MTIME( "-mtime\0" ) 507 IF_FEATURE_FIND_MTIME( "-mtime\0" )
508 USE_FEATURE_FIND_MMIN( "-mmin\0" ) 508 IF_FEATURE_FIND_MMIN( "-mmin\0" )
509 USE_FEATURE_FIND_NEWER( "-newer\0" ) 509 IF_FEATURE_FIND_NEWER( "-newer\0" )
510 USE_FEATURE_FIND_INUM( "-inum\0" ) 510 IF_FEATURE_FIND_INUM( "-inum\0" )
511 USE_FEATURE_FIND_USER( "-user\0" ) 511 IF_FEATURE_FIND_USER( "-user\0" )
512 USE_FEATURE_FIND_GROUP( "-group\0" ) 512 IF_FEATURE_FIND_GROUP( "-group\0" )
513 USE_FEATURE_FIND_SIZE( "-size\0" ) 513 IF_FEATURE_FIND_SIZE( "-size\0" )
514 USE_FEATURE_FIND_CONTEXT("-context\0") 514 IF_FEATURE_FIND_CONTEXT("-context\0")
515 ; 515 ;
516 516
517 action*** appp; 517 action*** appp;
518 unsigned cur_group = 0; 518 unsigned cur_group = 0;
519 unsigned cur_action = 0; 519 unsigned cur_action = 0;
520 USE_FEATURE_FIND_NOT( bool invert_flag = 0; ) 520 IF_FEATURE_FIND_NOT( bool invert_flag = 0; )
521 521
522 /* This is the only place in busybox where we use nested function. 522 /* This is the only place in busybox where we use nested function.
523 * So far more standard alternatives were bigger. */ 523 * So far more standard alternatives were bigger. */
@@ -530,8 +530,8 @@ static action*** parse_params(char **argv)
530 appp[cur_group][cur_action++] = ap = xmalloc(sizeof_struct); 530 appp[cur_group][cur_action++] = ap = xmalloc(sizeof_struct);
531 appp[cur_group][cur_action] = NULL; 531 appp[cur_group][cur_action] = NULL;
532 ap->f = f; 532 ap->f = f;
533 USE_FEATURE_FIND_NOT( ap->invert = invert_flag; ) 533 IF_FEATURE_FIND_NOT( ap->invert = invert_flag; )
534 USE_FEATURE_FIND_NOT( invert_flag = 0; ) 534 IF_FEATURE_FIND_NOT( invert_flag = 0; )
535 return ap; 535 return ap;
536 } 536 }
537 537
@@ -569,10 +569,10 @@ static action*** parse_params(char **argv)
569 * it doesn't give smaller code. Other arches? */ 569 * it doesn't give smaller code. Other arches? */
570 570
571 /* --- Operators --- */ 571 /* --- Operators --- */
572 if (parm == PARM_a USE_DESKTOP(|| parm == PARM_and)) { 572 if (parm == PARM_a IF_DESKTOP(|| parm == PARM_and)) {
573 /* no further special handling required */ 573 /* no further special handling required */
574 } 574 }
575 else if (parm == PARM_o USE_DESKTOP(|| parm == PARM_or)) { 575 else if (parm == PARM_o IF_DESKTOP(|| parm == PARM_or)) {
576 /* start new OR group */ 576 /* start new OR group */
577 cur_group++; 577 cur_group++;
578 appp = xrealloc(appp, (cur_group+2) * sizeof(*appp)); 578 appp = xrealloc(appp, (cur_group+2) * sizeof(*appp));
@@ -581,7 +581,7 @@ static action*** parse_params(char **argv)
581 cur_action = 0; 581 cur_action = 0;
582 } 582 }
583#if ENABLE_FEATURE_FIND_NOT 583#if ENABLE_FEATURE_FIND_NOT
584 else if (parm == PARM_char_not USE_DESKTOP(|| parm == PARM_not)) { 584 else if (parm == PARM_char_not IF_DESKTOP(|| parm == PARM_not)) {
585 /* also handles "find ! ! -name 'foo*'" */ 585 /* also handles "find ! ! -name 'foo*'" */
586 invert_flag ^= 1; 586 invert_flag ^= 1;
587 } 587 }
@@ -591,13 +591,13 @@ static action*** parse_params(char **argv)
591 else if (parm == PARM_print) { 591 else if (parm == PARM_print) {
592 need_print = 0; 592 need_print = 0;
593 /* GNU find ignores '!' here: "find ! -print" */ 593 /* GNU find ignores '!' here: "find ! -print" */
594 USE_FEATURE_FIND_NOT( invert_flag = 0; ) 594 IF_FEATURE_FIND_NOT( invert_flag = 0; )
595 (void) ALLOC_ACTION(print); 595 (void) ALLOC_ACTION(print);
596 } 596 }
597#if ENABLE_FEATURE_FIND_PRINT0 597#if ENABLE_FEATURE_FIND_PRINT0
598 else if (parm == PARM_print0) { 598 else if (parm == PARM_print0) {
599 need_print = 0; 599 need_print = 0;
600 USE_FEATURE_FIND_NOT( invert_flag = 0; ) 600 IF_FEATURE_FIND_NOT( invert_flag = 0; )
601 (void) ALLOC_ACTION(print0); 601 (void) ALLOC_ACTION(print0);
602 } 602 }
603#endif 603#endif
@@ -608,7 +608,7 @@ static action*** parse_params(char **argv)
608#endif 608#endif
609#if ENABLE_FEATURE_FIND_PRUNE 609#if ENABLE_FEATURE_FIND_PRUNE
610 else if (parm == PARM_prune) { 610 else if (parm == PARM_prune) {
611 USE_FEATURE_FIND_NOT( invert_flag = 0; ) 611 IF_FEATURE_FIND_NOT( invert_flag = 0; )
612 (void) ALLOC_ACTION(prune); 612 (void) ALLOC_ACTION(prune);
613 } 613 }
614#endif 614#endif
@@ -624,7 +624,7 @@ static action*** parse_params(char **argv)
624 int i; 624 int i;
625 action_exec *ap; 625 action_exec *ap;
626 need_print = 0; 626 need_print = 0;
627 USE_FEATURE_FIND_NOT( invert_flag = 0; ) 627 IF_FEATURE_FIND_NOT( invert_flag = 0; )
628 ap = ALLOC_ACTION(exec); 628 ap = ALLOC_ACTION(exec);
629 ap->exec_argv = ++argv; /* first arg after -exec */ 629 ap->exec_argv = ++argv; /* first arg after -exec */
630 ap->exec_argc = 0; 630 ap->exec_argc = 0;
@@ -813,13 +813,13 @@ int find_main(int argc, char **argv)
813{ 813{
814 static const char options[] ALIGN1 = 814 static const char options[] ALIGN1 =
815 "-follow\0" 815 "-follow\0"
816USE_FEATURE_FIND_XDEV( "-xdev\0" ) 816IF_FEATURE_FIND_XDEV( "-xdev\0" )
817USE_FEATURE_FIND_MAXDEPTH("-mindepth\0""-maxdepth\0") 817IF_FEATURE_FIND_MAXDEPTH("-mindepth\0""-maxdepth\0")
818 ; 818 ;
819 enum { 819 enum {
820 OPT_FOLLOW, 820 OPT_FOLLOW,
821USE_FEATURE_FIND_XDEV( OPT_XDEV ,) 821IF_FEATURE_FIND_XDEV( OPT_XDEV ,)
822USE_FEATURE_FIND_MAXDEPTH(OPT_MINDEPTH,) 822IF_FEATURE_FIND_MAXDEPTH(OPT_MINDEPTH,)
823 }; 823 };
824 824
825 char *arg; 825 char *arg;
diff --git a/findutils/grep.c b/findutils/grep.c
index e23f9bcf3..774f04d5d 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -25,10 +25,10 @@
25/* options */ 25/* options */
26#define OPTSTR_GREP \ 26#define OPTSTR_GREP \
27 "lnqvscFiHhe:f:Lorm:" \ 27 "lnqvscFiHhe:f:Lorm:" \
28 USE_FEATURE_GREP_CONTEXT("A:B:C:") \ 28 IF_FEATURE_GREP_CONTEXT("A:B:C:") \
29 USE_FEATURE_GREP_EGREP_ALIAS("E") \ 29 IF_FEATURE_GREP_EGREP_ALIAS("E") \
30 USE_DESKTOP("w") \ 30 IF_DESKTOP("w") \
31 USE_EXTRA_COMPAT("z") \ 31 IF_EXTRA_COMPAT("z") \
32 "aI" 32 "aI"
33 33
34/* ignored: -a "assume all files to be text" */ 34/* ignored: -a "assume all files to be text" */
@@ -51,12 +51,12 @@ enum {
51 OPTBIT_o, /* show only matching parts of lines */ 51 OPTBIT_o, /* show only matching parts of lines */
52 OPTBIT_r, /* recurse dirs */ 52 OPTBIT_r, /* recurse dirs */
53 OPTBIT_m, /* -m MAX_MATCHES */ 53 OPTBIT_m, /* -m MAX_MATCHES */
54 USE_FEATURE_GREP_CONTEXT( OPTBIT_A ,) /* -A NUM: after-match context */ 54 IF_FEATURE_GREP_CONTEXT( OPTBIT_A ,) /* -A NUM: after-match context */
55 USE_FEATURE_GREP_CONTEXT( OPTBIT_B ,) /* -B NUM: before-match context */ 55 IF_FEATURE_GREP_CONTEXT( OPTBIT_B ,) /* -B NUM: before-match context */
56 USE_FEATURE_GREP_CONTEXT( OPTBIT_C ,) /* -C NUM: -A and -B combined */ 56 IF_FEATURE_GREP_CONTEXT( OPTBIT_C ,) /* -C NUM: -A and -B combined */
57 USE_FEATURE_GREP_EGREP_ALIAS(OPTBIT_E ,) /* extended regexp */ 57 IF_FEATURE_GREP_EGREP_ALIAS(OPTBIT_E ,) /* extended regexp */
58 USE_DESKTOP( OPTBIT_w ,) /* whole word match */ 58 IF_DESKTOP( OPTBIT_w ,) /* whole word match */
59 USE_EXTRA_COMPAT( OPTBIT_z ,) /* input is NUL terminated */ 59 IF_EXTRA_COMPAT( OPTBIT_z ,) /* input is NUL terminated */
60 OPT_l = 1 << OPTBIT_l, 60 OPT_l = 1 << OPTBIT_l,
61 OPT_n = 1 << OPTBIT_n, 61 OPT_n = 1 << OPTBIT_n,
62 OPT_q = 1 << OPTBIT_q, 62 OPT_q = 1 << OPTBIT_q,
@@ -73,12 +73,12 @@ enum {
73 OPT_o = 1 << OPTBIT_o, 73 OPT_o = 1 << OPTBIT_o,
74 OPT_r = 1 << OPTBIT_r, 74 OPT_r = 1 << OPTBIT_r,
75 OPT_m = 1 << OPTBIT_m, 75 OPT_m = 1 << OPTBIT_m,
76 OPT_A = USE_FEATURE_GREP_CONTEXT( (1 << OPTBIT_A)) + 0, 76 OPT_A = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_A)) + 0,
77 OPT_B = USE_FEATURE_GREP_CONTEXT( (1 << OPTBIT_B)) + 0, 77 OPT_B = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_B)) + 0,
78 OPT_C = USE_FEATURE_GREP_CONTEXT( (1 << OPTBIT_C)) + 0, 78 OPT_C = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_C)) + 0,
79 OPT_E = USE_FEATURE_GREP_EGREP_ALIAS((1 << OPTBIT_E)) + 0, 79 OPT_E = IF_FEATURE_GREP_EGREP_ALIAS((1 << OPTBIT_E)) + 0,
80 OPT_w = USE_DESKTOP( (1 << OPTBIT_w)) + 0, 80 OPT_w = IF_DESKTOP( (1 << OPTBIT_w)) + 0,
81 OPT_z = USE_EXTRA_COMPAT( (1 << OPTBIT_z)) + 0, 81 OPT_z = IF_EXTRA_COMPAT( (1 << OPTBIT_z)) + 0,
82}; 82};
83 83
84#define PRINT_FILES_WITH_MATCHES (option_mask32 & OPT_l) 84#define PRINT_FILES_WITH_MATCHES (option_mask32 & OPT_l)
@@ -105,7 +105,7 @@ struct globals {
105 int lines_before; 105 int lines_before;
106 int lines_after; 106 int lines_after;
107 char **before_buf; 107 char **before_buf;
108 USE_EXTRA_COMPAT(size_t *before_buf_size;) 108 IF_EXTRA_COMPAT(size_t *before_buf_size;)
109 int last_line_printed; 109 int last_line_printed;
110#endif 110#endif
111 /* globals used internally */ 111 /* globals used internally */
@@ -400,7 +400,7 @@ static int grep_file(FILE *file)
400 /* Add the line to the circular 'before' buffer */ 400 /* Add the line to the circular 'before' buffer */
401 free(before_buf[curpos]); 401 free(before_buf[curpos]);
402 before_buf[curpos] = line; 402 before_buf[curpos] = line;
403 USE_EXTRA_COMPAT(before_buf_size[curpos] = line_len;) 403 IF_EXTRA_COMPAT(before_buf_size[curpos] = line_len;)
404 curpos = (curpos + 1) % lines_before; 404 curpos = (curpos + 1) % lines_before;
405 /* avoid free(line) - we took the line */ 405 /* avoid free(line) - we took the line */
406 line = NULL; 406 line = NULL;
@@ -544,7 +544,7 @@ int grep_main(int argc, char **argv)
544 lines_after = 0; 544 lines_after = 0;
545 } else if (lines_before > 0) { 545 } else if (lines_before > 0) {
546 before_buf = xzalloc(lines_before * sizeof(before_buf[0])); 546 before_buf = xzalloc(lines_before * sizeof(before_buf[0]));
547 USE_EXTRA_COMPAT(before_buf_size = xzalloc(lines_before * sizeof(before_buf_size[0]));) 547 IF_EXTRA_COMPAT(before_buf_size = xzalloc(lines_before * sizeof(before_buf_size[0]));)
548 } 548 }
549#else 549#else
550 /* with auto sanity checks */ 550 /* with auto sanity checks */
diff --git a/findutils/xargs.c b/findutils/xargs.c
index f22d089ca..76d1d5489 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -356,9 +356,9 @@ enum {
356 OPTBIT_UPTO_SIZE, 356 OPTBIT_UPTO_SIZE,
357 OPTBIT_EOF_STRING, 357 OPTBIT_EOF_STRING,
358 OPTBIT_EOF_STRING1, 358 OPTBIT_EOF_STRING1,
359 USE_FEATURE_XARGS_SUPPORT_CONFIRMATION(OPTBIT_INTERACTIVE,) 359 IF_FEATURE_XARGS_SUPPORT_CONFIRMATION(OPTBIT_INTERACTIVE,)
360 USE_FEATURE_XARGS_SUPPORT_TERMOPT( OPTBIT_TERMINATE ,) 360 IF_FEATURE_XARGS_SUPPORT_TERMOPT( OPTBIT_TERMINATE ,)
361 USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( OPTBIT_ZEROTERM ,) 361 IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( OPTBIT_ZEROTERM ,)
362 362
363 OPT_VERBOSE = 1 << OPTBIT_VERBOSE , 363 OPT_VERBOSE = 1 << OPTBIT_VERBOSE ,
364 OPT_NO_EMPTY = 1 << OPTBIT_NO_EMPTY , 364 OPT_NO_EMPTY = 1 << OPTBIT_NO_EMPTY ,
@@ -366,14 +366,14 @@ enum {
366 OPT_UPTO_SIZE = 1 << OPTBIT_UPTO_SIZE , 366 OPT_UPTO_SIZE = 1 << OPTBIT_UPTO_SIZE ,
367 OPT_EOF_STRING = 1 << OPTBIT_EOF_STRING , /* GNU: -e[<param>] */ 367 OPT_EOF_STRING = 1 << OPTBIT_EOF_STRING , /* GNU: -e[<param>] */
368 OPT_EOF_STRING1 = 1 << OPTBIT_EOF_STRING1, /* SUS: -E<param> */ 368 OPT_EOF_STRING1 = 1 << OPTBIT_EOF_STRING1, /* SUS: -E<param> */
369 OPT_INTERACTIVE = USE_FEATURE_XARGS_SUPPORT_CONFIRMATION((1 << OPTBIT_INTERACTIVE)) + 0, 369 OPT_INTERACTIVE = IF_FEATURE_XARGS_SUPPORT_CONFIRMATION((1 << OPTBIT_INTERACTIVE)) + 0,
370 OPT_TERMINATE = USE_FEATURE_XARGS_SUPPORT_TERMOPT( (1 << OPTBIT_TERMINATE )) + 0, 370 OPT_TERMINATE = IF_FEATURE_XARGS_SUPPORT_TERMOPT( (1 << OPTBIT_TERMINATE )) + 0,
371 OPT_ZEROTERM = USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( (1 << OPTBIT_ZEROTERM )) + 0, 371 OPT_ZEROTERM = IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( (1 << OPTBIT_ZEROTERM )) + 0,
372}; 372};
373#define OPTION_STR "+trn:s:e::E:" \ 373#define OPTION_STR "+trn:s:e::E:" \
374 USE_FEATURE_XARGS_SUPPORT_CONFIRMATION("p") \ 374 IF_FEATURE_XARGS_SUPPORT_CONFIRMATION("p") \
375 USE_FEATURE_XARGS_SUPPORT_TERMOPT( "x") \ 375 IF_FEATURE_XARGS_SUPPORT_TERMOPT( "x") \
376 USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( "0") 376 IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( "0")
377 377
378int xargs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 378int xargs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
379int xargs_main(int argc, char **argv) 379int xargs_main(int argc, char **argv)
@@ -405,7 +405,7 @@ int xargs_main(int argc, char **argv)
405 eof_str = NULL; 405 eof_str = NULL;
406 406
407 if (opt & OPT_ZEROTERM) 407 if (opt & OPT_ZEROTERM)
408 USE_FEATURE_XARGS_SUPPORT_ZERO_TERM(read_args = process0_stdin); 408 IF_FEATURE_XARGS_SUPPORT_ZERO_TERM(read_args = process0_stdin);
409 409
410 argv += optind; 410 argv += optind;
411 argc -= optind; 411 argc -= optind;
diff --git a/include/applets.h b/include/applets.h
index 1d932589b..820aaffe2 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -67,358 +67,358 @@ s - suid type:
67#endif 67#endif
68 68
69 69
70USE_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test)) 70IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
71USE_TEST(APPLET_NOFORK([[, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test)) 71IF_TEST(APPLET_NOFORK([[, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
72USE_ACPID(APPLET(acpid, _BB_DIR_SBIN, _BB_SUID_NEVER)) 72IF_ACPID(APPLET(acpid, _BB_DIR_SBIN, _BB_SUID_NEVER))
73USE_ADDGROUP(APPLET(addgroup, _BB_DIR_BIN, _BB_SUID_NEVER)) 73IF_ADDGROUP(APPLET(addgroup, _BB_DIR_BIN, _BB_SUID_NEVER))
74USE_ADDUSER(APPLET(adduser, _BB_DIR_BIN, _BB_SUID_NEVER)) 74IF_ADDUSER(APPLET(adduser, _BB_DIR_BIN, _BB_SUID_NEVER))
75USE_ADJTIMEX(APPLET(adjtimex, _BB_DIR_SBIN, _BB_SUID_NEVER)) 75IF_ADJTIMEX(APPLET(adjtimex, _BB_DIR_SBIN, _BB_SUID_NEVER))
76USE_AR(APPLET(ar, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 76IF_AR(APPLET(ar, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
77USE_ARP(APPLET(arp, _BB_DIR_SBIN, _BB_SUID_NEVER)) 77IF_ARP(APPLET(arp, _BB_DIR_SBIN, _BB_SUID_NEVER))
78USE_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 78IF_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
79USE_ASH(APPLET(ash, _BB_DIR_BIN, _BB_SUID_NEVER)) 79IF_ASH(APPLET(ash, _BB_DIR_BIN, _BB_SUID_NEVER))
80USE_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk)) 80IF_AWK(APPLET_NOEXEC(awk, awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER, awk))
81USE_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename)) 81IF_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER, basename))
82USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER)) 82IF_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
83//USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER)) 83//IF_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
84USE_BLKID(APPLET(blkid, _BB_DIR_SBIN, _BB_SUID_NEVER)) 84IF_BLKID(APPLET(blkid, _BB_DIR_SBIN, _BB_SUID_NEVER))
85USE_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 85IF_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
86USE_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 86IF_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
87USE_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER, bzcat)) 87IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER, bzcat))
88USE_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 88IF_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
89USE_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 89IF_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
90USE_CAT(APPLET_NOFORK(cat, cat, _BB_DIR_BIN, _BB_SUID_NEVER, cat)) 90IF_CAT(APPLET_NOFORK(cat, cat, _BB_DIR_BIN, _BB_SUID_NEVER, cat))
91USE_CATV(APPLET(catv, _BB_DIR_BIN, _BB_SUID_NEVER)) 91IF_CATV(APPLET(catv, _BB_DIR_BIN, _BB_SUID_NEVER))
92USE_CHAT(APPLET(chat, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 92IF_CHAT(APPLET(chat, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
93USE_CHATTR(APPLET(chattr, _BB_DIR_BIN, _BB_SUID_NEVER)) 93IF_CHATTR(APPLET(chattr, _BB_DIR_BIN, _BB_SUID_NEVER))
94USE_CHCON(APPLET(chcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 94IF_CHCON(APPLET(chcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
95USE_CHGRP(APPLET_NOEXEC(chgrp, chgrp, _BB_DIR_BIN, _BB_SUID_NEVER, chgrp)) 95IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, _BB_DIR_BIN, _BB_SUID_NEVER, chgrp))
96USE_CHMOD(APPLET_NOEXEC(chmod, chmod, _BB_DIR_BIN, _BB_SUID_NEVER, chmod)) 96IF_CHMOD(APPLET_NOEXEC(chmod, chmod, _BB_DIR_BIN, _BB_SUID_NEVER, chmod))
97USE_CHOWN(APPLET_NOEXEC(chown, chown, _BB_DIR_BIN, _BB_SUID_NEVER, chown)) 97IF_CHOWN(APPLET_NOEXEC(chown, chown, _BB_DIR_BIN, _BB_SUID_NEVER, chown))
98USE_CHPASSWD(APPLET(chpasswd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 98IF_CHPASSWD(APPLET(chpasswd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
99USE_CHPST(APPLET(chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 99IF_CHPST(APPLET(chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
100USE_CHROOT(APPLET(chroot, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 100IF_CHROOT(APPLET(chroot, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
101USE_CHRT(APPLET(chrt, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 101IF_CHRT(APPLET(chrt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
102USE_CHVT(APPLET(chvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 102IF_CHVT(APPLET(chvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
103USE_CKSUM(APPLET(cksum, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 103IF_CKSUM(APPLET(cksum, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
104USE_CLEAR(APPLET(clear, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 104IF_CLEAR(APPLET(clear, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
105USE_CMP(APPLET(cmp, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 105IF_CMP(APPLET(cmp, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
106USE_COMM(APPLET(comm, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 106IF_COMM(APPLET(comm, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
107USE_CP(APPLET_NOEXEC(cp, cp, _BB_DIR_BIN, _BB_SUID_NEVER, cp)) 107IF_CP(APPLET_NOEXEC(cp, cp, _BB_DIR_BIN, _BB_SUID_NEVER, cp))
108USE_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_NEVER)) 108IF_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_NEVER))
109USE_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 109IF_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
110USE_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) 110IF_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
111USE_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 111IF_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
112USE_CTTYHACK(APPLET(cttyhack, _BB_DIR_BIN, _BB_SUID_NEVER)) 112IF_CTTYHACK(APPLET(cttyhack, _BB_DIR_BIN, _BB_SUID_NEVER))
113USE_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_NEVER, cut)) 113IF_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_NEVER, cut))
114USE_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_NEVER)) 114IF_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_NEVER))
115USE_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 115IF_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
116USE_DD(APPLET_NOEXEC(dd, dd, _BB_DIR_BIN, _BB_SUID_NEVER, dd)) 116IF_DD(APPLET_NOEXEC(dd, dd, _BB_DIR_BIN, _BB_SUID_NEVER, dd))
117USE_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 117IF_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
118USE_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_NEVER, delgroup)) 118IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_NEVER, delgroup))
119USE_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_NEVER)) 119IF_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_NEVER))
120USE_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_NEVER)) 120IF_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
121USE_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe)) 121IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
122USE_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_NEVER)) 122IF_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_NEVER))
123USE_DEVMEM(APPLET(devmem, _BB_DIR_SBIN, _BB_SUID_NEVER)) 123IF_DEVMEM(APPLET(devmem, _BB_DIR_SBIN, _BB_SUID_NEVER))
124USE_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_NEVER)) 124IF_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_NEVER))
125USE_APP_DHCPRELAY(APPLET(dhcprelay, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 125IF_APP_DHCPRELAY(APPLET(dhcprelay, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
126USE_DIFF(APPLET(diff, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 126IF_DIFF(APPLET(diff, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
127USE_DIRNAME(APPLET_NOFORK(dirname, dirname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dirname)) 127IF_DIRNAME(APPLET_NOFORK(dirname, dirname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dirname))
128USE_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_NEVER)) 128IF_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_NEVER))
129USE_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_ALWAYS)) 129IF_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_ALWAYS))
130USE_DOS2UNIX(APPLET(dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 130IF_DOS2UNIX(APPLET(dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
131USE_DPKG(APPLET(dpkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 131IF_DPKG(APPLET(dpkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
132USE_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dpkg_deb)) 132IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dpkg_deb))
133USE_DU(APPLET(du, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 133IF_DU(APPLET(du, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
134USE_DUMPKMAP(APPLET(dumpkmap, _BB_DIR_BIN, _BB_SUID_NEVER)) 134IF_DUMPKMAP(APPLET(dumpkmap, _BB_DIR_BIN, _BB_SUID_NEVER))
135USE_APP_DUMPLEASES(APPLET(dumpleases, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 135IF_APP_DUMPLEASES(APPLET(dumpleases, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
136//USE_E2FSCK(APPLET(e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER)) 136//IF_E2FSCK(APPLET(e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
137//USE_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, e2label)) 137//IF_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, e2label))
138USE_ECHO(APPLET_NOFORK(echo, echo, _BB_DIR_BIN, _BB_SUID_NEVER, echo)) 138IF_ECHO(APPLET_NOFORK(echo, echo, _BB_DIR_BIN, _BB_SUID_NEVER, echo))
139USE_ED(APPLET(ed, _BB_DIR_BIN, _BB_SUID_NEVER)) 139IF_ED(APPLET(ed, _BB_DIR_BIN, _BB_SUID_NEVER))
140USE_FEATURE_GREP_EGREP_ALIAS(APPLET_ODDNAME(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, egrep)) 140IF_FEATURE_GREP_EGREP_ALIAS(APPLET_ODDNAME(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, egrep))
141USE_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 141IF_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
142USE_ENV(APPLET_NOEXEC(env, env, _BB_DIR_USR_BIN, _BB_SUID_NEVER, env)) 142IF_ENV(APPLET_NOEXEC(env, env, _BB_DIR_USR_BIN, _BB_SUID_NEVER, env))
143USE_ENVDIR(APPLET_ODDNAME(envdir, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envdir)) 143IF_ENVDIR(APPLET_ODDNAME(envdir, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envdir))
144USE_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envuidgid)) 144IF_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envuidgid))
145USE_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake)) 145IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake))
146USE_EXPAND(APPLET(expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 146IF_EXPAND(APPLET(expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
147USE_EXPR(APPLET(expr, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 147IF_EXPR(APPLET(expr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
148USE_FAKEIDENTD(APPLET(fakeidentd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 148IF_FAKEIDENTD(APPLET(fakeidentd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
149USE_FALSE(APPLET_NOFORK(false, false, _BB_DIR_BIN, _BB_SUID_NEVER, false)) 149IF_FALSE(APPLET_NOFORK(false, false, _BB_DIR_BIN, _BB_SUID_NEVER, false))
150USE_FBSET(APPLET(fbset, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 150IF_FBSET(APPLET(fbset, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
151USE_FBSPLASH(APPLET(fbsplash, _BB_DIR_SBIN, _BB_SUID_NEVER)) 151IF_FBSPLASH(APPLET(fbsplash, _BB_DIR_SBIN, _BB_SUID_NEVER))
152USE_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, _BB_DIR_BIN, _BB_SUID_NEVER, fdflush)) 152IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, _BB_DIR_BIN, _BB_SUID_NEVER, fdflush))
153USE_FDFORMAT(APPLET(fdformat, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 153IF_FDFORMAT(APPLET(fdformat, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
154USE_FDISK(APPLET(fdisk, _BB_DIR_SBIN, _BB_SUID_NEVER)) 154IF_FDISK(APPLET(fdisk, _BB_DIR_SBIN, _BB_SUID_NEVER))
155USE_FEATURE_GREP_FGREP_ALIAS(APPLET_ODDNAME(fgrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, fgrep)) 155IF_FEATURE_GREP_FGREP_ALIAS(APPLET_ODDNAME(fgrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER, fgrep))
156USE_FIND(APPLET_NOEXEC(find, find, _BB_DIR_USR_BIN, _BB_SUID_NEVER, find)) 156IF_FIND(APPLET_NOEXEC(find, find, _BB_DIR_USR_BIN, _BB_SUID_NEVER, find))
157USE_FINDFS(APPLET(findfs, _BB_DIR_SBIN, _BB_SUID_MAYBE)) 157IF_FINDFS(APPLET(findfs, _BB_DIR_SBIN, _BB_SUID_MAYBE))
158//USE_FLASH_ERASEALL(APPLET_ODDNAME(flash_eraseall, flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_NEVER, flash_eraseall)) 158//IF_FLASH_ERASEALL(APPLET_ODDNAME(flash_eraseall, flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_NEVER, flash_eraseall))
159USE_FLASH_ERASEALL(APPLET(flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 159IF_FLASH_ERASEALL(APPLET(flash_eraseall, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
160USE_FOLD(APPLET(fold, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 160IF_FOLD(APPLET(fold, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
161USE_FREE(APPLET(free, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 161IF_FREE(APPLET(free, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
162USE_FREERAMDISK(APPLET(freeramdisk, _BB_DIR_SBIN, _BB_SUID_NEVER)) 162IF_FREERAMDISK(APPLET(freeramdisk, _BB_DIR_SBIN, _BB_SUID_NEVER))
163USE_FSCK(APPLET(fsck, _BB_DIR_SBIN, _BB_SUID_NEVER)) 163IF_FSCK(APPLET(fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
164//USE_E2FSCK(APPLET_ODDNAME(fsck.ext2, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_ext2)) 164//IF_E2FSCK(APPLET_ODDNAME(fsck.ext2, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_ext2))
165//USE_E2FSCK(APPLET_ODDNAME(fsck.ext3, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_ext3)) 165//IF_E2FSCK(APPLET_ODDNAME(fsck.ext3, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_ext3))
166USE_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_minix)) 166IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_minix))
167USE_FTPD(APPLET(ftpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 167IF_FTPD(APPLET(ftpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
168USE_FTPGET(APPLET_ODDNAME(ftpget, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpget)) 168IF_FTPGET(APPLET_ODDNAME(ftpget, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpget))
169USE_FTPPUT(APPLET_ODDNAME(ftpput, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpput)) 169IF_FTPPUT(APPLET_ODDNAME(ftpput, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ftpput))
170USE_FUSER(APPLET(fuser, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 170IF_FUSER(APPLET(fuser, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
171USE_GETENFORCE(APPLET(getenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 171IF_GETENFORCE(APPLET(getenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
172USE_GETOPT(APPLET(getopt, _BB_DIR_BIN, _BB_SUID_NEVER)) 172IF_GETOPT(APPLET(getopt, _BB_DIR_BIN, _BB_SUID_NEVER))
173USE_GETSEBOOL(APPLET(getsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 173IF_GETSEBOOL(APPLET(getsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
174USE_GETTY(APPLET(getty, _BB_DIR_SBIN, _BB_SUID_NEVER)) 174IF_GETTY(APPLET(getty, _BB_DIR_SBIN, _BB_SUID_NEVER))
175USE_GREP(APPLET(grep, _BB_DIR_BIN, _BB_SUID_NEVER)) 175IF_GREP(APPLET(grep, _BB_DIR_BIN, _BB_SUID_NEVER))
176USE_GUNZIP(APPLET(gunzip, _BB_DIR_BIN, _BB_SUID_NEVER)) 176IF_GUNZIP(APPLET(gunzip, _BB_DIR_BIN, _BB_SUID_NEVER))
177USE_GZIP(APPLET(gzip, _BB_DIR_BIN, _BB_SUID_NEVER)) 177IF_GZIP(APPLET(gzip, _BB_DIR_BIN, _BB_SUID_NEVER))
178USE_HALT(APPLET(halt, _BB_DIR_SBIN, _BB_SUID_NEVER)) 178IF_HALT(APPLET(halt, _BB_DIR_SBIN, _BB_SUID_NEVER))
179USE_HD(APPLET_NOEXEC(hd, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hd)) 179IF_HD(APPLET_NOEXEC(hd, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hd))
180USE_HDPARM(APPLET(hdparm, _BB_DIR_SBIN, _BB_SUID_NEVER)) 180IF_HDPARM(APPLET(hdparm, _BB_DIR_SBIN, _BB_SUID_NEVER))
181USE_HEAD(APPLET(head, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 181IF_HEAD(APPLET(head, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
182USE_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hexdump)) 182IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hexdump))
183USE_HOSTID(APPLET_NOFORK(hostid, hostid, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hostid)) 183IF_HOSTID(APPLET_NOFORK(hostid, hostid, _BB_DIR_USR_BIN, _BB_SUID_NEVER, hostid))
184USE_HOSTNAME(APPLET(hostname, _BB_DIR_BIN, _BB_SUID_NEVER)) 184IF_HOSTNAME(APPLET(hostname, _BB_DIR_BIN, _BB_SUID_NEVER))
185USE_HTTPD(APPLET(httpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 185IF_HTTPD(APPLET(httpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
186USE_HUSH(APPLET(hush, _BB_DIR_BIN, _BB_SUID_NEVER)) 186IF_HUSH(APPLET(hush, _BB_DIR_BIN, _BB_SUID_NEVER))
187USE_HWCLOCK(APPLET(hwclock, _BB_DIR_SBIN, _BB_SUID_NEVER)) 187IF_HWCLOCK(APPLET(hwclock, _BB_DIR_SBIN, _BB_SUID_NEVER))
188USE_ID(APPLET(id, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 188IF_ID(APPLET(id, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
189USE_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_NEVER)) 189IF_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_NEVER))
190USE_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifdown)) 190IF_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifdown))
191USE_IFENSLAVE(APPLET(ifenslave, _BB_DIR_SBIN, _BB_SUID_NEVER)) 191IF_IFENSLAVE(APPLET(ifenslave, _BB_DIR_SBIN, _BB_SUID_NEVER))
192USE_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifup)) 192IF_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifup))
193USE_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 193IF_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
194USE_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_NEVER)) 194IF_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_NEVER))
195USE_INOTIFYD(APPLET(inotifyd, _BB_DIR_SBIN, _BB_SUID_NEVER)) 195IF_INOTIFYD(APPLET(inotifyd, _BB_DIR_SBIN, _BB_SUID_NEVER))
196USE_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_NEVER)) 196IF_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
197USE_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe)) 197IF_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
198USE_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 198IF_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
199USE_IONICE(APPLET(ionice, _BB_DIR_BIN, _BB_SUID_NEVER)) 199IF_IONICE(APPLET(ionice, _BB_DIR_BIN, _BB_SUID_NEVER))
200#if ENABLE_FEATURE_IP_ADDRESS \ 200#if ENABLE_FEATURE_IP_ADDRESS \
201 || ENABLE_FEATURE_IP_ROUTE \ 201 || ENABLE_FEATURE_IP_ROUTE \
202 || ENABLE_FEATURE_IP_LINK \ 202 || ENABLE_FEATURE_IP_LINK \
203 || ENABLE_FEATURE_IP_TUNNEL \ 203 || ENABLE_FEATURE_IP_TUNNEL \
204 || ENABLE_FEATURE_IP_RULE 204 || ENABLE_FEATURE_IP_RULE
205USE_IP(APPLET(ip, _BB_DIR_BIN, _BB_SUID_NEVER)) 205IF_IP(APPLET(ip, _BB_DIR_BIN, _BB_SUID_NEVER))
206#endif 206#endif
207USE_IPADDR(APPLET(ipaddr, _BB_DIR_BIN, _BB_SUID_NEVER)) 207IF_IPADDR(APPLET(ipaddr, _BB_DIR_BIN, _BB_SUID_NEVER))
208USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER)) 208IF_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER))
209USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) 209IF_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
210USE_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) 210IF_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
211USE_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER)) 211IF_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER))
212USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER)) 212IF_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER))
213USE_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER)) 213IF_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER))
214USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER)) 214IF_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER))
215USE_KBD_MODE(APPLET(kbd_mode, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 215IF_KBD_MODE(APPLET(kbd_mode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
216USE_KILL(APPLET(kill, _BB_DIR_BIN, _BB_SUID_NEVER)) 216IF_KILL(APPLET(kill, _BB_DIR_BIN, _BB_SUID_NEVER))
217USE_KILLALL(APPLET_ODDNAME(killall, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall)) 217IF_KILLALL(APPLET_ODDNAME(killall, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall))
218USE_KILLALL5(APPLET_ODDNAME(killall5, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall5)) 218IF_KILLALL5(APPLET_ODDNAME(killall5, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall5))
219USE_KLOGD(APPLET(klogd, _BB_DIR_SBIN, _BB_SUID_NEVER)) 219IF_KLOGD(APPLET(klogd, _BB_DIR_SBIN, _BB_SUID_NEVER))
220USE_LASH(APPLET(lash, _BB_DIR_BIN, _BB_SUID_NEVER)) 220IF_LASH(APPLET(lash, _BB_DIR_BIN, _BB_SUID_NEVER))
221USE_LAST(APPLET(last, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 221IF_LAST(APPLET(last, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
222USE_LENGTH(APPLET_NOFORK(length, length, _BB_DIR_USR_BIN, _BB_SUID_NEVER, length)) 222IF_LENGTH(APPLET_NOFORK(length, length, _BB_DIR_USR_BIN, _BB_SUID_NEVER, length))
223USE_LESS(APPLET(less, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 223IF_LESS(APPLET(less, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
224USE_SETARCH(APPLET_ODDNAME(linux32, setarch, _BB_DIR_BIN, _BB_SUID_NEVER, linux32)) 224IF_SETARCH(APPLET_ODDNAME(linux32, setarch, _BB_DIR_BIN, _BB_SUID_NEVER, linux32))
225USE_SETARCH(APPLET_ODDNAME(linux64, setarch, _BB_DIR_BIN, _BB_SUID_NEVER, linux64)) 225IF_SETARCH(APPLET_ODDNAME(linux64, setarch, _BB_DIR_BIN, _BB_SUID_NEVER, linux64))
226USE_FEATURE_INITRD(APPLET_ODDNAME(linuxrc, init, _BB_DIR_ROOT, _BB_SUID_NEVER, linuxrc)) 226IF_FEATURE_INITRD(APPLET_ODDNAME(linuxrc, init, _BB_DIR_ROOT, _BB_SUID_NEVER, linuxrc))
227USE_LN(APPLET_NOEXEC(ln, ln, _BB_DIR_BIN, _BB_SUID_NEVER, ln)) 227IF_LN(APPLET_NOEXEC(ln, ln, _BB_DIR_BIN, _BB_SUID_NEVER, ln))
228USE_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 228IF_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
229USE_LOADFONT(APPLET(loadfont, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 229IF_LOADFONT(APPLET(loadfont, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
230USE_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_NEVER)) 230IF_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_NEVER))
231USE_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 231IF_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
232USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS)) 232IF_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS))
233USE_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, logname)) 233IF_LOGNAME(APPLET_NOFORK(logname, logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER, logname))
234USE_LOGREAD(APPLET(logread, _BB_DIR_SBIN, _BB_SUID_NEVER)) 234IF_LOGREAD(APPLET(logread, _BB_DIR_SBIN, _BB_SUID_NEVER))
235USE_LOSETUP(APPLET(losetup, _BB_DIR_SBIN, _BB_SUID_NEVER)) 235IF_LOSETUP(APPLET(losetup, _BB_DIR_SBIN, _BB_SUID_NEVER))
236USE_LPD(APPLET(lpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 236IF_LPD(APPLET(lpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
237USE_LPQ(APPLET_ODDNAME(lpq, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpq)) 237IF_LPQ(APPLET_ODDNAME(lpq, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpq))
238USE_LPR(APPLET_ODDNAME(lpr, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpr)) 238IF_LPR(APPLET_ODDNAME(lpr, lpqr, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lpr))
239USE_LS(APPLET_NOEXEC(ls, ls, _BB_DIR_BIN, _BB_SUID_NEVER, ls)) 239IF_LS(APPLET_NOEXEC(ls, ls, _BB_DIR_BIN, _BB_SUID_NEVER, ls))
240USE_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_NEVER)) 240IF_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_NEVER))
241USE_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_NEVER)) 241IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
242USE_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe)) 242IF_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
243USE_UNLZMA(APPLET_ODDNAME(lzmacat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lzmacat)) 243IF_UNLZMA(APPLET_ODDNAME(lzmacat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lzmacat))
244USE_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_NEVER)) 244IF_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_NEVER))
245USE_MAKEMIME(APPLET(makemime, _BB_DIR_BIN, _BB_SUID_NEVER)) 245IF_MAKEMIME(APPLET(makemime, _BB_DIR_BIN, _BB_SUID_NEVER))
246USE_MAN(APPLET(man, _BB_DIR_SBIN, _BB_SUID_NEVER)) 246IF_MAN(APPLET(man, _BB_DIR_SBIN, _BB_SUID_NEVER))
247USE_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 247IF_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
248USE_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, md5sum)) 248IF_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, md5sum))
249USE_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_NEVER)) 249IF_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_NEVER))
250USE_MESG(APPLET(mesg, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 250IF_MESG(APPLET(mesg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
251USE_MICROCOM(APPLET(microcom, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 251IF_MICROCOM(APPLET(microcom, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
252USE_MKDIR(APPLET_NOFORK(mkdir, mkdir, _BB_DIR_BIN, _BB_SUID_NEVER, mkdir)) 252IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, _BB_DIR_BIN, _BB_SUID_NEVER, mkdir))
253USE_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat)) 253IF_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat))
254//USE_MKE2FS(APPLET(mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER)) 254//IF_MKE2FS(APPLET(mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
255USE_MKFIFO(APPLET(mkfifo, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 255IF_MKFIFO(APPLET(mkfifo, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
256//USE_MKE2FS(APPLET_ODDNAME(mkfs.ext2, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext2)) 256//IF_MKE2FS(APPLET_ODDNAME(mkfs.ext2, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext2))
257//USE_MKE2FS(APPLET_ODDNAME(mkfs.ext3, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext3)) 257//IF_MKE2FS(APPLET_ODDNAME(mkfs.ext3, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_ext3))
258USE_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_minix)) 258IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_minix))
259USE_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat)) 259IF_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_vfat))
260USE_MKNOD(APPLET(mknod, _BB_DIR_BIN, _BB_SUID_NEVER)) 260IF_MKNOD(APPLET(mknod, _BB_DIR_BIN, _BB_SUID_NEVER))
261USE_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER, mkpasswd)) 261IF_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER, mkpasswd))
262USE_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_NEVER)) 262IF_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_NEVER))
263USE_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_NEVER)) 263IF_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_NEVER))
264USE_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER)) 264IF_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER))
265USE_MODPROBE_SMALL(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER)) 265IF_MODPROBE_SMALL(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER))
266USE_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_NEVER)) 266IF_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_NEVER))
267USE_MOUNT(APPLET(mount, _BB_DIR_BIN, USE_DESKTOP(_BB_SUID_MAYBE) SKIP_DESKTOP(_BB_SUID_NEVER))) 267IF_MOUNT(APPLET(mount, _BB_DIR_BIN, IF_DESKTOP(_BB_SUID_MAYBE) IF_NOT_DESKTOP(_BB_SUID_NEVER)))
268USE_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_NEVER)) 268IF_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_NEVER))
269USE_MSH(APPLET(msh, _BB_DIR_BIN, _BB_SUID_NEVER)) 269IF_MSH(APPLET(msh, _BB_DIR_BIN, _BB_SUID_NEVER))
270USE_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_NEVER)) 270IF_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_NEVER))
271USE_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER)) 271IF_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER))
272USE_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER)) 272IF_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER))
273USE_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 273IF_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
274USE_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER)) 274IF_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER))
275USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER)) 275IF_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER))
276USE_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 276IF_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
277USE_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 277IF_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
278USE_NSLOOKUP(APPLET(nslookup, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 278IF_NSLOOKUP(APPLET(nslookup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
279USE_OD(APPLET(od, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 279IF_OD(APPLET(od, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
280USE_OPENVT(APPLET(openvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 280IF_OPENVT(APPLET(openvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
281//USE_PARSE(APPLET(parse, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 281//IF_PARSE(APPLET(parse, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
282USE_PASSWD(APPLET(passwd, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) 282IF_PASSWD(APPLET(passwd, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
283USE_PATCH(APPLET(patch, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 283IF_PATCH(APPLET(patch, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
284USE_PGREP(APPLET(pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 284IF_PGREP(APPLET(pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
285USE_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_NEVER)) 285IF_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_NEVER))
286USE_PING(APPLET(ping, _BB_DIR_BIN, _BB_SUID_MAYBE)) 286IF_PING(APPLET(ping, _BB_DIR_BIN, _BB_SUID_MAYBE))
287USE_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_NEVER)) 287IF_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_NEVER))
288USE_PIPE_PROGRESS(APPLET(pipe_progress, _BB_DIR_BIN, _BB_SUID_NEVER)) 288IF_PIPE_PROGRESS(APPLET(pipe_progress, _BB_DIR_BIN, _BB_SUID_NEVER))
289USE_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_NEVER)) 289IF_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
290USE_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER, pkill)) 290IF_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_NEVER, pkill))
291USE_POPMAILDIR(APPLET(popmaildir, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 291IF_POPMAILDIR(APPLET(popmaildir, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
292USE_HALT(APPLET_ODDNAME(poweroff, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, poweroff)) 292IF_HALT(APPLET_ODDNAME(poweroff, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, poweroff))
293USE_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_NEVER)) 293IF_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_NEVER))
294USE_PRINTF(APPLET_NOFORK(printf, printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER, printf)) 294IF_PRINTF(APPLET_NOFORK(printf, printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER, printf))
295USE_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_NEVER)) 295IF_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_NEVER))
296USE_PSCAN(APPLET(pscan, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 296IF_PSCAN(APPLET(pscan, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
297USE_PWD(APPLET_NOFORK(pwd, pwd, _BB_DIR_BIN, _BB_SUID_NEVER, pwd)) 297IF_PWD(APPLET_NOFORK(pwd, pwd, _BB_DIR_BIN, _BB_SUID_NEVER, pwd))
298USE_RAIDAUTORUN(APPLET(raidautorun, _BB_DIR_SBIN, _BB_SUID_NEVER)) 298IF_RAIDAUTORUN(APPLET(raidautorun, _BB_DIR_SBIN, _BB_SUID_NEVER))
299USE_RDATE(APPLET(rdate, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 299IF_RDATE(APPLET(rdate, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
300USE_RDEV(APPLET(rdev, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 300IF_RDEV(APPLET(rdev, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
301USE_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 301IF_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
302USE_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 302IF_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
303USE_READPROFILE(APPLET(readprofile, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 303IF_READPROFILE(APPLET(readprofile, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
304USE_REALPATH(APPLET(realpath, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 304IF_REALPATH(APPLET(realpath, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
305USE_HALT(APPLET_ODDNAME(reboot, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, reboot)) 305IF_HALT(APPLET_ODDNAME(reboot, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, reboot))
306USE_REFORMIME(APPLET(reformime, _BB_DIR_BIN, _BB_SUID_NEVER)) 306IF_REFORMIME(APPLET(reformime, _BB_DIR_BIN, _BB_SUID_NEVER))
307USE_RENICE(APPLET(renice, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 307IF_RENICE(APPLET(renice, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
308USE_RESET(APPLET(reset, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 308IF_RESET(APPLET(reset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
309USE_RESIZE(APPLET(resize, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 309IF_RESIZE(APPLET(resize, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
310USE_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER, restorecon)) 310IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER, restorecon))
311USE_RM(APPLET_NOFORK(rm, rm, _BB_DIR_BIN, _BB_SUID_NEVER, rm)) 311IF_RM(APPLET_NOFORK(rm, rm, _BB_DIR_BIN, _BB_SUID_NEVER, rm))
312USE_RMDIR(APPLET_NOFORK(rmdir, rmdir, _BB_DIR_BIN, _BB_SUID_NEVER, rmdir)) 312IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, _BB_DIR_BIN, _BB_SUID_NEVER, rmdir))
313USE_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_NEVER)) 313IF_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
314USE_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe)) 314IF_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
315USE_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_NEVER)) 315IF_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_NEVER))
316USE_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_NEVER)) 316IF_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_NEVER))
317USE_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 317IF_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
318USE_RTCWAKE(APPLET(rtcwake, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 318IF_RTCWAKE(APPLET(rtcwake, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
319USE_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, _BB_DIR_BIN, _BB_SUID_NEVER, run_parts)) 319IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, _BB_DIR_BIN, _BB_SUID_NEVER, run_parts))
320USE_RUNCON(APPLET(runcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 320IF_RUNCON(APPLET(runcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
321USE_RUNLEVEL(APPLET(runlevel, _BB_DIR_SBIN, _BB_SUID_NEVER)) 321IF_RUNLEVEL(APPLET(runlevel, _BB_DIR_SBIN, _BB_SUID_NEVER))
322USE_RUNSV(APPLET(runsv, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 322IF_RUNSV(APPLET(runsv, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
323USE_RUNSVDIR(APPLET(runsvdir, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 323IF_RUNSVDIR(APPLET(runsvdir, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
324USE_RX(APPLET(rx, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 324IF_RX(APPLET(rx, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
325USE_SCRIPT(APPLET(script, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 325IF_SCRIPT(APPLET(script, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
326USE_SED(APPLET(sed, _BB_DIR_BIN, _BB_SUID_NEVER)) 326IF_SED(APPLET(sed, _BB_DIR_BIN, _BB_SUID_NEVER))
327USE_SELINUXENABLED(APPLET(selinuxenabled, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 327IF_SELINUXENABLED(APPLET(selinuxenabled, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
328USE_SENDMAIL(APPLET(sendmail, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 328IF_SENDMAIL(APPLET(sendmail, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
329USE_SEQ(APPLET_NOFORK(seq, seq, _BB_DIR_USR_BIN, _BB_SUID_NEVER, seq)) 329IF_SEQ(APPLET_NOFORK(seq, seq, _BB_DIR_USR_BIN, _BB_SUID_NEVER, seq))
330USE_SESTATUS(APPLET(sestatus, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 330IF_SESTATUS(APPLET(sestatus, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
331USE_SETARCH(APPLET(setarch, _BB_DIR_BIN, _BB_SUID_NEVER)) 331IF_SETARCH(APPLET(setarch, _BB_DIR_BIN, _BB_SUID_NEVER))
332USE_SETCONSOLE(APPLET(setconsole, _BB_DIR_SBIN, _BB_SUID_NEVER)) 332IF_SETCONSOLE(APPLET(setconsole, _BB_DIR_SBIN, _BB_SUID_NEVER))
333USE_SETENFORCE(APPLET(setenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 333IF_SETENFORCE(APPLET(setenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
334USE_SETFILES(APPLET(setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER)) 334IF_SETFILES(APPLET(setfiles, _BB_DIR_SBIN, _BB_SUID_NEVER))
335USE_SETFONT(APPLET(setfont, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 335IF_SETFONT(APPLET(setfont, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
336USE_SETKEYCODES(APPLET(setkeycodes, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 336IF_SETKEYCODES(APPLET(setkeycodes, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
337USE_SETLOGCONS(APPLET(setlogcons, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 337IF_SETLOGCONS(APPLET(setlogcons, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
338USE_SETSEBOOL(APPLET(setsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 338IF_SETSEBOOL(APPLET(setsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
339USE_SETSID(APPLET(setsid, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 339IF_SETSID(APPLET(setsid, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
340USE_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, setuidgid)) 340IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, setuidgid))
341USE_FEATURE_SH_IS_ASH(APPLET_ODDNAME(sh, ash, _BB_DIR_BIN, _BB_SUID_NEVER, sh)) 341IF_FEATURE_SH_IS_ASH(APPLET_ODDNAME(sh, ash, _BB_DIR_BIN, _BB_SUID_NEVER, sh))
342USE_FEATURE_SH_IS_HUSH(APPLET_ODDNAME(sh, hush, _BB_DIR_BIN, _BB_SUID_NEVER, sh)) 342IF_FEATURE_SH_IS_HUSH(APPLET_ODDNAME(sh, hush, _BB_DIR_BIN, _BB_SUID_NEVER, sh))
343USE_FEATURE_SH_IS_MSH(APPLET_ODDNAME(sh, msh, _BB_DIR_BIN, _BB_SUID_NEVER, sh)) 343IF_FEATURE_SH_IS_MSH(APPLET_ODDNAME(sh, msh, _BB_DIR_BIN, _BB_SUID_NEVER, sh))
344USE_SHA1SUM(APPLET_ODDNAME(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha1sum)) 344IF_SHA1SUM(APPLET_ODDNAME(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha1sum))
345USE_SHA256SUM(APPLET_ODDNAME(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha256sum)) 345IF_SHA256SUM(APPLET_ODDNAME(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha256sum))
346USE_SHA512SUM(APPLET_ODDNAME(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha512sum)) 346IF_SHA512SUM(APPLET_ODDNAME(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha512sum))
347USE_SHOWKEY(APPLET(showkey, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 347IF_SHOWKEY(APPLET(showkey, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
348USE_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_NEVER)) 348IF_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_NEVER))
349USE_SLEEP(APPLET_NOFORK(sleep, sleep, _BB_DIR_BIN, _BB_SUID_NEVER, sleep)) 349IF_SLEEP(APPLET_NOFORK(sleep, sleep, _BB_DIR_BIN, _BB_SUID_NEVER, sleep))
350USE_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, softlimit)) 350IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, softlimit))
351USE_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sort)) 351IF_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sort))
352USE_SPLIT(APPLET(split, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 352IF_SPLIT(APPLET(split, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
353USE_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, _BB_DIR_SBIN, _BB_SUID_NEVER, start_stop_daemon)) 353IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, _BB_DIR_SBIN, _BB_SUID_NEVER, start_stop_daemon))
354USE_STAT(APPLET(stat, _BB_DIR_BIN, _BB_SUID_NEVER)) 354IF_STAT(APPLET(stat, _BB_DIR_BIN, _BB_SUID_NEVER))
355USE_STRINGS(APPLET(strings, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 355IF_STRINGS(APPLET(strings, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
356USE_STTY(APPLET(stty, _BB_DIR_BIN, _BB_SUID_NEVER)) 356IF_STTY(APPLET(stty, _BB_DIR_BIN, _BB_SUID_NEVER))
357USE_SU(APPLET(su, _BB_DIR_BIN, _BB_SUID_ALWAYS)) 357IF_SU(APPLET(su, _BB_DIR_BIN, _BB_SUID_ALWAYS))
358USE_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_NEVER)) 358IF_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_NEVER))
359USE_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 359IF_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
360USE_SV(APPLET(sv, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 360IF_SV(APPLET(sv, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
361USE_SVLOGD(APPLET(svlogd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 361IF_SVLOGD(APPLET(svlogd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
362USE_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER,swapoff)) 362IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER,swapoff))
363USE_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER, swapon)) 363IF_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER, swapon))
364USE_SWITCH_ROOT(APPLET(switch_root, _BB_DIR_SBIN, _BB_SUID_NEVER)) 364IF_SWITCH_ROOT(APPLET(switch_root, _BB_DIR_SBIN, _BB_SUID_NEVER))
365USE_SYNC(APPLET_NOFORK(sync, sync, _BB_DIR_BIN, _BB_SUID_NEVER, sync)) 365IF_SYNC(APPLET_NOFORK(sync, sync, _BB_DIR_BIN, _BB_SUID_NEVER, sync))
366USE_BB_SYSCTL(APPLET(sysctl, _BB_DIR_SBIN, _BB_SUID_NEVER)) 366IF_BB_SYSCTL(APPLET(sysctl, _BB_DIR_SBIN, _BB_SUID_NEVER))
367USE_SYSLOGD(APPLET(syslogd, _BB_DIR_SBIN, _BB_SUID_NEVER)) 367IF_SYSLOGD(APPLET(syslogd, _BB_DIR_SBIN, _BB_SUID_NEVER))
368USE_TAC(APPLET_NOEXEC(tac, tac, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tac)) 368IF_TAC(APPLET_NOEXEC(tac, tac, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tac))
369USE_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 369IF_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
370USE_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER)) 370IF_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER))
371USE_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 371IF_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
372/* USE_TC(APPLET(tc, _BB_DIR_SBIN, _BB_SUID_NEVER)) */ 372/* IF_TC(APPLET(tc, _BB_DIR_SBIN, _BB_SUID_NEVER)) */
373USE_TCPSVD(APPLET_ODDNAME(tcpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tcpsvd)) 373IF_TCPSVD(APPLET_ODDNAME(tcpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, tcpsvd))
374USE_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 374IF_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
375USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 375IF_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
376USE_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 376IF_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
377USE_TEST(APPLET_NOFORK(test, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test)) 377IF_TEST(APPLET_NOFORK(test, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER, test))
378#if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT 378#if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT
379USE_TFTP(APPLET(tftp, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 379IF_TFTP(APPLET(tftp, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
380USE_TFTPD(APPLET(tftpd, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 380IF_TFTPD(APPLET(tftpd, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
381#endif 381#endif
382USE_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 382IF_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
383USE_TIMEOUT(APPLET(timeout, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 383IF_TIMEOUT(APPLET(timeout, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
384USE_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 384IF_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
385USE_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_NEVER, touch)) 385IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_NEVER, touch))
386USE_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 386IF_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
387USE_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) 387IF_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE))
388USE_TRUE(APPLET_NOFORK(true, true, _BB_DIR_BIN, _BB_SUID_NEVER, true)) 388IF_TRUE(APPLET_NOFORK(true, true, _BB_DIR_BIN, _BB_SUID_NEVER, true))
389USE_TTY(APPLET(tty, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 389IF_TTY(APPLET(tty, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
390USE_TTYSIZE(APPLET(ttysize, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 390IF_TTYSIZE(APPLET(ttysize, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
391USE_TUNCTL(APPLET(tunctl, _BB_DIR_SBIN, _BB_SUID_NEVER)) 391IF_TUNCTL(APPLET(tunctl, _BB_DIR_SBIN, _BB_SUID_NEVER))
392//USE_TUNE2FS(APPLET(tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER)) 392//IF_TUNE2FS(APPLET(tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
393USE_APP_UDHCPC(APPLET(udhcpc, _BB_DIR_SBIN, _BB_SUID_NEVER)) 393IF_APP_UDHCPC(APPLET(udhcpc, _BB_DIR_SBIN, _BB_SUID_NEVER))
394USE_APP_UDHCPD(APPLET(udhcpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) 394IF_APP_UDHCPD(APPLET(udhcpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
395USE_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, udpsvd)) 395IF_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, _BB_DIR_USR_BIN, _BB_SUID_NEVER, udpsvd))
396USE_UMOUNT(APPLET(umount, _BB_DIR_BIN, _BB_SUID_NEVER)) 396IF_UMOUNT(APPLET(umount, _BB_DIR_BIN, _BB_SUID_NEVER))
397USE_UNAME(APPLET(uname, _BB_DIR_BIN, _BB_SUID_NEVER)) 397IF_UNAME(APPLET(uname, _BB_DIR_BIN, _BB_SUID_NEVER))
398USE_UNCOMPRESS(APPLET(uncompress, _BB_DIR_BIN, _BB_SUID_NEVER)) 398IF_UNCOMPRESS(APPLET(uncompress, _BB_DIR_BIN, _BB_SUID_NEVER))
399USE_UNEXPAND(APPLET_ODDNAME(unexpand, expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unexpand)) 399IF_UNEXPAND(APPLET_ODDNAME(unexpand, expand, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unexpand))
400USE_UNIQ(APPLET(uniq, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 400IF_UNIQ(APPLET(uniq, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
401USE_UNIX2DOS(APPLET_ODDNAME(unix2dos, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unix2dos)) 401IF_UNIX2DOS(APPLET_ODDNAME(unix2dos, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unix2dos))
402USE_UNLZMA(APPLET(unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 402IF_UNLZMA(APPLET(unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
403USE_UNZIP(APPLET(unzip, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 403IF_UNZIP(APPLET(unzip, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
404USE_UPTIME(APPLET(uptime, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 404IF_UPTIME(APPLET(uptime, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
405USE_USLEEP(APPLET_NOFORK(usleep, usleep, _BB_DIR_BIN, _BB_SUID_NEVER, usleep)) 405IF_USLEEP(APPLET_NOFORK(usleep, usleep, _BB_DIR_BIN, _BB_SUID_NEVER, usleep))
406USE_UUDECODE(APPLET(uudecode, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 406IF_UUDECODE(APPLET(uudecode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
407USE_UUENCODE(APPLET(uuencode, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 407IF_UUENCODE(APPLET(uuencode, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
408USE_VCONFIG(APPLET(vconfig, _BB_DIR_SBIN, _BB_SUID_NEVER)) 408IF_VCONFIG(APPLET(vconfig, _BB_DIR_SBIN, _BB_SUID_NEVER))
409USE_VI(APPLET(vi, _BB_DIR_BIN, _BB_SUID_NEVER)) 409IF_VI(APPLET(vi, _BB_DIR_BIN, _BB_SUID_NEVER))
410USE_VLOCK(APPLET(vlock, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) 410IF_VLOCK(APPLET(vlock, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
411USE_WATCH(APPLET(watch, _BB_DIR_BIN, _BB_SUID_NEVER)) 411IF_WATCH(APPLET(watch, _BB_DIR_BIN, _BB_SUID_NEVER))
412USE_WATCHDOG(APPLET(watchdog, _BB_DIR_SBIN, _BB_SUID_NEVER)) 412IF_WATCHDOG(APPLET(watchdog, _BB_DIR_SBIN, _BB_SUID_NEVER))
413USE_WC(APPLET(wc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 413IF_WC(APPLET(wc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
414USE_WGET(APPLET(wget, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 414IF_WGET(APPLET(wget, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
415USE_WHICH(APPLET(which, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 415IF_WHICH(APPLET(which, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
416USE_WHO(APPLET(who, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) 416IF_WHO(APPLET(who, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
417USE_WHOAMI(APPLET_NOFORK(whoami, whoami, _BB_DIR_USR_BIN, _BB_SUID_NEVER, whoami)) 417IF_WHOAMI(APPLET_NOFORK(whoami, whoami, _BB_DIR_USR_BIN, _BB_SUID_NEVER, whoami))
418USE_XARGS(APPLET_NOEXEC(xargs, xargs, _BB_DIR_USR_BIN, _BB_SUID_NEVER, xargs)) 418IF_XARGS(APPLET_NOEXEC(xargs, xargs, _BB_DIR_USR_BIN, _BB_SUID_NEVER, xargs))
419USE_YES(APPLET_NOFORK(yes, yes, _BB_DIR_USR_BIN, _BB_SUID_NEVER, yes)) 419IF_YES(APPLET_NOFORK(yes, yes, _BB_DIR_USR_BIN, _BB_SUID_NEVER, yes))
420USE_GUNZIP(APPLET_ODDNAME(zcat, gunzip, _BB_DIR_BIN, _BB_SUID_NEVER, zcat)) 420IF_GUNZIP(APPLET_ODDNAME(zcat, gunzip, _BB_DIR_BIN, _BB_SUID_NEVER, zcat))
421USE_ZCIP(APPLET(zcip, _BB_DIR_SBIN, _BB_SUID_NEVER)) 421IF_ZCIP(APPLET(zcip, _BB_DIR_SBIN, _BB_SUID_NEVER))
422 422
423#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) 423#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE)
424}; 424};
diff --git a/include/libbb.h b/include/libbb.h
index 1faa9e9fd..4de3e7915 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -260,7 +260,7 @@ enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */
260 FILEUTILS_SET_SECURITY_CONTEXT = 0x200 260 FILEUTILS_SET_SECURITY_CONTEXT = 0x200
261#endif 261#endif
262}; 262};
263#define FILEUTILS_CP_OPTSTR "pdRfilsL" USE_SELINUX("c") 263#define FILEUTILS_CP_OPTSTR "pdRfilsL" IF_SELINUX("c")
264extern int remove_file(const char *path, int flags) FAST_FUNC; 264extern int remove_file(const char *path, int flags) FAST_FUNC;
265/* NB: without FILEUTILS_RECUR in flags, it will basically "cat" 265/* NB: without FILEUTILS_RECUR in flags, it will basically "cat"
266 * the source, not copy (unless "source" is a directory). 266 * the source, not copy (unless "source" is a directory).
@@ -916,15 +916,15 @@ extern void bb_verror_msg(const char *s, va_list p, const char *strerr) FAST_FUN
916/* Applets which are useful from another applets */ 916/* Applets which are useful from another applets */
917int bb_cat(char** argv); 917int bb_cat(char** argv);
918/* If shell needs them, they exist even if not enabled as applets */ 918/* If shell needs them, they exist even if not enabled as applets */
919int echo_main(int argc, char** argv) USE_ECHO(MAIN_EXTERNALLY_VISIBLE); 919int echo_main(int argc, char** argv) IF_ECHO(MAIN_EXTERNALLY_VISIBLE);
920int printf_main(int argc, char **argv) USE_PRINTF(MAIN_EXTERNALLY_VISIBLE); 920int printf_main(int argc, char **argv) IF_PRINTF(MAIN_EXTERNALLY_VISIBLE);
921int test_main(int argc, char **argv) USE_TEST(MAIN_EXTERNALLY_VISIBLE); 921int test_main(int argc, char **argv) IF_TEST(MAIN_EXTERNALLY_VISIBLE);
922int kill_main(int argc, char **argv) USE_KILL(MAIN_EXTERNALLY_VISIBLE); 922int kill_main(int argc, char **argv) IF_KILL(MAIN_EXTERNALLY_VISIBLE);
923/* Similar, but used by chgrp, not shell */ 923/* Similar, but used by chgrp, not shell */
924int chown_main(int argc, char **argv) USE_CHOWN(MAIN_EXTERNALLY_VISIBLE); 924int chown_main(int argc, char **argv) IF_CHOWN(MAIN_EXTERNALLY_VISIBLE);
925/* Used by ftpd */ 925/* Used by ftpd */
926int ls_main(int argc, char **argv) USE_LS(MAIN_EXTERNALLY_VISIBLE); 926int ls_main(int argc, char **argv) IF_LS(MAIN_EXTERNALLY_VISIBLE);
927/* Don't need USE_xxx() guard for these */ 927/* Don't need IF_xxx() guard for these */
928int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 928int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
929int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 929int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
930 930
@@ -1253,7 +1253,7 @@ typedef struct procps_status_t {
1253/* Fields are set to 0/NULL if failed to determine (or not requested) */ 1253/* Fields are set to 0/NULL if failed to determine (or not requested) */
1254 uint16_t argv_len; 1254 uint16_t argv_len;
1255 char *argv0; 1255 char *argv0;
1256 USE_SELINUX(char *context;) 1256 IF_SELINUX(char *context;)
1257 /* Everything below must contain no ptrs to malloc'ed data: 1257 /* Everything below must contain no ptrs to malloc'ed data:
1258 * it is memset(0) for each process in procps_scan() */ 1258 * it is memset(0) for each process in procps_scan() */
1259 unsigned long vsz, rss; /* we round it to kbytes */ 1259 unsigned long vsz, rss; /* we round it to kbytes */
@@ -1309,7 +1309,7 @@ enum {
1309 || ENABLE_PIDOF 1309 || ENABLE_PIDOF
1310 || ENABLE_SESTATUS 1310 || ENABLE_SESTATUS
1311 ), 1311 ),
1312 USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,) 1312 IF_SELINUX(PSSCAN_CONTEXT = 1 << 17,)
1313 PSSCAN_START_TIME = 1 << 18, 1313 PSSCAN_START_TIME = 1 << 18,
1314 PSSCAN_CPU = 1 << 19, 1314 PSSCAN_CPU = 1 << 19,
1315 /* These are all retrieved from proc/NN/stat in one go: */ 1315 /* These are all retrieved from proc/NN/stat in one go: */
diff --git a/include/unarchive.h b/include/unarchive.h
index 9d4f1fa40..682e810d5 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -125,24 +125,24 @@ typedef struct inflate_unzip_result {
125 uint32_t crc; 125 uint32_t crc;
126} inflate_unzip_result; 126} inflate_unzip_result;
127 127
128USE_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, off_t compr_size, int src_fd, int dst_fd) FAST_FUNC; 128IF_DESKTOP(long long) int inflate_unzip(inflate_unzip_result *res, off_t compr_size, int src_fd, int dst_fd) FAST_FUNC;
129/* lzma unpacker takes .lzma stream from offset 0 */ 129/* lzma unpacker takes .lzma stream from offset 0 */
130USE_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd) FAST_FUNC; 130IF_DESKTOP(long long) int unpack_lzma_stream(int src_fd, int dst_fd) FAST_FUNC;
131/* the rest wants 2 first bytes already skipped by the caller */ 131/* the rest wants 2 first bytes already skipped by the caller */
132USE_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC; 132IF_DESKTOP(long long) int unpack_bz2_stream(int src_fd, int dst_fd) FAST_FUNC;
133USE_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC; 133IF_DESKTOP(long long) int unpack_gz_stream(int src_fd, int dst_fd) FAST_FUNC;
134USE_DESKTOP(long long) int unpack_gz_stream_with_info(int src_fd, int dst_fd, unpack_info_t *info) FAST_FUNC; 134IF_DESKTOP(long long) int unpack_gz_stream_with_info(int src_fd, int dst_fd, unpack_info_t *info) FAST_FUNC;
135USE_DESKTOP(long long) int unpack_Z_stream(int fd_in, int fd_out) FAST_FUNC; 135IF_DESKTOP(long long) int unpack_Z_stream(int fd_in, int fd_out) FAST_FUNC;
136/* wrapper which checks first two bytes to be "BZ" */ 136/* wrapper which checks first two bytes to be "BZ" */
137USE_DESKTOP(long long) int unpack_bz2_stream_prime(int src_fd, int dst_fd) FAST_FUNC; 137IF_DESKTOP(long long) int unpack_bz2_stream_prime(int src_fd, int dst_fd) FAST_FUNC;
138 138
139int bbunpack(char **argv, 139int bbunpack(char **argv,
140 char* (*make_new_name)(char *filename), 140 char* (*make_new_name)(char *filename),
141 USE_DESKTOP(long long) int (*unpacker)(unpack_info_t *info)) FAST_FUNC; 141 IF_DESKTOP(long long) int (*unpacker)(unpack_info_t *info)) FAST_FUNC;
142 142
143#if BB_MMU 143#if BB_MMU
144void open_transformer(int fd, 144void open_transformer(int fd,
145 USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd)) FAST_FUNC; 145 IF_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd)) FAST_FUNC;
146#define open_transformer(fd, transformer, transform_prog) open_transformer(fd, transformer) 146#define open_transformer(fd, transformer, transform_prog) open_transformer(fd, transformer)
147#else 147#else
148void open_transformer(int src_fd, const char *transform_prog) FAST_FUNC; 148void open_transformer(int src_fd, const char *transform_prog) FAST_FUNC;
diff --git a/include/usage.h b/include/usage.h
index d3bf7849e..bfb07a4cf 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -25,7 +25,7 @@
25 "\n -c DIR Config directory [/etc/acpi]" \ 25 "\n -c DIR Config directory [/etc/acpi]" \
26 "\n -e FILE /proc event file [/proc/acpi/event]" \ 26 "\n -e FILE /proc event file [/proc/acpi/event]" \
27 "\n -l FILE Log file [/var/log/acpid]" \ 27 "\n -l FILE Log file [/var/log/acpid]" \
28 USE_FEATURE_ACPID_COMPAT( \ 28 IF_FEATURE_ACPID_COMPAT( \
29 "\n\nAccept and ignore compatibility options -g -m -s -S -v" \ 29 "\n\nAccept and ignore compatibility options -g -m -s -S -v" \
30 ) 30 )
31 31
@@ -34,9 +34,9 @@
34 "# acpid -d /dev/input/event*\n" 34 "# acpid -d /dev/input/event*\n"
35 35
36#define addgroup_trivial_usage \ 36#define addgroup_trivial_usage \
37 "[-g GID] " USE_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name" 37 "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name"
38#define addgroup_full_usage "\n\n" \ 38#define addgroup_full_usage "\n\n" \
39 "Add a group " USE_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \ 39 "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \
40 "\nOptions:" \ 40 "\nOptions:" \
41 "\n -g GID Group id" \ 41 "\n -g GID Group id" \
42 42
@@ -160,14 +160,14 @@
160#define brctl_full_usage "\n\n" \ 160#define brctl_full_usage "\n\n" \
161 "Manage ethernet bridges.\n" \ 161 "Manage ethernet bridges.\n" \
162 "\nCommands:" \ 162 "\nCommands:" \
163 USE_FEATURE_BRCTL_SHOW( \ 163 IF_FEATURE_BRCTL_SHOW( \
164 "\n show Show a list of bridges" \ 164 "\n show Show a list of bridges" \
165 ) \ 165 ) \
166 "\n addbr BRIDGE Create BRIDGE" \ 166 "\n addbr BRIDGE Create BRIDGE" \
167 "\n delbr BRIDGE Delete BRIDGE" \ 167 "\n delbr BRIDGE Delete BRIDGE" \
168 "\n addif BRIDGE IFACE Add IFACE to BRIDGE" \ 168 "\n addif BRIDGE IFACE Add IFACE to BRIDGE" \
169 "\n delif BRIDGE IFACE Delete IFACE from BRIDGE" \ 169 "\n delif BRIDGE IFACE Delete IFACE from BRIDGE" \
170 USE_FEATURE_BRCTL_FANCY( \ 170 IF_FEATURE_BRCTL_FANCY( \
171 "\n setageing BRIDGE TIME Set ageing time" \ 171 "\n setageing BRIDGE TIME Set ageing time" \
172 "\n setfd BRIDGE TIME Set bridge forward delay" \ 172 "\n setfd BRIDGE TIME Set bridge forward delay" \
173 "\n sethello BRIDGE TIME Set hello time" \ 173 "\n sethello BRIDGE TIME Set hello time" \
@@ -281,12 +281,12 @@
281#define chcon_trivial_usage \ 281#define chcon_trivial_usage \
282 "[OPTIONS] CONTEXT FILE..." \ 282 "[OPTIONS] CONTEXT FILE..." \
283 "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \ 283 "\n chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE..." \
284 USE_FEATURE_CHCON_LONG_OPTIONS( \ 284 IF_FEATURE_CHCON_LONG_OPTIONS( \
285 "\n chcon [OPTIONS] --reference=RFILE FILE..." \ 285 "\n chcon [OPTIONS] --reference=RFILE FILE..." \
286 ) 286 )
287#define chcon_full_usage "\n\n" \ 287#define chcon_full_usage "\n\n" \
288 "Change the security context of each FILE to CONTEXT\n" \ 288 "Change the security context of each FILE to CONTEXT\n" \
289 USE_FEATURE_CHCON_LONG_OPTIONS( \ 289 IF_FEATURE_CHCON_LONG_OPTIONS( \
290 "\n -v,--verbose Verbose" \ 290 "\n -v,--verbose Verbose" \
291 "\n -c,--changes Report changes made" \ 291 "\n -c,--changes Report changes made" \
292 "\n -h,--no-dereference Affect symlinks instead of their targets" \ 292 "\n -h,--no-dereference Affect symlinks instead of their targets" \
@@ -298,7 +298,7 @@
298 "\n -l,--range=RANGE" \ 298 "\n -l,--range=RANGE" \
299 "\n -R,--recursive Recurse subdirectories" \ 299 "\n -R,--recursive Recurse subdirectories" \
300 ) \ 300 ) \
301 SKIP_FEATURE_CHCON_LONG_OPTIONS( \ 301 IF_NOT_FEATURE_CHCON_LONG_OPTIONS( \
302 "\n -v Verbose" \ 302 "\n -v Verbose" \
303 "\n -c Report changes made" \ 303 "\n -c Report changes made" \
304 "\n -h Affect symlinks instead of their targets" \ 304 "\n -h Affect symlinks instead of their targets" \
@@ -311,13 +311,13 @@
311 ) 311 )
312 312
313#define chmod_trivial_usage \ 313#define chmod_trivial_usage \
314 "[-R"USE_DESKTOP("cvf")"] MODE[,MODE]... FILE..." 314 "[-R"IF_DESKTOP("cvf")"] MODE[,MODE]... FILE..."
315#define chmod_full_usage "\n\n" \ 315#define chmod_full_usage "\n\n" \
316 "Each MODE is one or more of the letters ugoa, one of the\n" \ 316 "Each MODE is one or more of the letters ugoa, one of the\n" \
317 "symbols +-= and one or more of the letters rwxst\n" \ 317 "symbols +-= and one or more of the letters rwxst\n" \
318 "\nOptions:" \ 318 "\nOptions:" \
319 "\n -R Recurse directories" \ 319 "\n -R Recurse directories" \
320 USE_DESKTOP( \ 320 IF_DESKTOP( \
321 "\n -c List changed files" \ 321 "\n -c List changed files" \
322 "\n -v List all files" \ 322 "\n -v List all files" \
323 "\n -f Hide errors" \ 323 "\n -f Hide errors" \
@@ -333,7 +333,7 @@
333 "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" 333 "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n"
334 334
335#define chgrp_trivial_usage \ 335#define chgrp_trivial_usage \
336 "[-RhLHP"USE_DESKTOP("cvf")"]... GROUP FILE..." 336 "[-RhLHP"IF_DESKTOP("cvf")"]... GROUP FILE..."
337#define chgrp_full_usage "\n\n" \ 337#define chgrp_full_usage "\n\n" \
338 "Change the group membership of each FILE to GROUP\n" \ 338 "Change the group membership of each FILE to GROUP\n" \
339 "\nOptions:" \ 339 "\nOptions:" \
@@ -342,7 +342,7 @@
342 "\n -L Traverse all symlinks to directories" \ 342 "\n -L Traverse all symlinks to directories" \
343 "\n -H Traverse symlinks on command line only" \ 343 "\n -H Traverse symlinks on command line only" \
344 "\n -P Do not traverse symlinks (default)" \ 344 "\n -P Do not traverse symlinks (default)" \
345 USE_DESKTOP( \ 345 IF_DESKTOP( \
346 "\n -c List changed files" \ 346 "\n -c List changed files" \
347 "\n -v Verbose" \ 347 "\n -v Verbose" \
348 "\n -f Hide errors" \ 348 "\n -f Hide errors" \
@@ -355,7 +355,7 @@
355 "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n" 355 "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n"
356 356
357#define chown_trivial_usage \ 357#define chown_trivial_usage \
358 "[-RhLHP"USE_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..." 358 "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
359#define chown_full_usage "\n\n" \ 359#define chown_full_usage "\n\n" \
360 "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" \ 360 "Change the owner and/or group of each FILE to OWNER and/or GROUP\n" \
361 "\nOptions:" \ 361 "\nOptions:" \
@@ -364,7 +364,7 @@
364 "\n -L Traverse all symlinks to directories" \ 364 "\n -L Traverse all symlinks to directories" \
365 "\n -H Traverse symlinks on command line only" \ 365 "\n -H Traverse symlinks on command line only" \
366 "\n -P Do not traverse symlinks (default)" \ 366 "\n -P Do not traverse symlinks (default)" \
367 USE_DESKTOP( \ 367 IF_DESKTOP( \
368 "\n -c List changed files" \ 368 "\n -c List changed files" \
369 "\n -v List all files" \ 369 "\n -v List all files" \
370 "\n -f Hide errors" \ 370 "\n -f Hide errors" \
@@ -468,7 +468,7 @@
468 "Clear screen" 468 "Clear screen"
469 469
470#define cmp_trivial_usage \ 470#define cmp_trivial_usage \
471 "[-l] [-s] FILE1 [FILE2" USE_DESKTOP(" [SKIP1 [SKIP2]") "]]" 471 "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]") "]]"
472#define cmp_full_usage "\n\n" \ 472#define cmp_full_usage "\n\n" \
473 "Compares FILE1 vs stdin if FILE2 is not specified\n" \ 473 "Compares FILE1 vs stdin if FILE2 is not specified\n" \
474 "\nOptions:" \ 474 "\nOptions:" \
@@ -518,7 +518,7 @@
518 "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" \ 518 "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY\n" \
519 "\nOptions:" \ 519 "\nOptions:" \
520 "\n -a Same as -dpR" \ 520 "\n -a Same as -dpR" \
521 USE_SELINUX( \ 521 IF_SELINUX( \
522 "\n -c Preserve security context" \ 522 "\n -c Preserve security context" \
523 ) \ 523 ) \
524 "\n -d,-P Preserve links" \ 524 "\n -d,-P Preserve links" \
@@ -530,18 +530,18 @@
530 "\n -l,-s Create (sym)links" \ 530 "\n -l,-s Create (sym)links" \
531 531
532#define cpio_trivial_usage \ 532#define cpio_trivial_usage \
533 "-[ti" USE_FEATURE_CPIO_O("o") USE_FEATURE_CPIO_P("p") "dmvu] [-F FILE]" \ 533 "-[ti" IF_FEATURE_CPIO_O("o") IF_FEATURE_CPIO_P("p") "dmvu] [-F FILE]" \
534 USE_FEATURE_CPIO_O( " [-H newc]" ) 534 IF_FEATURE_CPIO_O( " [-H newc]" )
535#define cpio_full_usage "\n\n" \ 535#define cpio_full_usage "\n\n" \
536 "Extract or list files from a cpio archive" \ 536 "Extract or list files from a cpio archive" \
537 USE_FEATURE_CPIO_O( ", or create a cpio archive" ) \ 537 IF_FEATURE_CPIO_O( ", or create a cpio archive" ) \
538 "\nMain operation mode:" \ 538 "\nMain operation mode:" \
539 "\n -t List" \ 539 "\n -t List" \
540 "\n -i Extract" \ 540 "\n -i Extract" \
541 USE_FEATURE_CPIO_O( \ 541 IF_FEATURE_CPIO_O( \
542 "\n -o Create" \ 542 "\n -o Create" \
543 ) \ 543 ) \
544 USE_FEATURE_CPIO_P( \ 544 IF_FEATURE_CPIO_P( \
545 "\n -p Passthrough" \ 545 "\n -p Passthrough" \
546 ) \ 546 ) \
547 "\nOptions:" \ 547 "\nOptions:" \
@@ -550,18 +550,18 @@
550 "\n -v Verbose" \ 550 "\n -v Verbose" \
551 "\n -u Overwrite" \ 551 "\n -u Overwrite" \
552 "\n -F Input file" \ 552 "\n -F Input file" \
553 USE_FEATURE_CPIO_O( \ 553 IF_FEATURE_CPIO_O( \
554 "\n -H Define format" \ 554 "\n -H Define format" \
555 ) \ 555 ) \
556 556
557#define crond_trivial_usage \ 557#define crond_trivial_usage \
558 "-fbS -l N " USE_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR" 558 "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
559#define crond_full_usage "\n\n" \ 559#define crond_full_usage "\n\n" \
560 " -f Foreground" \ 560 " -f Foreground" \
561 "\n -b Background (default)" \ 561 "\n -b Background (default)" \
562 "\n -S Log to syslog (default)" \ 562 "\n -S Log to syslog (default)" \
563 "\n -l Set log level. 0 is the most verbose, default 8" \ 563 "\n -l Set log level. 0 is the most verbose, default 8" \
564 USE_FEATURE_CROND_D( \ 564 IF_FEATURE_CROND_D( \
565 "\n -d Set log level, log to stderr" \ 565 "\n -d Set log level, log to stderr" \
566 ) \ 566 ) \
567 "\n -L Log to file" \ 567 "\n -L Log to file" \
@@ -583,13 +583,13 @@
583#define cryptpw_full_usage "\n\n" \ 583#define cryptpw_full_usage "\n\n" \
584 "Crypt the PASSWORD using crypt(3)\n" \ 584 "Crypt the PASSWORD using crypt(3)\n" \
585 "\nOptions:" \ 585 "\nOptions:" \
586 USE_GETOPT_LONG( \ 586 IF_GETOPT_LONG( \
587 "\n -P,--password-fd=NUM Read password from fd NUM" \ 587 "\n -P,--password-fd=NUM Read password from fd NUM" \
588/* "\n -s,--stdin Use stdin; like -P0" */ \ 588/* "\n -s,--stdin Use stdin; like -P0" */ \
589 "\n -m,--method=TYPE Encryption method TYPE" \ 589 "\n -m,--method=TYPE Encryption method TYPE" \
590 "\n -S,--salt=SALT" \ 590 "\n -S,--salt=SALT" \
591 ) \ 591 ) \
592 SKIP_GETOPT_LONG( \ 592 IF_NOT_GETOPT_LONG( \
593 "\n -P NUM Read password from fd NUM" \ 593 "\n -P NUM Read password from fd NUM" \
594/* "\n -s Use stdin; like -P0" */ \ 594/* "\n -s Use stdin; like -P0" */ \
595 "\n -m TYPE Encryption method TYPE" \ 595 "\n -m TYPE Encryption method TYPE" \
@@ -604,13 +604,13 @@
604#define mkpasswd_full_usage "\n\n" \ 604#define mkpasswd_full_usage "\n\n" \
605 "Crypt the PASSWORD using crypt(3)\n" \ 605 "Crypt the PASSWORD using crypt(3)\n" \
606 "\nOptions:" \ 606 "\nOptions:" \
607 USE_GETOPT_LONG( \ 607 IF_GETOPT_LONG( \
608 "\n -P,--password-fd=NUM Read password from fd NUM" \ 608 "\n -P,--password-fd=NUM Read password from fd NUM" \
609/* "\n -s,--stdin Use stdin; like -P0" */ \ 609/* "\n -s,--stdin Use stdin; like -P0" */ \
610 "\n -m,--method=TYPE Encryption method TYPE" \ 610 "\n -m,--method=TYPE Encryption method TYPE" \
611 "\n -S,--salt=SALT" \ 611 "\n -S,--salt=SALT" \
612 ) \ 612 ) \
613 SKIP_GETOPT_LONG( \ 613 IF_NOT_GETOPT_LONG( \
614 "\n -P NUM Read password from fd NUM" \ 614 "\n -P NUM Read password from fd NUM" \
615/* "\n -s Use stdin; like -P0" */ \ 615/* "\n -s Use stdin; like -P0" */ \
616 "\n -m TYPE Encryption method TYPE" \ 616 "\n -m TYPE Encryption method TYPE" \
@@ -645,7 +645,7 @@
645 "\nOptions:" \ 645 "\nOptions:" \
646 "\n -u Work in UTC (don't convert to local time)" \ 646 "\n -u Work in UTC (don't convert to local time)" \
647 "\n -R Output RFC-822 compliant date string" \ 647 "\n -R Output RFC-822 compliant date string" \
648 USE_FEATURE_DATE_ISOFMT( \ 648 IF_FEATURE_DATE_ISOFMT( \
649 "\n -I[SPEC] Output ISO-8601 compliant date string" \ 649 "\n -I[SPEC] Output ISO-8601 compliant date string" \
650 "\n SPEC='date' (default) for date only," \ 650 "\n SPEC='date' (default) for date only," \
651 "\n 'hours', 'minutes', or 'seconds' for date and" \ 651 "\n 'hours', 'minutes', or 'seconds' for date and" \
@@ -654,7 +654,7 @@
654 "\n -d TIME Display TIME, not 'now'" \ 654 "\n -d TIME Display TIME, not 'now'" \
655 "\n -r FILE Display last modification time of FILE" \ 655 "\n -r FILE Display last modification time of FILE" \
656 "\n [-s] TIME Set time to TIME" \ 656 "\n [-s] TIME Set time to TIME" \
657 USE_FEATURE_DATE_ISOFMT( \ 657 IF_FEATURE_DATE_ISOFMT( \
658 "\n -D FMT Use FMT for str->date conversion" \ 658 "\n -D FMT Use FMT for str->date conversion" \
659 ) \ 659 ) \
660 "\n" \ 660 "\n" \
@@ -691,24 +691,24 @@
691 "64\n" 691 "64\n"
692 692
693#define dd_trivial_usage \ 693#define dd_trivial_usage \
694 "[if=FILE] [of=FILE] " USE_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \ 694 "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
695 " [seek=N]" USE_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]") 695 " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
696#define dd_full_usage "\n\n" \ 696#define dd_full_usage "\n\n" \
697 "Copy a file with converting and formatting\n" \ 697 "Copy a file with converting and formatting\n" \
698 "\nOptions:" \ 698 "\nOptions:" \
699 "\n if=FILE Read from FILE instead of stdin" \ 699 "\n if=FILE Read from FILE instead of stdin" \
700 "\n of=FILE Write to FILE instead of stdout" \ 700 "\n of=FILE Write to FILE instead of stdout" \
701 "\n bs=N Read and write N bytes at a time" \ 701 "\n bs=N Read and write N bytes at a time" \
702 USE_FEATURE_DD_IBS_OBS( \ 702 IF_FEATURE_DD_IBS_OBS( \
703 "\n ibs=N Read N bytes at a time" \ 703 "\n ibs=N Read N bytes at a time" \
704 ) \ 704 ) \
705 USE_FEATURE_DD_IBS_OBS( \ 705 IF_FEATURE_DD_IBS_OBS( \
706 "\n obs=N Write N bytes at a time" \ 706 "\n obs=N Write N bytes at a time" \
707 ) \ 707 ) \
708 "\n count=N Copy only N input blocks" \ 708 "\n count=N Copy only N input blocks" \
709 "\n skip=N Skip N input blocks" \ 709 "\n skip=N Skip N input blocks" \
710 "\n seek=N Skip N output blocks" \ 710 "\n seek=N Skip N output blocks" \
711 USE_FEATURE_DD_IBS_OBS( \ 711 IF_FEATURE_DD_IBS_OBS( \
712 "\n conv=notrunc Don't truncate output file" \ 712 "\n conv=notrunc Don't truncate output file" \
713 "\n conv=noerror Continue after read errors" \ 713 "\n conv=noerror Continue after read errors" \
714 "\n conv=sync Pad blocks with zeros" \ 714 "\n conv=sync Pad blocks with zeros" \
@@ -729,10 +729,10 @@
729 "Deallocate unused virtual terminal /dev/ttyN" 729 "Deallocate unused virtual terminal /dev/ttyN"
730 730
731#define delgroup_trivial_usage \ 731#define delgroup_trivial_usage \
732 USE_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP" 732 IF_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
733#define delgroup_full_usage "\n\n" \ 733#define delgroup_full_usage "\n\n" \
734 "Delete group GROUP from the system" \ 734 "Delete group GROUP from the system" \
735 USE_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP") 735 IF_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
736 736
737#define deluser_trivial_usage \ 737#define deluser_trivial_usage \
738 "USER" 738 "USER"
@@ -752,14 +752,14 @@
752 "\n VALUE Data to be written" \ 752 "\n VALUE Data to be written" \
753 753
754#define devfsd_trivial_usage \ 754#define devfsd_trivial_usage \
755 "mntpnt [-v]" USE_DEVFSD_FG_NP("[-fg][-np]") 755 "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]")
756#define devfsd_full_usage "\n\n" \ 756#define devfsd_full_usage "\n\n" \
757 "Manage devfs permissions and old device name symlinks\n" \ 757 "Manage devfs permissions and old device name symlinks\n" \
758 "\nOptions:" \ 758 "\nOptions:" \
759 "\n mntpnt The mount point where devfs is mounted" \ 759 "\n mntpnt The mount point where devfs is mounted" \
760 "\n -v Print the protocol version numbers for devfsd" \ 760 "\n -v Print the protocol version numbers for devfsd" \
761 "\n and the kernel-side protocol version and exit" \ 761 "\n and the kernel-side protocol version and exit" \
762 USE_DEVFSD_FG_NP( \ 762 IF_DEVFSD_FG_NP( \
763 "\n -fg Run in foreground" \ 763 "\n -fg Run in foreground" \
764 "\n -np Exit after parsing the configuration file" \ 764 "\n -np Exit after parsing the configuration file" \
765 "\n and processing synthetic REGISTER events," \ 765 "\n and processing synthetic REGISTER events," \
@@ -768,19 +768,19 @@
768 768
769#define df_trivial_usage \ 769#define df_trivial_usage \
770 "[-Pk" \ 770 "[-Pk" \
771 USE_FEATURE_HUMAN_READABLE("mh") \ 771 IF_FEATURE_HUMAN_READABLE("mh") \
772 USE_FEATURE_DF_FANCY("ai] [-B SIZE") \ 772 IF_FEATURE_DF_FANCY("ai] [-B SIZE") \
773 "] [FILESYSTEM...]" 773 "] [FILESYSTEM...]"
774#define df_full_usage "\n\n" \ 774#define df_full_usage "\n\n" \
775 "Print filesystem usage statistics\n" \ 775 "Print filesystem usage statistics\n" \
776 "\nOptions:" \ 776 "\nOptions:" \
777 "\n -P POSIX output format" \ 777 "\n -P POSIX output format" \
778 "\n -k 1024-byte blocks (default)" \ 778 "\n -k 1024-byte blocks (default)" \
779 USE_FEATURE_HUMAN_READABLE( \ 779 IF_FEATURE_HUMAN_READABLE( \
780 "\n -m 1M-byte blocks" \ 780 "\n -m 1M-byte blocks" \
781 "\n -h Human readable (e.g. 1K 243M 2G)" \ 781 "\n -h Human readable (e.g. 1K 243M 2G)" \
782 ) \ 782 ) \
783 USE_FEATURE_DF_FANCY( \ 783 IF_FEATURE_DF_FANCY( \
784 "\n -a Show all filesystems" \ 784 "\n -a Show all filesystems" \
785 "\n -i Inodes" \ 785 "\n -i Inodes" \
786 "\n -B SIZE Blocksize" \ 786 "\n -B SIZE Blocksize" \
@@ -894,12 +894,12 @@
894 "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n" 894 "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n"
895 895
896#define du_trivial_usage \ 896#define du_trivial_usage \
897 "[-aHLdclsx" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..." 897 "[-aHLdclsx" IF_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..."
898#define du_full_usage "\n\n" \ 898#define du_full_usage "\n\n" \
899 "Summarize disk space used for each FILE and/or directory.\n" \ 899 "Summarize disk space used for each FILE and/or directory.\n" \
900 "Disk space is printed in units of " \ 900 "Disk space is printed in units of " \
901 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \ 901 IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \
902 SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \ 902 IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \
903 " bytes.\n" \ 903 " bytes.\n" \
904 "\nOptions:" \ 904 "\nOptions:" \
905 "\n -a Show file sizes too" \ 905 "\n -a Show file sizes too" \
@@ -910,12 +910,12 @@
910 "\n -l Count sizes many times if hard linked" \ 910 "\n -l Count sizes many times if hard linked" \
911 "\n -s Display only a total for each argument" \ 911 "\n -s Display only a total for each argument" \
912 "\n -x Skip directories on different filesystems" \ 912 "\n -x Skip directories on different filesystems" \
913 USE_FEATURE_HUMAN_READABLE( \ 913 IF_FEATURE_HUMAN_READABLE( \
914 "\n -h Sizes in human readable format (e.g., 1K 243M 2G )" \ 914 "\n -h Sizes in human readable format (e.g., 1K 243M 2G )" \
915 "\n -m Sizes in megabytes" \ 915 "\n -m Sizes in megabytes" \
916 ) \ 916 ) \
917 "\n -k Sizes in kilobytes" \ 917 "\n -k Sizes in kilobytes" \
918 USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \ 918 IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(" (default)") \
919 919
920#define du_example_usage \ 920#define du_example_usage \
921 "$ du\n" \ 921 "$ du\n" \
@@ -942,12 +942,12 @@
942#define dumpleases_full_usage "\n\n" \ 942#define dumpleases_full_usage "\n\n" \
943 "Display DHCP leases granted by udhcpd\n" \ 943 "Display DHCP leases granted by udhcpd\n" \
944 "\nOptions:" \ 944 "\nOptions:" \
945 USE_GETOPT_LONG( \ 945 IF_GETOPT_LONG( \
946 "\n -f,--file=FILE Leases file to load" \ 946 "\n -f,--file=FILE Leases file to load" \
947 "\n -r,--remaining Interpret lease times as time remaining" \ 947 "\n -r,--remaining Interpret lease times as time remaining" \
948 "\n -a,--absolute Interpret lease times as expire time" \ 948 "\n -a,--absolute Interpret lease times as expire time" \
949 ) \ 949 ) \
950 SKIP_GETOPT_LONG( \ 950 IF_NOT_GETOPT_LONG( \
951 "\n -f FILE Leases file to load" \ 951 "\n -f FILE Leases file to load" \
952 "\n -r Interpret lease times as time remaining" \ 952 "\n -r Interpret lease times as time remaining" \
953 "\n -a Interpret lease times as expire time" \ 953 "\n -a Interpret lease times as expire time" \
@@ -974,10 +974,10 @@
974 "\n -L file Set badblocks list" \ 974 "\n -L file Set badblocks list" \
975 975
976#define echo_trivial_usage \ 976#define echo_trivial_usage \
977 USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG...]" 977 IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG...]"
978#define echo_full_usage "\n\n" \ 978#define echo_full_usage "\n\n" \
979 "Print the specified ARGs to stdout" \ 979 "Print the specified ARGs to stdout" \
980 USE_FEATURE_FANCY_ECHO( "\n" \ 980 IF_FEATURE_FANCY_ECHO( "\n" \
981 "\nOptions:" \ 981 "\nOptions:" \
982 "\n -n Suppress trailing newline" \ 982 "\n -n Suppress trailing newline" \
983 "\n -e Interpret backslash-escaped characters (i.e., \\t=tab)" \ 983 "\n -e Interpret backslash-escaped characters (i.e., \\t=tab)" \
@@ -986,7 +986,7 @@
986#define echo_example_usage \ 986#define echo_example_usage \
987 "$ echo \"Erik is cool\"\n" \ 987 "$ echo \"Erik is cool\"\n" \
988 "Erik is cool\n" \ 988 "Erik is cool\n" \
989 USE_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \ 989 IF_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \
990 "Erik\n" \ 990 "Erik\n" \
991 "is\n" \ 991 "is\n" \
992 "cool\n" \ 992 "cool\n" \
@@ -998,7 +998,7 @@
998#define eject_full_usage "\n\n" \ 998#define eject_full_usage "\n\n" \
999 "Eject specified DEVICE (or default /dev/cdrom)\n" \ 999 "Eject specified DEVICE (or default /dev/cdrom)\n" \
1000 "\nOptions:" \ 1000 "\nOptions:" \
1001 USE_FEATURE_EJECT_SCSI( \ 1001 IF_FEATURE_EJECT_SCSI( \
1002 "\n -s SCSI device" \ 1002 "\n -s SCSI device" \
1003 ) \ 1003 ) \
1004 "\n -t Close tray" \ 1004 "\n -t Close tray" \
@@ -1032,11 +1032,11 @@
1032#define expand_full_usage "\n\n" \ 1032#define expand_full_usage "\n\n" \
1033 "Convert tabs to spaces, writing to standard output.\n" \ 1033 "Convert tabs to spaces, writing to standard output.\n" \
1034 "\nOptions:" \ 1034 "\nOptions:" \
1035 USE_FEATURE_EXPAND_LONG_OPTIONS( \ 1035 IF_FEATURE_EXPAND_LONG_OPTIONS( \
1036 "\n -i,--initial Do not convert tabs after non blanks" \ 1036 "\n -i,--initial Do not convert tabs after non blanks" \
1037 "\n -t,--tabs=N Tabstops every N chars" \ 1037 "\n -t,--tabs=N Tabstops every N chars" \
1038 ) \ 1038 ) \
1039 SKIP_FEATURE_EXPAND_LONG_OPTIONS( \ 1039 IF_NOT_FEATURE_EXPAND_LONG_OPTIONS( \
1040 "\n -i Do not convert tabs after non blanks" \ 1040 "\n -i Do not convert tabs after non blanks" \
1041 "\n -t Tabstops every N chars" \ 1041 "\n -t Tabstops every N chars" \
1042 ) 1042 )
@@ -1127,18 +1127,18 @@
1127/* Looks like someone forgot to add this to config system */ 1127/* Looks like someone forgot to add this to config system */
1128#ifndef ENABLE_FEATURE_FDISK_BLKSIZE 1128#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
1129# define ENABLE_FEATURE_FDISK_BLKSIZE 0 1129# define ENABLE_FEATURE_FDISK_BLKSIZE 0
1130# define USE_FEATURE_FDISK_BLKSIZE(a) 1130# define IF_FEATURE_FDISK_BLKSIZE(a)
1131#endif 1131#endif
1132 1132
1133#define fdisk_trivial_usage \ 1133#define fdisk_trivial_usage \
1134 "[-ul" USE_FEATURE_FDISK_BLKSIZE("s") "] " \ 1134 "[-ul" IF_FEATURE_FDISK_BLKSIZE("s") "] " \
1135 "[-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK" 1135 "[-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK"
1136#define fdisk_full_usage "\n\n" \ 1136#define fdisk_full_usage "\n\n" \
1137 "Change partition table\n" \ 1137 "Change partition table\n" \
1138 "\nOptions:" \ 1138 "\nOptions:" \
1139 "\n -u Start and End are in sectors (instead of cylinders)" \ 1139 "\n -u Start and End are in sectors (instead of cylinders)" \
1140 "\n -l Show partition table for each DISK, then exit" \ 1140 "\n -l Show partition table for each DISK, then exit" \
1141 USE_FEATURE_FDISK_BLKSIZE( \ 1141 IF_FEATURE_FDISK_BLKSIZE( \
1142 "\n -s Show partition sizes in kb for each DISK, then exit" \ 1142 "\n -s Show partition sizes in kb for each DISK, then exit" \
1143 ) \ 1143 ) \
1144 "\n -b 2048 (for certain MO disks) use 2048-byte sectors" \ 1144 "\n -b 2048 (for certain MO disks) use 2048-byte sectors" \
@@ -1165,56 +1165,56 @@
1165 "default EXPRESSION is '-print'\n" \ 1165 "default EXPRESSION is '-print'\n" \
1166 "\nEXPRESSION may consist of:" \ 1166 "\nEXPRESSION may consist of:" \
1167 "\n -follow Dereference symlinks" \ 1167 "\n -follow Dereference symlinks" \
1168 USE_FEATURE_FIND_XDEV( \ 1168 IF_FEATURE_FIND_XDEV( \
1169 "\n -xdev Don't descend directories on other filesystems") \ 1169 "\n -xdev Don't descend directories on other filesystems") \
1170 USE_FEATURE_FIND_MAXDEPTH( \ 1170 IF_FEATURE_FIND_MAXDEPTH( \
1171 "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \ 1171 "\n -maxdepth N Descend at most N levels. -maxdepth 0 applies" \
1172 "\n tests/actions to command line arguments only") \ 1172 "\n tests/actions to command line arguments only") \
1173 "\n -mindepth N Do not act on first N levels" \ 1173 "\n -mindepth N Do not act on first N levels" \
1174 "\n -name PATTERN File name (w/o directory name) matches PATTERN" \ 1174 "\n -name PATTERN File name (w/o directory name) matches PATTERN" \
1175 "\n -iname PATTERN Case insensitive -name" \ 1175 "\n -iname PATTERN Case insensitive -name" \
1176 USE_FEATURE_FIND_PATH( \ 1176 IF_FEATURE_FIND_PATH( \
1177 "\n -path PATTERN Path matches PATTERN") \ 1177 "\n -path PATTERN Path matches PATTERN") \
1178 USE_FEATURE_FIND_REGEX( \ 1178 IF_FEATURE_FIND_REGEX( \
1179 "\n -regex PATTERN Path matches regex PATTERN") \ 1179 "\n -regex PATTERN Path matches regex PATTERN") \
1180 USE_FEATURE_FIND_TYPE( \ 1180 IF_FEATURE_FIND_TYPE( \
1181 "\n -type X File type is X (X is one of: f,d,l,b,c,...)") \ 1181 "\n -type X File type is X (X is one of: f,d,l,b,c,...)") \
1182 USE_FEATURE_FIND_PERM( \ 1182 IF_FEATURE_FIND_PERM( \
1183 "\n -perm NNN Permissions match any of (+NNN), all of (-NNN)," \ 1183 "\n -perm NNN Permissions match any of (+NNN), all of (-NNN)," \
1184 "\n or exactly (NNN)") \ 1184 "\n or exactly (NNN)") \
1185 USE_FEATURE_FIND_MTIME( \ 1185 IF_FEATURE_FIND_MTIME( \
1186 "\n -mtime DAYS Modified time is greater than (+N), less than (-N)," \ 1186 "\n -mtime DAYS Modified time is greater than (+N), less than (-N)," \
1187 "\n or exactly (N) days") \ 1187 "\n or exactly (N) days") \
1188 USE_FEATURE_FIND_MMIN( \ 1188 IF_FEATURE_FIND_MMIN( \
1189 "\n -mmin MINS Modified time is greater than (+N), less than (-N)," \ 1189 "\n -mmin MINS Modified time is greater than (+N), less than (-N)," \
1190 "\n or exactly (N) minutes") \ 1190 "\n or exactly (N) minutes") \
1191 USE_FEATURE_FIND_NEWER( \ 1191 IF_FEATURE_FIND_NEWER( \
1192 "\n -newer FILE Modified time is more recent than FILE's") \ 1192 "\n -newer FILE Modified time is more recent than FILE's") \
1193 USE_FEATURE_FIND_INUM( \ 1193 IF_FEATURE_FIND_INUM( \
1194 "\n -inum N File has inode number N") \ 1194 "\n -inum N File has inode number N") \
1195 USE_FEATURE_FIND_USER( \ 1195 IF_FEATURE_FIND_USER( \
1196 "\n -user NAME File is owned by user NAME (numeric user ID allowed)") \ 1196 "\n -user NAME File is owned by user NAME (numeric user ID allowed)") \
1197 USE_FEATURE_FIND_GROUP( \ 1197 IF_FEATURE_FIND_GROUP( \
1198 "\n -group NAME File belongs to group NAME (numeric group ID allowed)") \ 1198 "\n -group NAME File belongs to group NAME (numeric group ID allowed)") \
1199 USE_FEATURE_FIND_DEPTH( \ 1199 IF_FEATURE_FIND_DEPTH( \
1200 "\n -depth Process directory name after traversing it") \ 1200 "\n -depth Process directory name after traversing it") \
1201 USE_FEATURE_FIND_SIZE( \ 1201 IF_FEATURE_FIND_SIZE( \
1202 "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))." \ 1202 "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))." \
1203 "\n +/-N: file size is bigger/smaller than N") \ 1203 "\n +/-N: file size is bigger/smaller than N") \
1204 "\n -print Print (default and assumed)" \ 1204 "\n -print Print (default and assumed)" \
1205 USE_FEATURE_FIND_PRINT0( \ 1205 IF_FEATURE_FIND_PRINT0( \
1206 "\n -print0 Delimit output with null characters rather than" \ 1206 "\n -print0 Delimit output with null characters rather than" \
1207 "\n newlines") \ 1207 "\n newlines") \
1208 USE_FEATURE_FIND_CONTEXT ( \ 1208 IF_FEATURE_FIND_CONTEXT ( \
1209 "\n -context File has specified security context") \ 1209 "\n -context File has specified security context") \
1210 USE_FEATURE_FIND_EXEC( \ 1210 IF_FEATURE_FIND_EXEC( \
1211 "\n -exec CMD ARG ; Execute CMD with all instances of {} replaced by the" \ 1211 "\n -exec CMD ARG ; Execute CMD with all instances of {} replaced by the" \
1212 "\n matching files") \ 1212 "\n matching files") \
1213 USE_FEATURE_FIND_PRUNE( \ 1213 IF_FEATURE_FIND_PRUNE( \
1214 "\n -prune Stop traversing current subtree") \ 1214 "\n -prune Stop traversing current subtree") \
1215 USE_FEATURE_FIND_DELETE( \ 1215 IF_FEATURE_FIND_DELETE( \
1216 "\n -delete Delete files, turns on -depth option") \ 1216 "\n -delete Delete files, turns on -depth option") \
1217 USE_FEATURE_FIND_PAREN( \ 1217 IF_FEATURE_FIND_PAREN( \
1218 "\n (EXPR) Group an expression") \ 1218 "\n (EXPR) Group an expression") \
1219 1219
1220#define find_example_usage \ 1220#define find_example_usage \
@@ -1306,14 +1306,14 @@
1306#define ftpget_full_usage "\n\n" \ 1306#define ftpget_full_usage "\n\n" \
1307 "Retrieve a remote file via FTP\n" \ 1307 "Retrieve a remote file via FTP\n" \
1308 "\nOptions:" \ 1308 "\nOptions:" \
1309 USE_FEATURE_FTPGETPUT_LONG_OPTIONS( \ 1309 IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \
1310 "\n -c,--continue Continue previous transfer" \ 1310 "\n -c,--continue Continue previous transfer" \
1311 "\n -v,--verbose Verbose" \ 1311 "\n -v,--verbose Verbose" \
1312 "\n -u,--username Username" \ 1312 "\n -u,--username Username" \
1313 "\n -p,--password Password" \ 1313 "\n -p,--password Password" \
1314 "\n -P,--port Port number" \ 1314 "\n -P,--port Port number" \
1315 ) \ 1315 ) \
1316 SKIP_FEATURE_FTPGETPUT_LONG_OPTIONS( \ 1316 IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \
1317 "\n -c Continue previous transfer" \ 1317 "\n -c Continue previous transfer" \
1318 "\n -v Verbose" \ 1318 "\n -v Verbose" \
1319 "\n -u Username" \ 1319 "\n -u Username" \
@@ -1326,13 +1326,13 @@
1326#define ftpput_full_usage "\n\n" \ 1326#define ftpput_full_usage "\n\n" \
1327 "Store a local file on a remote machine via FTP\n" \ 1327 "Store a local file on a remote machine via FTP\n" \
1328 "\nOptions:" \ 1328 "\nOptions:" \
1329 USE_FEATURE_FTPGETPUT_LONG_OPTIONS( \ 1329 IF_FEATURE_FTPGETPUT_LONG_OPTIONS( \
1330 "\n -v,--verbose Verbose" \ 1330 "\n -v,--verbose Verbose" \
1331 "\n -u,--username Username" \ 1331 "\n -u,--username Username" \
1332 "\n -p,--password Password" \ 1332 "\n -p,--password Password" \
1333 "\n -P,--port Port number" \ 1333 "\n -P,--port Port number" \
1334 ) \ 1334 ) \
1335 SKIP_FEATURE_FTPGETPUT_LONG_OPTIONS( \ 1335 IF_NOT_FEATURE_FTPGETPUT_LONG_OPTIONS( \
1336 "\n -v Verbose" \ 1336 "\n -v Verbose" \
1337 "\n -u Username" \ 1337 "\n -u Username" \
1338 "\n -p Password" \ 1338 "\n -p Password" \
@@ -1358,7 +1358,7 @@
1358 "[OPTIONS]..." 1358 "[OPTIONS]..."
1359#define getopt_full_usage "\n\n" \ 1359#define getopt_full_usage "\n\n" \
1360 "Parse command options\n" \ 1360 "Parse command options\n" \
1361 USE_GETOPT_LONG( \ 1361 IF_GETOPT_LONG( \
1362 "\n -a,--alternative Allow long options starting with single -" \ 1362 "\n -a,--alternative Allow long options starting with single -" \
1363 "\n -l,--longoptions=longopts Long options to be recognized" \ 1363 "\n -l,--longoptions=longopts Long options to be recognized" \
1364 "\n -n,--name=progname The name under which errors are reported" \ 1364 "\n -n,--name=progname The name under which errors are reported" \
@@ -1369,7 +1369,7 @@
1369 "\n -T,--test Test for getopt(1) version" \ 1369 "\n -T,--test Test for getopt(1) version" \
1370 "\n -u,--unquoted Don't quote the output" \ 1370 "\n -u,--unquoted Don't quote the output" \
1371 ) \ 1371 ) \
1372 SKIP_GETOPT_LONG( \ 1372 IF_NOT_GETOPT_LONG( \
1373 "\n -a Allow long options starting with single -" \ 1373 "\n -a Allow long options starting with single -" \
1374 "\n -l longopts Long options to be recognized" \ 1374 "\n -l longopts Long options to be recognized" \
1375 "\n -n progname The name under which errors are reported" \ 1375 "\n -n progname The name under which errors are reported" \
@@ -1425,11 +1425,11 @@
1425 1425
1426#define grep_trivial_usage \ 1426#define grep_trivial_usage \
1427 "[-HhrilLnqvso" \ 1427 "[-HhrilLnqvso" \
1428 USE_DESKTOP("w") \ 1428 IF_DESKTOP("w") \
1429 "eF" \ 1429 "eF" \
1430 USE_FEATURE_GREP_EGREP_ALIAS("E") \ 1430 IF_FEATURE_GREP_EGREP_ALIAS("E") \
1431 USE_FEATURE_GREP_CONTEXT("ABC") \ 1431 IF_FEATURE_GREP_CONTEXT("ABC") \
1432 USE_EXTRA_COMPAT("z") \ 1432 IF_EXTRA_COMPAT("z") \
1433 "] PATTERN [FILEs...]" 1433 "] PATTERN [FILEs...]"
1434#define grep_full_usage "\n\n" \ 1434#define grep_full_usage "\n\n" \
1435 "Search for PATTERN in each FILE or standard input\n" \ 1435 "Search for PATTERN in each FILE or standard input\n" \
@@ -1447,18 +1447,18 @@
1447 "\n -c Only print count of matching lines" \ 1447 "\n -c Only print count of matching lines" \
1448 "\n -o Show only the part of a line that matches PATTERN" \ 1448 "\n -o Show only the part of a line that matches PATTERN" \
1449 "\n -m MAX Match up to MAX times per file" \ 1449 "\n -m MAX Match up to MAX times per file" \
1450 USE_DESKTOP( \ 1450 IF_DESKTOP( \
1451 "\n -w Match whole words only") \ 1451 "\n -w Match whole words only") \
1452 "\n -F PATTERN is a set of newline-separated strings" \ 1452 "\n -F PATTERN is a set of newline-separated strings" \
1453 USE_FEATURE_GREP_EGREP_ALIAS( \ 1453 IF_FEATURE_GREP_EGREP_ALIAS( \
1454 "\n -E PATTERN is an extended regular expression") \ 1454 "\n -E PATTERN is an extended regular expression") \
1455 "\n -e PTRN Pattern to match" \ 1455 "\n -e PTRN Pattern to match" \
1456 "\n -f FILE Read pattern from file" \ 1456 "\n -f FILE Read pattern from file" \
1457 USE_FEATURE_GREP_CONTEXT( \ 1457 IF_FEATURE_GREP_CONTEXT( \
1458 "\n -A Print NUM lines of trailing context" \ 1458 "\n -A Print NUM lines of trailing context" \
1459 "\n -B Print NUM lines of leading context" \ 1459 "\n -B Print NUM lines of leading context" \
1460 "\n -C Print NUM lines of output context") \ 1460 "\n -C Print NUM lines of output context") \
1461 USE_EXTRA_COMPAT( \ 1461 IF_EXTRA_COMPAT( \
1462 "\n -z Input is NUL terminated") \ 1462 "\n -z Input is NUL terminated") \
1463 1463
1464#define grep_example_usage \ 1464#define grep_example_usage \
@@ -1506,14 +1506,14 @@
1506 "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" 1506 "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
1507 1507
1508#define halt_trivial_usage \ 1508#define halt_trivial_usage \
1509 "[-d delay] [-n] [-f]" USE_FEATURE_WTMP(" [-w]") 1509 "[-d delay] [-n] [-f]" IF_FEATURE_WTMP(" [-w]")
1510#define halt_full_usage "\n\n" \ 1510#define halt_full_usage "\n\n" \
1511 "Halt the system\n" \ 1511 "Halt the system\n" \
1512 "\nOptions:" \ 1512 "\nOptions:" \
1513 "\n -d Delay interval for halting" \ 1513 "\n -d Delay interval for halting" \
1514 "\n -n No call to sync()" \ 1514 "\n -n No call to sync()" \
1515 "\n -f Force halt (don't go through init)" \ 1515 "\n -f Force halt (don't go through init)" \
1516 USE_FEATURE_WTMP( \ 1516 IF_FEATURE_WTMP( \
1517 "\n -w Only write a wtmp record" \ 1517 "\n -w Only write a wtmp record" \
1518 ) 1518 )
1519 1519
@@ -1527,15 +1527,15 @@
1527 "\n -B Set Advanced Power Management setting (1-255)" \ 1527 "\n -B Set Advanced Power Management setting (1-255)" \
1528 "\n -c Get/set IDE 32-bit IO setting" \ 1528 "\n -c Get/set IDE 32-bit IO setting" \
1529 "\n -C Check IDE power mode status" \ 1529 "\n -C Check IDE power mode status" \
1530 USE_FEATURE_HDPARM_HDIO_GETSET_DMA( \ 1530 IF_FEATURE_HDPARM_HDIO_GETSET_DMA( \
1531 "\n -d Get/set using_dma flag") \ 1531 "\n -d Get/set using_dma flag") \
1532 "\n -D Enable/disable drive defect-mgmt" \ 1532 "\n -D Enable/disable drive defect-mgmt" \
1533 "\n -f Flush buffer cache for device on exit" \ 1533 "\n -f Flush buffer cache for device on exit" \
1534 "\n -g Display drive geometry" \ 1534 "\n -g Display drive geometry" \
1535 "\n -h Display terse usage information" \ 1535 "\n -h Display terse usage information" \
1536 USE_FEATURE_HDPARM_GET_IDENTITY( \ 1536 IF_FEATURE_HDPARM_GET_IDENTITY( \
1537 "\n -i Display drive identification") \ 1537 "\n -i Display drive identification") \
1538 USE_FEATURE_HDPARM_GET_IDENTITY( \ 1538 IF_FEATURE_HDPARM_GET_IDENTITY( \
1539 "\n -I Detailed/current information directly from drive") \ 1539 "\n -I Detailed/current information directly from drive") \
1540 "\n -k Get/set keep_settings_over_reset flag (0/1)" \ 1540 "\n -k Get/set keep_settings_over_reset flag (0/1)" \
1541 "\n -K Set drive keep_features_over_reset flag (0/1)" \ 1541 "\n -K Set drive keep_features_over_reset flag (0/1)" \
@@ -1547,20 +1547,20 @@
1547/* "\n -q Change next setting quietly" - not supported ib bbox */ \ 1547/* "\n -q Change next setting quietly" - not supported ib bbox */ \
1548 "\n -Q Get/set DMA tagged-queuing depth (if supported)" \ 1548 "\n -Q Get/set DMA tagged-queuing depth (if supported)" \
1549 "\n -r Get/set readonly flag (DANGEROUS to set)" \ 1549 "\n -r Get/set readonly flag (DANGEROUS to set)" \
1550 USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( \ 1550 IF_FEATURE_HDPARM_HDIO_SCAN_HWIF( \
1551 "\n -R Register an IDE interface (DANGEROUS)") \ 1551 "\n -R Register an IDE interface (DANGEROUS)") \
1552 "\n -S Set standby (spindown) timeout" \ 1552 "\n -S Set standby (spindown) timeout" \
1553 "\n -t Perform device read timings" \ 1553 "\n -t Perform device read timings" \
1554 "\n -T Perform cache read timings" \ 1554 "\n -T Perform cache read timings" \
1555 "\n -u Get/set unmaskirq flag (0/1)" \ 1555 "\n -u Get/set unmaskirq flag (0/1)" \
1556 USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \ 1556 IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \
1557 "\n -U Un-register an IDE interface (DANGEROUS)") \ 1557 "\n -U Un-register an IDE interface (DANGEROUS)") \
1558 "\n -v Defaults; same as -mcudkrag for IDE drives" \ 1558 "\n -v Defaults; same as -mcudkrag for IDE drives" \
1559 "\n -V Display program version and exit immediately" \ 1559 "\n -V Display program version and exit immediately" \
1560 USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( \ 1560 IF_FEATURE_HDPARM_HDIO_DRIVE_RESET( \
1561 "\n -w Perform device reset (DANGEROUS)") \ 1561 "\n -w Perform device reset (DANGEROUS)") \
1562 "\n -W Set drive write-caching flag (0/1) (DANGEROUS)" \ 1562 "\n -W Set drive write-caching flag (0/1) (DANGEROUS)" \
1563 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \ 1563 IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \
1564 "\n -x Tristate device for hotswap (0/1) (DANGEROUS)") \ 1564 "\n -x Tristate device for hotswap (0/1) (DANGEROUS)") \
1565 "\n -X Set IDE xfer mode (DANGEROUS)" \ 1565 "\n -X Set IDE xfer mode (DANGEROUS)" \
1566 "\n -y Put IDE drive in standby mode" \ 1566 "\n -y Put IDE drive in standby mode" \
@@ -1576,7 +1576,7 @@
1576 "file name. With no FILE, or when FILE is -, read standard input.\n" \ 1576 "file name. With no FILE, or when FILE is -, read standard input.\n" \
1577 "\nOptions:" \ 1577 "\nOptions:" \
1578 "\n -n NUM Print first NUM lines instead of first 10" \ 1578 "\n -n NUM Print first NUM lines instead of first 10" \
1579 USE_FEATURE_FANCY_HEAD( \ 1579 IF_FEATURE_FANCY_HEAD( \
1580 "\n -c NUM Output the first NUM bytes" \ 1580 "\n -c NUM Output the first NUM bytes" \
1581 "\n -q Never output headers giving file names" \ 1581 "\n -q Never output headers giving file names" \
1582 "\n -v Always output headers giving file names") \ 1582 "\n -v Always output headers giving file names") \
@@ -1587,7 +1587,7 @@
1587 "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n" 1587 "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n"
1588 1588
1589#define hexdump_trivial_usage \ 1589#define hexdump_trivial_usage \
1590 "[-bcCdefnosvx" USE_FEATURE_HEXDUMP_REVERSE("R") "] FILE..." 1590 "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] FILE..."
1591#define hexdump_full_usage "\n\n" \ 1591#define hexdump_full_usage "\n\n" \
1592 "Display file(s) or standard input in a user specified format\n" \ 1592 "Display file(s) or standard input in a user specified format\n" \
1593 "\nOptions:" \ 1593 "\nOptions:" \
@@ -1602,7 +1602,7 @@
1602 "\n -s OFFSET Skip OFFSET bytes" \ 1602 "\n -s OFFSET Skip OFFSET bytes" \
1603 "\n -v Display all input data" \ 1603 "\n -v Display all input data" \
1604 "\n -x Two-byte hexadecimal display" \ 1604 "\n -x Two-byte hexadecimal display" \
1605 USE_FEATURE_HEXDUMP_REVERSE( \ 1605 IF_FEATURE_HEXDUMP_REVERSE( \
1606 "\n -R Reverse of 'hexdump -Cv'") \ 1606 "\n -R Reverse of 'hexdump -Cv'") \
1607 1607
1608#define hd_trivial_usage \ 1608#define hd_trivial_usage \
@@ -1634,9 +1634,9 @@
1634 "[-c conffile]" \ 1634 "[-c conffile]" \
1635 " [-p [ip:]port]" \ 1635 " [-p [ip:]port]" \
1636 " [-i] [-f] [-v[v]]" \ 1636 " [-i] [-f] [-v[v]]" \
1637 USE_FEATURE_HTTPD_SETUID(" [-u user[:grp]]") \ 1637 IF_FEATURE_HTTPD_SETUID(" [-u user[:grp]]") \
1638 USE_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \ 1638 IF_FEATURE_HTTPD_BASIC_AUTH(" [-r realm]") \
1639 USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \ 1639 IF_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \
1640 " [-h home]" \ 1640 " [-h home]" \
1641 " [-d/-e string]" 1641 " [-d/-e string]"
1642#define httpd_full_usage "\n\n" \ 1642#define httpd_full_usage "\n\n" \
@@ -1647,23 +1647,23 @@
1647 "\n -i Inetd mode" \ 1647 "\n -i Inetd mode" \
1648 "\n -f Do not daemonize" \ 1648 "\n -f Do not daemonize" \
1649 "\n -v[v] Verbose" \ 1649 "\n -v[v] Verbose" \
1650 USE_FEATURE_HTTPD_SETUID( \ 1650 IF_FEATURE_HTTPD_SETUID( \
1651 "\n -u USER[:GRP] Set uid/gid after binding to port") \ 1651 "\n -u USER[:GRP] Set uid/gid after binding to port") \
1652 USE_FEATURE_HTTPD_BASIC_AUTH( \ 1652 IF_FEATURE_HTTPD_BASIC_AUTH( \
1653 "\n -r REALM Authentication Realm for Basic Authentication") \ 1653 "\n -r REALM Authentication Realm for Basic Authentication") \
1654 USE_FEATURE_HTTPD_AUTH_MD5( \ 1654 IF_FEATURE_HTTPD_AUTH_MD5( \
1655 "\n -m PASS Crypt PASS with md5 algorithm") \ 1655 "\n -m PASS Crypt PASS with md5 algorithm") \
1656 "\n -h HOME Home directory (default .)" \ 1656 "\n -h HOME Home directory (default .)" \
1657 "\n -e STRING HTML encode STRING" \ 1657 "\n -e STRING HTML encode STRING" \
1658 "\n -d STRING URL decode STRING" \ 1658 "\n -d STRING URL decode STRING" \
1659 1659
1660#define hwclock_trivial_usage \ 1660#define hwclock_trivial_usage \
1661 USE_FEATURE_HWCLOCK_LONG_OPTIONS( \ 1661 IF_FEATURE_HWCLOCK_LONG_OPTIONS( \
1662 "[-r|--show] [-s|--hctosys] [-w|--systohc]" \ 1662 "[-r|--show] [-s|--hctosys] [-w|--systohc]" \
1663 " [-l|--localtime] [-u|--utc]" \ 1663 " [-l|--localtime] [-u|--utc]" \
1664 " [-f FILE]" \ 1664 " [-f FILE]" \
1665 ) \ 1665 ) \
1666 SKIP_FEATURE_HWCLOCK_LONG_OPTIONS( \ 1666 IF_NOT_FEATURE_HWCLOCK_LONG_OPTIONS( \
1667 "[-r] [-s] [-w] [-l] [-u] [-f FILE]" \ 1667 "[-r] [-s] [-w] [-l] [-u] [-f FILE]" \
1668 ) 1668 )
1669#define hwclock_full_usage "\n\n" \ 1669#define hwclock_full_usage "\n\n" \
@@ -1681,7 +1681,7 @@
1681#define id_full_usage "\n\n" \ 1681#define id_full_usage "\n\n" \
1682 "Print information about USER or the current user\n" \ 1682 "Print information about USER or the current user\n" \
1683 "\nOptions:" \ 1683 "\nOptions:" \
1684 USE_SELINUX( \ 1684 IF_SELINUX( \
1685 "\n -Z Print the security context" \ 1685 "\n -Z Print the security context" \
1686 ) \ 1686 ) \
1687 "\n -u Print user ID" \ 1687 "\n -u Print user ID" \
@@ -1695,23 +1695,23 @@
1695 "uid=1000(andersen) gid=1000(andersen)\n" 1695 "uid=1000(andersen) gid=1000(andersen)\n"
1696 1696
1697#define ifconfig_trivial_usage \ 1697#define ifconfig_trivial_usage \
1698 USE_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]" 1698 IF_FEATURE_IFCONFIG_STATUS("[-a]") " interface [address]"
1699#define ifconfig_full_usage "\n\n" \ 1699#define ifconfig_full_usage "\n\n" \
1700 "Configure a network interface\n" \ 1700 "Configure a network interface\n" \
1701 "\nOptions:" \ 1701 "\nOptions:" \
1702 "\n" \ 1702 "\n" \
1703 USE_FEATURE_IPV6( \ 1703 IF_FEATURE_IPV6( \
1704 " [add ADDRESS[/PREFIXLEN]]\n") \ 1704 " [add ADDRESS[/PREFIXLEN]]\n") \
1705 USE_FEATURE_IPV6( \ 1705 IF_FEATURE_IPV6( \
1706 " [del ADDRESS[/PREFIXLEN]]\n") \ 1706 " [del ADDRESS[/PREFIXLEN]]\n") \
1707 " [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \ 1707 " [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]\n" \
1708 " [netmask ADDRESS] [dstaddr ADDRESS]\n" \ 1708 " [netmask ADDRESS] [dstaddr ADDRESS]\n" \
1709 USE_FEATURE_IFCONFIG_SLIP( \ 1709 IF_FEATURE_IFCONFIG_SLIP( \
1710 " [outfill NN] [keepalive NN]\n") \ 1710 " [outfill NN] [keepalive NN]\n") \
1711 " " USE_FEATURE_IFCONFIG_HW("[hw ether" USE_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n" \ 1711 " " IF_FEATURE_IFCONFIG_HW("[hw ether" IF_FEATURE_HWIB("|infiniband")" ADDRESS] ") "[metric NN] [mtu NN]\n" \
1712 " [[-]trailers] [[-]arp] [[-]allmulti]\n" \ 1712 " [[-]trailers] [[-]arp] [[-]allmulti]\n" \
1713 " [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \ 1713 " [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]\n" \
1714 USE_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \ 1714 IF_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \
1715 " [mem_start NN] [io_addr NN] [irq NN]\n") \ 1715 " [mem_start NN] [io_addr NN] [irq NN]\n") \
1716 " [up|down] ..." 1716 " [up|down] ..."
1717 1717
@@ -1743,13 +1743,13 @@
1743 " # ifenslave -c bond0 eth0\n" \ 1743 " # ifenslave -c bond0 eth0\n" \
1744 1744
1745#define ifup_trivial_usage \ 1745#define ifup_trivial_usage \
1746 "[-ain"USE_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..." 1746 "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
1747#define ifup_full_usage "\n\n" \ 1747#define ifup_full_usage "\n\n" \
1748 "Options:" \ 1748 "Options:" \
1749 "\n -a De/configure all interfaces automatically" \ 1749 "\n -a De/configure all interfaces automatically" \
1750 "\n -i FILE Use FILE for interface definitions" \ 1750 "\n -i FILE Use FILE for interface definitions" \
1751 "\n -n Print out what would happen, but don't do it" \ 1751 "\n -n Print out what would happen, but don't do it" \
1752 USE_FEATURE_IFUPDOWN_MAPPING( \ 1752 IF_FEATURE_IFUPDOWN_MAPPING( \
1753 "\n (note: doesn't disable mappings)" \ 1753 "\n (note: doesn't disable mappings)" \
1754 "\n -m Don't run any mappings" \ 1754 "\n -m Don't run any mappings" \
1755 ) \ 1755 ) \
@@ -1757,13 +1757,13 @@
1757 "\n -f Force de/configuration" \ 1757 "\n -f Force de/configuration" \
1758 1758
1759#define ifdown_trivial_usage \ 1759#define ifdown_trivial_usage \
1760 "[-ain"USE_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..." 1760 "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..."
1761#define ifdown_full_usage "\n\n" \ 1761#define ifdown_full_usage "\n\n" \
1762 "Options:" \ 1762 "Options:" \
1763 "\n -a De/configure all interfaces automatically" \ 1763 "\n -a De/configure all interfaces automatically" \
1764 "\n -i FILE Use FILE for interface definitions" \ 1764 "\n -i FILE Use FILE for interface definitions" \
1765 "\n -n Print out what would happen, but don't do it" \ 1765 "\n -n Print out what would happen, but don't do it" \
1766 USE_FEATURE_IFUPDOWN_MAPPING( \ 1766 IF_FEATURE_IFUPDOWN_MAPPING( \
1767 "\n (note: doesn't disable mappings)" \ 1767 "\n (note: doesn't disable mappings)" \
1768 "\n -m Don't run any mappings" \ 1768 "\n -m Don't run any mappings" \
1769 ) \ 1769 ) \
@@ -1943,19 +1943,19 @@
1943/* 2.6 style insmod has no options and required filename 1943/* 2.6 style insmod has no options and required filename
1944 * (not module name - .ko can't be omitted) */ 1944 * (not module name - .ko can't be omitted) */
1945#define insmod_trivial_usage \ 1945#define insmod_trivial_usage \
1946 USE_FEATURE_2_4_MODULES("[OPTION]... MODULE ") \ 1946 IF_FEATURE_2_4_MODULES("[OPTION]... MODULE ") \
1947 SKIP_FEATURE_2_4_MODULES("FILE ") \ 1947 IF_NOT_FEATURE_2_4_MODULES("FILE ") \
1948 "[symbol=value]..." 1948 "[symbol=value]..."
1949#define insmod_full_usage "\n\n" \ 1949#define insmod_full_usage "\n\n" \
1950 "Load the specified kernel modules into the kernel" \ 1950 "Load the specified kernel modules into the kernel" \
1951 USE_FEATURE_2_4_MODULES( "\n" \ 1951 IF_FEATURE_2_4_MODULES( "\n" \
1952 "\nOptions:" \ 1952 "\nOptions:" \
1953 "\n -f Force module to load into the wrong kernel version" \ 1953 "\n -f Force module to load into the wrong kernel version" \
1954 "\n -k Make module autoclean-able" \ 1954 "\n -k Make module autoclean-able" \
1955 "\n -v Verbose" \ 1955 "\n -v Verbose" \
1956 "\n -q Quiet" \ 1956 "\n -q Quiet" \
1957 "\n -L Lock to prevent simultaneous loads of a module" \ 1957 "\n -L Lock to prevent simultaneous loads of a module" \
1958 USE_FEATURE_INSMOD_LOAD_MAP( \ 1958 IF_FEATURE_INSMOD_LOAD_MAP( \
1959 "\n -m Output load map to stdout" \ 1959 "\n -m Output load map to stdout" \
1960 ) \ 1960 ) \
1961 "\n -o NAME Set internal module name to NAME" \ 1961 "\n -o NAME Set internal module name to NAME" \
@@ -1976,7 +1976,7 @@
1976 "\n -o USER Set ownership" \ 1976 "\n -o USER Set ownership" \
1977 "\n -g GRP Set group ownership" \ 1977 "\n -g GRP Set group ownership" \
1978 "\n -m MODE Set permissions" \ 1978 "\n -m MODE Set permissions" \
1979 USE_SELINUX( \ 1979 IF_SELINUX( \
1980 "\n -Z Set security context" \ 1980 "\n -Z Set security context" \
1981 ) 1981 )
1982 1982
@@ -1991,20 +1991,20 @@
1991/* would need to make the " | " optional depending on more than one selected: */ 1991/* would need to make the " | " optional depending on more than one selected: */
1992#define ip_trivial_usage \ 1992#define ip_trivial_usage \
1993 "[OPTIONS] {" \ 1993 "[OPTIONS] {" \
1994 USE_FEATURE_IP_ADDRESS("address | ") \ 1994 IF_FEATURE_IP_ADDRESS("address | ") \
1995 USE_FEATURE_IP_ROUTE("route | ") \ 1995 IF_FEATURE_IP_ROUTE("route | ") \
1996 USE_FEATURE_IP_LINK("link | ") \ 1996 IF_FEATURE_IP_LINK("link | ") \
1997 USE_FEATURE_IP_TUNNEL("tunnel | ") \ 1997 IF_FEATURE_IP_TUNNEL("tunnel | ") \
1998 USE_FEATURE_IP_RULE("rule") \ 1998 IF_FEATURE_IP_RULE("rule") \
1999 "} {COMMAND}" 1999 "} {COMMAND}"
2000#define ip_full_usage "\n\n" \ 2000#define ip_full_usage "\n\n" \
2001 "ip [OPTIONS] OBJECT {COMMAND}\n" \ 2001 "ip [OPTIONS] OBJECT {COMMAND}\n" \
2002 "where OBJECT := {" \ 2002 "where OBJECT := {" \
2003 USE_FEATURE_IP_ADDRESS("address | ") \ 2003 IF_FEATURE_IP_ADDRESS("address | ") \
2004 USE_FEATURE_IP_ROUTE("route | ") \ 2004 IF_FEATURE_IP_ROUTE("route | ") \
2005 USE_FEATURE_IP_LINK("link | ") \ 2005 IF_FEATURE_IP_LINK("link | ") \
2006 USE_FEATURE_IP_TUNNEL("tunnel | ") \ 2006 IF_FEATURE_IP_TUNNEL("tunnel | ") \
2007 USE_FEATURE_IP_RULE("rule") \ 2007 IF_FEATURE_IP_RULE("rule") \
2008 "}\n" \ 2008 "}\n" \
2009 "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" \ 2009 "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" \
2010 2010
@@ -2025,21 +2025,21 @@
2025#define ipcalc_full_usage "\n\n" \ 2025#define ipcalc_full_usage "\n\n" \
2026 "Calculate IP network settings from a IP address\n" \ 2026 "Calculate IP network settings from a IP address\n" \
2027 "\nOptions:" \ 2027 "\nOptions:" \
2028 USE_FEATURE_IPCALC_LONG_OPTIONS( \ 2028 IF_FEATURE_IPCALC_LONG_OPTIONS( \
2029 "\n -b,--broadcast Display calculated broadcast address" \ 2029 "\n -b,--broadcast Display calculated broadcast address" \
2030 "\n -n,--network Display calculated network address" \ 2030 "\n -n,--network Display calculated network address" \
2031 "\n -m,--netmask Display default netmask for IP" \ 2031 "\n -m,--netmask Display default netmask for IP" \
2032 USE_FEATURE_IPCALC_FANCY( \ 2032 IF_FEATURE_IPCALC_FANCY( \
2033 "\n -p,--prefix Display the prefix for IP/NETMASK" \ 2033 "\n -p,--prefix Display the prefix for IP/NETMASK" \
2034 "\n -h,--hostname Display first resolved host name" \ 2034 "\n -h,--hostname Display first resolved host name" \
2035 "\n -s,--silent Don't ever display error messages" \ 2035 "\n -s,--silent Don't ever display error messages" \
2036 ) \ 2036 ) \
2037 ) \ 2037 ) \
2038 SKIP_FEATURE_IPCALC_LONG_OPTIONS( \ 2038 IF_NOT_FEATURE_IPCALC_LONG_OPTIONS( \
2039 "\n -b Display calculated broadcast address" \ 2039 "\n -b Display calculated broadcast address" \
2040 "\n -n Display calculated network address" \ 2040 "\n -n Display calculated network address" \
2041 "\n -m Display default netmask for IP" \ 2041 "\n -m Display default netmask for IP" \
2042 USE_FEATURE_IPCALC_FANCY( \ 2042 IF_FEATURE_IPCALC_FANCY( \
2043 "\n -p Display the prefix for IP/NETMASK" \ 2043 "\n -p Display the prefix for IP/NETMASK" \
2044 "\n -h Display first resolved host name" \ 2044 "\n -h Display first resolved host name" \
2045 "\n -s Don't ever display error messages" \ 2045 "\n -s Don't ever display error messages" \
@@ -2332,14 +2332,14 @@
2332 "\n -V Verbose" \ 2332 "\n -V Verbose" \
2333 2333
2334#define ls_trivial_usage \ 2334#define ls_trivial_usage \
2335 "[-1Aa" USE_FEATURE_LS_TIMESTAMPS("c") "Cd" \ 2335 "[-1Aa" IF_FEATURE_LS_TIMESTAMPS("c") "Cd" \
2336 USE_FEATURE_LS_TIMESTAMPS("e") USE_FEATURE_LS_FILETYPES("F") "iln" \ 2336 IF_FEATURE_LS_TIMESTAMPS("e") IF_FEATURE_LS_FILETYPES("F") "iln" \
2337 USE_FEATURE_LS_FILETYPES("p") USE_FEATURE_LS_FOLLOWLINKS("L") \ 2337 IF_FEATURE_LS_FILETYPES("p") IF_FEATURE_LS_FOLLOWLINKS("L") \
2338 USE_FEATURE_LS_RECURSIVE("R") USE_FEATURE_LS_SORTFILES("rS") "s" \ 2338 IF_FEATURE_LS_RECURSIVE("R") IF_FEATURE_LS_SORTFILES("rS") "s" \
2339 USE_FEATURE_AUTOWIDTH("T") USE_FEATURE_LS_TIMESTAMPS("tu") \ 2339 IF_FEATURE_AUTOWIDTH("T") IF_FEATURE_LS_TIMESTAMPS("tu") \
2340 USE_FEATURE_LS_SORTFILES("v") USE_FEATURE_AUTOWIDTH("w") "x" \ 2340 IF_FEATURE_LS_SORTFILES("v") IF_FEATURE_AUTOWIDTH("w") "x" \
2341 USE_FEATURE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" \ 2341 IF_FEATURE_LS_SORTFILES("X") IF_FEATURE_HUMAN_READABLE("h") "k" \
2342 USE_SELINUX("K") "] [filenames...]" 2342 IF_SELINUX("K") "] [filenames...]"
2343#define ls_full_usage "\n\n" \ 2343#define ls_full_usage "\n\n" \
2344 "List directory contents\n" \ 2344 "List directory contents\n" \
2345 "\nOptions:" \ 2345 "\nOptions:" \
@@ -2347,49 +2347,49 @@
2347 "\n -A Don't list . and .." \ 2347 "\n -A Don't list . and .." \
2348 "\n -a Don't hide entries starting with ." \ 2348 "\n -a Don't hide entries starting with ." \
2349 "\n -C List by columns" \ 2349 "\n -C List by columns" \
2350 USE_FEATURE_LS_TIMESTAMPS( \ 2350 IF_FEATURE_LS_TIMESTAMPS( \
2351 "\n -c With -l: sort by ctime") \ 2351 "\n -c With -l: sort by ctime") \
2352 USE_FEATURE_LS_COLOR( \ 2352 IF_FEATURE_LS_COLOR( \
2353 "\n --color[={always,never,auto}] Control coloring") \ 2353 "\n --color[={always,never,auto}] Control coloring") \
2354 "\n -d List directory entries instead of contents" \ 2354 "\n -d List directory entries instead of contents" \
2355 USE_FEATURE_LS_TIMESTAMPS( \ 2355 IF_FEATURE_LS_TIMESTAMPS( \
2356 "\n -e List full date and time") \ 2356 "\n -e List full date and time") \
2357 USE_FEATURE_LS_FILETYPES( \ 2357 IF_FEATURE_LS_FILETYPES( \
2358 "\n -F Append indicator (one of */=@|) to entries") \ 2358 "\n -F Append indicator (one of */=@|) to entries") \
2359 "\n -i List inode numbers" \ 2359 "\n -i List inode numbers" \
2360 "\n -l Long listing format" \ 2360 "\n -l Long listing format" \
2361 "\n -n List numeric UIDs and GIDs instead of names" \ 2361 "\n -n List numeric UIDs and GIDs instead of names" \
2362 USE_FEATURE_LS_FILETYPES( \ 2362 IF_FEATURE_LS_FILETYPES( \
2363 "\n -p Append indicator (one of /=@|) to entries") \ 2363 "\n -p Append indicator (one of /=@|) to entries") \
2364 USE_FEATURE_LS_FOLLOWLINKS( \ 2364 IF_FEATURE_LS_FOLLOWLINKS( \
2365 "\n -L List entries pointed to by symlinks") \ 2365 "\n -L List entries pointed to by symlinks") \
2366 USE_FEATURE_LS_RECURSIVE( \ 2366 IF_FEATURE_LS_RECURSIVE( \
2367 "\n -R List subdirectories recursively") \ 2367 "\n -R List subdirectories recursively") \
2368 USE_FEATURE_LS_SORTFILES( \ 2368 IF_FEATURE_LS_SORTFILES( \
2369 "\n -r Sort in reverse order") \ 2369 "\n -r Sort in reverse order") \
2370 USE_FEATURE_LS_SORTFILES( \ 2370 IF_FEATURE_LS_SORTFILES( \
2371 "\n -S Sort by file size") \ 2371 "\n -S Sort by file size") \
2372 "\n -s List the size of each file, in blocks" \ 2372 "\n -s List the size of each file, in blocks" \
2373 USE_FEATURE_AUTOWIDTH( \ 2373 IF_FEATURE_AUTOWIDTH( \
2374 "\n -T NUM Assume tabstop every NUM columns") \ 2374 "\n -T NUM Assume tabstop every NUM columns") \
2375 USE_FEATURE_LS_TIMESTAMPS( \ 2375 IF_FEATURE_LS_TIMESTAMPS( \
2376 "\n -t With -l: sort by modification time") \ 2376 "\n -t With -l: sort by modification time") \
2377 USE_FEATURE_LS_TIMESTAMPS( \ 2377 IF_FEATURE_LS_TIMESTAMPS( \
2378 "\n -u With -l: sort by access time") \ 2378 "\n -u With -l: sort by access time") \
2379 USE_FEATURE_LS_SORTFILES( \ 2379 IF_FEATURE_LS_SORTFILES( \
2380 "\n -v Sort by version") \ 2380 "\n -v Sort by version") \
2381 USE_FEATURE_AUTOWIDTH( \ 2381 IF_FEATURE_AUTOWIDTH( \
2382 "\n -w NUM Assume the terminal is NUM columns wide") \ 2382 "\n -w NUM Assume the terminal is NUM columns wide") \
2383 "\n -x List by lines" \ 2383 "\n -x List by lines" \
2384 USE_FEATURE_LS_SORTFILES( \ 2384 IF_FEATURE_LS_SORTFILES( \
2385 "\n -X Sort by extension") \ 2385 "\n -X Sort by extension") \
2386 USE_FEATURE_HUMAN_READABLE( \ 2386 IF_FEATURE_HUMAN_READABLE( \
2387 "\n -h List sizes in human readable format (1K 243M 2G)") \ 2387 "\n -h List sizes in human readable format (1K 243M 2G)") \
2388 USE_SELINUX( \ 2388 IF_SELINUX( \
2389 "\n -k List security context") \ 2389 "\n -k List security context") \
2390 USE_SELINUX( \ 2390 IF_SELINUX( \
2391 "\n -K List security context in long format") \ 2391 "\n -K List security context in long format") \
2392 USE_SELINUX( \ 2392 IF_SELINUX( \
2393 "\n -Z List security context and permission") \ 2393 "\n -Z List security context and permission") \
2394 2394
2395#define lsattr_trivial_usage \ 2395#define lsattr_trivial_usage \
@@ -2495,10 +2495,10 @@
2495 2495
2496#define md5sum_trivial_usage \ 2496#define md5sum_trivial_usage \
2497 "[OPTION] [FILEs...]" \ 2497 "[OPTION] [FILEs...]" \
2498 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]") 2498 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]")
2499#define md5sum_full_usage "\n\n" \ 2499#define md5sum_full_usage "\n\n" \
2500 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \ 2500 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
2501 USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ 2501 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
2502 "\nOptions:" \ 2502 "\nOptions:" \
2503 "\n -c Check sums against given list" \ 2503 "\n -c Check sums against given list" \
2504 "\n -s Don't output anything, status code shows success" \ 2504 "\n -s Don't output anything, status code shows success" \
@@ -2517,10 +2517,10 @@
2517 2517
2518#define sha1sum_trivial_usage \ 2518#define sha1sum_trivial_usage \
2519 "[OPTION] [FILEs...]" \ 2519 "[OPTION] [FILEs...]" \
2520 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]") 2520 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]")
2521#define sha1sum_full_usage "\n\n" \ 2521#define sha1sum_full_usage "\n\n" \
2522 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \ 2522 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
2523 USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ 2523 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
2524 "\nOptions:" \ 2524 "\nOptions:" \
2525 "\n -c Check sums against given list" \ 2525 "\n -c Check sums against given list" \
2526 "\n -s Don't output anything, status code shows success" \ 2526 "\n -s Don't output anything, status code shows success" \
@@ -2529,10 +2529,10 @@
2529 2529
2530#define sha256sum_trivial_usage \ 2530#define sha256sum_trivial_usage \
2531 "[OPTION] [FILEs...]" \ 2531 "[OPTION] [FILEs...]" \
2532 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum [OPTION] -c [FILE]") 2532 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum [OPTION] -c [FILE]")
2533#define sha256sum_full_usage "\n\n" \ 2533#define sha256sum_full_usage "\n\n" \
2534 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \ 2534 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
2535 USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ 2535 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
2536 "\nOptions:" \ 2536 "\nOptions:" \
2537 "\n -c Check sums against given list" \ 2537 "\n -c Check sums against given list" \
2538 "\n -s Don't output anything, status code shows success" \ 2538 "\n -s Don't output anything, status code shows success" \
@@ -2541,10 +2541,10 @@
2541 2541
2542#define sha512sum_trivial_usage \ 2542#define sha512sum_trivial_usage \
2543 "[OPTION] [FILEs...]" \ 2543 "[OPTION] [FILEs...]" \
2544 USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum [OPTION] -c [FILE]") 2544 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum [OPTION] -c [FILE]")
2545#define sha512sum_full_usage "\n\n" \ 2545#define sha512sum_full_usage "\n\n" \
2546 "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \ 2546 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums." \
2547 USE_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ 2547 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
2548 "\nOptions:" \ 2548 "\nOptions:" \
2549 "\n -c Check sums against given list" \ 2549 "\n -c Check sums against given list" \
2550 "\n -s Don't output anything, status code shows success" \ 2550 "\n -s Don't output anything, status code shows success" \
@@ -2558,19 +2558,19 @@
2558 "\n" \ 2558 "\n" \
2559 "It can be run by kernel as a hotplug helper. To activate it:\n" \ 2559 "It can be run by kernel as a hotplug helper. To activate it:\n" \
2560 " echo /bin/mdev >/proc/sys/kernel/hotplug\n" \ 2560 " echo /bin/mdev >/proc/sys/kernel/hotplug\n" \
2561 USE_FEATURE_MDEV_CONF( \ 2561 IF_FEATURE_MDEV_CONF( \
2562 "It uses /etc/mdev.conf with lines\n" \ 2562 "It uses /etc/mdev.conf with lines\n" \
2563 "[-]DEVNAME UID:GID PERM" \ 2563 "[-]DEVNAME UID:GID PERM" \
2564 USE_FEATURE_MDEV_RENAME(" [>|=PATH]") \ 2564 IF_FEATURE_MDEV_RENAME(" [>|=PATH]") \
2565 USE_FEATURE_MDEV_EXEC(" [@|$|*COMMAND]") \ 2565 IF_FEATURE_MDEV_EXEC(" [@|$|*COMMAND]") \
2566 ) \ 2566 ) \
2567 2567
2568#define mdev_notes_usage "" \ 2568#define mdev_notes_usage "" \
2569 USE_FEATURE_MDEV_CONFIG( \ 2569 IF_FEATURE_MDEV_CONFIG( \
2570 "The mdev config file contains lines that look like:\n" \ 2570 "The mdev config file contains lines that look like:\n" \
2571 " hd[a-z][0-9]* 0:3 660\n\n" \ 2571 " hd[a-z][0-9]* 0:3 660\n\n" \
2572 "That's device name (with regex match), uid:gid, and permissions.\n\n" \ 2572 "That's device name (with regex match), uid:gid, and permissions.\n\n" \
2573 USE_FEATURE_MDEV_EXEC( \ 2573 IF_FEATURE_MDEV_EXEC( \
2574 "Optionally, that can be followed (on the same line) by a special character\n" \ 2574 "Optionally, that can be followed (on the same line) by a special character\n" \
2575 "and a command line to run after creating/before deleting the corresponding\n" \ 2575 "and a command line to run after creating/before deleting the corresponding\n" \
2576 "device(s). The environment variable $MDEV indicates the active device node\n" \ 2576 "device(s). The environment variable $MDEV indicates the active device node\n" \
@@ -2610,7 +2610,7 @@
2610 "\nOptions:" \ 2610 "\nOptions:" \
2611 "\n -m Set permission mode (as in chmod), not rwxrwxrwx - umask" \ 2611 "\n -m Set permission mode (as in chmod), not rwxrwxrwx - umask" \
2612 "\n -p No error if existing, make parent directories as needed" \ 2612 "\n -p No error if existing, make parent directories as needed" \
2613 USE_SELINUX( \ 2613 IF_SELINUX( \
2614 "\n -Z Set security context" \ 2614 "\n -Z Set security context" \
2615 ) 2615 )
2616 2616
@@ -2659,7 +2659,7 @@
2659 "Create named pipe (identical to 'mknod name p')\n" \ 2659 "Create named pipe (identical to 'mknod name p')\n" \
2660 "\nOptions:" \ 2660 "\nOptions:" \
2661 "\n -m MODE Mode (default a=rw)" \ 2661 "\n -m MODE Mode (default a=rw)" \
2662 USE_SELINUX( \ 2662 IF_SELINUX( \
2663 "\n -Z Set security context" \ 2663 "\n -Z Set security context" \
2664 ) 2664 )
2665 2665
@@ -2700,7 +2700,7 @@
2700 "\n b: Make a block device" \ 2700 "\n b: Make a block device" \
2701 "\n c or u: Make a character device" \ 2701 "\n c or u: Make a character device" \
2702 "\n p: Make a named pipe (MAJOR and MINOR are ignored)" \ 2702 "\n p: Make a named pipe (MAJOR and MINOR are ignored)" \
2703 USE_SELINUX( \ 2703 IF_SELINUX( \
2704 "\n -Z Set security context" \ 2704 "\n -Z Set security context" \
2705 ) 2705 )
2706 2706
@@ -2745,7 +2745,7 @@
2745 "[-knqrsv] MODULE [symbol=value...]" 2745 "[-knqrsv] MODULE [symbol=value...]"
2746#define modprobe_full_usage "\n\n" \ 2746#define modprobe_full_usage "\n\n" \
2747 "Options:" \ 2747 "Options:" \
2748 USE_FEATURE_2_4_MODULES( \ 2748 IF_FEATURE_2_4_MODULES( \
2749 "\n -k Make module autoclean-able" \ 2749 "\n -k Make module autoclean-able" \
2750 ) \ 2750 ) \
2751 "\n -n Dry run" \ 2751 "\n -n Dry run" \
@@ -2753,7 +2753,7 @@
2753 "\n -r Remove module (stacks) or do autoclean" \ 2753 "\n -r Remove module (stacks) or do autoclean" \
2754 "\n -s Report via syslog instead of stderr" \ 2754 "\n -s Report via syslog instead of stderr" \
2755 "\n -v Verbose" \ 2755 "\n -v Verbose" \
2756 USE_FEATURE_MODPROBE_BLACKLIST( \ 2756 IF_FEATURE_MODPROBE_BLACKLIST( \
2757 "\n -b Apply blacklist to module names too" \ 2757 "\n -b Apply blacklist to module names too" \
2758 ) 2758 )
2759 2759
@@ -2831,15 +2831,15 @@
2831 "Mount a filesystem. Filesystem autodetection requires /proc be mounted.\n" \ 2831 "Mount a filesystem. Filesystem autodetection requires /proc be mounted.\n" \
2832 "\nOptions:" \ 2832 "\nOptions:" \
2833 "\n -a Mount all filesystems in fstab" \ 2833 "\n -a Mount all filesystems in fstab" \
2834 USE_FEATURE_MOUNT_FAKE( \ 2834 IF_FEATURE_MOUNT_FAKE( \
2835 USE_FEATURE_MTAB_SUPPORT( \ 2835 IF_FEATURE_MTAB_SUPPORT( \
2836 "\n -f Update /etc/mtab, but don't mount" \ 2836 "\n -f Update /etc/mtab, but don't mount" \
2837 ) \ 2837 ) \
2838 SKIP_FEATURE_MTAB_SUPPORT( \ 2838 IF_NOT_FEATURE_MTAB_SUPPORT( \
2839 "\n -f Dry run" \ 2839 "\n -f Dry run" \
2840 ) \ 2840 ) \
2841 ) \ 2841 ) \
2842 USE_FEATURE_MTAB_SUPPORT( \ 2842 IF_FEATURE_MTAB_SUPPORT( \
2843 "\n -n Don't update /etc/mtab" \ 2843 "\n -n Don't update /etc/mtab" \
2844 ) \ 2844 ) \
2845 "\n -r Read-only mount" \ 2845 "\n -r Read-only mount" \
@@ -2847,10 +2847,10 @@
2847 "\n -t FSTYPE Filesystem type" \ 2847 "\n -t FSTYPE Filesystem type" \
2848 "\n -O OPT Mount only filesystems with option OPT (-a only)" \ 2848 "\n -O OPT Mount only filesystems with option OPT (-a only)" \
2849 "\n-o OPT:" \ 2849 "\n-o OPT:" \
2850 USE_FEATURE_MOUNT_LOOP( \ 2850 IF_FEATURE_MOUNT_LOOP( \
2851 "\n loop Ignored (loop devices are autodetected)" \ 2851 "\n loop Ignored (loop devices are autodetected)" \
2852 ) \ 2852 ) \
2853 USE_FEATURE_MOUNT_FLAGS( \ 2853 IF_FEATURE_MOUNT_FLAGS( \
2854 "\n [a]sync Writes are [a]synchronous" \ 2854 "\n [a]sync Writes are [a]synchronous" \
2855 "\n [no]atime Disable/enable updates to inode access times" \ 2855 "\n [no]atime Disable/enable updates to inode access times" \
2856 "\n [no]diratime Disable/enable atime updates to directories" \ 2856 "\n [no]diratime Disable/enable atime updates to directories" \
@@ -2945,26 +2945,26 @@
2945#endif 2945#endif
2946 2946
2947#define nc_trivial_usage \ 2947#define nc_trivial_usage \
2948 USE_NC_EXTRA("[-iN] [-wN] ")USE_NC_SERVER("[-l] [-p PORT] ") \ 2948 IF_NC_EXTRA("[-iN] [-wN] ")IF_NC_SERVER("[-l] [-p PORT] ") \
2949 "["USE_NC_EXTRA("-f FILENAME|")"IPADDR PORTNUM]"USE_NC_EXTRA(" [-e COMMAND]") 2949 "["IF_NC_EXTRA("-f FILENAME|")"IPADDR PORTNUM]"IF_NC_EXTRA(" [-e COMMAND]")
2950#define nc_full_usage "\n\n" \ 2950#define nc_full_usage "\n\n" \
2951 "Open a pipe to IP:port" USE_NC_EXTRA(" or file") \ 2951 "Open a pipe to IP:port" IF_NC_EXTRA(" or file") \
2952 NC_OPTIONS_STR \ 2952 NC_OPTIONS_STR \
2953 USE_NC_EXTRA( \ 2953 IF_NC_EXTRA( \
2954 "\n -e Exec rest of command line after connect" \ 2954 "\n -e Exec rest of command line after connect" \
2955 "\n -i SECS Delay interval for lines sent" \ 2955 "\n -i SECS Delay interval for lines sent" \
2956 "\n -w SECS Timeout for connect" \ 2956 "\n -w SECS Timeout for connect" \
2957 "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \ 2957 "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \
2958 ) \ 2958 ) \
2959 USE_NC_SERVER( \ 2959 IF_NC_SERVER( \
2960 "\n -l Listen mode, for inbound connects" \ 2960 "\n -l Listen mode, for inbound connects" \
2961 USE_NC_EXTRA( \ 2961 IF_NC_EXTRA( \
2962 "\n (use -l twice with -e for persistent server)") \ 2962 "\n (use -l twice with -e for persistent server)") \
2963 "\n -p PORT Local port number" \ 2963 "\n -p PORT Local port number" \
2964 ) 2964 )
2965 2965
2966#define nc_notes_usage "" \ 2966#define nc_notes_usage "" \
2967 USE_NC_EXTRA( \ 2967 IF_NC_EXTRA( \
2968 "To use netcat as a terminal emulator on a serial port:\n\n" \ 2968 "To use netcat as a terminal emulator on a serial port:\n\n" \
2969 "$ stty 115200 -F /dev/ttyS0\n" \ 2969 "$ stty 115200 -F /dev/ttyS0\n" \
2970 "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \ 2970 "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \
@@ -2984,12 +2984,12 @@
2984 2984
2985#define nc_trivial_usage \ 2985#define nc_trivial_usage \
2986 "[-options] hostname port - connect" \ 2986 "[-options] hostname port - connect" \
2987 USE_NC_SERVER("\n" \ 2987 IF_NC_SERVER("\n" \
2988 "nc [-options] -l -p port [hostname] [port] - listen") 2988 "nc [-options] -l -p port [hostname] [port] - listen")
2989#define nc_full_usage "\n\n" \ 2989#define nc_full_usage "\n\n" \
2990 "Options:" \ 2990 "Options:" \
2991 "\n -e prog [args] Program to exec after connect (must be last)" \ 2991 "\n -e prog [args] Program to exec after connect (must be last)" \
2992 USE_NC_SERVER( \ 2992 IF_NC_SERVER( \
2993 "\n -l Listen mode, for inbound connects" \ 2993 "\n -l Listen mode, for inbound connects" \
2994 ) \ 2994 ) \
2995 "\n -n Don't do DNS resolution" \ 2995 "\n -n Don't do DNS resolution" \
@@ -2998,7 +2998,7 @@
2998 "\n -u UDP mode" \ 2998 "\n -u UDP mode" \
2999 "\n -v Verbose (cumulative: -vv)" \ 2999 "\n -v Verbose (cumulative: -vv)" \
3000 "\n -w secs Timeout for connects and final net reads" \ 3000 "\n -w secs Timeout for connects and final net reads" \
3001 USE_NC_EXTRA( \ 3001 IF_NC_EXTRA( \
3002 "\n -i sec Delay interval for lines sent" /* ", ports scanned" */ \ 3002 "\n -i sec Delay interval for lines sent" /* ", ports scanned" */ \
3003 "\n -o file Hex dump of traffic" \ 3003 "\n -o file Hex dump of traffic" \
3004 "\n -z Zero-I/O mode (scanning)" \ 3004 "\n -z Zero-I/O mode (scanning)" \
@@ -3011,7 +3011,7 @@
3011#endif 3011#endif
3012 3012
3013#define netstat_trivial_usage \ 3013#define netstat_trivial_usage \
3014 "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")USE_FEATURE_NETSTAT_PRG("p")"]" 3014 "[-laentuwxr"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]"
3015#define netstat_full_usage "\n\n" \ 3015#define netstat_full_usage "\n\n" \
3016 "Display networking information\n" \ 3016 "Display networking information\n" \
3017 "\nOptions:" \ 3017 "\nOptions:" \
@@ -3024,10 +3024,10 @@
3024 "\n -w Raw sockets" \ 3024 "\n -w Raw sockets" \
3025 "\n -x Unix sockets" \ 3025 "\n -x Unix sockets" \
3026 "\n -r Display routing table" \ 3026 "\n -r Display routing table" \
3027 USE_FEATURE_NETSTAT_WIDE( \ 3027 IF_FEATURE_NETSTAT_WIDE( \
3028 "\n -W Display with no column truncation" \ 3028 "\n -W Display with no column truncation" \
3029 ) \ 3029 ) \
3030 USE_FEATURE_NETSTAT_PRG( \ 3030 IF_FEATURE_NETSTAT_PRG( \
3031 "\n -p Display PID/Program name for sockets" \ 3031 "\n -p Display PID/Program name for sockets" \
3032 ) 3032 )
3033 3033
@@ -3084,7 +3084,7 @@
3084 "Address: 127.0.0.1\n" 3084 "Address: 127.0.0.1\n"
3085 3085
3086#define od_trivial_usage \ 3086#define od_trivial_usage \
3087 "[-aBbcDdeFfHhIiLlOovXx] " USE_DESKTOP("[-t TYPE] ") "[FILE]" 3087 "[-aBbcDdeFfHhIiLlOovXx] " IF_DESKTOP("[-t TYPE] ") "[FILE]"
3088#define od_full_usage "\n\n" \ 3088#define od_full_usage "\n\n" \
3089 "Write an unambiguous representation, octal bytes by default, of FILE\n" \ 3089 "Write an unambiguous representation, octal bytes by default, of FILE\n" \
3090 "to standard output. With no FILE or when FILE is -, read standard input." 3090 "to standard output. With no FILE or when FILE is -, read standard input."
@@ -3119,16 +3119,16 @@
3119 "\n -u Unlock (re-enable) account" \ 3119 "\n -u Unlock (re-enable) account" \
3120 3120
3121#define chpasswd_trivial_usage \ 3121#define chpasswd_trivial_usage \
3122 USE_GETOPT_LONG("[--md5|--encrypted]") SKIP_GETOPT_LONG("[-m|-e]") 3122 IF_GETOPT_LONG("[--md5|--encrypted]") IF_NOT_GETOPT_LONG("[-m|-e]")
3123#define chpasswd_full_usage "\n\n" \ 3123#define chpasswd_full_usage "\n\n" \
3124 "Read user:password information from stdin " \ 3124 "Read user:password information from stdin " \
3125 "and update /etc/passwd accordingly.\n" \ 3125 "and update /etc/passwd accordingly.\n" \
3126 "\nOptions:" \ 3126 "\nOptions:" \
3127 USE_GETOPT_LONG( \ 3127 IF_GETOPT_LONG( \
3128 "\n -e,--encrypted Supplied passwords are in encrypted form" \ 3128 "\n -e,--encrypted Supplied passwords are in encrypted form" \
3129 "\n -m,--md5 Use MD5 encryption instead of DES" \ 3129 "\n -m,--md5 Use MD5 encryption instead of DES" \
3130 ) \ 3130 ) \
3131 SKIP_GETOPT_LONG( \ 3131 IF_NOT_GETOPT_LONG( \
3132 "\n -e Supplied passwords are in encrypted form" \ 3132 "\n -e Supplied passwords are in encrypted form" \
3133 "\n -m Use MD5 encryption instead of DES" \ 3133 "\n -m Use MD5 encryption instead of DES" \
3134 ) 3134 )
@@ -3168,18 +3168,18 @@
3168#define pidof_full_usage "\n\n" \ 3168#define pidof_full_usage "\n\n" \
3169 "List PIDs of all processes with names that match NAMEs" \ 3169 "List PIDs of all processes with names that match NAMEs" \
3170 USAGE_PIDOF \ 3170 USAGE_PIDOF \
3171 USE_FEATURE_PIDOF_SINGLE( \ 3171 IF_FEATURE_PIDOF_SINGLE( \
3172 "\n -s Show only one PID") \ 3172 "\n -s Show only one PID") \
3173 USE_FEATURE_PIDOF_OMIT( \ 3173 IF_FEATURE_PIDOF_OMIT( \
3174 "\n -o PID Omit given pid" \ 3174 "\n -o PID Omit given pid" \
3175 "\n Use %PPID to omit pid of pidof's parent") \ 3175 "\n Use %PPID to omit pid of pidof's parent") \
3176 3176
3177#define pidof_example_usage \ 3177#define pidof_example_usage \
3178 "$ pidof init\n" \ 3178 "$ pidof init\n" \
3179 "1\n" \ 3179 "1\n" \
3180 USE_FEATURE_PIDOF_OMIT( \ 3180 IF_FEATURE_PIDOF_OMIT( \
3181 "$ pidof /bin/sh\n20351 5973 5950\n") \ 3181 "$ pidof /bin/sh\n20351 5973 5950\n") \
3182 USE_FEATURE_PIDOF_OMIT( \ 3182 IF_FEATURE_PIDOF_OMIT( \
3183 "$ pidof /bin/sh -o %PPID\n20351 5950") 3183 "$ pidof /bin/sh -o %PPID\n20351 5950")
3184 3184
3185#if !ENABLE_FEATURE_FANCY_PING 3185#if !ENABLE_FEATURE_FANCY_PING
@@ -3273,7 +3273,7 @@
3273 "\n -T Get messages with TOP instead with RETR" \ 3273 "\n -T Get messages with TOP instead with RETR" \
3274 "\n -k Keep retrieved messages on the server" \ 3274 "\n -k Keep retrieved messages on the server" \
3275 "\n -t timeout Set network timeout" \ 3275 "\n -t timeout Set network timeout" \
3276 USE_FEATURE_POPMAILDIR_DELIVERY( \ 3276 IF_FEATURE_POPMAILDIR_DELIVERY( \
3277 "\n -F \"program arg1 arg2 ...\" Filter by program. May be multiple" \ 3277 "\n -F \"program arg1 arg2 ...\" Filter by program. May be multiple" \
3278 "\n -M \"program arg1 arg2 ...\" Deliver by program" \ 3278 "\n -M \"program arg1 arg2 ...\" Deliver by program" \
3279 ) \ 3279 ) \
@@ -3332,10 +3332,10 @@
3332#define ps_full_usage "\n\n" \ 3332#define ps_full_usage "\n\n" \
3333 "Report process status\n" \ 3333 "Report process status\n" \
3334 USAGE_PS \ 3334 USAGE_PS \
3335 USE_SELINUX( \ 3335 IF_SELINUX( \
3336 "\n -Z Show SE Linux context" \ 3336 "\n -Z Show SE Linux context" \
3337 ) \ 3337 ) \
3338 USE_FEATURE_PS_WIDE( \ 3338 IF_FEATURE_PS_WIDE( \
3339 "\n w Wide output" \ 3339 "\n w Wide output" \
3340 ) 3340 )
3341 3341
@@ -3404,10 +3404,10 @@
3404 "files do not block on disk I/O" 3404 "files do not block on disk I/O"
3405 3405
3406#define readlink_trivial_usage \ 3406#define readlink_trivial_usage \
3407 USE_FEATURE_READLINK_FOLLOW("[-f] ") "FILE" 3407 IF_FEATURE_READLINK_FOLLOW("[-f] ") "FILE"
3408#define readlink_full_usage "\n\n" \ 3408#define readlink_full_usage "\n\n" \
3409 "Display the value of a symlink" \ 3409 "Display the value of a symlink" \
3410 USE_FEATURE_READLINK_FOLLOW( "\n" \ 3410 IF_FEATURE_READLINK_FOLLOW( "\n" \
3411 "\nOptions:" \ 3411 "\nOptions:" \
3412 "\n -f Canonicalize by following all symlinks") \ 3412 "\n -f Canonicalize by following all symlinks") \
3413 3413
@@ -3505,11 +3505,11 @@
3505#define rmdir_full_usage "\n\n" \ 3505#define rmdir_full_usage "\n\n" \
3506 "Remove the DIRECTORY, if it is empty.\n" \ 3506 "Remove the DIRECTORY, if it is empty.\n" \
3507 "\nOptions:" \ 3507 "\nOptions:" \
3508 USE_FEATURE_RMDIR_LONG_OPTIONS( \ 3508 IF_FEATURE_RMDIR_LONG_OPTIONS( \
3509 "\n -p|--parents Include parents" \ 3509 "\n -p|--parents Include parents" \
3510 "\n -ignore-fail-on-non-empty" \ 3510 "\n -ignore-fail-on-non-empty" \
3511 ) \ 3511 ) \
3512 SKIP_FEATURE_RMDIR_LONG_OPTIONS( \ 3512 IF_NOT_FEATURE_RMDIR_LONG_OPTIONS( \
3513 "\n -p Include parents" \ 3513 "\n -p Include parents" \
3514 ) 3514 )
3515 3515
@@ -3535,7 +3535,7 @@
3535 "\nOptions:" \ 3535 "\nOptions:" \
3536 "\n -n Don't resolve names" \ 3536 "\n -n Don't resolve names" \
3537 "\n -e Display other/more information" \ 3537 "\n -e Display other/more information" \
3538 "\n -A inet" USE_FEATURE_IPV6("{6}") " Select address family" \ 3538 "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family" \
3539 3539
3540#define rpm_trivial_usage \ 3540#define rpm_trivial_usage \
3541 "-i -q[ildc]p package.rpm" 3541 "-i -q[ildc]p package.rpm"
@@ -3559,7 +3559,7 @@
3559 "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]" 3559 "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]"
3560#define rtcwake_full_usage "\n\n" \ 3560#define rtcwake_full_usage "\n\n" \
3561 "Enter a system sleep state until specified wakeup time\n" \ 3561 "Enter a system sleep state until specified wakeup time\n" \
3562 USE_GETOPT_LONG( \ 3562 IF_GETOPT_LONG( \
3563 "\n -a,--auto Read clock mode from adjtime" \ 3563 "\n -a,--auto Read clock mode from adjtime" \
3564 "\n -l,--local Clock is set to local time" \ 3564 "\n -l,--local Clock is set to local time" \
3565 "\n -u,--utc Clock is set to UTC time" \ 3565 "\n -u,--utc Clock is set to UTC time" \
@@ -3568,7 +3568,7 @@
3568 "\n -s,--seconds=SEC Set the timeout in SEC seconds from now" \ 3568 "\n -s,--seconds=SEC Set the timeout in SEC seconds from now" \
3569 "\n -t,--time=TIME Set the timeout to TIME seconds from epoch" \ 3569 "\n -t,--time=TIME Set the timeout to TIME seconds from epoch" \
3570 ) \ 3570 ) \
3571 SKIP_GETOPT_LONG( \ 3571 IF_NOT_GETOPT_LONG( \
3572 "\n -a Read clock mode from adjtime" \ 3572 "\n -a Read clock mode from adjtime" \
3573 "\n -l Clock is set to local time" \ 3573 "\n -l Clock is set to local time" \
3574 "\n -u Clock is set to UTC time" \ 3574 "\n -u Clock is set to UTC time" \
@@ -3584,14 +3584,14 @@
3584#define runcon_full_usage "\n\n" \ 3584#define runcon_full_usage "\n\n" \
3585 "Run a program in a different security context\n" \ 3585 "Run a program in a different security context\n" \
3586 "\n CONTEXT Complete security context\n" \ 3586 "\n CONTEXT Complete security context\n" \
3587 USE_FEATURE_RUNCON_LONG_OPTIONS( \ 3587 IF_FEATURE_RUNCON_LONG_OPTIONS( \
3588 "\n -c,--compute Compute process transition context before modifying" \ 3588 "\n -c,--compute Compute process transition context before modifying" \
3589 "\n -t,--type=TYPE Type (for same role as parent)" \ 3589 "\n -t,--type=TYPE Type (for same role as parent)" \
3590 "\n -u,--user=USER User identity" \ 3590 "\n -u,--user=USER User identity" \
3591 "\n -r,--role=ROLE Role" \ 3591 "\n -r,--role=ROLE Role" \
3592 "\n -l,--range=RNG Levelrange" \ 3592 "\n -l,--range=RNG Levelrange" \
3593 ) \ 3593 ) \
3594 SKIP_FEATURE_RUNCON_LONG_OPTIONS( \ 3594 IF_NOT_FEATURE_RUNCON_LONG_OPTIONS( \
3595 "\n -c Compute process transition context before modifying" \ 3595 "\n -c Compute process transition context before modifying" \
3596 "\n -t TYPE Type (for same role as parent)" \ 3596 "\n -t TYPE Type (for same role as parent)" \
3597 "\n -u USER User identity" \ 3597 "\n -u USER User identity" \
@@ -3600,14 +3600,14 @@
3600 ) 3600 )
3601 3601
3602#define run_parts_trivial_usage \ 3602#define run_parts_trivial_usage \
3603 "[-t] "USE_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY" 3603 "[-t] "IF_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
3604#define run_parts_full_usage "\n\n" \ 3604#define run_parts_full_usage "\n\n" \
3605 "Run a bunch of scripts in a directory\n" \ 3605 "Run a bunch of scripts in a directory\n" \
3606 "\nOptions:" \ 3606 "\nOptions:" \
3607 "\n -t Print what would be run, but don't actually run anything" \ 3607 "\n -t Print what would be run, but don't actually run anything" \
3608 "\n -a ARG Pass ARG as argument for every program" \ 3608 "\n -a ARG Pass ARG as argument for every program" \
3609 "\n -u MASK Set the umask to MASK before running every program" \ 3609 "\n -u MASK Set the umask to MASK before running every program" \
3610 USE_FEATURE_RUN_PARTS_FANCY( \ 3610 IF_FEATURE_RUN_PARTS_FANCY( \
3611 "\n -l Print names of all matching files even if they are not executable" \ 3611 "\n -l Print names of all matching files even if they are not executable" \
3612 ) 3612 )
3613 3613
@@ -3728,7 +3728,7 @@
3728 "\n -b Display current state of booleans" \ 3728 "\n -b Display current state of booleans" \
3729 3729
3730#define setconsole_trivial_usage \ 3730#define setconsole_trivial_usage \
3731 "[-r" USE_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]" 3731 "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
3732#define setconsole_full_usage "\n\n" \ 3732#define setconsole_full_usage "\n\n" \
3733 "Redirect system console output to DEVICE (default: /dev/tty)\n" \ 3733 "Redirect system console output to DEVICE (default: /dev/tty)\n" \
3734 "\nOptions:" \ 3734 "\nOptions:" \
@@ -3740,13 +3740,13 @@
3740 3740
3741#define setfiles_trivial_usage \ 3741#define setfiles_trivial_usage \
3742 "[-dnpqsvW] [-e dir]... [-o file] [-r alt_root_path]" \ 3742 "[-dnpqsvW] [-e dir]... [-o file] [-r alt_root_path]" \
3743 USE_FEATURE_SETFILES_CHECK_OPTION( \ 3743 IF_FEATURE_SETFILES_CHECK_OPTION( \
3744 " [-c policyfile] spec_file" \ 3744 " [-c policyfile] spec_file" \
3745 ) \ 3745 ) \
3746 " pathname" 3746 " pathname"
3747#define setfiles_full_usage "\n\n" \ 3747#define setfiles_full_usage "\n\n" \
3748 "Reset file contexts under pathname according to spec_file\n" \ 3748 "Reset file contexts under pathname according to spec_file\n" \
3749 USE_FEATURE_SETFILES_CHECK_OPTION( \ 3749 IF_FEATURE_SETFILES_CHECK_OPTION( \
3750 "\n -c file Check the validity of the contexts against the specified binary policy" \ 3750 "\n -c file Check the validity of the contexts against the specified binary policy" \
3751 ) \ 3751 ) \
3752 "\n -d Show which specification matched each file" \ 3752 "\n -d Show which specification matched each file" \
@@ -3809,10 +3809,10 @@
3809 "lash is deprecated, please use hush" 3809 "lash is deprecated, please use hush"
3810 3810
3811#define last_trivial_usage \ 3811#define last_trivial_usage \
3812 ""USE_FEATURE_LAST_FANCY("[-HW] [-f file]") 3812 ""IF_FEATURE_LAST_FANCY("[-HW] [-f file]")
3813#define last_full_usage "\n\n" \ 3813#define last_full_usage "\n\n" \
3814 "Show listing of the last users that logged into the system" \ 3814 "Show listing of the last users that logged into the system" \
3815 USE_FEATURE_LAST_FANCY( "\n" \ 3815 IF_FEATURE_LAST_FANCY( "\n" \
3816 "\nOptions:" \ 3816 "\nOptions:" \
3817/* "\n -H Show header line" */ \ 3817/* "\n -H Show header line" */ \
3818 "\n -W Display with no host column truncation" \ 3818 "\n -W Display with no host column truncation" \
@@ -3843,27 +3843,27 @@
3843 "\n -F Disable RTS/CTS flow control" \ 3843 "\n -F Disable RTS/CTS flow control" \
3844 3844
3845#define sleep_trivial_usage \ 3845#define sleep_trivial_usage \
3846 USE_FEATURE_FANCY_SLEEP("[") "N" USE_FEATURE_FANCY_SLEEP("]...") 3846 IF_FEATURE_FANCY_SLEEP("[") "N" IF_FEATURE_FANCY_SLEEP("]...")
3847#define sleep_full_usage "\n\n" \ 3847#define sleep_full_usage "\n\n" \
3848 SKIP_FEATURE_FANCY_SLEEP("Pause for N seconds") \ 3848 IF_NOT_FEATURE_FANCY_SLEEP("Pause for N seconds") \
3849 USE_FEATURE_FANCY_SLEEP( \ 3849 IF_FEATURE_FANCY_SLEEP( \
3850 "Pause for a time equal to the total of the args given, where each arg can\n" \ 3850 "Pause for a time equal to the total of the args given, where each arg can\n" \
3851 "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays") 3851 "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays")
3852#define sleep_example_usage \ 3852#define sleep_example_usage \
3853 "$ sleep 2\n" \ 3853 "$ sleep 2\n" \
3854 "[2 second delay results]\n" \ 3854 "[2 second delay results]\n" \
3855 USE_FEATURE_FANCY_SLEEP( \ 3855 IF_FEATURE_FANCY_SLEEP( \
3856 "$ sleep 1d 3h 22m 8s\n" \ 3856 "$ sleep 1d 3h 22m 8s\n" \
3857 "[98528 second delay results]\n") 3857 "[98528 second delay results]\n")
3858 3858
3859#define sort_trivial_usage \ 3859#define sort_trivial_usage \
3860 "[-nru" \ 3860 "[-nru" \
3861 USE_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \ 3861 IF_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR") \
3862 "] [FILE]..." 3862 "] [FILE]..."
3863#define sort_full_usage "\n\n" \ 3863#define sort_full_usage "\n\n" \
3864 "Sort lines of text\n" \ 3864 "Sort lines of text\n" \
3865 "\nOptions:" \ 3865 "\nOptions:" \
3866 USE_FEATURE_SORT_BIG( \ 3866 IF_FEATURE_SORT_BIG( \
3867 "\n -b Ignore leading blanks" \ 3867 "\n -b Ignore leading blanks" \
3868 "\n -c Check whether input is sorted" \ 3868 "\n -c Check whether input is sorted" \
3869 "\n -d Dictionary order (blank or alphanumeric only)" \ 3869 "\n -d Dictionary order (blank or alphanumeric only)" \
@@ -3874,17 +3874,17 @@
3874 "\n -M Sort month" \ 3874 "\n -M Sort month" \
3875 ) \ 3875 ) \
3876 "\n -n Sort numbers" \ 3876 "\n -n Sort numbers" \
3877 USE_FEATURE_SORT_BIG( \ 3877 IF_FEATURE_SORT_BIG( \
3878 "\n -o Output to file" \ 3878 "\n -o Output to file" \
3879 "\n -k Sort by key" \ 3879 "\n -k Sort by key" \
3880 "\n -t CHAR Key separator" \ 3880 "\n -t CHAR Key separator" \
3881 ) \ 3881 ) \
3882 "\n -r Reverse sort order" \ 3882 "\n -r Reverse sort order" \
3883 USE_FEATURE_SORT_BIG( \ 3883 IF_FEATURE_SORT_BIG( \
3884 "\n -s Stable (don't sort ties alphabetically)" \ 3884 "\n -s Stable (don't sort ties alphabetically)" \
3885 ) \ 3885 ) \
3886 "\n -u Suppress duplicate lines" \ 3886 "\n -u Suppress duplicate lines" \
3887 USE_FEATURE_SORT_BIG( \ 3887 IF_FEATURE_SORT_BIG( \
3888 "\n -z Lines are terminated by NUL, not newline" \ 3888 "\n -z Lines are terminated by NUL, not newline" \
3889 "\n -mST Ignored for GNU compatibility") \ 3889 "\n -mST Ignored for GNU compatibility") \
3890 3890
@@ -3896,7 +3896,7 @@
3896 "d\n" \ 3896 "d\n" \
3897 "e\n" \ 3897 "e\n" \
3898 "f\n" \ 3898 "f\n" \
3899 USE_FEATURE_SORT_BIG( \ 3899 IF_FEATURE_SORT_BIG( \
3900 "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \ 3900 "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
3901 "d 2\n" \ 3901 "d 2\n" \
3902 "b 2\n" \ 3902 "b 2\n" \
@@ -3922,7 +3922,7 @@
3922 "Search for matching processes, and then\n" \ 3922 "Search for matching processes, and then\n" \
3923 "-K: stop all matching processes.\n" \ 3923 "-K: stop all matching processes.\n" \
3924 "-S: start a process unless a matching process is found.\n" \ 3924 "-S: start a process unless a matching process is found.\n" \
3925 USE_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \ 3925 IF_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
3926 "\nProcess matching:" \ 3926 "\nProcess matching:" \
3927 "\n -u,--user USERNAME|UID Match only this user's processes" \ 3927 "\n -u,--user USERNAME|UID Match only this user's processes" \
3928 "\n -n,--name NAME Match processes with NAME" \ 3928 "\n -n,--name NAME Match processes with NAME" \
@@ -3935,7 +3935,7 @@
3935 "\n -x,--exec EXECUTABLE Program to run" \ 3935 "\n -x,--exec EXECUTABLE Program to run" \
3936 "\n -a,--startas NAME Zeroth argument" \ 3936 "\n -a,--startas NAME Zeroth argument" \
3937 "\n -b,--background Background" \ 3937 "\n -b,--background Background" \
3938 USE_FEATURE_START_STOP_DAEMON_FANCY( \ 3938 IF_FEATURE_START_STOP_DAEMON_FANCY( \
3939 "\n -N,--nicelevel N Change nice level" \ 3939 "\n -N,--nicelevel N Change nice level" \
3940 ) \ 3940 ) \
3941 "\n -c,--chuid USER[:[GRP]] Change to user/group" \ 3941 "\n -c,--chuid USER[:[GRP]] Change to user/group" \
@@ -3944,13 +3944,13 @@
3944 "\n -s,--signal SIG Signal to send" \ 3944 "\n -s,--signal SIG Signal to send" \
3945 "\n -t,--test Match only, exit with 0 if a process is found" \ 3945 "\n -t,--test Match only, exit with 0 if a process is found" \
3946 "\nOther:" \ 3946 "\nOther:" \
3947 USE_FEATURE_START_STOP_DAEMON_FANCY( \ 3947 IF_FEATURE_START_STOP_DAEMON_FANCY( \
3948 "\n -o,--oknodo Exit with status 0 if nothing is done" \ 3948 "\n -o,--oknodo Exit with status 0 if nothing is done" \
3949 "\n -v,--verbose Verbose" \ 3949 "\n -v,--verbose Verbose" \
3950 ) \ 3950 ) \
3951 "\n -q,--quiet Quiet" \ 3951 "\n -q,--quiet Quiet" \
3952 ) \ 3952 ) \
3953 SKIP_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \ 3953 IF_NOT_FEATURE_START_STOP_DAEMON_LONG_OPTIONS( \
3954 "\nProcess matching:" \ 3954 "\nProcess matching:" \
3955 "\n -u USERNAME|UID Match only this user's processes" \ 3955 "\n -u USERNAME|UID Match only this user's processes" \
3956 "\n -n NAME Match processes with NAME" \ 3956 "\n -n NAME Match processes with NAME" \
@@ -3963,7 +3963,7 @@
3963 "\n -x EXECUTABLE Program to run" \ 3963 "\n -x EXECUTABLE Program to run" \
3964 "\n -a NAME Zeroth argument" \ 3964 "\n -a NAME Zeroth argument" \
3965 "\n -b Background" \ 3965 "\n -b Background" \
3966 USE_FEATURE_START_STOP_DAEMON_FANCY( \ 3966 IF_FEATURE_START_STOP_DAEMON_FANCY( \
3967 "\n -N N Change nice level" \ 3967 "\n -N N Change nice level" \
3968 ) \ 3968 ) \
3969 "\n -c USER[:[GRP]] Change to user/group" \ 3969 "\n -c USER[:[GRP]] Change to user/group" \
@@ -3972,7 +3972,7 @@
3972 "\n -s SIG Signal to send" \ 3972 "\n -s SIG Signal to send" \
3973 "\n -t Match only, exit with 0 if a process is found" \ 3973 "\n -t Match only, exit with 0 if a process is found" \
3974 "\nOther:" \ 3974 "\nOther:" \
3975 USE_FEATURE_START_STOP_DAEMON_FANCY( \ 3975 IF_FEATURE_START_STOP_DAEMON_FANCY( \
3976 "\n -o Exit with status 0 if nothing is done" \ 3976 "\n -o Exit with status 0 if nothing is done" \
3977 "\n -v Verbose" \ 3977 "\n -v Verbose" \
3978 ) \ 3978 ) \
@@ -3984,16 +3984,16 @@
3984#define stat_full_usage "\n\n" \ 3984#define stat_full_usage "\n\n" \
3985 "Display file (default) or filesystem status\n" \ 3985 "Display file (default) or filesystem status\n" \
3986 "\nOptions:" \ 3986 "\nOptions:" \
3987 USE_FEATURE_STAT_FORMAT( \ 3987 IF_FEATURE_STAT_FORMAT( \
3988 "\n -c fmt Use the specified format" \ 3988 "\n -c fmt Use the specified format" \
3989 ) \ 3989 ) \
3990 "\n -f Display filesystem status" \ 3990 "\n -f Display filesystem status" \
3991 "\n -L Dereference links" \ 3991 "\n -L Dereference links" \
3992 "\n -t Display info in terse form" \ 3992 "\n -t Display info in terse form" \
3993 USE_SELINUX( \ 3993 IF_SELINUX( \
3994 "\n -Z Print security context" \ 3994 "\n -Z Print security context" \
3995 ) \ 3995 ) \
3996 USE_FEATURE_STAT_FORMAT( \ 3996 IF_FEATURE_STAT_FORMAT( \
3997 "\n\nValid format sequences for files:\n" \ 3997 "\n\nValid format sequences for files:\n" \
3998 " %a Access rights in octal\n" \ 3998 " %a Access rights in octal\n" \
3999 " %A Access rights in human readable form\n" \ 3999 " %A Access rights in human readable form\n" \
@@ -4027,7 +4027,7 @@
4027 " %c Total file nodes in file system\n" \ 4027 " %c Total file nodes in file system\n" \
4028 " %d Free file nodes in file system\n" \ 4028 " %d Free file nodes in file system\n" \
4029 " %f Free blocks in file system\n" \ 4029 " %f Free blocks in file system\n" \
4030 USE_SELINUX( \ 4030 IF_SELINUX( \
4031 " %C Security context in SELinux\n" \ 4031 " %C Security context in SELinux\n" \
4032 ) \ 4032 ) \
4033 " %i File System ID in hex\n" \ 4033 " %i File System ID in hex\n" \
@@ -4115,12 +4115,12 @@
4115 "\n -a Stop swapping on all swap devices" \ 4115 "\n -a Stop swapping on all swap devices" \
4116 4116
4117#define swapon_trivial_usage \ 4117#define swapon_trivial_usage \
4118 "[-a]" USE_FEATURE_SWAPON_PRI(" [-p pri]") " [DEVICE]" 4118 "[-a]" IF_FEATURE_SWAPON_PRI(" [-p pri]") " [DEVICE]"
4119#define swapon_full_usage "\n\n" \ 4119#define swapon_full_usage "\n\n" \
4120 "Start swapping on DEVICE\n" \ 4120 "Start swapping on DEVICE\n" \
4121 "\nOptions:" \ 4121 "\nOptions:" \
4122 "\n -a Start swapping on all swap devices" \ 4122 "\n -a Start swapping on all swap devices" \
4123 USE_FEATURE_SWAPON_PRI( \ 4123 IF_FEATURE_SWAPON_PRI( \
4124 "\n -p pri Set swap device priority" \ 4124 "\n -p pri Set swap device priority" \
4125 ) \ 4125 ) \
4126 4126
@@ -4166,15 +4166,15 @@
4166 "\n -O FILE Log to given file (default=/var/log/messages)" \ 4166 "\n -O FILE Log to given file (default=/var/log/messages)" \
4167 "\n -l n Set local log level" \ 4167 "\n -l n Set local log level" \
4168 "\n -S Smaller logging output" \ 4168 "\n -S Smaller logging output" \
4169 USE_FEATURE_ROTATE_LOGFILE( \ 4169 IF_FEATURE_ROTATE_LOGFILE( \
4170 "\n -s SIZE Max size (KB) before rotate (default=200KB, 0=off)" \ 4170 "\n -s SIZE Max size (KB) before rotate (default=200KB, 0=off)" \
4171 "\n -b NUM Number of rotated logs to keep (default=1, max=99, 0=purge)") \ 4171 "\n -b NUM Number of rotated logs to keep (default=1, max=99, 0=purge)") \
4172 USE_FEATURE_REMOTE_LOG( \ 4172 IF_FEATURE_REMOTE_LOG( \
4173 "\n -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)" \ 4173 "\n -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)" \
4174 "\n -L Log locally and via network (default is network only if -R)") \ 4174 "\n -L Log locally and via network (default is network only if -R)") \
4175 USE_FEATURE_SYSLOGD_DUP( \ 4175 IF_FEATURE_SYSLOGD_DUP( \
4176 "\n -D Drop duplicates") \ 4176 "\n -D Drop duplicates") \
4177 USE_FEATURE_IPC_SYSLOG( \ 4177 IF_FEATURE_IPC_SYSLOG( \
4178 "\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") \ 4178 "\n -C[size(KiB)] Log to shared mem buffer (read it using logread)") \
4179 /* NB: -Csize shouldn't have space (because size is optional) */ 4179 /* NB: -Csize shouldn't have space (because size is optional) */
4180/* "\n -m MIN Minutes between MARK lines (default=20, 0=off)" */ 4180/* "\n -m MIN Minutes between MARK lines (default=20, 0=off)" */
@@ -4195,11 +4195,11 @@
4195 "With more than one FILE, precede each with a header giving the\n" \ 4195 "With more than one FILE, precede each with a header giving the\n" \
4196 "file name. With no FILE, or when FILE is -, read standard input.\n" \ 4196 "file name. With no FILE, or when FILE is -, read standard input.\n" \
4197 "\nOptions:" \ 4197 "\nOptions:" \
4198 USE_FEATURE_FANCY_TAIL( \ 4198 IF_FEATURE_FANCY_TAIL( \
4199 "\n -c N[kbm] Output the last N bytes") \ 4199 "\n -c N[kbm] Output the last N bytes") \
4200 "\n -n N[kbm] Print last N lines instead of last 10" \ 4200 "\n -n N[kbm] Print last N lines instead of last 10" \
4201 "\n -f Output data as the file grows" \ 4201 "\n -f Output data as the file grows" \
4202 USE_FEATURE_FANCY_TAIL( \ 4202 IF_FEATURE_FANCY_TAIL( \
4203 "\n -q Never output headers giving file names" \ 4203 "\n -q Never output headers giving file names" \
4204 "\n -s SEC Wait SEC seconds between reads with -f" \ 4204 "\n -s SEC Wait SEC seconds between reads with -f" \
4205 "\n -v Always output headers giving file names" \ 4205 "\n -v Always output headers giving file names" \
@@ -4213,35 +4213,35 @@
4213 "nameserver 10.0.0.1\n" 4213 "nameserver 10.0.0.1\n"
4214 4214
4215#define tar_trivial_usage \ 4215#define tar_trivial_usage \
4216 "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_SEAMLESS_GZ("z") \ 4216 "-[" IF_FEATURE_TAR_CREATE("c") IF_FEATURE_SEAMLESS_GZ("z") \
4217 USE_FEATURE_SEAMLESS_BZ2("j") USE_FEATURE_SEAMLESS_LZMA("a") \ 4217 IF_FEATURE_SEAMLESS_BZ2("j") IF_FEATURE_SEAMLESS_LZMA("a") \
4218 USE_FEATURE_SEAMLESS_Z("Z") "xtvO] " \ 4218 IF_FEATURE_SEAMLESS_Z("Z") "xtvO] " \
4219 USE_FEATURE_TAR_FROM("[-X FILE] ") \ 4219 IF_FEATURE_TAR_FROM("[-X FILE] ") \
4220 "[-f TARFILE] [-C DIR] [FILE(s)]..." 4220 "[-f TARFILE] [-C DIR] [FILE(s)]..."
4221#define tar_full_usage "\n\n" \ 4221#define tar_full_usage "\n\n" \
4222 "Create, extract, or list files from a tar file\n" \ 4222 "Create, extract, or list files from a tar file\n" \
4223 "\nOptions:" \ 4223 "\nOptions:" \
4224 USE_FEATURE_TAR_CREATE( \ 4224 IF_FEATURE_TAR_CREATE( \
4225 "\n c Create") \ 4225 "\n c Create") \
4226 "\n x Extract" \ 4226 "\n x Extract" \
4227 "\n t List" \ 4227 "\n t List" \
4228 "\nArchive format selection:" \ 4228 "\nArchive format selection:" \
4229 USE_FEATURE_SEAMLESS_GZ( \ 4229 IF_FEATURE_SEAMLESS_GZ( \
4230 "\n z Filter the archive through gzip" \ 4230 "\n z Filter the archive through gzip" \
4231 ) \ 4231 ) \
4232 USE_FEATURE_SEAMLESS_BZ2( \ 4232 IF_FEATURE_SEAMLESS_BZ2( \
4233 "\n j Filter the archive through bzip2" \ 4233 "\n j Filter the archive through bzip2" \
4234 ) \ 4234 ) \
4235 USE_FEATURE_SEAMLESS_LZMA( \ 4235 IF_FEATURE_SEAMLESS_LZMA( \
4236 "\n a Filter the archive through lzma" \ 4236 "\n a Filter the archive through lzma" \
4237 ) \ 4237 ) \
4238 USE_FEATURE_SEAMLESS_Z( \ 4238 IF_FEATURE_SEAMLESS_Z( \
4239 "\n Z Filter the archive through compress" \ 4239 "\n Z Filter the archive through compress" \
4240 ) \ 4240 ) \
4241 "\nFile selection:" \ 4241 "\nFile selection:" \
4242 "\n f Name of TARFILE or \"-\" for stdin" \ 4242 "\n f Name of TARFILE or \"-\" for stdin" \
4243 "\n O Extract to stdout" \ 4243 "\n O Extract to stdout" \
4244 USE_FEATURE_TAR_FROM( \ 4244 IF_FEATURE_TAR_FROM( \
4245 "\n exclude File to exclude" \ 4245 "\n exclude File to exclude" \
4246 "\n X File with names to exclude" \ 4246 "\n X File with names to exclude" \
4247 ) \ 4247 ) \
@@ -4303,13 +4303,13 @@
4303 "[OPTION]" 4303 "[OPTION]"
4304#define telnetd_full_usage "\n\n" \ 4304#define telnetd_full_usage "\n\n" \
4305 "Handle incoming telnet connections" \ 4305 "Handle incoming telnet connections" \
4306 SKIP_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \ 4306 IF_NOT_FEATURE_TELNETD_STANDALONE(" via inetd") "\n" \
4307 "\nOptions:" \ 4307 "\nOptions:" \
4308 "\n -l LOGIN Exec LOGIN on connect" \ 4308 "\n -l LOGIN Exec LOGIN on connect" \
4309 "\n -f issue_file Display issue_file instead of /etc/issue" \ 4309 "\n -f issue_file Display issue_file instead of /etc/issue" \
4310 "\n -K Close connection as soon as login exits" \ 4310 "\n -K Close connection as soon as login exits" \
4311 "\n (normally wait until all programs close slave pty)" \ 4311 "\n (normally wait until all programs close slave pty)" \
4312 USE_FEATURE_TELNETD_STANDALONE( \ 4312 IF_FEATURE_TELNETD_STANDALONE( \
4313 "\n -p PORT Port to listen on" \ 4313 "\n -p PORT Port to listen on" \
4314 "\n -b ADDR Address to bind to" \ 4314 "\n -b ADDR Address to bind to" \
4315 "\n -F Run in foreground" \ 4315 "\n -F Run in foreground" \
@@ -4343,11 +4343,11 @@
4343 "OBJECT: {qdisc|class|filter}\n" \ 4343 "OBJECT: {qdisc|class|filter}\n" \
4344 "CMD: {add|del|change|replace|show}\n" \ 4344 "CMD: {add|del|change|replace|show}\n" \
4345 "\n" \ 4345 "\n" \
4346 "qdisc [ handle QHANDLE ] [ root |"USE_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \ 4346 "qdisc [ handle QHANDLE ] [ root |"IF_FEATURE_TC_INGRESS(" ingress |")" parent CLASSID ]\n" \
4347 /* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \ 4347 /* "\t[ estimator INTERVAL TIME_CONSTANT ]\n" */ \
4348 "\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \ 4348 "\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
4349 "\tQDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n" \ 4349 "\tQDISC_KIND := { [p|b]fifo | tbf | prio | cbq | red | etc. }\n" \
4350 "qdisc show [ dev STRING ]"USE_FEATURE_TC_INGRESS(" [ingress]")"\n" \ 4350 "qdisc show [ dev STRING ]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n" \
4351 "class [ classid CLASSID ] [ root | parent CLASSID ]\n" \ 4351 "class [ classid CLASSID ] [ root | parent CLASSID ]\n" \
4352 "\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \ 4352 "\t[ [ QDISC_KIND ] [ help | OPTIONS ] ]\n" \
4353 "class show [ dev STRING ] [ root | parent CLASSID ]\n" \ 4353 "class show [ dev STRING ] [ root | parent CLASSID ]\n" \
@@ -4401,13 +4401,13 @@
4401 "\nOptions:" \ 4401 "\nOptions:" \
4402 "\n -l FILE Local FILE" \ 4402 "\n -l FILE Local FILE" \
4403 "\n -r FILE Remote FILE" \ 4403 "\n -r FILE Remote FILE" \
4404 USE_FEATURE_TFTP_GET( \ 4404 IF_FEATURE_TFTP_GET( \
4405 "\n -g Get file" \ 4405 "\n -g Get file" \
4406 ) \ 4406 ) \
4407 USE_FEATURE_TFTP_PUT( \ 4407 IF_FEATURE_TFTP_PUT( \
4408 "\n -p Put file" \ 4408 "\n -p Put file" \
4409 ) \ 4409 ) \
4410 USE_FEATURE_TFTP_BLOCKSIZE( \ 4410 IF_FEATURE_TFTP_BLOCKSIZE( \
4411 "\n -b SIZE Transfer blocks of SIZE octets" \ 4411 "\n -b SIZE Transfer blocks of SIZE octets" \
4412 ) 4412 )
4413 4413
@@ -4512,7 +4512,7 @@
4512 "" 4512 ""
4513#define tty_full_usage "\n\n" \ 4513#define tty_full_usage "\n\n" \
4514 "Print file name of standard input's terminal" \ 4514 "Print file name of standard input's terminal" \
4515 USE_INCLUDE_SUSv2( "\n" \ 4515 IF_INCLUDE_SUSv2( "\n" \
4516 "\nOptions:" \ 4516 "\nOptions:" \
4517 "\n -s Print nothing, only return exit status" \ 4517 "\n -s Print nothing, only return exit status" \
4518 ) 4518 )
@@ -4526,14 +4526,14 @@
4526 "Print dimension(s) of standard input's terminal, on error return 80x25" 4526 "Print dimension(s) of standard input's terminal, on error return 80x25"
4527 4527
4528#define tunctl_trivial_usage \ 4528#define tunctl_trivial_usage \
4529 "[-f device] ([-t name] | -d name)" USE_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]") 4529 "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]")
4530#define tunctl_full_usage "\n\n" \ 4530#define tunctl_full_usage "\n\n" \
4531 "Create or delete tun interfaces" \ 4531 "Create or delete tun interfaces" \
4532 "\nOptions:" \ 4532 "\nOptions:" \
4533 "\n -f name tun device (/dev/net/tun)" \ 4533 "\n -f name tun device (/dev/net/tun)" \
4534 "\n -t name Create iface 'name'" \ 4534 "\n -t name Create iface 'name'" \
4535 "\n -d name Delete iface 'name'" \ 4535 "\n -d name Delete iface 'name'" \
4536USE_FEATURE_TUNCTL_UG( \ 4536IF_FEATURE_TUNCTL_UG( \
4537 "\n -u owner Set iface owner" \ 4537 "\n -u owner Set iface owner" \
4538 "\n -g group Set iface group" \ 4538 "\n -g group Set iface group" \
4539 "\n -b Brief output" \ 4539 "\n -b Brief output" \
@@ -4554,9 +4554,9 @@ USE_FEATURE_TUNCTL_UG( \
4554 4554
4555#define udhcpc_trivial_usage \ 4555#define udhcpc_trivial_usage \
4556 "[-Cfbnqtvo] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n" \ 4556 "[-Cfbnqtvo] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n" \
4557 " [-p pidfile] [-r IP] [-s script] [-O dhcp-option]..." USE_FEATURE_UDHCP_PORT(" [-P N]") 4557 " [-p pidfile] [-r IP] [-s script] [-O dhcp-option]..." IF_FEATURE_UDHCP_PORT(" [-P N]")
4558#define udhcpc_full_usage "\n\n" \ 4558#define udhcpc_full_usage "\n\n" \
4559 USE_GETOPT_LONG( \ 4559 IF_GETOPT_LONG( \
4560 " -V,--vendorclass=CLASSID Vendor class identifier" \ 4560 " -V,--vendorclass=CLASSID Vendor class identifier" \
4561 "\n -i,--interface=INTERFACE Interface to use (default eth0)" \ 4561 "\n -i,--interface=INTERFACE Interface to use (default eth0)" \
4562 "\n -H,-h,--hostname=HOSTNAME Client hostname" \ 4562 "\n -H,-h,--hostname=HOSTNAME Client hostname" \
@@ -4578,14 +4578,14 @@ USE_FEATURE_TUNCTL_UG( \
4578 "\n -n,--now Exit with failure if lease is not immediately obtained" \ 4578 "\n -n,--now Exit with failure if lease is not immediately obtained" \
4579 "\n -q,--quit Quit after obtaining lease" \ 4579 "\n -q,--quit Quit after obtaining lease" \
4580 "\n -R,--release Release IP on quit" \ 4580 "\n -R,--release Release IP on quit" \
4581 USE_FEATURE_UDHCP_PORT( \ 4581 IF_FEATURE_UDHCP_PORT( \
4582 "\n -P,--client-port N Use port N instead of default 68" \ 4582 "\n -P,--client-port N Use port N instead of default 68" \
4583 ) \ 4583 ) \
4584 USE_FEATURE_UDHCPC_ARPING( \ 4584 IF_FEATURE_UDHCPC_ARPING( \
4585 "\n -a,--arping Use arping to validate offered address" \ 4585 "\n -a,--arping Use arping to validate offered address" \
4586 ) \ 4586 ) \
4587 ) \ 4587 ) \
4588 SKIP_GETOPT_LONG( \ 4588 IF_NOT_GETOPT_LONG( \
4589 " -V CLASSID Vendor class identifier" \ 4589 " -V CLASSID Vendor class identifier" \
4590 "\n -i INTERFACE Interface to use (default: eth0)" \ 4590 "\n -i INTERFACE Interface to use (default: eth0)" \
4591 "\n -H,-h HOSTNAME Client hostname" \ 4591 "\n -H,-h HOSTNAME Client hostname" \
@@ -4607,22 +4607,22 @@ USE_FEATURE_TUNCTL_UG( \
4607 "\n -n Exit with failure if lease is not immediately obtained" \ 4607 "\n -n Exit with failure if lease is not immediately obtained" \
4608 "\n -q Quit after obtaining lease" \ 4608 "\n -q Quit after obtaining lease" \
4609 "\n -R Release IP on quit" \ 4609 "\n -R Release IP on quit" \
4610 USE_FEATURE_UDHCP_PORT( \ 4610 IF_FEATURE_UDHCP_PORT( \
4611 "\n -P N Use port N instead of default 68" \ 4611 "\n -P N Use port N instead of default 68" \
4612 ) \ 4612 ) \
4613 USE_FEATURE_UDHCPC_ARPING( \ 4613 IF_FEATURE_UDHCPC_ARPING( \
4614 "\n -a Use arping to validate offered address" \ 4614 "\n -a Use arping to validate offered address" \
4615 ) \ 4615 ) \
4616 ) 4616 )
4617 4617
4618#define udhcpd_trivial_usage \ 4618#define udhcpd_trivial_usage \
4619 "[-fS]" USE_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \ 4619 "[-fS]" IF_FEATURE_UDHCP_PORT(" [-P N]") " [configfile]" \
4620 4620
4621#define udhcpd_full_usage "\n\n" \ 4621#define udhcpd_full_usage "\n\n" \
4622 "DHCP server\n" \ 4622 "DHCP server\n" \
4623 "\n -f Run in foreground" \ 4623 "\n -f Run in foreground" \
4624 "\n -S Log to syslog too" \ 4624 "\n -S Log to syslog too" \
4625 USE_FEATURE_UDHCP_PORT( \ 4625 IF_FEATURE_UDHCP_PORT( \
4626 "\n -P N Use port N instead of default 67" \ 4626 "\n -P N Use port N instead of default 67" \
4627 ) 4627 )
4628 4628
@@ -4631,16 +4631,16 @@ USE_FEATURE_TUNCTL_UG( \
4631#define umount_full_usage "\n\n" \ 4631#define umount_full_usage "\n\n" \
4632 "Unmount file systems\n" \ 4632 "Unmount file systems\n" \
4633 "\nOptions:" \ 4633 "\nOptions:" \
4634 USE_FEATURE_UMOUNT_ALL( \ 4634 IF_FEATURE_UMOUNT_ALL( \
4635 "\n -a Unmount all file systems" USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \ 4635 "\n -a Unmount all file systems" IF_FEATURE_MTAB_SUPPORT(" in /etc/mtab") \
4636 ) \ 4636 ) \
4637 USE_FEATURE_MTAB_SUPPORT( \ 4637 IF_FEATURE_MTAB_SUPPORT( \
4638 "\n -n Don't erase /etc/mtab entries" \ 4638 "\n -n Don't erase /etc/mtab entries" \
4639 ) \ 4639 ) \
4640 "\n -r Try to remount devices as read-only if mount is busy" \ 4640 "\n -r Try to remount devices as read-only if mount is busy" \
4641 "\n -l Lazy umount (detach filesystem)" \ 4641 "\n -l Lazy umount (detach filesystem)" \
4642 "\n -f Force umount (i.e., unreachable NFS server)" \ 4642 "\n -f Force umount (i.e., unreachable NFS server)" \
4643 USE_FEATURE_MOUNT_LOOP( \ 4643 IF_FEATURE_MOUNT_LOOP( \
4644 "\n -d Free loop device if it has been used" \ 4644 "\n -d Free loop device if it has been used" \
4645 ) 4645 )
4646 4646
@@ -4677,12 +4677,12 @@ USE_FEATURE_TUNCTL_UG( \
4677#define unexpand_full_usage "\n\n" \ 4677#define unexpand_full_usage "\n\n" \
4678 "Convert spaces to tabs, writing to standard output.\n" \ 4678 "Convert spaces to tabs, writing to standard output.\n" \
4679 "\nOptions:" \ 4679 "\nOptions:" \
4680 USE_FEATURE_UNEXPAND_LONG_OPTIONS( \ 4680 IF_FEATURE_UNEXPAND_LONG_OPTIONS( \
4681 "\n -a,--all Convert all blanks" \ 4681 "\n -a,--all Convert all blanks" \
4682 "\n -f,--first-only Convert only leading blanks" \ 4682 "\n -f,--first-only Convert only leading blanks" \
4683 "\n -t,--tabs=N Tabstops every N chars" \ 4683 "\n -t,--tabs=N Tabstops every N chars" \
4684 ) \ 4684 ) \
4685 SKIP_FEATURE_UNEXPAND_LONG_OPTIONS( \ 4685 IF_NOT_FEATURE_UNEXPAND_LONG_OPTIONS( \
4686 "\n -a Convert all blanks" \ 4686 "\n -a Convert all blanks" \
4687 "\n -f Convert only leading blanks" \ 4687 "\n -f Convert only leading blanks" \
4688 "\n -t N Tabstops every N chars" \ 4688 "\n -t N Tabstops every N chars" \
@@ -4788,9 +4788,9 @@ USE_FEATURE_TUNCTL_UG( \
4788#define vi_full_usage "\n\n" \ 4788#define vi_full_usage "\n\n" \
4789 "Edit FILE\n" \ 4789 "Edit FILE\n" \
4790 "\nOptions:" \ 4790 "\nOptions:" \
4791 USE_FEATURE_VI_COLON( \ 4791 IF_FEATURE_VI_COLON( \
4792 "\n -c Initial command to run ($EXINIT also available)") \ 4792 "\n -c Initial command to run ($EXINIT also available)") \
4793 USE_FEATURE_VI_READONLY( \ 4793 IF_FEATURE_VI_READONLY( \
4794 "\n -R Read-only - do not write to the file") \ 4794 "\n -R Read-only - do not write to the file") \
4795 "\n -H Short help regarding available features" \ 4795 "\n -H Short help regarding available features" \
4796 4796
@@ -4842,12 +4842,12 @@ USE_FEATURE_TUNCTL_UG( \
4842 " 31 46 1365 /etc/passwd\n" 4842 " 31 46 1365 /etc/passwd\n"
4843 4843
4844#define wget_trivial_usage \ 4844#define wget_trivial_usage \
4845 USE_FEATURE_WGET_LONG_OPTIONS( \ 4845 IF_FEATURE_WGET_LONG_OPTIONS( \
4846 "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]\n" \ 4846 "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]\n" \
4847 " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \ 4847 " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \
4848 " [-U|--user-agent agent] url" \ 4848 " [-U|--user-agent agent] url" \
4849 ) \ 4849 ) \
4850 SKIP_FEATURE_WGET_LONG_OPTIONS( \ 4850 IF_NOT_FEATURE_WGET_LONG_OPTIONS( \
4851 "[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \ 4851 "[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \
4852 ) 4852 )
4853#define wget_full_usage "\n\n" \ 4853#define wget_full_usage "\n\n" \
@@ -4886,16 +4886,16 @@ USE_FEATURE_TUNCTL_UG( \
4886#define xargs_full_usage "\n\n" \ 4886#define xargs_full_usage "\n\n" \
4887 "Execute COMMAND on every item given by standard input\n" \ 4887 "Execute COMMAND on every item given by standard input\n" \
4888 "\nOptions:" \ 4888 "\nOptions:" \
4889 USE_FEATURE_XARGS_SUPPORT_CONFIRMATION( \ 4889 IF_FEATURE_XARGS_SUPPORT_CONFIRMATION( \
4890 "\n -p Ask user whether to run each command") \ 4890 "\n -p Ask user whether to run each command") \
4891 "\n -r Do not run command if input is empty" \ 4891 "\n -r Do not run command if input is empty" \
4892 USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( \ 4892 IF_FEATURE_XARGS_SUPPORT_ZERO_TERM( \
4893 "\n -0 Input is separated by NUL characters") \ 4893 "\n -0 Input is separated by NUL characters") \
4894 "\n -t Print the command on stderr before execution" \ 4894 "\n -t Print the command on stderr before execution" \
4895 "\n -e[STR] STR stops input processing" \ 4895 "\n -e[STR] STR stops input processing" \
4896 "\n -n N Pass no more than N args to COMMAND" \ 4896 "\n -n N Pass no more than N args to COMMAND" \
4897 "\n -s N Pass command line of no more than N bytes" \ 4897 "\n -s N Pass command line of no more than N bytes" \
4898 USE_FEATURE_XARGS_SUPPORT_TERMOPT( \ 4898 IF_FEATURE_XARGS_SUPPORT_TERMOPT( \
4899 "\n -x Exit if size is exceeded") \ 4899 "\n -x Exit if size is exceeded") \
4900 4900
4901#define xargs_example_usage \ 4901#define xargs_example_usage \
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 80380ae08..8f3729f71 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -55,8 +55,8 @@ static const char usage_messages[] ALIGN1 = ""
55#ifdef SINGLE_APPLET_MAIN 55#ifdef SINGLE_APPLET_MAIN
56#undef ENABLE_FEATURE_INDIVIDUAL 56#undef ENABLE_FEATURE_INDIVIDUAL
57#define ENABLE_FEATURE_INDIVIDUAL 1 57#define ENABLE_FEATURE_INDIVIDUAL 1
58#undef USE_FEATURE_INDIVIDUAL 58#undef IF_FEATURE_INDIVIDUAL
59#define USE_FEATURE_INDIVIDUAL(...) __VA_ARGS__ 59#define IF_FEATURE_INDIVIDUAL(...) __VA_ARGS__
60#endif 60#endif
61 61
62 62
@@ -179,10 +179,10 @@ int FAST_FUNC find_applet_by_name(const char *name)
179 179
180 180
181void lbb_prepare(const char *applet 181void lbb_prepare(const char *applet
182 USE_FEATURE_INDIVIDUAL(, char **argv)) 182 IF_FEATURE_INDIVIDUAL(, char **argv))
183 MAIN_EXTERNALLY_VISIBLE; 183 MAIN_EXTERNALLY_VISIBLE;
184void lbb_prepare(const char *applet 184void lbb_prepare(const char *applet
185 USE_FEATURE_INDIVIDUAL(, char **argv)) 185 IF_FEATURE_INDIVIDUAL(, char **argv))
186{ 186{
187#ifdef __GLIBC__ 187#ifdef __GLIBC__
188 (*(int **)&bb_errno) = __errno_location(); 188 (*(int **)&bb_errno) = __errno_location();
@@ -224,7 +224,7 @@ bool re_execed;
224/* If not built as a single-applet executable... */ 224/* If not built as a single-applet executable... */
225#if !defined(SINGLE_APPLET_MAIN) 225#if !defined(SINGLE_APPLET_MAIN)
226 226
227USE_FEATURE_SUID(static uid_t ruid;) /* real uid */ 227IF_FEATURE_SUID(static uid_t ruid;) /* real uid */
228 228
229#if ENABLE_FEATURE_SUID_CONFIG 229#if ENABLE_FEATURE_SUID_CONFIG
230 230
@@ -500,7 +500,7 @@ static void parse_config_file(void)
500#else 500#else
501static inline void parse_config_file(void) 501static inline void parse_config_file(void)
502{ 502{
503 USE_FEATURE_SUID(ruid = getuid();) 503 IF_FEATURE_SUID(ruid = getuid();)
504} 504}
505#endif /* FEATURE_SUID_CONFIG */ 505#endif /* FEATURE_SUID_CONFIG */
506 506
@@ -754,10 +754,10 @@ int main(int argc UNUSED_PARAM, char **argv)
754#if defined(SINGLE_APPLET_MAIN) 754#if defined(SINGLE_APPLET_MAIN)
755 /* Only one applet is selected by the user! */ 755 /* Only one applet is selected by the user! */
756 /* applet_names in this case is just "applet\0\0" */ 756 /* applet_names in this case is just "applet\0\0" */
757 lbb_prepare(applet_names USE_FEATURE_INDIVIDUAL(, argv)); 757 lbb_prepare(applet_names IF_FEATURE_INDIVIDUAL(, argv));
758 return SINGLE_APPLET_MAIN(argc, argv); 758 return SINGLE_APPLET_MAIN(argc, argv);
759#else 759#else
760 lbb_prepare("busybox" USE_FEATURE_INDIVIDUAL(, argv)); 760 lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
761 761
762#if !BB_MMU 762#if !BB_MMU
763 /* NOMMU re-exec trick sets high-order bit in first byte of name */ 763 /* NOMMU re-exec trick sets high-order bit in first byte of name */
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 7bcdb954c..e0ab73250 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -62,10 +62,10 @@
62 62
63#define ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR \ 63#define ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR \
64 (ENABLE_FEATURE_USERNAME_COMPLETION || ENABLE_FEATURE_EDITING_FANCY_PROMPT) 64 (ENABLE_FEATURE_USERNAME_COMPLETION || ENABLE_FEATURE_EDITING_FANCY_PROMPT)
65#define USE_FEATURE_GETUSERNAME_AND_HOMEDIR(...) 65#define IF_FEATURE_GETUSERNAME_AND_HOMEDIR(...)
66#if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR 66#if ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR
67#undef USE_FEATURE_GETUSERNAME_AND_HOMEDIR 67#undef IF_FEATURE_GETUSERNAME_AND_HOMEDIR
68#define USE_FEATURE_GETUSERNAME_AND_HOMEDIR(...) __VA_ARGS__ 68#define IF_FEATURE_GETUSERNAME_AND_HOMEDIR(...) __VA_ARGS__
69#endif 69#endif
70 70
71enum { 71enum {
@@ -152,8 +152,8 @@ extern struct lineedit_statics *const lineedit_ptr_to_statics;
152 (*(struct lineedit_statics**)&lineedit_ptr_to_statics) = xzalloc(sizeof(S)); \ 152 (*(struct lineedit_statics**)&lineedit_ptr_to_statics) = xzalloc(sizeof(S)); \
153 barrier(); \ 153 barrier(); \
154 cmdedit_termw = 80; \ 154 cmdedit_termw = 80; \
155 USE_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \ 155 IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \
156 USE_FEATURE_GETUSERNAME_AND_HOMEDIR(home_pwd_buf = (char*)null_str;) \ 156 IF_FEATURE_GETUSERNAME_AND_HOMEDIR(home_pwd_buf = (char*)null_str;) \
157} while (0) 157} while (0)
158static void deinit_S(void) 158static void deinit_S(void)
159{ 159{
@@ -1160,7 +1160,7 @@ static void remember_in_history(char *str)
1160 if ((state->flags & SAVE_HISTORY) && state->hist_file) 1160 if ((state->flags & SAVE_HISTORY) && state->hist_file)
1161 save_history(str); 1161 save_history(str);
1162#endif 1162#endif
1163 USE_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines++;) 1163 IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines++;)
1164} 1164}
1165 1165
1166#else /* MAX_HISTORY == 0 */ 1166#else /* MAX_HISTORY == 0 */
@@ -1442,7 +1442,7 @@ static void win_changed(int nsig)
1442 1442
1443/* leave out the "vi-mode"-only case labels if vi editing isn't 1443/* leave out the "vi-mode"-only case labels if vi editing isn't
1444 * configured. */ 1444 * configured. */
1445#define vi_case(caselabel) USE_FEATURE_EDITING(case caselabel) 1445#define vi_case(caselabel) IF_FEATURE_EDITING(case caselabel)
1446 1446
1447/* convert uppercase ascii to equivalent control char, for readability */ 1447/* convert uppercase ascii to equivalent control char, for readability */
1448#undef CTRL 1448#undef CTRL
diff --git a/libbb/mtab_file.c b/libbb/mtab_file.c
index 030b148d3..c9d9a695e 100644
--- a/libbb/mtab_file.c
+++ b/libbb/mtab_file.c
@@ -12,4 +12,4 @@
12/* Busybox mount uses either /proc/mounts or /etc/mtab to 12/* Busybox mount uses either /proc/mounts or /etc/mtab to
13 * get the list of currently mounted filesystems */ 13 * get the list of currently mounted filesystems */
14const char bb_path_mtab_file[] ALIGN1 = 14const char bb_path_mtab_file[] ALIGN1 =
15USE_FEATURE_MTAB_SUPPORT("/etc/mtab")SKIP_FEATURE_MTAB_SUPPORT("/proc/mounts"); 15IF_FEATURE_MTAB_SUPPORT("/etc/mtab")IF_NOT_FEATURE_MTAB_SUPPORT("/proc/mounts");
diff --git a/libbb/procps.c b/libbb/procps.c
index c5e40bf88..445e709c8 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -111,7 +111,7 @@ void FAST_FUNC free_procps_scan(procps_status_t* sp)
111{ 111{
112 closedir(sp->dir); 112 closedir(sp->dir);
113 free(sp->argv0); 113 free(sp->argv0);
114 USE_SELINUX(free(sp->context);) 114 IF_SELINUX(free(sp->context);)
115 free(sp); 115 free(sp);
116} 116}
117 117
diff --git a/libbb/read.c b/libbb/read.c
index 37503e84d..a0c0cc64a 100644
--- a/libbb/read.c
+++ b/libbb/read.c
@@ -315,7 +315,7 @@ int FAST_FUNC open_zipped(const char *fname)
315 char *sfx; 315 char *sfx;
316 int fd; 316 int fd;
317#if BB_MMU 317#if BB_MMU
318 USE_DESKTOP(long long) int FAST_FUNC (*xformer)(int src_fd, int dst_fd); 318 IF_DESKTOP(long long) int FAST_FUNC (*xformer)(int src_fd, int dst_fd);
319 enum { xformer_prog = 0 }; 319 enum { xformer_prog = 0 };
320#else 320#else
321 enum { xformer = 0 }; 321 enum { xformer = 0 };
@@ -352,7 +352,7 @@ int FAST_FUNC open_zipped(const char *fname)
352 || magic[0] != 'B' || magic[1] != 'Z' 352 || magic[0] != 'B' || magic[1] != 'Z'
353 ) { 353 ) {
354 bb_error_msg_and_die("no gzip" 354 bb_error_msg_and_die("no gzip"
355 USE_FEATURE_SEAMLESS_BZ2("/bzip2") 355 IF_FEATURE_SEAMLESS_BZ2("/bzip2")
356 " magic"); 356 " magic");
357 } 357 }
358#if BB_MMU 358#if BB_MMU
diff --git a/libbb/xconnect.c b/libbb/xconnect.c
index f5d7983a4..1b4f4f78a 100644
--- a/libbb/xconnect.c
+++ b/libbb/xconnect.c
@@ -151,7 +151,7 @@ void FAST_FUNC set_nport(len_and_sockaddr *lsa, unsigned port)
151 * port: if neither of above specifies port # */ 151 * port: if neither of above specifies port # */
152static len_and_sockaddr* str2sockaddr( 152static len_and_sockaddr* str2sockaddr(
153 const char *host, int port, 153 const char *host, int port,
154USE_FEATURE_IPV6(sa_family_t af,) 154IF_FEATURE_IPV6(sa_family_t af,)
155 int ai_flags) 155 int ai_flags)
156{ 156{
157 int rc; 157 int rc;
@@ -269,9 +269,9 @@ len_and_sockaddr* FAST_FUNC xdotted2sockaddr(const char *host, int port)
269} 269}
270 270
271#undef xsocket_type 271#undef xsocket_type
272int FAST_FUNC xsocket_type(len_and_sockaddr **lsap, USE_FEATURE_IPV6(int family,) int sock_type) 272int FAST_FUNC xsocket_type(len_and_sockaddr **lsap, IF_FEATURE_IPV6(int family,) int sock_type)
273{ 273{
274 SKIP_FEATURE_IPV6(enum { family = AF_INET };) 274 IF_NOT_FEATURE_IPV6(enum { family = AF_INET };)
275 len_and_sockaddr *lsa; 275 len_and_sockaddr *lsa;
276 int fd; 276 int fd;
277 int len; 277 int len;
@@ -303,7 +303,7 @@ int FAST_FUNC xsocket_type(len_and_sockaddr **lsap, USE_FEATURE_IPV6(int family,
303 303
304int FAST_FUNC xsocket_stream(len_and_sockaddr **lsap) 304int FAST_FUNC xsocket_stream(len_and_sockaddr **lsap)
305{ 305{
306 return xsocket_type(lsap, USE_FEATURE_IPV6(AF_UNSPEC,) SOCK_STREAM); 306 return xsocket_type(lsap, IF_FEATURE_IPV6(AF_UNSPEC,) SOCK_STREAM);
307} 307}
308 308
309static int create_and_bind_or_die(const char *bindaddr, int port, int sock_type) 309static int create_and_bind_or_die(const char *bindaddr, int port, int sock_type)
@@ -316,7 +316,7 @@ static int create_and_bind_or_die(const char *bindaddr, int port, int sock_type)
316 /* user specified bind addr dictates family */ 316 /* user specified bind addr dictates family */
317 fd = xsocket(lsa->u.sa.sa_family, sock_type, 0); 317 fd = xsocket(lsa->u.sa.sa_family, sock_type, 0);
318 } else { 318 } else {
319 fd = xsocket_type(&lsa, USE_FEATURE_IPV6(AF_UNSPEC,) sock_type); 319 fd = xsocket_type(&lsa, IF_FEATURE_IPV6(AF_UNSPEC,) sock_type);
320 set_nport(lsa, htons(port)); 320 set_nport(lsa, htons(port));
321 } 321 }
322 setsockopt_reuseaddr(fd); 322 setsockopt_reuseaddr(fd);
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index 6d0fa6e8d..5f56b36de 100644
--- a/libbb/xfuncs_printf.c
+++ b/libbb/xfuncs_printf.c
@@ -420,7 +420,7 @@ int FAST_FUNC xsocket(int domain, int type, int protocol)
420 const char *s = "INET"; 420 const char *s = "INET";
421 if (domain == AF_PACKET) s = "PACKET"; 421 if (domain == AF_PACKET) s = "PACKET";
422 if (domain == AF_NETLINK) s = "NETLINK"; 422 if (domain == AF_NETLINK) s = "NETLINK";
423USE_FEATURE_IPV6(if (domain == AF_INET6) s = "INET6";) 423IF_FEATURE_IPV6(if (domain == AF_INET6) s = "INET6";)
424 bb_perror_msg_and_die("socket(AF_%s)", s); 424 bb_perror_msg_and_die("socket(AF_%s)", s);
425#else 425#else
426 bb_perror_msg_and_die("socket"); 426 bb_perror_msg_and_die("socket");
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index 4bffbe83f..68b398068 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -29,7 +29,7 @@ int chpasswd_main(int argc UNUSED_PARAM, char **argv)
29 bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); 29 bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
30 30
31 opt_complementary = "m--e:e--m"; 31 opt_complementary = "m--e:e--m";
32 USE_GETOPT_LONG(applet_long_options = chpasswd_longopts;) 32 IF_GETOPT_LONG(applet_long_options = chpasswd_longopts;)
33 opt = getopt32(argv, "em"); 33 opt = getopt32(argv, "em");
34 34
35 while ((name = xmalloc_fgetline(stdin)) != NULL) { 35 while ((name = xmalloc_fgetline(stdin)) != NULL) {
diff --git a/loginutils/login.c b/loginutils/login.c
index d57d529c0..31b25a43e 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -285,8 +285,8 @@ int login_main(int argc UNUSED_PARAM, char **argv)
285 char *opt_host = opt_host; /* for compiler */ 285 char *opt_host = opt_host; /* for compiler */
286 char *opt_user = opt_user; /* for compiler */ 286 char *opt_user = opt_user; /* for compiler */
287 char *full_tty; 287 char *full_tty;
288 USE_SELINUX(security_context_t user_sid = NULL;) 288 IF_SELINUX(security_context_t user_sid = NULL;)
289 USE_FEATURE_UTMP(struct utmp utent;) 289 IF_FEATURE_UTMP(struct utmp utent;)
290#if ENABLE_PAM 290#if ENABLE_PAM
291 int pamret; 291 int pamret;
292 pam_handle_t *pamh; 292 pam_handle_t *pamh;
@@ -333,7 +333,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
333 read_or_build_utent(&utent, run_by_root); 333 read_or_build_utent(&utent, run_by_root);
334 334
335 if (opt & LOGIN_OPT_h) { 335 if (opt & LOGIN_OPT_h) {
336 USE_FEATURE_UTMP(safe_strncpy(utent.ut_host, opt_host, sizeof(utent.ut_host));) 336 IF_FEATURE_UTMP(safe_strncpy(utent.ut_host, opt_host, sizeof(utent.ut_host));)
337 fromhost = xasprintf(" on '%s' from '%s'", short_tty, opt_host); 337 fromhost = xasprintf(" on '%s' from '%s'", short_tty, opt_host);
338 } else { 338 } else {
339 fromhost = xasprintf(" on '%s'", short_tty); 339 fromhost = xasprintf(" on '%s'", short_tty);
@@ -457,7 +457,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
457 457
458 write_utent(&utent, username); 458 write_utent(&utent, username);
459 459
460 USE_SELINUX(initselinux(username, full_tty, &user_sid)); 460 IF_SELINUX(initselinux(username, full_tty, &user_sid));
461 461
462 /* Try these, but don't complain if they fail. 462 /* Try these, but don't complain if they fail.
463 * _f_chown is safe wrt race t=ttyname(0);...;chown(t); */ 463 * _f_chown is safe wrt race t=ttyname(0);...;chown(t); */
@@ -482,7 +482,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
482 482
483 /* well, a simple setexeccon() here would do the job as well, 483 /* well, a simple setexeccon() here would do the job as well,
484 * but let's play the game for now */ 484 * but let's play the game for now */
485 USE_SELINUX(set_current_security_context(user_sid);) 485 IF_SELINUX(set_current_security_context(user_sid);)
486 486
487 // util-linux login also does: 487 // util-linux login also does:
488 // /* start new session */ 488 // /* start new session */
diff --git a/loginutils/su.c b/loginutils/su.c
index de8c18d25..a8b852b09 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -43,7 +43,7 @@ int su_main(int argc UNUSED_PARAM, char **argv)
43 the user, especially if someone su's from a su-shell. 43 the user, especially if someone su's from a su-shell.
44 But getlogin can fail -- usually due to lack of utmp entry. 44 But getlogin can fail -- usually due to lack of utmp entry.
45 in this case resort to getpwuid. */ 45 in this case resort to getpwuid. */
46 old_user = xstrdup(USE_FEATURE_UTMP(getlogin() ? : ) (pw = getpwuid(cur_uid)) ? pw->pw_name : ""); 46 old_user = xstrdup(IF_FEATURE_UTMP(getlogin() ? : ) (pw = getpwuid(cur_uid)) ? pw->pw_name : "");
47 tty = xmalloc_ttyname(2) ? : "none"; 47 tty = xmalloc_ttyname(2) ? : "none";
48 openlog(applet_name, 0, LOG_AUTH); 48 openlog(applet_name, 0, LOG_AUTH);
49 } 49 }
@@ -91,7 +91,7 @@ int su_main(int argc UNUSED_PARAM, char **argv)
91 change_identity(pw); 91 change_identity(pw);
92 /* setup_environment params: shell, clear_env, change_env, pw */ 92 /* setup_environment params: shell, clear_env, change_env, pw */
93 setup_environment(opt_shell, flags & SU_OPT_l, !(flags & SU_OPT_mp), pw); 93 setup_environment(opt_shell, flags & SU_OPT_l, !(flags & SU_OPT_mp), pw);
94 USE_SELINUX(set_current_security_context(NULL);) 94 IF_SELINUX(set_current_security_context(NULL);)
95 95
96 /* Never returns */ 96 /* Never returns */
97 run_shell(opt_shell, flags & SU_OPT_l, opt_command, (const char**)argv); 97 run_shell(opt_shell, flags & SU_OPT_l, opt_command, (const char**)argv);
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index 4ffefe933..77eff9f8d 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -99,7 +99,7 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv)
99 99
100 bb_info_msg("System Maintenance Mode"); 100 bb_info_msg("System Maintenance Mode");
101 101
102 USE_SELINUX(renew_current_security_context()); 102 IF_SELINUX(renew_current_security_context());
103 103
104 shell = getenv("SUSHELL"); 104 shell = getenv("SUSHELL");
105 if (!shell) 105 if (!shell)
diff --git a/mailutils/mime.c b/mailutils/mime.c
index bda727b7c..d309d7f7f 100644
--- a/mailutils/mime.c
+++ b/mailutils/mime.c
@@ -341,11 +341,11 @@ int reformime_main(int argc UNUSED_PARAM, char **argv)
341 341
342 // parse options 342 // parse options
343 // N.B. only -x and -X are supported so far 343 // N.B. only -x and -X are supported so far
344 opt_complementary = "x--X:X--x" USE_FEATURE_REFORMIME_COMPAT(":m::"); 344 opt_complementary = "x--X:X--x" IF_FEATURE_REFORMIME_COMPAT(":m::");
345 opts = getopt32(argv, 345 opts = getopt32(argv,
346 "x:X" USE_FEATURE_REFORMIME_COMPAT("deis:r:c:m:h:o:O:"), 346 "x:X" IF_FEATURE_REFORMIME_COMPAT("deis:r:c:m:h:o:O:"),
347 &opt_prefix 347 &opt_prefix
348 USE_FEATURE_REFORMIME_COMPAT(, NULL, NULL, &G.opt_charset, NULL, NULL, NULL, NULL) 348 IF_FEATURE_REFORMIME_COMPAT(, NULL, NULL, &G.opt_charset, NULL, NULL, NULL, NULL)
349 ); 349 );
350 //argc -= optind; 350 //argc -= optind;
351 argv += optind; 351 argv += optind;
diff --git a/mailutils/popmaildir.c b/mailutils/popmaildir.c
index 1a72b87c5..ab9ddbaed 100644
--- a/mailutils/popmaildir.c
+++ b/mailutils/popmaildir.c
@@ -73,9 +73,9 @@ int popmaildir_main(int argc UNUSED_PARAM, char **argv)
73 // parse options 73 // parse options
74 opt_complementary = "-1:dd:t+:R+:L+:H+"; 74 opt_complementary = "-1:dd:t+:R+:L+:H+";
75 opts = getopt32(argv, 75 opts = getopt32(argv,
76 "bdmVcasTkt:" "R:Z:L:H:" USE_FEATURE_POPMAILDIR_DELIVERY("M:F:"), 76 "bdmVcasTkt:" "R:Z:L:H:" IF_FEATURE_POPMAILDIR_DELIVERY("M:F:"),
77 &timeout, NULL, NULL, NULL, &opt_nlines 77 &timeout, NULL, NULL, NULL, &opt_nlines
78 USE_FEATURE_POPMAILDIR_DELIVERY(, &delivery, &delivery) // we treat -M and -F the same 78 IF_FEATURE_POPMAILDIR_DELIVERY(, &delivery, &delivery) // we treat -M and -F the same
79 ); 79 );
80 //argc -= optind; 80 //argc -= optind;
81 argv += optind; 81 argv += optind;
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 804fe0b29..f0b64fe3a 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -162,11 +162,11 @@ int crond_main(int argc UNUSED_PARAM, char **argv)
162 INIT_G(); 162 INIT_G();
163 163
164 /* "-b after -f is ignored", and so on for every pair a-b */ 164 /* "-b after -f is ignored", and so on for every pair a-b */
165 opt_complementary = "f-b:b-f:S-L:L-S" USE_FEATURE_CROND_D(":d-l") 165 opt_complementary = "f-b:b-f:S-L:L-S" IF_FEATURE_CROND_D(":d-l")
166 ":l+:d+"; /* -l and -d have numeric param */ 166 ":l+:d+"; /* -l and -d have numeric param */
167 opt = getopt32(argv, "l:L:fbSc:" USE_FEATURE_CROND_D("d:"), 167 opt = getopt32(argv, "l:L:fbSc:" IF_FEATURE_CROND_D("d:"),
168 &LogLevel, &LogFile, &CDir 168 &LogLevel, &LogFile, &CDir
169 USE_FEATURE_CROND_D(,&LogLevel)); 169 IF_FEATURE_CROND_D(,&LogLevel));
170 /* both -d N and -l N set the same variable: LogLevel */ 170 /* both -d N and -l N set the same variable: LogLevel */
171 171
172 if (!(opt & OPT_f)) { 172 if (!(opt & OPT_f)) {
diff --git a/miscutils/eject.c b/miscutils/eject.c
index ff3976ebb..94a36c0da 100644
--- a/miscutils/eject.c
+++ b/miscutils/eject.c
@@ -89,7 +89,7 @@ int eject_main(int argc UNUSED_PARAM, char **argv)
89 const char *device; 89 const char *device;
90 90
91 opt_complementary = "?1:t--T:T--t"; 91 opt_complementary = "?1:t--T:T--t";
92 flags = getopt32(argv, "tT" USE_FEATURE_EJECT_SCSI("s")); 92 flags = getopt32(argv, "tT" IF_FEATURE_EJECT_SCSI("s"));
93 device = argv[optind] ? argv[optind] : "/dev/cdrom"; 93 device = argv[optind] ? argv[optind] : "/dev/cdrom";
94 94
95 /* We used to do "umount <device>" here, but it was buggy 95 /* We used to do "umount <device>" here, but it was buggy
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index de5d68a04..f9638887a 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -293,15 +293,15 @@ struct globals {
293 unsigned long doorlock; 293 unsigned long doorlock;
294 unsigned long apmmode; 294 unsigned long apmmode;
295#endif 295#endif
296 USE_FEATURE_HDPARM_GET_IDENTITY( smallint get_IDentity;) 296 IF_FEATURE_HDPARM_GET_IDENTITY( smallint get_IDentity;)
297 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( smallint set_busstate, get_busstate;) 297 IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( smallint set_busstate, get_busstate;)
298 USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( smallint perform_reset;) 298 IF_FEATURE_HDPARM_HDIO_DRIVE_RESET( smallint perform_reset;)
299 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( smallint perform_tristate;) 299 IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( smallint perform_tristate;)
300 USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(smallint unregister_hwif;) 300 IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(smallint unregister_hwif;)
301 USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( smallint scan_hwif;) 301 IF_FEATURE_HDPARM_HDIO_SCAN_HWIF( smallint scan_hwif;)
302 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( unsigned long busstate;) 302 IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( unsigned long busstate;)
303 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( unsigned long tristate;) 303 IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( unsigned long tristate;)
304 USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(unsigned long hwif;) 304 IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(unsigned long hwif;)
305#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF 305#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF
306 unsigned long hwif_data; 306 unsigned long hwif_data;
307 unsigned long hwif_ctrl; 307 unsigned long hwif_ctrl;
@@ -1960,12 +1960,12 @@ static void parse_xfermode(int flag, smallint *get, smallint *set, int *value)
1960/*------- getopt short options --------*/ 1960/*------- getopt short options --------*/
1961static const char hdparm_options[] ALIGN1 = 1961static const char hdparm_options[] ALIGN1 =
1962 "gfu::n::p:r::m::c::k::a::B:tT" 1962 "gfu::n::p:r::m::c::k::a::B:tT"
1963 USE_FEATURE_HDPARM_GET_IDENTITY("iI") 1963 IF_FEATURE_HDPARM_GET_IDENTITY("iI")
1964 USE_FEATURE_HDPARM_HDIO_GETSET_DMA("d::") 1964 IF_FEATURE_HDPARM_HDIO_GETSET_DMA("d::")
1965#ifdef HDIO_DRIVE_CMD 1965#ifdef HDIO_DRIVE_CMD
1966 "S:D:P:X:K:A:L:W:CyYzZ" 1966 "S:D:P:X:K:A:L:W:CyYzZ"
1967#endif 1967#endif
1968 USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF("U:") 1968 IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF("U:")
1969#ifdef HDIO_GET_QDMA 1969#ifdef HDIO_GET_QDMA
1970#ifdef HDIO_SET_QDMA 1970#ifdef HDIO_SET_QDMA
1971 "Q:" 1971 "Q:"
@@ -1973,9 +1973,9 @@ static const char hdparm_options[] ALIGN1 =
1973 "Q" 1973 "Q"
1974#endif 1974#endif
1975#endif 1975#endif
1976 USE_FEATURE_HDPARM_HDIO_DRIVE_RESET("w") 1976 IF_FEATURE_HDPARM_HDIO_DRIVE_RESET("w")
1977 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF("x::b:") 1977 IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF("x::b:")
1978 USE_FEATURE_HDPARM_HDIO_SCAN_HWIF("R:"); 1978 IF_FEATURE_HDPARM_HDIO_SCAN_HWIF("R:");
1979/*-------------------------------------*/ 1979/*-------------------------------------*/
1980 1980
1981/* our main() routine: */ 1981/* our main() routine: */
@@ -1987,12 +1987,12 @@ int hdparm_main(int argc, char **argv)
1987 1987
1988 while ((c = getopt(argc, argv, hdparm_options)) >= 0) { 1988 while ((c = getopt(argc, argv, hdparm_options)) >= 0) {
1989 flagcount++; 1989 flagcount++;
1990 USE_FEATURE_HDPARM_GET_IDENTITY(get_IDentity |= (c == 'I')); 1990 IF_FEATURE_HDPARM_GET_IDENTITY(get_IDentity |= (c == 'I'));
1991 USE_FEATURE_HDPARM_GET_IDENTITY(get_identity |= (c == 'i')); 1991 IF_FEATURE_HDPARM_GET_IDENTITY(get_identity |= (c == 'i'));
1992 get_geom |= (c == 'g'); 1992 get_geom |= (c == 'g');
1993 do_flush |= (c == 'f'); 1993 do_flush |= (c == 'f');
1994 if (c == 'u') parse_opts(&get_unmask, &set_unmask, &unmask, 0, 1); 1994 if (c == 'u') parse_opts(&get_unmask, &set_unmask, &unmask, 0, 1);
1995 USE_FEATURE_HDPARM_HDIO_GETSET_DMA(if (c == 'd') parse_opts(&get_dma, &set_dma, &dma, 0, 9)); 1995 IF_FEATURE_HDPARM_HDIO_GETSET_DMA(if (c == 'd') parse_opts(&get_dma, &set_dma, &dma, 0, 9));
1996 if (c == 'n') parse_opts(&get_nowerr, &set_nowerr, &nowerr, 0, 1); 1996 if (c == 'n') parse_opts(&get_nowerr, &set_nowerr, &nowerr, 0, 1);
1997 parse_xfermode((c == 'p'), &noisy_piomode, &set_piomode, &piomode); 1997 parse_xfermode((c == 'p'), &noisy_piomode, &set_piomode, &piomode);
1998 if (c == 'r') parse_opts(&get_readonly, &set_readonly, &readonly, 0, 1); 1998 if (c == 'r') parse_opts(&get_readonly, &set_readonly, &readonly, 0, 1);
@@ -2018,7 +2018,7 @@ int hdparm_main(int argc, char **argv)
2018 reread_partn |= (c == 'z'); 2018 reread_partn |= (c == 'z');
2019 get_seagate = set_seagate |= (c == 'Z'); 2019 get_seagate = set_seagate |= (c == 'Z');
2020#endif 2020#endif
2021 USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(if (c == 'U') parse_opts(NULL, &unregister_hwif, &hwif, 0, INT_MAX)); 2021 IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(if (c == 'U') parse_opts(NULL, &unregister_hwif, &hwif, 0, INT_MAX));
2022#ifdef HDIO_GET_QDMA 2022#ifdef HDIO_GET_QDMA
2023 if (c == 'Q') { 2023 if (c == 'Q') {
2024#ifdef HDIO_SET_QDMA 2024#ifdef HDIO_SET_QDMA
@@ -2028,9 +2028,9 @@ int hdparm_main(int argc, char **argv)
2028#endif 2028#endif
2029 } 2029 }
2030#endif 2030#endif
2031 USE_FEATURE_HDPARM_HDIO_DRIVE_RESET(perform_reset = (c == 'r')); 2031 IF_FEATURE_HDPARM_HDIO_DRIVE_RESET(perform_reset = (c == 'r'));
2032 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'x') parse_opts(NULL, &perform_tristate, &tristate, 0, 1)); 2032 IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'x') parse_opts(NULL, &perform_tristate, &tristate, 0, 1));
2033 USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'b') parse_opts(&get_busstate, &set_busstate, &busstate, 0, 2)); 2033 IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(if (c == 'b') parse_opts(&get_busstate, &set_busstate, &busstate, 0, 2));
2034#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF 2034#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF
2035 if (c == 'R') { 2035 if (c == 'R') {
2036 parse_opts(NULL, &scan_hwif, &hwif_data, 0, INT_MAX); 2036 parse_opts(NULL, &scan_hwif, &hwif_data, 0, INT_MAX);
@@ -2045,7 +2045,7 @@ int hdparm_main(int argc, char **argv)
2045 /* When no flags are given (flagcount = 0), -acdgkmnru is assumed. */ 2045 /* When no flags are given (flagcount = 0), -acdgkmnru is assumed. */
2046 if (!flagcount) { 2046 if (!flagcount) {
2047 get_mult = get_io32bit = get_unmask = get_keep = get_readonly = get_readahead = get_geom = 1; 2047 get_mult = get_io32bit = get_unmask = get_keep = get_readonly = get_readahead = get_geom = 1;
2048 USE_FEATURE_HDPARM_HDIO_GETSET_DMA(get_dma = 1); 2048 IF_FEATURE_HDPARM_HDIO_GETSET_DMA(get_dma = 1);
2049 } 2049 }
2050 argv += optind; 2050 argv += optind;
2051 2051
diff --git a/miscutils/less.c b/miscutils/less.c
index 27855bbe8..702c4a891 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -145,7 +145,7 @@ struct globals {
145 current_file = 1; \ 145 current_file = 1; \
146 eof_error = 1; \ 146 eof_error = 1; \
147 terminated = 1; \ 147 terminated = 1; \
148 USE_FEATURE_LESS_REGEXP(wanted_match = -1;) \ 148 IF_FEATURE_LESS_REGEXP(wanted_match = -1;) \
149} while (0) 149} while (0)
150 150
151/* flines[] are lines read from stdin, each in malloc'ed buffer. 151/* flines[] are lines read from stdin, each in malloc'ed buffer.
@@ -326,7 +326,7 @@ static void read_lines(void)
326 if (option_mask32 & FLAG_N) 326 if (option_mask32 & FLAG_N)
327 w -= 8; 327 w -= 8;
328 328
329 USE_FEATURE_LESS_REGEXP(again0:) 329 IF_FEATURE_LESS_REGEXP(again0:)
330 330
331 p = current_line = ((char*)xmalloc(w + 4)) + 4; 331 p = current_line = ((char*)xmalloc(w + 4)) + 4;
332 max_fline += last_terminated; 332 max_fline += last_terminated;
@@ -1509,7 +1509,7 @@ int less_main(int argc, char **argv)
1509 /* TODO: -x: do not interpret backspace, -xx: tab also */ 1509 /* TODO: -x: do not interpret backspace, -xx: tab also */
1510 /* -xxx: newline also */ 1510 /* -xxx: newline also */
1511 /* -w N: assume width N (-xxx -w 32: hex viewer of sorts) */ 1511 /* -w N: assume width N (-xxx -w 32: hex viewer of sorts) */
1512 getopt32(argv, "EMmN~I" USE_FEATURE_LESS_DASHCMD("S")); 1512 getopt32(argv, "EMmN~I" IF_FEATURE_LESS_DASHCMD("S"));
1513 argc -= optind; 1513 argc -= optind;
1514 argv += optind; 1514 argv += optind;
1515 num_files = argc; 1515 num_files = argc;
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 90ed87a72..c4fb9279d 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -24,7 +24,7 @@ int insmod_main(int argc UNUSED_PARAM, char **argv)
24 * or in $MODPATH. 24 * or in $MODPATH.
25 */ 25 */
26 26
27 USE_FEATURE_2_4_MODULES( 27 IF_FEATURE_2_4_MODULES(
28 getopt32(argv, INSMOD_OPTS INSMOD_ARGS); 28 getopt32(argv, INSMOD_OPTS INSMOD_ARGS);
29 argv += optind - 1; 29 argv += optind - 1;
30 ); 30 );
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index 6eb950f32..3fd7bf5ad 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -679,7 +679,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
679{ 679{
680 struct utsname uts; 680 struct utsname uts;
681 char applet0 = applet_name[0]; 681 char applet0 = applet_name[0];
682 USE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(char *options;) 682 IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(char *options;)
683 683
684 /* are we lsmod? -> just dump /proc/modules */ 684 /* are we lsmod? -> just dump /proc/modules */
685 if ('l' == applet0) { 685 if ('l' == applet0) {
@@ -773,8 +773,8 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
773 len = MAXINT(ssize_t); 773 len = MAXINT(ssize_t);
774 map = xmalloc_xopen_read_close(*argv, &len); 774 map = xmalloc_xopen_read_close(*argv, &len);
775 if (init_module(map, len, 775 if (init_module(map, len,
776 USE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "") 776 IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(options ? options : "")
777 SKIP_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("") 777 IF_NOT_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE("")
778 ) != 0) 778 ) != 0)
779 bb_error_msg_and_die("can't insert '%s': %s", 779 bb_error_msg_and_die("can't insert '%s': %s",
780 *argv, moderror(errno)); 780 *argv, moderror(errno));
@@ -791,7 +791,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
791 } while (*argv); 791 } while (*argv);
792 792
793 if (ENABLE_FEATURE_CLEAN_UP) { 793 if (ENABLE_FEATURE_CLEAN_UP) {
794 USE_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(free(options);) 794 IF_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE(free(options);)
795 } 795 }
796 return EXIT_SUCCESS; 796 return EXIT_SUCCESS;
797} 797}
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 218a898a8..3474964f8 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -33,7 +33,7 @@ struct module_entry { /* I'll call it ME. */
33 llist_t *deps; /* strings. modules we depend on */ 33 llist_t *deps; /* strings. modules we depend on */
34}; 34};
35 35
36#define MODPROBE_OPTS "acdlnrt:VC:" USE_FEATURE_MODPROBE_BLACKLIST("b") 36#define MODPROBE_OPTS "acdlnrt:VC:" IF_FEATURE_MODPROBE_BLACKLIST("b")
37enum { 37enum {
38 MODPROBE_OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */ 38 MODPROBE_OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */
39 MODPROBE_OPT_DUMP_ONLY = (INSMOD_OPT_UNUSED << 1), /* c */ 39 MODPROBE_OPT_DUMP_ONLY = (INSMOD_OPT_UNUSED << 1), /* c */
diff --git a/modutils/modutils.h b/modutils/modutils.h
index 5104f1b6e..8cca5ccfe 100644
--- a/modutils/modutils.h
+++ b/modutils/modutils.h
@@ -26,10 +26,10 @@ char *parse_cmdline_module_options(char **argv) FAST_FUNC;
26 26
27#define INSMOD_OPTS \ 27#define INSMOD_OPTS \
28 "vq" \ 28 "vq" \
29 USE_FEATURE_2_4_MODULES("sLo:fkx") \ 29 IF_FEATURE_2_4_MODULES("sLo:fkx") \
30 USE_FEATURE_INSMOD_LOAD_MAP("m") 30 IF_FEATURE_INSMOD_LOAD_MAP("m")
31 31
32#define INSMOD_ARGS USE_FEATURE_2_4_MODULES(, NULL) 32#define INSMOD_ARGS IF_FEATURE_2_4_MODULES(, NULL)
33 33
34enum { 34enum {
35 INSMOD_OPT_VERBOSE = 0x0001, 35 INSMOD_OPT_VERBOSE = 0x0001,
diff --git a/networking/brctl.c b/networking/brctl.c
index 1b5268947..57074cd73 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -99,20 +99,20 @@ int brctl_main(int argc UNUSED_PARAM, char **argv)
99{ 99{
100 static const char keywords[] ALIGN1 = 100 static const char keywords[] ALIGN1 =
101 "addbr\0" "delbr\0" "addif\0" "delif\0" 101 "addbr\0" "delbr\0" "addif\0" "delif\0"
102 USE_FEATURE_BRCTL_FANCY( 102 IF_FEATURE_BRCTL_FANCY(
103 "stp\0" 103 "stp\0"
104 "setageing\0" "setfd\0" "sethello\0" "setmaxage\0" 104 "setageing\0" "setfd\0" "sethello\0" "setmaxage\0"
105 "setpathcost\0" "setportprio\0" "setbridgeprio\0" 105 "setpathcost\0" "setportprio\0" "setbridgeprio\0"
106 ) 106 )
107 USE_FEATURE_BRCTL_SHOW("showmacs\0" "show\0"); 107 IF_FEATURE_BRCTL_SHOW("showmacs\0" "show\0");
108 108
109 enum { ARG_addbr = 0, ARG_delbr, ARG_addif, ARG_delif 109 enum { ARG_addbr = 0, ARG_delbr, ARG_addif, ARG_delif
110 USE_FEATURE_BRCTL_FANCY(, 110 IF_FEATURE_BRCTL_FANCY(,
111 ARG_stp, 111 ARG_stp,
112 ARG_setageing, ARG_setfd, ARG_sethello, ARG_setmaxage, 112 ARG_setageing, ARG_setfd, ARG_sethello, ARG_setmaxage,
113 ARG_setpathcost, ARG_setportprio, ARG_setbridgeprio 113 ARG_setpathcost, ARG_setportprio, ARG_setbridgeprio
114 ) 114 )
115 USE_FEATURE_BRCTL_SHOW(, ARG_showmacs, ARG_show) 115 IF_FEATURE_BRCTL_SHOW(, ARG_showmacs, ARG_show)
116 }; 116 };
117 117
118 int fd; 118 int fd;
diff --git a/networking/ftpd.c b/networking/ftpd.c
index ac6896117..2ec67df35 100644
--- a/networking/ftpd.c
+++ b/networking/ftpd.c
@@ -1103,9 +1103,9 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv)
1103 G.timeout = 2 * 60; 1103 G.timeout = 2 * 60;
1104 opt_complementary = "t+:T+:vv"; 1104 opt_complementary = "t+:T+:vv";
1105#if BB_MMU 1105#if BB_MMU
1106 opts = getopt32(argv, "vS" USE_FEATURE_FTP_WRITE("w") "t:T:", &G.timeout, &abs_timeout, &G.verbose); 1106 opts = getopt32(argv, "vS" IF_FEATURE_FTP_WRITE("w") "t:T:", &G.timeout, &abs_timeout, &G.verbose);
1107#else 1107#else
1108 opts = getopt32(argv, "l1vS" USE_FEATURE_FTP_WRITE("w") "t:T:", &G.timeout, &abs_timeout, &G.verbose); 1108 opts = getopt32(argv, "l1vS" IF_FEATURE_FTP_WRITE("w") "t:T:", &G.timeout, &abs_timeout, &G.verbose);
1109 if (opts & (OPT_l|OPT_1)) { 1109 if (opts & (OPT_l|OPT_1)) {
1110 /* Our secret backdoor to ls */ 1110 /* Our secret backdoor to ls */
1111/* TODO: pass -n too? */ 1111/* TODO: pass -n too? */
diff --git a/networking/httpd.c b/networking/httpd.c
index 6bf103c56..803a98b46 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -250,13 +250,13 @@ struct globals {
250 const char *found_moved_temporarily; 250 const char *found_moved_temporarily;
251 Htaccess_IP *ip_a_d; /* config allow/deny lines */ 251 Htaccess_IP *ip_a_d; /* config allow/deny lines */
252 252
253 USE_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;) 253 IF_FEATURE_HTTPD_BASIC_AUTH(const char *g_realm;)
254 USE_FEATURE_HTTPD_BASIC_AUTH(char *remoteuser;) 254 IF_FEATURE_HTTPD_BASIC_AUTH(char *remoteuser;)
255 USE_FEATURE_HTTPD_CGI(char *referer;) 255 IF_FEATURE_HTTPD_CGI(char *referer;)
256 USE_FEATURE_HTTPD_CGI(char *user_agent;) 256 IF_FEATURE_HTTPD_CGI(char *user_agent;)
257 USE_FEATURE_HTTPD_CGI(char *host;) 257 IF_FEATURE_HTTPD_CGI(char *host;)
258 USE_FEATURE_HTTPD_CGI(char *http_accept;) 258 IF_FEATURE_HTTPD_CGI(char *http_accept;)
259 USE_FEATURE_HTTPD_CGI(char *http_accept_language;) 259 IF_FEATURE_HTTPD_CGI(char *http_accept_language;)
260 260
261 off_t file_size; /* -1 - unknown */ 261 off_t file_size; /* -1 - unknown */
262#if ENABLE_FEATURE_HTTPD_RANGES 262#if ENABLE_FEATURE_HTTPD_RANGES
@@ -326,7 +326,7 @@ enum {
326#define proxy (G.proxy ) 326#define proxy (G.proxy )
327#define INIT_G() do { \ 327#define INIT_G() do { \
328 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ 328 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
329 USE_FEATURE_HTTPD_BASIC_AUTH(g_realm = "Web Server Authentication";) \ 329 IF_FEATURE_HTTPD_BASIC_AUTH(g_realm = "Web Server Authentication";) \
330 bind_addr_or_port = "80"; \ 330 bind_addr_or_port = "80"; \
331 index_page = "index.html"; \ 331 index_page = "index.html"; \
332 file_size = -1; \ 332 file_size = -1; \
@@ -1587,14 +1587,14 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
1587 while (1) { 1587 while (1) {
1588 /* sz is rounded down to 64k */ 1588 /* sz is rounded down to 64k */
1589 ssize_t sz = MAXINT(ssize_t) - 0xffff; 1589 ssize_t sz = MAXINT(ssize_t) - 0xffff;
1590 USE_FEATURE_HTTPD_RANGES(if (sz > range_len) sz = range_len;) 1590 IF_FEATURE_HTTPD_RANGES(if (sz > range_len) sz = range_len;)
1591 count = sendfile(STDOUT_FILENO, fd, &offset, sz); 1591 count = sendfile(STDOUT_FILENO, fd, &offset, sz);
1592 if (count < 0) { 1592 if (count < 0) {
1593 if (offset == range_start) 1593 if (offset == range_start)
1594 break; /* fall back to read/write loop */ 1594 break; /* fall back to read/write loop */
1595 goto fin; 1595 goto fin;
1596 } 1596 }
1597 USE_FEATURE_HTTPD_RANGES(range_len -= sz;) 1597 IF_FEATURE_HTTPD_RANGES(range_len -= sz;)
1598 if (count == 0 || range_len == 0) 1598 if (count == 0 || range_len == 0)
1599 log_and_exit(); 1599 log_and_exit();
1600 } 1600 }
@@ -1602,16 +1602,16 @@ static NOINLINE void send_file_and_exit(const char *url, int what)
1602#endif 1602#endif
1603 while ((count = safe_read(fd, iobuf, IOBUF_SIZE)) > 0) { 1603 while ((count = safe_read(fd, iobuf, IOBUF_SIZE)) > 0) {
1604 ssize_t n; 1604 ssize_t n;
1605 USE_FEATURE_HTTPD_RANGES(if (count > range_len) count = range_len;) 1605 IF_FEATURE_HTTPD_RANGES(if (count > range_len) count = range_len;)
1606 n = full_write(STDOUT_FILENO, iobuf, count); 1606 n = full_write(STDOUT_FILENO, iobuf, count);
1607 if (count != n) 1607 if (count != n)
1608 break; 1608 break;
1609 USE_FEATURE_HTTPD_RANGES(range_len -= count;) 1609 IF_FEATURE_HTTPD_RANGES(range_len -= count;)
1610 if (range_len == 0) 1610 if (range_len == 0)
1611 break; 1611 break;
1612 } 1612 }
1613 if (count < 0) { 1613 if (count < 0) {
1614 USE_FEATURE_HTTPD_USE_SENDFILE(fin:) 1614 IF_FEATURE_HTTPD_USE_SENDFILE(fin:)
1615 if (verbose > 1) 1615 if (verbose > 1)
1616 bb_perror_msg("error"); 1616 bb_perror_msg("error");
1617 } 1617 }
@@ -1839,12 +1839,12 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
1839 1839
1840 /* Find end of URL and parse HTTP version, if any */ 1840 /* Find end of URL and parse HTTP version, if any */
1841 http_major_version = '0'; 1841 http_major_version = '0';
1842 USE_FEATURE_HTTPD_PROXY(http_minor_version = '0';) 1842 IF_FEATURE_HTTPD_PROXY(http_minor_version = '0';)
1843 tptr = strchrnul(urlp, ' '); 1843 tptr = strchrnul(urlp, ' ');
1844 /* Is it " HTTP/"? */ 1844 /* Is it " HTTP/"? */
1845 if (tptr[0] && strncmp(tptr + 1, HTTP_200, 5) == 0) { 1845 if (tptr[0] && strncmp(tptr + 1, HTTP_200, 5) == 0) {
1846 http_major_version = tptr[6]; 1846 http_major_version = tptr[6];
1847 USE_FEATURE_HTTPD_PROXY(http_minor_version = tptr[8];) 1847 IF_FEATURE_HTTPD_PROXY(http_minor_version = tptr[8];)
1848 } 1848 }
1849 *tptr = '\0'; 1849 *tptr = '\0';
1850 1850
@@ -2252,10 +2252,10 @@ enum {
2252 c_opt_config_file = 0, 2252 c_opt_config_file = 0,
2253 d_opt_decode_url, 2253 d_opt_decode_url,
2254 h_opt_home_httpd, 2254 h_opt_home_httpd,
2255 USE_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,) 2255 IF_FEATURE_HTTPD_ENCODE_URL_STR(e_opt_encode_url,)
2256 USE_FEATURE_HTTPD_BASIC_AUTH( r_opt_realm ,) 2256 IF_FEATURE_HTTPD_BASIC_AUTH( r_opt_realm ,)
2257 USE_FEATURE_HTTPD_AUTH_MD5( m_opt_md5 ,) 2257 IF_FEATURE_HTTPD_AUTH_MD5( m_opt_md5 ,)
2258 USE_FEATURE_HTTPD_SETUID( u_opt_setuid ,) 2258 IF_FEATURE_HTTPD_SETUID( u_opt_setuid ,)
2259 p_opt_port , 2259 p_opt_port ,
2260 p_opt_inetd , 2260 p_opt_inetd ,
2261 p_opt_foreground, 2261 p_opt_foreground,
@@ -2263,10 +2263,10 @@ enum {
2263 OPT_CONFIG_FILE = 1 << c_opt_config_file, 2263 OPT_CONFIG_FILE = 1 << c_opt_config_file,
2264 OPT_DECODE_URL = 1 << d_opt_decode_url, 2264 OPT_DECODE_URL = 1 << d_opt_decode_url,
2265 OPT_HOME_HTTPD = 1 << h_opt_home_httpd, 2265 OPT_HOME_HTTPD = 1 << h_opt_home_httpd,
2266 OPT_ENCODE_URL = USE_FEATURE_HTTPD_ENCODE_URL_STR((1 << e_opt_encode_url)) + 0, 2266 OPT_ENCODE_URL = IF_FEATURE_HTTPD_ENCODE_URL_STR((1 << e_opt_encode_url)) + 0,
2267 OPT_REALM = USE_FEATURE_HTTPD_BASIC_AUTH( (1 << r_opt_realm )) + 0, 2267 OPT_REALM = IF_FEATURE_HTTPD_BASIC_AUTH( (1 << r_opt_realm )) + 0,
2268 OPT_MD5 = USE_FEATURE_HTTPD_AUTH_MD5( (1 << m_opt_md5 )) + 0, 2268 OPT_MD5 = IF_FEATURE_HTTPD_AUTH_MD5( (1 << m_opt_md5 )) + 0,
2269 OPT_SETUID = USE_FEATURE_HTTPD_SETUID( (1 << u_opt_setuid )) + 0, 2269 OPT_SETUID = IF_FEATURE_HTTPD_SETUID( (1 << u_opt_setuid )) + 0,
2270 OPT_PORT = 1 << p_opt_port, 2270 OPT_PORT = 1 << p_opt_port,
2271 OPT_INETD = 1 << p_opt_inetd, 2271 OPT_INETD = 1 << p_opt_inetd,
2272 OPT_FOREGROUND = 1 << p_opt_foreground, 2272 OPT_FOREGROUND = 1 << p_opt_foreground,
@@ -2280,10 +2280,10 @@ int httpd_main(int argc UNUSED_PARAM, char **argv)
2280 int server_socket = server_socket; /* for gcc */ 2280 int server_socket = server_socket; /* for gcc */
2281 unsigned opt; 2281 unsigned opt;
2282 char *url_for_decode; 2282 char *url_for_decode;
2283 USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;) 2283 IF_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;)
2284 USE_FEATURE_HTTPD_SETUID(const char *s_ugid = NULL;) 2284 IF_FEATURE_HTTPD_SETUID(const char *s_ugid = NULL;)
2285 USE_FEATURE_HTTPD_SETUID(struct bb_uidgid_t ugid;) 2285 IF_FEATURE_HTTPD_SETUID(struct bb_uidgid_t ugid;)
2286 USE_FEATURE_HTTPD_AUTH_MD5(const char *pass;) 2286 IF_FEATURE_HTTPD_AUTH_MD5(const char *pass;)
2287 2287
2288 INIT_G(); 2288 INIT_G();
2289 2289
@@ -2299,16 +2299,16 @@ int httpd_main(int argc UNUSED_PARAM, char **argv)
2299 * If user gives relative path in -h, 2299 * If user gives relative path in -h,
2300 * $SCRIPT_FILENAME will not be set. */ 2300 * $SCRIPT_FILENAME will not be set. */
2301 opt = getopt32(argv, "c:d:h:" 2301 opt = getopt32(argv, "c:d:h:"
2302 USE_FEATURE_HTTPD_ENCODE_URL_STR("e:") 2302 IF_FEATURE_HTTPD_ENCODE_URL_STR("e:")
2303 USE_FEATURE_HTTPD_BASIC_AUTH("r:") 2303 IF_FEATURE_HTTPD_BASIC_AUTH("r:")
2304 USE_FEATURE_HTTPD_AUTH_MD5("m:") 2304 IF_FEATURE_HTTPD_AUTH_MD5("m:")
2305 USE_FEATURE_HTTPD_SETUID("u:") 2305 IF_FEATURE_HTTPD_SETUID("u:")
2306 "p:ifv", 2306 "p:ifv",
2307 &configFile, &url_for_decode, &home_httpd 2307 &configFile, &url_for_decode, &home_httpd
2308 USE_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode) 2308 IF_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode)
2309 USE_FEATURE_HTTPD_BASIC_AUTH(, &g_realm) 2309 IF_FEATURE_HTTPD_BASIC_AUTH(, &g_realm)
2310 USE_FEATURE_HTTPD_AUTH_MD5(, &pass) 2310 IF_FEATURE_HTTPD_AUTH_MD5(, &pass)
2311 USE_FEATURE_HTTPD_SETUID(, &s_ugid) 2311 IF_FEATURE_HTTPD_SETUID(, &s_ugid)
2312 , &bind_addr_or_port 2312 , &bind_addr_or_port
2313 , &verbose 2313 , &verbose
2314 ); 2314 );
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index 22b1682bc..863d6e44a 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -424,7 +424,7 @@ int ifconfig_main(int argc, char **argv)
424 } else { /* A_CAST_HOST_COPY_IN_ETHER */ 424 } else { /* A_CAST_HOST_COPY_IN_ETHER */
425 /* This is the "hw" arg case. */ 425 /* This is the "hw" arg case. */
426 smalluint hw_class= index_in_substrings("ether\0" 426 smalluint hw_class= index_in_substrings("ether\0"
427 USE_FEATURE_HWIB("infiniband\0"), *argv) + 1; 427 IF_FEATURE_HWIB("infiniband\0"), *argv) + 1;
428 if (!hw_class || !*++argv) 428 if (!hw_class || !*++argv)
429 bb_show_usage(); 429 bb_show_usage();
430 /*safe_strncpy(host, *argv, sizeof(host));*/ 430 /*safe_strncpy(host, *argv, sizeof(host));*/
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index dc7ed490b..604a216d4 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -87,7 +87,7 @@ struct interfaces_file_t {
87 struct mapping_defn_t *mappings; 87 struct mapping_defn_t *mappings;
88}; 88};
89 89
90#define OPTION_STR "anvf" USE_FEATURE_IFUPDOWN_MAPPING("m") "i:" 90#define OPTION_STR "anvf" IF_FEATURE_IFUPDOWN_MAPPING("m") "i:"
91enum { 91enum {
92 OPT_do_all = 0x1, 92 OPT_do_all = 0x1,
93 OPT_no_act = 0x2, 93 OPT_no_act = 0x2,
diff --git a/networking/ip.c b/networking/ip.c
index 9903c6800..7a0f308f0 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -76,18 +76,18 @@ int ip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
76int ip_main(int argc UNUSED_PARAM, char **argv) 76int ip_main(int argc UNUSED_PARAM, char **argv)
77{ 77{
78 static const char keywords[] ALIGN1 = 78 static const char keywords[] ALIGN1 =
79 USE_FEATURE_IP_ADDRESS("address\0") 79 IF_FEATURE_IP_ADDRESS("address\0")
80 USE_FEATURE_IP_ROUTE("route\0") 80 IF_FEATURE_IP_ROUTE("route\0")
81 USE_FEATURE_IP_LINK("link\0") 81 IF_FEATURE_IP_LINK("link\0")
82 USE_FEATURE_IP_TUNNEL("tunnel\0" "tunl\0") 82 IF_FEATURE_IP_TUNNEL("tunnel\0" "tunl\0")
83 USE_FEATURE_IP_RULE("rule\0") 83 IF_FEATURE_IP_RULE("rule\0")
84 ; 84 ;
85 enum { 85 enum {
86 USE_FEATURE_IP_ADDRESS(IP_addr,) 86 IF_FEATURE_IP_ADDRESS(IP_addr,)
87 USE_FEATURE_IP_ROUTE(IP_route,) 87 IF_FEATURE_IP_ROUTE(IP_route,)
88 USE_FEATURE_IP_LINK(IP_link,) 88 IF_FEATURE_IP_LINK(IP_link,)
89 USE_FEATURE_IP_TUNNEL(IP_tunnel, IP_tunl,) 89 IF_FEATURE_IP_TUNNEL(IP_tunnel, IP_tunl,)
90 USE_FEATURE_IP_RULE(IP_rule,) 90 IF_FEATURE_IP_RULE(IP_rule,)
91 IP_none 91 IP_none
92 }; 92 };
93 int (*ip_func)(char**) = ip_print_help; 93 int (*ip_func)(char**) = ip_print_help;
diff --git a/networking/ipcalc.c b/networking/ipcalc.c
index d8fa5f3f2..b5cc3dec4 100644
--- a/networking/ipcalc.c
+++ b/networking/ipcalc.c
@@ -86,7 +86,7 @@ int ipcalc_main(int argc, char **argv)
86#if ENABLE_FEATURE_IPCALC_LONG_OPTIONS 86#if ENABLE_FEATURE_IPCALC_LONG_OPTIONS
87 applet_long_options = ipcalc_longopts; 87 applet_long_options = ipcalc_longopts;
88#endif 88#endif
89 opt = getopt32(argv, "mbn" USE_FEATURE_IPCALC_FANCY("phs")); 89 opt = getopt32(argv, "mbn" IF_FEATURE_IPCALC_FANCY("phs"));
90 argc -= optind; 90 argc -= optind;
91 argv += optind; 91 argv += optind;
92 if (opt & (BROADCAST | NETWORK | NETPREFIX)) { 92 if (opt & (BROADCAST | NETWORK | NETPREFIX)) {
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index 66557d8fd..37859525d 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -287,14 +287,14 @@ static int print_route(const struct sockaddr_nl *who UNUSED_PARAM,
287static int iproute_modify(int cmd, unsigned flags, char **argv) 287static int iproute_modify(int cmd, unsigned flags, char **argv)
288{ 288{
289 static const char keywords[] ALIGN1 = 289 static const char keywords[] ALIGN1 =
290 "src\0""via\0""mtu\0""lock\0""protocol\0"USE_FEATURE_IP_RULE("table\0") 290 "src\0""via\0""mtu\0""lock\0""protocol\0"IF_FEATURE_IP_RULE("table\0")
291 "dev\0""oif\0""to\0""metric\0"; 291 "dev\0""oif\0""to\0""metric\0";
292 enum { 292 enum {
293 ARG_src, 293 ARG_src,
294 ARG_via, 294 ARG_via,
295 ARG_mtu, PARM_lock, 295 ARG_mtu, PARM_lock,
296 ARG_protocol, 296 ARG_protocol,
297USE_FEATURE_IP_RULE(ARG_table,) 297IF_FEATURE_IP_RULE(ARG_table,)
298 ARG_dev, 298 ARG_dev,
299 ARG_oif, 299 ARG_oif,
300 ARG_to, 300 ARG_to,
diff --git a/networking/nc.c b/networking/nc.c
index fe845f582..857d63570 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -29,11 +29,11 @@ int nc_main(int argc, char **argv)
29 int sfd = sfd; /* for gcc */ 29 int sfd = sfd; /* for gcc */
30 int cfd = 0; 30 int cfd = 0;
31 unsigned lport = 0; 31 unsigned lport = 0;
32 SKIP_NC_SERVER(const) unsigned do_listen = 0; 32 IF_NOT_NC_SERVER(const) unsigned do_listen = 0;
33 SKIP_NC_EXTRA (const) unsigned wsecs = 0; 33 IF_NOT_NC_EXTRA (const) unsigned wsecs = 0;
34 SKIP_NC_EXTRA (const) unsigned delay = 0; 34 IF_NOT_NC_EXTRA (const) unsigned delay = 0;
35 SKIP_NC_EXTRA (const int execparam = 0;) 35 IF_NOT_NC_EXTRA (const int execparam = 0;)
36 USE_NC_EXTRA (char **execparam = NULL;) 36 IF_NC_EXTRA (char **execparam = NULL;)
37 len_and_sockaddr *lsa; 37 len_and_sockaddr *lsa;
38 fd_set readfds, testfds; 38 fd_set readfds, testfds;
39 int opt; /* must be signed (getopt returns -1) */ 39 int opt; /* must be signed (getopt returns -1) */
@@ -42,24 +42,24 @@ int nc_main(int argc, char **argv)
42 /* getopt32 is _almost_ usable: 42 /* getopt32 is _almost_ usable:
43 ** it cannot handle "... -e prog -prog-opt" */ 43 ** it cannot handle "... -e prog -prog-opt" */
44 while ((opt = getopt(argc, argv, 44 while ((opt = getopt(argc, argv,
45 "" USE_NC_SERVER("lp:") USE_NC_EXTRA("w:i:f:e:") )) > 0 45 "" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0
46 ) { 46 ) {
47 if (ENABLE_NC_SERVER && opt=='l') 47 if (ENABLE_NC_SERVER && opt=='l')
48 USE_NC_SERVER(do_listen++); 48 IF_NC_SERVER(do_listen++);
49 else if (ENABLE_NC_SERVER && opt=='p') 49 else if (ENABLE_NC_SERVER && opt=='p')
50 USE_NC_SERVER(lport = bb_lookup_port(optarg, "tcp", 0)); 50 IF_NC_SERVER(lport = bb_lookup_port(optarg, "tcp", 0));
51 else if (ENABLE_NC_EXTRA && opt=='w') 51 else if (ENABLE_NC_EXTRA && opt=='w')
52 USE_NC_EXTRA( wsecs = xatou(optarg)); 52 IF_NC_EXTRA( wsecs = xatou(optarg));
53 else if (ENABLE_NC_EXTRA && opt=='i') 53 else if (ENABLE_NC_EXTRA && opt=='i')
54 USE_NC_EXTRA( delay = xatou(optarg)); 54 IF_NC_EXTRA( delay = xatou(optarg));
55 else if (ENABLE_NC_EXTRA && opt=='f') 55 else if (ENABLE_NC_EXTRA && opt=='f')
56 USE_NC_EXTRA( cfd = xopen(optarg, O_RDWR)); 56 IF_NC_EXTRA( cfd = xopen(optarg, O_RDWR));
57 else if (ENABLE_NC_EXTRA && opt=='e' && optind <= argc) { 57 else if (ENABLE_NC_EXTRA && opt=='e' && optind <= argc) {
58 /* We cannot just 'break'. We should let getopt finish. 58 /* We cannot just 'break'. We should let getopt finish.
59 ** Or else we won't be able to find where 59 ** Or else we won't be able to find where
60 ** 'host' and 'port' params are 60 ** 'host' and 'port' params are
61 ** (think "nc -w 60 host port -e prog"). */ 61 ** (think "nc -w 60 host port -e prog"). */
62 USE_NC_EXTRA( 62 IF_NC_EXTRA(
63 char **p; 63 char **p;
64 // +2: one for progname (optarg) and one for NULL 64 // +2: one for progname (optarg) and one for NULL
65 execparam = xzalloc(sizeof(char*) * (argc - optind + 2)); 65 execparam = xzalloc(sizeof(char*) * (argc - optind + 2));
@@ -154,7 +154,7 @@ int nc_main(int argc, char **argv)
154 xmove_fd(cfd, 0); 154 xmove_fd(cfd, 0);
155 xdup2(0, 1); 155 xdup2(0, 1);
156 xdup2(0, 2); 156 xdup2(0, 2);
157 USE_NC_EXTRA(BB_EXECVP(execparam[0], execparam);) 157 IF_NC_EXTRA(BB_EXECVP(execparam[0], execparam);)
158 /* Don't print stuff or it will go over the wire.... */ 158 /* Don't print stuff or it will go over the wire.... */
159 _exit(127); 159 _exit(127);
160 } 160 }
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c
index 41db94524..47940e9b3 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -675,7 +675,7 @@ int nc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
675int nc_main(int argc, char **argv) 675int nc_main(int argc, char **argv)
676{ 676{
677 char *str_p, *str_s; 677 char *str_p, *str_s;
678 USE_NC_EXTRA(char *str_i, *str_o;) 678 IF_NC_EXTRA(char *str_i, *str_o;)
679 char *themdotted = themdotted; /* gcc */ 679 char *themdotted = themdotted; /* gcc */
680 char **proggie; 680 char **proggie;
681 int x; 681 int x;
@@ -711,10 +711,10 @@ int nc_main(int argc, char **argv)
711 711
712 // -g -G -t -r deleted, unimplemented -a deleted too 712 // -g -G -t -r deleted, unimplemented -a deleted too
713 opt_complementary = "?2:vv:w+"; /* max 2 params; -v is a counter; -w N */ 713 opt_complementary = "?2:vv:w+"; /* max 2 params; -v is a counter; -w N */
714 getopt32(argv, "hnp:s:uvw:" USE_NC_SERVER("l") 714 getopt32(argv, "hnp:s:uvw:" IF_NC_SERVER("l")
715 USE_NC_EXTRA("i:o:z"), 715 IF_NC_EXTRA("i:o:z"),
716 &str_p, &str_s, &o_wait 716 &str_p, &str_s, &o_wait
717 USE_NC_EXTRA(, &str_i, &str_o, &o_verbose)); 717 IF_NC_EXTRA(, &str_i, &str_o, &o_verbose));
718 argv += optind; 718 argv += optind;
719#if ENABLE_NC_EXTRA 719#if ENABLE_NC_EXTRA
720 if (option_mask32 & OPT_i) /* line-interval time */ 720 if (option_mask32 & OPT_i) /* line-interval time */
diff --git a/networking/netstat.c b/networking/netstat.c
index b24628068..0c3f93191 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -18,15 +18,15 @@
18#include "inet_common.h" 18#include "inet_common.h"
19 19
20#define NETSTAT_OPTS "laentuwx" \ 20#define NETSTAT_OPTS "laentuwx" \
21 USE_ROUTE( "r") \ 21 IF_ROUTE( "r") \
22 USE_FEATURE_NETSTAT_WIDE("W") \ 22 IF_FEATURE_NETSTAT_WIDE("W") \
23 USE_FEATURE_NETSTAT_PRG( "p") 23 IF_FEATURE_NETSTAT_PRG( "p")
24 24
25enum { 25enum {
26 OPTBIT_KEEP_OLD = 7, 26 OPTBIT_KEEP_OLD = 7,
27 USE_ROUTE( OPTBIT_ROUTE,) 27 IF_ROUTE( OPTBIT_ROUTE,)
28 USE_FEATURE_NETSTAT_WIDE(OPTBIT_WIDE ,) 28 IF_FEATURE_NETSTAT_WIDE(OPTBIT_WIDE ,)
29 USE_FEATURE_NETSTAT_PRG( OPTBIT_PRG ,) 29 IF_FEATURE_NETSTAT_PRG( OPTBIT_PRG ,)
30 OPT_sock_listen = 1 << 0, // l 30 OPT_sock_listen = 1 << 0, // l
31 OPT_sock_all = 1 << 1, // a 31 OPT_sock_all = 1 << 1, // a
32 OPT_extended = 1 << 2, // e 32 OPT_extended = 1 << 2, // e
@@ -35,9 +35,9 @@ enum {
35 OPT_sock_udp = 1 << 5, // u 35 OPT_sock_udp = 1 << 5, // u
36 OPT_sock_raw = 1 << 6, // w 36 OPT_sock_raw = 1 << 6, // w
37 OPT_sock_unix = 1 << 7, // x 37 OPT_sock_unix = 1 << 7, // x
38 OPT_route = USE_ROUTE( (1 << OPTBIT_ROUTE)) + 0, // r 38 OPT_route = IF_ROUTE( (1 << OPTBIT_ROUTE)) + 0, // r
39 OPT_wide = USE_FEATURE_NETSTAT_WIDE((1 << OPTBIT_WIDE )) + 0, // W 39 OPT_wide = IF_FEATURE_NETSTAT_WIDE((1 << OPTBIT_WIDE )) + 0, // W
40 OPT_prg = USE_FEATURE_NETSTAT_PRG( (1 << OPTBIT_PRG )) + 0, // p 40 OPT_prg = IF_FEATURE_NETSTAT_PRG( (1 << OPTBIT_PRG )) + 0, // p
41}; 41};
42 42
43#define NETSTAT_CONNECTED 0x01 43#define NETSTAT_CONNECTED 0x01
diff --git a/networking/ping.c b/networking/ping.c
index f2a612fde..71b2a4be8 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -224,7 +224,7 @@ int ping_main(int argc UNUSED_PARAM, char **argv)
224 224
225/* full(er) version */ 225/* full(er) version */
226 226
227#define OPT_STRING ("qvc:s:w:W:I:4" USE_PING6("6")) 227#define OPT_STRING ("qvc:s:w:W:I:4" IF_PING6("6"))
228enum { 228enum {
229 OPT_QUIET = 1 << 0, 229 OPT_QUIET = 1 << 0,
230 OPT_VERBOSE = 1 << 1, 230 OPT_VERBOSE = 1 << 1,
diff --git a/networking/telnetd.c b/networking/telnetd.c
index ccf328925..b7162ad36 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -201,8 +201,8 @@ static size_t iac_safe_write(int fd, const char *buf, size_t count)
201 201
202static struct tsession * 202static struct tsession *
203make_new_session( 203make_new_session(
204 USE_FEATURE_TELNETD_STANDALONE(int sock) 204 IF_FEATURE_TELNETD_STANDALONE(int sock)
205 SKIP_FEATURE_TELNETD_STANDALONE(void) 205 IF_NOT_FEATURE_TELNETD_STANDALONE(void)
206) { 206) {
207 const char *login_argv[2]; 207 const char *login_argv[2];
208 struct termios termbuf; 208 struct termios termbuf;
@@ -437,9 +437,9 @@ int telnetd_main(int argc UNUSED_PARAM, char **argv)
437#endif 437#endif
438 /* Even if !STANDALONE, we accept (and ignore) -i, thus people 438 /* Even if !STANDALONE, we accept (and ignore) -i, thus people
439 * don't need to guess whether it's ok to pass -i to us */ 439 * don't need to guess whether it's ok to pass -i to us */
440 opt = getopt32(argv, "f:l:Ki" USE_FEATURE_TELNETD_STANDALONE("p:b:F"), 440 opt = getopt32(argv, "f:l:Ki" IF_FEATURE_TELNETD_STANDALONE("p:b:F"),
441 &issuefile, &loginpath 441 &issuefile, &loginpath
442 USE_FEATURE_TELNETD_STANDALONE(, &opt_portnbr, &opt_bindaddr)); 442 IF_FEATURE_TELNETD_STANDALONE(, &opt_portnbr, &opt_bindaddr));
443 if (!IS_INETD /*&& !re_execed*/) { 443 if (!IS_INETD /*&& !re_execed*/) {
444 /* inform that we start in standalone mode? 444 /* inform that we start in standalone mode?
445 * May be useful when people forget to give -i */ 445 * May be useful when people forget to give -i */
@@ -455,7 +455,7 @@ int telnetd_main(int argc UNUSED_PARAM, char **argv)
455 openlog(applet_name, LOG_PID, LOG_DAEMON); 455 openlog(applet_name, LOG_PID, LOG_DAEMON);
456 logmode = LOGMODE_SYSLOG; 456 logmode = LOGMODE_SYSLOG;
457 } 457 }
458 USE_FEATURE_TELNETD_STANDALONE( 458 IF_FEATURE_TELNETD_STANDALONE(
459 if (opt & OPT_PORT) 459 if (opt & OPT_PORT)
460 portnbr = xatou16(opt_portnbr); 460 portnbr = xatou16(opt_portnbr);
461 ); 461 );
diff --git a/networking/telnetd.ctrlSQ.patch b/networking/telnetd.ctrlSQ.patch
index 885e10523..7060e1c6e 100644
--- a/networking/telnetd.ctrlSQ.patch
+++ b/networking/telnetd.ctrlSQ.patch
@@ -104,7 +104,7 @@ exceptional conditions.
104+#endif 104+#endif
105 /* Even if !STANDALONE, we accept (and ignore) -i, thus people 105 /* Even if !STANDALONE, we accept (and ignore) -i, thus people
106 * don't need to guess whether it's ok to pass -i to us */ 106 * don't need to guess whether it's ok to pass -i to us */
107 opt = getopt32(argv, "f:l:Ki" USE_FEATURE_TELNETD_STANDALONE("p:b:F"), 107 opt = getopt32(argv, "f:l:Ki" IF_FEATURE_TELNETD_STANDALONE("p:b:F"),
108@@ -475,7 +495,7 @@ 108@@ -475,7 +495,7 @@
109 FD_SET(ts->sockfd_read, &rdfdset); 109 FD_SET(ts->sockfd_read, &rdfdset);
110 if (ts->size2 > 0) /* can write to socket */ 110 if (ts->size2 > 0) /* can write to socket */
diff --git a/networking/tftp.c b/networking/tftp.c
index 9c78b6e14..352037f1b 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -64,15 +64,15 @@ enum {
64}; 64};
65 65
66#if ENABLE_FEATURE_TFTP_GET && !ENABLE_FEATURE_TFTP_PUT 66#if ENABLE_FEATURE_TFTP_GET && !ENABLE_FEATURE_TFTP_PUT
67#define USE_GETPUT(...) 67#define IF_GETPUT(...)
68#define CMD_GET(cmd) 1 68#define CMD_GET(cmd) 1
69#define CMD_PUT(cmd) 0 69#define CMD_PUT(cmd) 0
70#elif !ENABLE_FEATURE_TFTP_GET && ENABLE_FEATURE_TFTP_PUT 70#elif !ENABLE_FEATURE_TFTP_GET && ENABLE_FEATURE_TFTP_PUT
71#define USE_GETPUT(...) 71#define IF_GETPUT(...)
72#define CMD_GET(cmd) 0 72#define CMD_GET(cmd) 0
73#define CMD_PUT(cmd) 1 73#define CMD_PUT(cmd) 1
74#else 74#else
75#define USE_GETPUT(...) __VA_ARGS__ 75#define IF_GETPUT(...) __VA_ARGS__
76#define CMD_GET(cmd) ((cmd) & TFTP_OPT_GET) 76#define CMD_GET(cmd) ((cmd) & TFTP_OPT_GET)
77#define CMD_PUT(cmd) ((cmd) & TFTP_OPT_PUT) 77#define CMD_PUT(cmd) ((cmd) & TFTP_OPT_PUT)
78#endif 78#endif
@@ -160,9 +160,9 @@ static int tftp_protocol(
160 len_and_sockaddr *our_lsa, 160 len_and_sockaddr *our_lsa,
161 len_and_sockaddr *peer_lsa, 161 len_and_sockaddr *peer_lsa,
162 const char *local_file 162 const char *local_file
163 USE_TFTP(, const char *remote_file) 163 IF_TFTP(, const char *remote_file)
164 USE_FEATURE_TFTP_BLOCKSIZE(USE_TFTPD(, void *tsize)) 164 IF_FEATURE_TFTP_BLOCKSIZE(IF_TFTPD(, void *tsize))
165 USE_FEATURE_TFTP_BLOCKSIZE(, int blksize)) 165 IF_FEATURE_TFTP_BLOCKSIZE(, int blksize))
166{ 166{
167#if !ENABLE_TFTP 167#if !ENABLE_TFTP
168#define remote_file NULL 168#define remote_file NULL
@@ -178,7 +178,7 @@ static int tftp_protocol(
178#define socket_fd (pfd[0].fd) 178#define socket_fd (pfd[0].fd)
179 int len; 179 int len;
180 int send_len; 180 int send_len;
181 USE_FEATURE_TFTP_BLOCKSIZE(smallint want_option_ack = 0;) 181 IF_FEATURE_TFTP_BLOCKSIZE(smallint want_option_ack = 0;)
182 smallint finished = 0; 182 smallint finished = 0;
183 uint16_t opcode; 183 uint16_t opcode;
184 uint16_t block_nr; 184 uint16_t block_nr;
@@ -564,19 +564,19 @@ int tftp_main(int argc UNUSED_PARAM, char **argv)
564#endif 564#endif
565 int result; 565 int result;
566 int port; 566 int port;
567 USE_GETPUT(int opt;) 567 IF_GETPUT(int opt;)
568 568
569 INIT_G(); 569 INIT_G();
570 570
571 /* -p or -g is mandatory, and they are mutually exclusive */ 571 /* -p or -g is mandatory, and they are mutually exclusive */
572 opt_complementary = "" USE_FEATURE_TFTP_GET("g:") USE_FEATURE_TFTP_PUT("p:") 572 opt_complementary = "" IF_FEATURE_TFTP_GET("g:") IF_FEATURE_TFTP_PUT("p:")
573 USE_GETPUT("g--p:p--g:"); 573 IF_GETPUT("g--p:p--g:");
574 574
575 USE_GETPUT(opt =) getopt32(argv, 575 IF_GETPUT(opt =) getopt32(argv,
576 USE_FEATURE_TFTP_GET("g") USE_FEATURE_TFTP_PUT("p") 576 IF_FEATURE_TFTP_GET("g") IF_FEATURE_TFTP_PUT("p")
577 "l:r:" USE_FEATURE_TFTP_BLOCKSIZE("b:"), 577 "l:r:" IF_FEATURE_TFTP_BLOCKSIZE("b:"),
578 &local_file, &remote_file 578 &local_file, &remote_file
579 USE_FEATURE_TFTP_BLOCKSIZE(, &blksize_str)); 579 IF_FEATURE_TFTP_BLOCKSIZE(, &blksize_str));
580 argv += optind; 580 argv += optind;
581 581
582#if ENABLE_FEATURE_TFTP_BLOCKSIZE 582#if ENABLE_FEATURE_TFTP_BLOCKSIZE
@@ -614,8 +614,8 @@ int tftp_main(int argc UNUSED_PARAM, char **argv)
614 result = tftp_protocol( 614 result = tftp_protocol(
615 NULL /*our_lsa*/, peer_lsa, 615 NULL /*our_lsa*/, peer_lsa,
616 local_file, remote_file 616 local_file, remote_file
617 USE_FEATURE_TFTP_BLOCKSIZE(USE_TFTPD(, NULL /*tsize*/)) 617 IF_FEATURE_TFTP_BLOCKSIZE(IF_TFTPD(, NULL /*tsize*/))
618 USE_FEATURE_TFTP_BLOCKSIZE(, blksize) 618 IF_FEATURE_TFTP_BLOCKSIZE(, blksize)
619 ); 619 );
620 620
621 if (result != EXIT_SUCCESS && NOT_LONE_DASH(local_file) && CMD_GET(opt)) { 621 if (result != EXIT_SUCCESS && NOT_LONE_DASH(local_file) && CMD_GET(opt)) {
@@ -635,8 +635,8 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
635 char *local_file, *mode; 635 char *local_file, *mode;
636 const char *error_msg; 636 const char *error_msg;
637 int opt, result, opcode; 637 int opt, result, opcode;
638 USE_FEATURE_TFTP_BLOCKSIZE(int blksize = TFTP_BLKSIZE_DEFAULT;) 638 IF_FEATURE_TFTP_BLOCKSIZE(int blksize = TFTP_BLKSIZE_DEFAULT;)
639 USE_FEATURE_TFTP_BLOCKSIZE(char *tsize = NULL;) 639 IF_FEATURE_TFTP_BLOCKSIZE(char *tsize = NULL;)
640 640
641 INIT_G(); 641 INIT_G();
642 642
@@ -667,9 +667,9 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
667 opcode = ntohs(*(uint16_t*)block_buf); 667 opcode = ntohs(*(uint16_t*)block_buf);
668 if (result < 4 || result >= sizeof(block_buf) 668 if (result < 4 || result >= sizeof(block_buf)
669 || block_buf[result-1] != '\0' 669 || block_buf[result-1] != '\0'
670 || (USE_FEATURE_TFTP_PUT(opcode != TFTP_RRQ) /* not download */ 670 || (IF_FEATURE_TFTP_PUT(opcode != TFTP_RRQ) /* not download */
671 USE_GETPUT(&&) 671 IF_GETPUT(&&)
672 USE_FEATURE_TFTP_GET(opcode != TFTP_WRQ) /* not upload */ 672 IF_FEATURE_TFTP_GET(opcode != TFTP_WRQ) /* not upload */
673 ) 673 )
674 ) { 674 ) {
675 goto err; 675 goto err;
@@ -711,9 +711,9 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
711 error_msg = bb_msg_write_error; 711 error_msg = bb_msg_write_error;
712 goto err; 712 goto err;
713 } 713 }
714 USE_GETPUT(option_mask32 |= TFTP_OPT_GET;) /* will receive file's data */ 714 IF_GETPUT(option_mask32 |= TFTP_OPT_GET;) /* will receive file's data */
715 } else { 715 } else {
716 USE_GETPUT(option_mask32 |= TFTP_OPT_PUT;) /* will send file's data */ 716 IF_GETPUT(option_mask32 |= TFTP_OPT_PUT;) /* will send file's data */
717 } 717 }
718 718
719 /* NB: if error_pkt_str or error_pkt_reason is set up, 719 /* NB: if error_pkt_str or error_pkt_reason is set up,
@@ -724,9 +724,9 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv)
724 /* tftp_protocol() will create new one, bound to particular local IP */ 724 /* tftp_protocol() will create new one, bound to particular local IP */
725 result = tftp_protocol( 725 result = tftp_protocol(
726 our_lsa, peer_lsa, 726 our_lsa, peer_lsa,
727 local_file USE_TFTP(, NULL /*remote_file*/) 727 local_file IF_TFTP(, NULL /*remote_file*/)
728 USE_FEATURE_TFTP_BLOCKSIZE(, tsize) 728 IF_FEATURE_TFTP_BLOCKSIZE(, tsize)
729 USE_FEATURE_TFTP_BLOCKSIZE(, blksize) 729 IF_FEATURE_TFTP_BLOCKSIZE(, blksize)
730 ); 730 );
731 731
732 return result; 732 return result;
diff --git a/networking/tunctl.c b/networking/tunctl.c
index a8e5270ad..02ff71dce 100644
--- a/networking/tunctl.c
+++ b/networking/tunctl.c
@@ -48,9 +48,9 @@ int tunctl_main(int argc UNUSED_PARAM, char **argv)
48 }; 48 };
49 49
50 opt_complementary = "=0:t--d:d--t"; // no arguments; t ^ d 50 opt_complementary = "=0:t--d:d--t"; // no arguments; t ^ d
51 opts = getopt32(argv, "f:t:d:" USE_FEATURE_TUNCTL_UG("u:g:b"), 51 opts = getopt32(argv, "f:t:d:" IF_FEATURE_TUNCTL_UG("u:g:b"),
52 &opt_device, &opt_name, &opt_name 52 &opt_device, &opt_name, &opt_name
53 USE_FEATURE_TUNCTL_UG(, &opt_user, &opt_group)); 53 IF_FEATURE_TUNCTL_UG(, &opt_user, &opt_group));
54 54
55 // select device 55 // select device
56 memset(&ifr, 0, sizeof(ifr)); 56 memset(&ifr, 0, sizeof(ifr));
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index e9f99e39c..2dd3cd077 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -133,7 +133,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
133{ 133{
134 uint8_t *temp, *message; 134 uint8_t *temp, *message;
135 char *str_c, *str_V, *str_h, *str_F, *str_r; 135 char *str_c, *str_V, *str_h, *str_F, *str_r;
136 USE_FEATURE_UDHCP_PORT(char *str_P;) 136 IF_FEATURE_UDHCP_PORT(char *str_P;)
137 llist_t *list_O = NULL; 137 llist_t *list_O = NULL;
138 int tryagain_timeout = 20; 138 int tryagain_timeout = 20;
139 int discover_timeout = 3; 139 int discover_timeout = 3;
@@ -175,8 +175,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
175 "no-default-options\0" No_argument "o" 175 "no-default-options\0" No_argument "o"
176 "foreground\0" No_argument "f" 176 "foreground\0" No_argument "f"
177 "background\0" No_argument "b" 177 "background\0" No_argument "b"
178 USE_FEATURE_UDHCPC_ARPING("arping\0" No_argument "a") 178 IF_FEATURE_UDHCPC_ARPING("arping\0" No_argument "a")
179 USE_FEATURE_UDHCP_PORT("client-port\0" Required_argument "P") 179 IF_FEATURE_UDHCP_PORT("client-port\0" Required_argument "P")
180 ; 180 ;
181#endif 181#endif
182 enum { 182 enum {
@@ -204,33 +204,33 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
204/* The rest has variable bit positions, need to be clever */ 204/* The rest has variable bit positions, need to be clever */
205 OPTBIT_f = 20, 205 OPTBIT_f = 20,
206 USE_FOR_MMU( OPTBIT_b,) 206 USE_FOR_MMU( OPTBIT_b,)
207 USE_FEATURE_UDHCPC_ARPING(OPTBIT_a,) 207 IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,)
208 USE_FEATURE_UDHCP_PORT( OPTBIT_P,) 208 IF_FEATURE_UDHCP_PORT( OPTBIT_P,)
209 USE_FOR_MMU( OPT_b = 1 << OPTBIT_b,) 209 USE_FOR_MMU( OPT_b = 1 << OPTBIT_b,)
210 USE_FEATURE_UDHCPC_ARPING(OPT_a = 1 << OPTBIT_a,) 210 IF_FEATURE_UDHCPC_ARPING(OPT_a = 1 << OPTBIT_a,)
211 USE_FEATURE_UDHCP_PORT( OPT_P = 1 << OPTBIT_P,) 211 IF_FEATURE_UDHCP_PORT( OPT_P = 1 << OPTBIT_P,)
212 }; 212 };
213 213
214 /* Default options. */ 214 /* Default options. */
215 USE_FEATURE_UDHCP_PORT(SERVER_PORT = 67;) 215 IF_FEATURE_UDHCP_PORT(SERVER_PORT = 67;)
216 USE_FEATURE_UDHCP_PORT(CLIENT_PORT = 68;) 216 IF_FEATURE_UDHCP_PORT(CLIENT_PORT = 68;)
217 client_config.interface = "eth0"; 217 client_config.interface = "eth0";
218 client_config.script = DEFAULT_SCRIPT; 218 client_config.script = DEFAULT_SCRIPT;
219 219
220 /* Parse command line */ 220 /* Parse command line */
221 /* Cc: mutually exclusive; O: list; -T,-t,-A take numeric param */ 221 /* Cc: mutually exclusive; O: list; -T,-t,-A take numeric param */
222 opt_complementary = "c--C:C--c:O::T+:t+:A+"; 222 opt_complementary = "c--C:C--c:O::T+:t+:A+";
223 USE_GETOPT_LONG(applet_long_options = udhcpc_longopts;) 223 IF_GETOPT_LONG(applet_long_options = udhcpc_longopts;)
224 opt = getopt32(argv, "c:CV:H:h:F:i:np:qRr:s:T:t:vSA:O:of" 224 opt = getopt32(argv, "c:CV:H:h:F:i:np:qRr:s:T:t:vSA:O:of"
225 USE_FOR_MMU("b") 225 USE_FOR_MMU("b")
226 USE_FEATURE_UDHCPC_ARPING("a") 226 IF_FEATURE_UDHCPC_ARPING("a")
227 USE_FEATURE_UDHCP_PORT("P:") 227 IF_FEATURE_UDHCP_PORT("P:")
228 , &str_c, &str_V, &str_h, &str_h, &str_F 228 , &str_c, &str_V, &str_h, &str_h, &str_F
229 , &client_config.interface, &client_config.pidfile, &str_r /* i,p */ 229 , &client_config.interface, &client_config.pidfile, &str_r /* i,p */
230 , &client_config.script /* s */ 230 , &client_config.script /* s */
231 , &discover_timeout, &discover_retries, &tryagain_timeout /* T,t,A */ 231 , &discover_timeout, &discover_retries, &tryagain_timeout /* T,t,A */
232 , &list_O 232 , &list_O
233 USE_FEATURE_UDHCP_PORT(, &str_P) 233 IF_FEATURE_UDHCP_PORT(, &str_P)
234 ); 234 );
235 if (opt & OPT_c) 235 if (opt & OPT_c)
236 client_config.clientid = alloc_dhcp_option(DHCP_CLIENT_ID, str_c, 0); 236 client_config.clientid = alloc_dhcp_option(DHCP_CLIENT_ID, str_c, 0);
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h
index 7b7794266..361624f17 100644
--- a/networking/udhcp/dhcpc.h
+++ b/networking/udhcp/dhcpc.h
@@ -10,7 +10,7 @@ struct client_config_t {
10 /* TODO: combine flag fields into single "unsigned opt" */ 10 /* TODO: combine flag fields into single "unsigned opt" */
11 /* (can be set directly to the result of getopt32) */ 11 /* (can be set directly to the result of getopt32) */
12 char no_default_options; /* Do not include default optins in request */ 12 char no_default_options; /* Do not include default optins in request */
13 USE_FEATURE_UDHCP_PORT(uint16_t port;) 13 IF_FEATURE_UDHCP_PORT(uint16_t port;)
14 int ifindex; /* Index number of the interface to use */ 14 int ifindex; /* Index number of the interface to use */
15 uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */ 15 uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */
16 const char *interface; /* The name of the interface to use */ 16 const char *interface; /* The name of the interface to use */
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index a82fd8c47..ccdfd362b 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -37,14 +37,14 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
37 unsigned opt; 37 unsigned opt;
38 struct option_set *option; 38 struct option_set *option;
39 struct dhcpOfferedAddr *lease, static_lease; 39 struct dhcpOfferedAddr *lease, static_lease;
40 USE_FEATURE_UDHCP_PORT(char *str_P;) 40 IF_FEATURE_UDHCP_PORT(char *str_P;)
41 41
42#if ENABLE_FEATURE_UDHCP_PORT 42#if ENABLE_FEATURE_UDHCP_PORT
43 SERVER_PORT = 67; 43 SERVER_PORT = 67;
44 CLIENT_PORT = 68; 44 CLIENT_PORT = 68;
45#endif 45#endif
46 46
47 opt = getopt32(argv, "fS" USE_FEATURE_UDHCP_PORT("P:", &str_P)); 47 opt = getopt32(argv, "fS" IF_FEATURE_UDHCP_PORT("P:", &str_P));
48 argv += optind; 48 argv += optind;
49 if (!(opt & 1)) { /* no -f */ 49 if (!(opt & 1)) { /* no -f */
50 bb_daemonize_or_rexec(0, argv); 50 bb_daemonize_or_rexec(0, argv);
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index a061a9c9b..b13897608 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -394,7 +394,7 @@ void FAST_FUNC read_leases(const char *file)
394 struct dhcpOfferedAddr lease; 394 struct dhcpOfferedAddr lease;
395 int64_t written_at, time_passed; 395 int64_t written_at, time_passed;
396 int fd; 396 int fd;
397 USE_UDHCP_DEBUG(unsigned i;) 397 IF_UDHCP_DEBUG(unsigned i;)
398 398
399 fd = open_or_warn(file, O_RDONLY); 399 fd = open_or_warn(file, O_RDONLY);
400 if (fd < 0) 400 if (fd < 0)
@@ -410,7 +410,7 @@ void FAST_FUNC read_leases(const char *file)
410 if ((uint64_t)time_passed > 12 * 60 * 60) 410 if ((uint64_t)time_passed > 12 * 60 * 60)
411 goto ret; 411 goto ret;
412 412
413 USE_UDHCP_DEBUG(i = 0;) 413 IF_UDHCP_DEBUG(i = 0;)
414 while (full_read(fd, &lease, sizeof(lease)) == sizeof(lease)) { 414 while (full_read(fd, &lease, sizeof(lease)) == sizeof(lease)) {
415 /* ADDME: what if it matches some static lease? */ 415 /* ADDME: what if it matches some static lease? */
416 uint32_t y = ntohl(lease.yiaddr); 416 uint32_t y = ntohl(lease.yiaddr);
@@ -424,7 +424,7 @@ void FAST_FUNC read_leases(const char *file)
424 bb_error_msg("too many leases while loading %s", file); 424 bb_error_msg("too many leases while loading %s", file);
425 break; 425 break;
426 } 426 }
427 USE_UDHCP_DEBUG(i++;) 427 IF_UDHCP_DEBUG(i++;)
428 } 428 }
429 } 429 }
430 DEBUG("Read %d leases", i); 430 DEBUG("Read %d leases", i);
diff --git a/networking/wget.c b/networking/wget.c
index 48759049d..ca3acd085 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -497,14 +497,14 @@ int wget_main(int argc UNUSED_PARAM, char **argv)
497 applet_long_options = wget_longopts; 497 applet_long_options = wget_longopts;
498#endif 498#endif
499 /* server.allocated = target.allocated = NULL; */ 499 /* server.allocated = target.allocated = NULL; */
500 opt_complementary = "-1" USE_FEATURE_WGET_LONG_OPTIONS(":\xfe::"); 500 opt_complementary = "-1" IF_FEATURE_WGET_LONG_OPTIONS(":\xfe::");
501 opt = getopt32(argv, "csqO:P:Y:U:" /*ignored:*/ "t:T:", 501 opt = getopt32(argv, "csqO:P:Y:U:" /*ignored:*/ "t:T:",
502 &fname_out, &dir_prefix, 502 &fname_out, &dir_prefix,
503 &proxy_flag, &user_agent, 503 &proxy_flag, &user_agent,
504 NULL, /* -t RETRIES */ 504 NULL, /* -t RETRIES */
505 NULL /* -T NETWORK_READ_TIMEOUT */ 505 NULL /* -T NETWORK_READ_TIMEOUT */
506 USE_FEATURE_WGET_LONG_OPTIONS(, &headers_llist) 506 IF_FEATURE_WGET_LONG_OPTIONS(, &headers_llist)
507 USE_FEATURE_WGET_LONG_OPTIONS(, &post_data) 507 IF_FEATURE_WGET_LONG_OPTIONS(, &post_data)
508 ); 508 );
509 if (strcmp(proxy_flag, "off") == 0) { 509 if (strcmp(proxy_flag, "off") == 0) {
510 /* Use the proxy if necessary */ 510 /* Use the proxy if necessary */
diff --git a/procps/pidof.c b/procps/pidof.c
index 194239961..bf5e7841a 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -10,10 +10,10 @@
10#include "libbb.h" 10#include "libbb.h"
11 11
12enum { 12enum {
13 USE_FEATURE_PIDOF_SINGLE(OPTBIT_SINGLE,) 13 IF_FEATURE_PIDOF_SINGLE(OPTBIT_SINGLE,)
14 USE_FEATURE_PIDOF_OMIT( OPTBIT_OMIT ,) 14 IF_FEATURE_PIDOF_OMIT( OPTBIT_OMIT ,)
15 OPT_SINGLE = USE_FEATURE_PIDOF_SINGLE((1<<OPTBIT_SINGLE)) + 0, 15 OPT_SINGLE = IF_FEATURE_PIDOF_SINGLE((1<<OPTBIT_SINGLE)) + 0,
16 OPT_OMIT = USE_FEATURE_PIDOF_OMIT( (1<<OPTBIT_OMIT )) + 0, 16 OPT_OMIT = IF_FEATURE_PIDOF_OMIT( (1<<OPTBIT_OMIT )) + 0,
17}; 17};
18 18
19int pidof_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 19int pidof_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -28,8 +28,8 @@ int pidof_main(int argc UNUSED_PARAM, char **argv)
28 28
29 /* do unconditional option parsing */ 29 /* do unconditional option parsing */
30 opt = getopt32(argv, "" 30 opt = getopt32(argv, ""
31 USE_FEATURE_PIDOF_SINGLE ("s") 31 IF_FEATURE_PIDOF_SINGLE ("s")
32 USE_FEATURE_PIDOF_OMIT("o:", &omits)); 32 IF_FEATURE_PIDOF_OMIT("o:", &omits));
33 33
34#if ENABLE_FEATURE_PIDOF_OMIT 34#if ENABLE_FEATURE_PIDOF_OMIT
35 /* fill omit list. */ 35 /* fill omit list. */
diff --git a/procps/ps.c b/procps/ps.c
index 395cfcf56..b9a4aef15 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -25,9 +25,9 @@ enum { MAX_WIDTH = 2*1024 };
25 25
26#if ENABLE_SELINUX 26#if ENABLE_SELINUX
27#define SELINUX_O_PREFIX "label," 27#define SELINUX_O_PREFIX "label,"
28#define DEFAULT_O_STR (SELINUX_O_PREFIX "pid,user" USE_FEATURE_PS_TIME(",time") ",args") 28#define DEFAULT_O_STR (SELINUX_O_PREFIX "pid,user" IF_FEATURE_PS_TIME(",time") ",args")
29#else 29#else
30#define DEFAULT_O_STR ("pid,user" USE_FEATURE_PS_TIME(",time") ",args") 30#define DEFAULT_O_STR ("pid,user" IF_FEATURE_PS_TIME(",time") ",args")
31#endif 31#endif
32 32
33typedef struct { 33typedef struct {
@@ -425,7 +425,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
425{ 425{
426 procps_status_t *p; 426 procps_status_t *p;
427 llist_t* opt_o = NULL; 427 llist_t* opt_o = NULL;
428 USE_SELINUX(int opt;) 428 IF_SELINUX(int opt;)
429 429
430 // POSIX: 430 // POSIX:
431 // -a Write information for all processes associated with terminals 431 // -a Write information for all processes associated with terminals
@@ -439,7 +439,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
439 // Select which columns to display 439 // Select which columns to display
440 /* We allow (and ignore) most of the above. FIXME */ 440 /* We allow (and ignore) most of the above. FIXME */
441 opt_complementary = "o::"; 441 opt_complementary = "o::";
442 USE_SELINUX(opt =) getopt32(argv, "Zo:aAdefl", &opt_o); 442 IF_SELINUX(opt =) getopt32(argv, "Zo:aAdefl", &opt_o);
443 if (opt_o) { 443 if (opt_o) {
444 do { 444 do {
445 parse_o(llist_pop(&opt_o)); 445 parse_o(llist_pop(&opt_o));
@@ -486,8 +486,8 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
486{ 486{
487 procps_status_t *p = NULL; 487 procps_status_t *p = NULL;
488 int len; 488 int len;
489 SKIP_SELINUX(const) int use_selinux = 0; 489 IF_NOT_SELINUX(const) int use_selinux = 0;
490 USE_SELINUX(int i;) 490 IF_SELINUX(int i;)
491#if !ENABLE_FEATURE_PS_WIDE 491#if !ENABLE_FEATURE_PS_WIDE
492 enum { terminal_width = 79 }; 492 enum { terminal_width = 79 };
493#else 493#else
@@ -498,7 +498,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
498#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX 498#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX
499#if ENABLE_FEATURE_PS_WIDE 499#if ENABLE_FEATURE_PS_WIDE
500 opt_complementary = "-:ww"; 500 opt_complementary = "-:ww";
501 USE_SELINUX(i =) getopt32(argv, USE_SELINUX("Z") "w", &w_count); 501 IF_SELINUX(i =) getopt32(argv, IF_SELINUX("Z") "w", &w_count);
502 /* if w is given once, GNU ps sets the width to 132, 502 /* if w is given once, GNU ps sets the width to 132,
503 * if w is given more than once, it is "unlimited" 503 * if w is given more than once, it is "unlimited"
504 */ 504 */
diff --git a/procps/top.c b/procps/top.c
index b5951422b..8738156e1 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -889,7 +889,7 @@ int top_main(int argc UNUSED_PARAM, char **argv)
889 int lines_rem; 889 int lines_rem;
890 unsigned interval; 890 unsigned interval;
891 char *str_interval, *str_iterations; 891 char *str_interval, *str_iterations;
892 SKIP_FEATURE_TOPMEM(const) unsigned scan_mask = TOP_MASK; 892 IF_NOT_FEATURE_TOPMEM(const) unsigned scan_mask = TOP_MASK;
893#if ENABLE_FEATURE_USE_TERMIOS 893#if ENABLE_FEATURE_USE_TERMIOS
894 struct termios new_settings; 894 struct termios new_settings;
895 struct pollfd pfd[1]; 895 struct pollfd pfd[1];
@@ -1054,11 +1054,11 @@ int top_main(int argc UNUSED_PARAM, char **argv)
1054 if (c == 'q') 1054 if (c == 'q')
1055 break; 1055 break;
1056 if (c == 'n') { 1056 if (c == 'n') {
1057 USE_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1057 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
1058 sort_function[0] = pid_sort; 1058 sort_function[0] = pid_sort;
1059 } 1059 }
1060 if (c == 'm') { 1060 if (c == 'm') {
1061 USE_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1061 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
1062 sort_function[0] = mem_sort; 1062 sort_function[0] = mem_sort;
1063#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE 1063#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
1064 sort_function[1] = pcpu_sort; 1064 sort_function[1] = pcpu_sort;
@@ -1067,13 +1067,13 @@ int top_main(int argc UNUSED_PARAM, char **argv)
1067 } 1067 }
1068#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE 1068#if ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE
1069 if (c == 'p') { 1069 if (c == 'p') {
1070 USE_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1070 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
1071 sort_function[0] = pcpu_sort; 1071 sort_function[0] = pcpu_sort;
1072 sort_function[1] = mem_sort; 1072 sort_function[1] = mem_sort;
1073 sort_function[2] = time_sort; 1073 sort_function[2] = time_sort;
1074 } 1074 }
1075 if (c == 't') { 1075 if (c == 't') {
1076 USE_FEATURE_TOPMEM(scan_mask = TOP_MASK;) 1076 IF_FEATURE_TOPMEM(scan_mask = TOP_MASK;)
1077 sort_function[0] = time_sort; 1077 sort_function[0] = time_sort;
1078 sort_function[1] = mem_sort; 1078 sort_function[1] = mem_sort;
1079 sort_function[2] = pcpu_sort; 1079 sort_function[2] = pcpu_sort;
diff --git a/runit/chpst.c b/runit/chpst.c
index 82a81f549..21297daf6 100644
--- a/runit/chpst.c
+++ b/runit/chpst.c
@@ -200,11 +200,11 @@ int chpst_main(int argc UNUSED_PARAM, char **argv)
200 // if yes -> getopt converts strings to numbers for us 200 // if yes -> getopt converts strings to numbers for us
201 opt_complementary = "-1:a+:c+:d+:f+:l+:m+:o+:p+:r+:s+:t+"; 201 opt_complementary = "-1:a+:c+:d+:f+:l+:m+:o+:p+:r+:s+:t+";
202 opt = getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:u:U:e:" 202 opt = getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:u:U:e:"
203 USE_CHPST("/:n:vP012"), 203 IF_CHPST("/:n:vP012"),
204 &limita, &limitc, &limitd, &limitf, &limitl, 204 &limita, &limitc, &limitd, &limitf, &limitl,
205 &limitm, &limito, &limitp, &limitr, &limits, &limitt, 205 &limitm, &limito, &limitp, &limitr, &limits, &limitt,
206 &set_user, &env_user, &env_dir 206 &set_user, &env_user, &env_dir
207 USE_CHPST(, &root, &nicestr)); 207 IF_CHPST(, &root, &nicestr));
208 argv += optind; 208 argv += optind;
209 if (opt & OPT_m) { // -m means -asld 209 if (opt & OPT_m) { // -m means -asld
210 limita = limits = limitl = limitd = limitm; 210 limita = limits = limitl = limitd = limitm;
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 811d48b78..6d61044c4 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -225,32 +225,36 @@ void use_config(char *m, int slen)
225void parse_config_file(char *map, size_t len) 225void parse_config_file(char *map, size_t len)
226{ 226{
227 /* modified for bbox */ 227 /* modified for bbox */
228 char *end_4 = map + len - 4; /* 4 == length of "USE_" */ 228 char *end_3 = map + len - 3; /* 3 == length of "IF_" */
229 char *end_7 = map + len - 7; 229 char *end_7 = map + len - 7;
230 char *p = map; 230 char *p = map;
231 char *q; 231 char *q;
232 int off; 232 int off;
233 233
234 for (; p < end_4; p++) { 234 for (; p <= end_3; p++) {
235 /* Find next identifier's beginning */
236 if (!(isalnum(*p) || *p == '_'))
237 continue;
238
239 /* Check it */
235 if (p < end_7 && p[6] == '_') { 240 if (p < end_7 && p[6] == '_') {
236 if (!memcmp(p, "CONFIG", 6)) goto conf7; 241 if (!memcmp(p, "CONFIG", 6)) goto conf7;
237 if (!memcmp(p, "ENABLE", 6)) goto conf7; 242 if (!memcmp(p, "ENABLE", 6)) goto conf7;
243 if (!memcmp(p, "IF_NOT", 6)) goto conf7;
238 } 244 }
239 /* We have at least 5 chars: for() has 245 /* we have at least 3 chars because of p <= end_3 */
240 * "p < end-4", not "p <= end-4" 246 /*if (!memcmp(p, "IF_", 3)) goto conf3;*/
241 * therefore we don't need to check p <= end-5 here */ 247 if (p[0] == 'I' && p[1] == 'F' && p[2] == '_') goto conf3;
242 if (p[4] == '_') 248
243 if (!memcmp(p, "SKIP", 4)) goto conf5; 249 /* This identifier is not interesting, skip it */
244 /* Ehhh, gcc is too stupid to just compare it as 32bit int */ 250 while (p <= end_3 && (isalnum(*p) || *p == '_'))
245 if (p[0] == 'U') 251 p++;
246 if (!memcmp(p, "USE_", 4)) goto conf4;
247 continue; 252 continue;
248 253
249 conf4: off = 4; 254 conf3: off = 3;
250 conf5: off = 5;
251 conf7: off = 7; 255 conf7: off = 7;
252 p += off; 256 p += off;
253 for (q = p; q < end_4+4; q++) { 257 for (q = p; q < end_3+3; q++) {
254 if (!(isalnum(*q) || *q == '_')) 258 if (!(isalnum(*q) || *q == '_'))
255 break; 259 break;
256 } 260 }
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 58ea96d5c..9365a12c2 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -458,8 +458,8 @@ int conf_write(const char *name)
458 fprintf(out_h, "#undef CONFIG_%s\n", sym->name); 458 fprintf(out_h, "#undef CONFIG_%s\n", sym->name);
459 /* bbox */ 459 /* bbox */
460 fprintf(out_h, "#define ENABLE_%s 0\n", sym->name); 460 fprintf(out_h, "#define ENABLE_%s 0\n", sym->name);
461 fprintf(out_h, "#define USE_%s(...)\n", sym->name); 461 fprintf(out_h, "#define IF_%s(...)\n", sym->name);
462 fprintf(out_h, "#define SKIP_%s(...) __VA_ARGS__\n", sym->name); 462 fprintf(out_h, "#define IF_NOT_%s(...) __VA_ARGS__\n", sym->name);
463 } 463 }
464 break; 464 break;
465 case mod: 465 case mod:
@@ -473,8 +473,8 @@ int conf_write(const char *name)
473 fprintf(out_h, "#define CONFIG_%s 1\n", sym->name); 473 fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
474 /* bbox */ 474 /* bbox */
475 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); 475 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
476 fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name); 476 fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
477 fprintf(out_h, "#define SKIP_%s(...)\n", sym->name); 477 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
478 } 478 }
479 break; 479 break;
480 } 480 }
@@ -505,8 +505,8 @@ int conf_write(const char *name)
505 fputs("\"\n", out_h); 505 fputs("\"\n", out_h);
506 /* bbox */ 506 /* bbox */
507 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); 507 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
508 fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name); 508 fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
509 fprintf(out_h, "#define SKIP_%s(...)\n", sym->name); 509 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
510 } 510 }
511 break; 511 break;
512 case S_HEX: 512 case S_HEX:
@@ -517,8 +517,8 @@ int conf_write(const char *name)
517 fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str); 517 fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
518 /* bbox */ 518 /* bbox */
519 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); 519 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
520 fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name); 520 fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
521 fprintf(out_h, "#define SKIP_%s(...)\n", sym->name); 521 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
522 } 522 }
523 break; 523 break;
524 } 524 }
@@ -531,8 +531,8 @@ int conf_write(const char *name)
531 fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str); 531 fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
532 /* bbox */ 532 /* bbox */
533 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name); 533 fprintf(out_h, "#define ENABLE_%s 1\n", sym->name);
534 fprintf(out_h, "#define USE_%s(...) __VA_ARGS__\n", sym->name); 534 fprintf(out_h, "#define IF_%s(...) __VA_ARGS__\n", sym->name);
535 fprintf(out_h, "#define SKIP_%s(...)\n", sym->name); 535 fprintf(out_h, "#define IF_NOT_%s(...)\n", sym->name);
536 } 536 }
537 break; 537 break;
538 } 538 }
diff --git a/selinux/setfiles.c b/selinux/setfiles.c
index 8185d7810..b410d7ede 100644
--- a/selinux/setfiles.c
+++ b/selinux/setfiles.c
@@ -544,9 +544,9 @@ int setfiles_main(int argc, char **argv)
544 &exclude_dir, &input_filename, &out_filename, &verbose); 544 &exclude_dir, &input_filename, &out_filename, &verbose);
545 } else { /* setfiles */ 545 } else { /* setfiles */
546 flags = getopt32(argv, "de:f:ilnpqr:svo:FW" 546 flags = getopt32(argv, "de:f:ilnpqr:svo:FW"
547 USE_FEATURE_SETFILES_CHECK_OPTION("c:"), 547 IF_FEATURE_SETFILES_CHECK_OPTION("c:"),
548 &exclude_dir, &input_filename, &rootpath, &out_filename, 548 &exclude_dir, &input_filename, &rootpath, &out_filename,
549 USE_FEATURE_SETFILES_CHECK_OPTION(&policyfile,) 549 IF_FEATURE_SETFILES_CHECK_OPTION(&policyfile,)
550 &verbose); 550 &verbose);
551 } 551 }
552 552
diff --git a/shell/ash.c b/shell/ash.c
index c53b080a4..b27b2777e 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -56,11 +56,11 @@
56/* STANDALONE does not make sense, and won't compile */ 56/* STANDALONE does not make sense, and won't compile */
57#undef CONFIG_FEATURE_SH_STANDALONE 57#undef CONFIG_FEATURE_SH_STANDALONE
58#undef ENABLE_FEATURE_SH_STANDALONE 58#undef ENABLE_FEATURE_SH_STANDALONE
59#undef USE_FEATURE_SH_STANDALONE 59#undef IF_FEATURE_SH_STANDALONE
60#undef SKIP_FEATURE_SH_STANDALONE(...) 60#undef IF_NOT_FEATURE_SH_STANDALONE(...)
61#define ENABLE_FEATURE_SH_STANDALONE 0 61#define ENABLE_FEATURE_SH_STANDALONE 0
62#define USE_FEATURE_SH_STANDALONE(...) 62#define IF_FEATURE_SH_STANDALONE(...)
63#define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__ 63#define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
64#endif 64#endif
65 65
66#ifndef PIPE_BUF 66#ifndef PIPE_BUF
@@ -349,7 +349,7 @@ raise_interrupt(void)
349} while (0) 349} while (0)
350#endif 350#endif
351 351
352static USE_ASH_OPTIMIZE_FOR_SIZE(inline) void 352static IF_ASH_OPTIMIZE_FOR_SIZE(inline) void
353int_on(void) 353int_on(void)
354{ 354{
355 xbarrier(); 355 xbarrier();
@@ -358,7 +358,7 @@ int_on(void)
358 } 358 }
359} 359}
360#define INT_ON int_on() 360#define INT_ON int_on()
361static USE_ASH_OPTIMIZE_FOR_SIZE(inline) void 361static IF_ASH_OPTIMIZE_FOR_SIZE(inline) void
362force_int_on(void) 362force_int_on(void)
363{ 363{
364 xbarrier(); 364 xbarrier();
@@ -4219,7 +4219,7 @@ cmdputs(const char *s)
4219 static const char vstype[VSTYPE + 1][3] = { 4219 static const char vstype[VSTYPE + 1][3] = {
4220 "", "}", "-", "+", "?", "=", 4220 "", "}", "-", "+", "?", "=",
4221 "%", "%%", "#", "##" 4221 "%", "%%", "#", "##"
4222 USE_ASH_BASH_COMPAT(, ":", "/", "//") 4222 IF_ASH_BASH_COMPAT(, ":", "/", "//")
4223 }; 4223 };
4224 4224
4225 const char *p, *str; 4225 const char *p, *str;
@@ -6069,9 +6069,9 @@ subevalvar(char *p, char *str, int strloc, int subtype,
6069 char *startp; 6069 char *startp;
6070 char *loc; 6070 char *loc;
6071 char *rmesc, *rmescend; 6071 char *rmesc, *rmescend;
6072 USE_ASH_BASH_COMPAT(char *repl = NULL;) 6072 IF_ASH_BASH_COMPAT(char *repl = NULL;)
6073 USE_ASH_BASH_COMPAT(char null = '\0';) 6073 IF_ASH_BASH_COMPAT(char null = '\0';)
6074 USE_ASH_BASH_COMPAT(int pos, len, orig_len;) 6074 IF_ASH_BASH_COMPAT(int pos, len, orig_len;)
6075 int saveherefd = herefd; 6075 int saveherefd = herefd;
6076 int amount, workloc, resetloc; 6076 int amount, workloc, resetloc;
6077 int zero; 6077 int zero;
@@ -6157,7 +6157,7 @@ subevalvar(char *p, char *str, int strloc, int subtype,
6157 * stack will need rebasing, and we'll need to remove our work 6157 * stack will need rebasing, and we'll need to remove our work
6158 * areas each time 6158 * areas each time
6159 */ 6159 */
6160 USE_ASH_BASH_COMPAT(restart:) 6160 IF_ASH_BASH_COMPAT(restart:)
6161 6161
6162 amount = expdest - ((char *)stackblock() + resetloc); 6162 amount = expdest - ((char *)stackblock() + resetloc);
6163 STADJUST(-amount, expdest); 6163 STADJUST(-amount, expdest);
@@ -7083,7 +7083,7 @@ static int builtinloc = -1; /* index in path of %builtin, or -1 */
7083 7083
7084 7084
7085static void 7085static void
7086tryexec(USE_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char **envp) 7086tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char **envp)
7087{ 7087{
7088 int repeated = 0; 7088 int repeated = 0;
7089 7089
@@ -7155,13 +7155,13 @@ shellexec(char **argv, const char *path, int idx)
7155 || (applet_no = find_applet_by_name(argv[0])) >= 0 7155 || (applet_no = find_applet_by_name(argv[0])) >= 0
7156#endif 7156#endif
7157 ) { 7157 ) {
7158 tryexec(USE_FEATURE_SH_STANDALONE(applet_no,) argv[0], argv, envp); 7158 tryexec(IF_FEATURE_SH_STANDALONE(applet_no,) argv[0], argv, envp);
7159 e = errno; 7159 e = errno;
7160 } else { 7160 } else {
7161 e = ENOENT; 7161 e = ENOENT;
7162 while ((cmdname = padvance(&path, argv[0])) != NULL) { 7162 while ((cmdname = padvance(&path, argv[0])) != NULL) {
7163 if (--idx < 0 && pathopt == NULL) { 7163 if (--idx < 0 && pathopt == NULL) {
7164 tryexec(USE_FEATURE_SH_STANDALONE(-1,) cmdname, argv, envp); 7164 tryexec(IF_FEATURE_SH_STANDALONE(-1,) cmdname, argv, envp);
7165 if (errno != ENOENT && errno != ENOTDIR) 7165 if (errno != ENOENT && errno != ENOTDIR)
7166 e = errno; 7166 e = errno;
7167 } 7167 }
@@ -10789,7 +10789,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
10789 int parenlevel; /* levels of parens in arithmetic */ 10789 int parenlevel; /* levels of parens in arithmetic */
10790 int dqvarnest; /* levels of variables expansion within double quotes */ 10790 int dqvarnest; /* levels of variables expansion within double quotes */
10791 10791
10792 USE_ASH_BASH_COMPAT(smallint bash_dollar_squote = 0;) 10792 IF_ASH_BASH_COMPAT(smallint bash_dollar_squote = 0;)
10793 10793
10794#if __GNUC__ 10794#if __GNUC__
10795 /* Avoid longjmp clobbering */ 10795 /* Avoid longjmp clobbering */
@@ -10895,7 +10895,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
10895 dblquote = 1; 10895 dblquote = 1;
10896 goto quotemark; 10896 goto quotemark;
10897 case CENDQUOTE: 10897 case CENDQUOTE:
10898 USE_ASH_BASH_COMPAT(bash_dollar_squote = 0;) 10898 IF_ASH_BASH_COMPAT(bash_dollar_squote = 0;)
10899 if (eofmark != NULL && arinest == 0 10899 if (eofmark != NULL && arinest == 0
10900 && varnest == 0 10900 && varnest == 0
10901 ) { 10901 ) {
@@ -10994,7 +10994,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
10994 len = out - (char *)stackblock(); 10994 len = out - (char *)stackblock();
10995 out = stackblock(); 10995 out = stackblock();
10996 if (eofmark == NULL) { 10996 if (eofmark == NULL) {
10997 if ((c == '>' || c == '<' USE_ASH_BASH_COMPAT( || c == 0x100 + '>')) 10997 if ((c == '>' || c == '<' IF_ASH_BASH_COMPAT( || c == 0x100 + '>'))
10998 && quotef == 0 10998 && quotef == 0
10999 ) { 10999 ) {
11000 if (isdigit_str9(out)) { 11000 if (isdigit_str9(out)) {
@@ -11488,7 +11488,7 @@ xxreadtoken(void)
11488 startlinno = g_parsefile->linno; 11488 startlinno = g_parsefile->linno;
11489 for (;;) { /* until token or start of word found */ 11489 for (;;) { /* until token or start of word found */
11490 c = pgetc_fast(); 11490 c = pgetc_fast();
11491 if (c == ' ' || c == '\t' USE_ASH_ALIAS( || c == PEOA)) 11491 if (c == ' ' || c == '\t' IF_ASH_ALIAS( || c == PEOA))
11492 continue; 11492 continue;
11493 11493
11494 if (c == '#') { 11494 if (c == '#') {
@@ -12454,8 +12454,8 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12454 rflag = 0; 12454 rflag = 0;
12455 prompt = NULL; 12455 prompt = NULL;
12456 while ((i = nextopt("p:u:r" 12456 while ((i = nextopt("p:u:r"
12457 USE_ASH_READ_TIMEOUT("t:") 12457 IF_ASH_READ_TIMEOUT("t:")
12458 USE_ASH_READ_NCHARS("n:s") 12458 IF_ASH_READ_NCHARS("n:s")
12459 )) != '\0') { 12459 )) != '\0') {
12460 switch (i) { 12460 switch (i) {
12461 case 'p': 12461 case 'p':
diff --git a/shell/hush.c b/shell/hush.c
index d59a5de82..58a57d961 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -97,11 +97,11 @@
97/* STANDALONE does not make sense, and won't compile */ 97/* STANDALONE does not make sense, and won't compile */
98# undef CONFIG_FEATURE_SH_STANDALONE 98# undef CONFIG_FEATURE_SH_STANDALONE
99# undef ENABLE_FEATURE_SH_STANDALONE 99# undef ENABLE_FEATURE_SH_STANDALONE
100# undef USE_FEATURE_SH_STANDALONE 100# undef IF_FEATURE_SH_STANDALONE
101# define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__ 101# define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
102# define ENABLE_FEATURE_SH_STANDALONE 0 102# define ENABLE_FEATURE_SH_STANDALONE 0
103# define USE_FEATURE_SH_STANDALONE(...) 103# define IF_FEATURE_SH_STANDALONE(...)
104# define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__ 104# define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
105#endif 105#endif
106 106
107#if !ENABLE_HUSH_INTERACTIVE 107#if !ENABLE_HUSH_INTERACTIVE
@@ -2443,11 +2443,11 @@ static void re_execute_shell(char ***to_free, const char *s, char *g_argv0, char
2443 goto do_exec; 2443 goto do_exec;
2444 } 2444 }
2445 2445
2446 sprintf(param_buf, "-$%x:%x:%x" USE_HUSH_LOOPS(":%x") 2446 sprintf(param_buf, "-$%x:%x:%x" IF_HUSH_LOOPS(":%x")
2447 , (unsigned) G.root_pid 2447 , (unsigned) G.root_pid
2448 , (unsigned) G.last_bg_pid 2448 , (unsigned) G.last_bg_pid
2449 , (unsigned) G.last_exitcode 2449 , (unsigned) G.last_exitcode
2450 USE_HUSH_LOOPS(, G.depth_of_loop) 2450 IF_HUSH_LOOPS(, G.depth_of_loop)
2451 ); 2451 );
2452 /* 1:hush 2:-$<pid>:<pid>:<exitcode>:<depth> <vars...> <funcs...> 2452 /* 1:hush 2:-$<pid>:<pid>:<exitcode>:<depth> <vars...> <funcs...>
2453 * 3:-c 4:<cmd> 5:<arg0> <argN...> 6:NULL 2453 * 3:-c 4:<cmd> 5:<arg0> <argN...> 6:NULL
@@ -3386,7 +3386,7 @@ static int run_pipe(struct pipe *pi)
3386 debug_printf_exec("run_pipe start: members:%d\n", pi->num_cmds); 3386 debug_printf_exec("run_pipe start: members:%d\n", pi->num_cmds);
3387 debug_enter(); 3387 debug_enter();
3388 3388
3389 USE_HUSH_JOB(pi->pgrp = -1;) 3389 IF_HUSH_JOB(pi->pgrp = -1;)
3390 pi->stopped_cmds = 0; 3390 pi->stopped_cmds = 0;
3391 command = &(pi->cmds[0]); 3391 command = &(pi->cmds[0]);
3392 argv_expanded = NULL; 3392 argv_expanded = NULL;
@@ -3821,7 +3821,7 @@ static int run_list(struct pipe *pi)
3821 rcode = G.last_exitcode; 3821 rcode = G.last_exitcode;
3822 3822
3823 /* Go through list of pipes, (maybe) executing them. */ 3823 /* Go through list of pipes, (maybe) executing them. */
3824 for (; pi; pi = USE_HUSH_LOOPS(rword == RES_DONE ? loop_top : ) pi->next) { 3824 for (; pi; pi = IF_HUSH_LOOPS(rword == RES_DONE ? loop_top : ) pi->next) {
3825 if (G.flag_SIGINT) 3825 if (G.flag_SIGINT)
3826 break; 3826 break;
3827 3827
@@ -4773,7 +4773,7 @@ static FILE *generate_stream_from_string(const char *s)
4773 close(channel[0]); /* NB: close _first_, then move fd! */ 4773 close(channel[0]); /* NB: close _first_, then move fd! */
4774 xmove_fd(channel[1], 1); 4774 xmove_fd(channel[1], 1);
4775 /* Prevent it from trying to handle ctrl-z etc */ 4775 /* Prevent it from trying to handle ctrl-z etc */
4776 USE_HUSH_JOB(G.run_list_level = 1;) 4776 IF_HUSH_JOB(G.run_list_level = 1;)
4777#if BB_MMU 4777#if BB_MMU
4778 reset_traps_to_defaults(); 4778 reset_traps_to_defaults();
4779 parse_and_run_string(s); 4779 parse_and_run_string(s);
@@ -5441,7 +5441,7 @@ static struct pipe *parse_stream(char **pstring,
5441 nommu_addchr(&ctx.as_string, ch); 5441 nommu_addchr(&ctx.as_string, ch);
5442 is_ifs = strchr(G.ifs, ch); 5442 is_ifs = strchr(G.ifs, ch);
5443 is_special = strchr("<>;&|(){}#'" /* special outside of "str" */ 5443 is_special = strchr("<>;&|(){}#'" /* special outside of "str" */
5444 "\\$\"" USE_HUSH_TICK("`") /* always special */ 5444 "\\$\"" IF_HUSH_TICK("`") /* always special */
5445 , ch); 5445 , ch);
5446 5446
5447 if (!is_special && !is_ifs) { /* ordinary char */ 5447 if (!is_special && !is_ifs) { /* ordinary char */
@@ -5832,7 +5832,7 @@ static struct pipe *parse_stream(char **pstring,
5832 } 5832 }
5833 /* Discard cached input, force prompt */ 5833 /* Discard cached input, force prompt */
5834 input->p = NULL; 5834 input->p = NULL;
5835 USE_HUSH_INTERACTIVE(input->promptme = 1;) 5835 IF_HUSH_INTERACTIVE(input->promptme = 1;)
5836 goto reset; 5836 goto reset;
5837 } 5837 }
5838} 5838}
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 89391036a..7ab9620fb 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -66,7 +66,7 @@ struct shbuf_ds {
66 /*int markInterval;*/ \ 66 /*int markInterval;*/ \
67 /* level of messages to be logged */ \ 67 /* level of messages to be logged */ \
68 int logLevel; \ 68 int logLevel; \
69USE_FEATURE_ROTATE_LOGFILE( \ 69IF_FEATURE_ROTATE_LOGFILE( \
70 /* max size of file before rotation */ \ 70 /* max size of file before rotation */ \
71 unsigned logFileSize; \ 71 unsigned logFileSize; \
72 /* number of rotated message files */ \ 72 /* number of rotated message files */ \
@@ -74,12 +74,12 @@ USE_FEATURE_ROTATE_LOGFILE( \
74 unsigned curFileSize; \ 74 unsigned curFileSize; \
75 smallint isRegular; \ 75 smallint isRegular; \
76) \ 76) \
77USE_FEATURE_REMOTE_LOG( \ 77IF_FEATURE_REMOTE_LOG( \
78 /* udp socket for remote logging */ \ 78 /* udp socket for remote logging */ \
79 int remoteFD; \ 79 int remoteFD; \
80 len_and_sockaddr* remoteAddr; \ 80 len_and_sockaddr* remoteAddr; \
81) \ 81) \
82USE_FEATURE_IPC_SYSLOG( \ 82IF_FEATURE_IPC_SYSLOG( \
83 int shmid; /* ipc shared memory id */ \ 83 int shmid; /* ipc shared memory id */ \
84 int s_semid; /* ipc semaphore id */ \ 84 int s_semid; /* ipc semaphore id */ \
85 int shm_size; \ 85 int shm_size; \
@@ -153,41 +153,41 @@ enum {
153 OPTBIT_outfile, // -O 153 OPTBIT_outfile, // -O
154 OPTBIT_loglevel, // -l 154 OPTBIT_loglevel, // -l
155 OPTBIT_small, // -S 155 OPTBIT_small, // -S
156 USE_FEATURE_ROTATE_LOGFILE(OPTBIT_filesize ,) // -s 156 IF_FEATURE_ROTATE_LOGFILE(OPTBIT_filesize ,) // -s
157 USE_FEATURE_ROTATE_LOGFILE(OPTBIT_rotatecnt ,) // -b 157 IF_FEATURE_ROTATE_LOGFILE(OPTBIT_rotatecnt ,) // -b
158 USE_FEATURE_REMOTE_LOG( OPTBIT_remotelog ,) // -R 158 IF_FEATURE_REMOTE_LOG( OPTBIT_remotelog ,) // -R
159 USE_FEATURE_REMOTE_LOG( OPTBIT_locallog ,) // -L 159 IF_FEATURE_REMOTE_LOG( OPTBIT_locallog ,) // -L
160 USE_FEATURE_IPC_SYSLOG( OPTBIT_circularlog,) // -C 160 IF_FEATURE_IPC_SYSLOG( OPTBIT_circularlog,) // -C
161 USE_FEATURE_SYSLOGD_DUP( OPTBIT_dup ,) // -D 161 IF_FEATURE_SYSLOGD_DUP( OPTBIT_dup ,) // -D
162 162
163 OPT_mark = 1 << OPTBIT_mark , 163 OPT_mark = 1 << OPTBIT_mark ,
164 OPT_nofork = 1 << OPTBIT_nofork , 164 OPT_nofork = 1 << OPTBIT_nofork ,
165 OPT_outfile = 1 << OPTBIT_outfile , 165 OPT_outfile = 1 << OPTBIT_outfile ,
166 OPT_loglevel = 1 << OPTBIT_loglevel, 166 OPT_loglevel = 1 << OPTBIT_loglevel,
167 OPT_small = 1 << OPTBIT_small , 167 OPT_small = 1 << OPTBIT_small ,
168 OPT_filesize = USE_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_filesize )) + 0, 168 OPT_filesize = IF_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_filesize )) + 0,
169 OPT_rotatecnt = USE_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_rotatecnt )) + 0, 169 OPT_rotatecnt = IF_FEATURE_ROTATE_LOGFILE((1 << OPTBIT_rotatecnt )) + 0,
170 OPT_remotelog = USE_FEATURE_REMOTE_LOG( (1 << OPTBIT_remotelog )) + 0, 170 OPT_remotelog = IF_FEATURE_REMOTE_LOG( (1 << OPTBIT_remotelog )) + 0,
171 OPT_locallog = USE_FEATURE_REMOTE_LOG( (1 << OPTBIT_locallog )) + 0, 171 OPT_locallog = IF_FEATURE_REMOTE_LOG( (1 << OPTBIT_locallog )) + 0,
172 OPT_circularlog = USE_FEATURE_IPC_SYSLOG( (1 << OPTBIT_circularlog)) + 0, 172 OPT_circularlog = IF_FEATURE_IPC_SYSLOG( (1 << OPTBIT_circularlog)) + 0,
173 OPT_dup = USE_FEATURE_SYSLOGD_DUP( (1 << OPTBIT_dup )) + 0, 173 OPT_dup = IF_FEATURE_SYSLOGD_DUP( (1 << OPTBIT_dup )) + 0,
174}; 174};
175#define OPTION_STR "m:nO:l:S" \ 175#define OPTION_STR "m:nO:l:S" \
176 USE_FEATURE_ROTATE_LOGFILE("s:" ) \ 176 IF_FEATURE_ROTATE_LOGFILE("s:" ) \
177 USE_FEATURE_ROTATE_LOGFILE("b:" ) \ 177 IF_FEATURE_ROTATE_LOGFILE("b:" ) \
178 USE_FEATURE_REMOTE_LOG( "R:" ) \ 178 IF_FEATURE_REMOTE_LOG( "R:" ) \
179 USE_FEATURE_REMOTE_LOG( "L" ) \ 179 IF_FEATURE_REMOTE_LOG( "L" ) \
180 USE_FEATURE_IPC_SYSLOG( "C::") \ 180 IF_FEATURE_IPC_SYSLOG( "C::") \
181 USE_FEATURE_SYSLOGD_DUP( "D" ) 181 IF_FEATURE_SYSLOGD_DUP( "D" )
182#define OPTION_DECL *opt_m, *opt_l \ 182#define OPTION_DECL *opt_m, *opt_l \
183 USE_FEATURE_ROTATE_LOGFILE(,*opt_s) \ 183 IF_FEATURE_ROTATE_LOGFILE(,*opt_s) \
184 USE_FEATURE_ROTATE_LOGFILE(,*opt_b) \ 184 IF_FEATURE_ROTATE_LOGFILE(,*opt_b) \
185 USE_FEATURE_IPC_SYSLOG( ,*opt_C = NULL) 185 IF_FEATURE_IPC_SYSLOG( ,*opt_C = NULL)
186#define OPTION_PARAM &opt_m, &G.logFilePath, &opt_l \ 186#define OPTION_PARAM &opt_m, &G.logFilePath, &opt_l \
187 USE_FEATURE_ROTATE_LOGFILE(,&opt_s) \ 187 IF_FEATURE_ROTATE_LOGFILE(,&opt_s) \
188 USE_FEATURE_ROTATE_LOGFILE(,&opt_b) \ 188 IF_FEATURE_ROTATE_LOGFILE(,&opt_b) \
189 USE_FEATURE_REMOTE_LOG( ,&G.remoteAddrStr) \ 189 IF_FEATURE_REMOTE_LOG( ,&G.remoteAddrStr) \
190 USE_FEATURE_IPC_SYSLOG( ,&opt_C) 190 IF_FEATURE_IPC_SYSLOG( ,&opt_C)
191 191
192 192
193/* circular buffer variables/structures */ 193/* circular buffer variables/structures */
diff --git a/testsuite/all_sourcecode.tests b/testsuite/all_sourcecode.tests
index 45f401127..5b3f0388d 100755
--- a/testsuite/all_sourcecode.tests
+++ b/testsuite/all_sourcecode.tests
@@ -33,7 +33,7 @@ rm -f src.usage.escaped
33# verify the applet order is correct in applets.h, otherwise 33# verify the applet order is correct in applets.h, otherwise
34# applets won't be called properly. 34# applets won't be called properly.
35# 35#
36sed -n -e '/^USE_[A-Z]*(APPLET/{s:,.*::;s:.*(::;s:"::g;p}' \ 36sed -n -e '/^IF_[A-Z]*(APPLET/{s:,.*::;s:.*(::;s:"::g;p}' \
37 $srcdir/../include/applets.h > applet.order.current 37 $srcdir/../include/applets.h > applet.order.current
38LC_ALL=C sort applet.order.current > applet.order.correct 38LC_ALL=C sort applet.order.current > applet.order.correct
39testing "Applet order" "diff -u applet.order.current applet.order.correct" "" "" "" 39testing "Applet order" "diff -u applet.order.current applet.order.correct" "" "" ""
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 49ea52d53..7dd4f5b15 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
@@ -61,9 +61,9 @@ int acpid_main(int argc, char **argv)
61 const char *opt_logfile = "/var/log/acpid.log"; 61 const char *opt_logfile = "/var/log/acpid.log";
62 62
63 getopt32(argv, "c:e:l:d" 63 getopt32(argv, "c:e:l:d"
64 USE_FEATURE_ACPID_COMPAT("g:m:s:S:v"), 64 IF_FEATURE_ACPID_COMPAT("g:m:s:S:v"),
65 &opt_conf, &opt_input, &opt_logfile 65 &opt_conf, &opt_input, &opt_logfile
66 USE_FEATURE_ACPID_COMPAT(, NULL, NULL, NULL, NULL, NULL) 66 IF_FEATURE_ACPID_COMPAT(, NULL, NULL, NULL, NULL, NULL)
67 ); 67 );
68 68
69 // daemonize unless -d given 69 // daemonize unless -d given
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index dc61e238a..514b5d79c 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -17,7 +17,7 @@
17/* Looks like someone forgot to add this to config system */ 17/* Looks like someone forgot to add this to config system */
18#ifndef ENABLE_FEATURE_FDISK_BLKSIZE 18#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
19# define ENABLE_FEATURE_FDISK_BLKSIZE 0 19# define ENABLE_FEATURE_FDISK_BLKSIZE 0
20# define USE_FEATURE_FDISK_BLKSIZE(a) 20# define IF_FEATURE_FDISK_BLKSIZE(a)
21#endif 21#endif
22 22
23#define DEFAULT_SECTOR_SIZE 512 23#define DEFAULT_SECTOR_SIZE 512
@@ -1302,7 +1302,7 @@ static int get_boot(void)
1302// or get_boot() [table is bad] -> create_sunlabel() -> get_boot(CREATE_EMPTY_SUN). 1302// or get_boot() [table is bad] -> create_sunlabel() -> get_boot(CREATE_EMPTY_SUN).
1303// (just factor out re-init of ptes[0,1,2,3] in a separate fn instead?) 1303// (just factor out re-init of ptes[0,1,2,3] in a separate fn instead?)
1304// So skip opening device _again_... 1304// So skip opening device _again_...
1305 if (what == CREATE_EMPTY_DOS USE_FEATURE_SUN_LABEL(|| what == CREATE_EMPTY_SUN)) 1305 if (what == CREATE_EMPTY_DOS IF_FEATURE_SUN_LABEL(|| what == CREATE_EMPTY_SUN))
1306 goto created_table; 1306 goto created_table;
1307 1307
1308 fd = open(disk_device, (option_mask32 & OPT_l) ? O_RDONLY : O_RDWR); 1308 fd = open(disk_device, (option_mask32 & OPT_l) ? O_RDONLY : O_RDWR);
@@ -1372,7 +1372,7 @@ static int get_boot(void)
1372 "partition table, nor Sun, SGI or OSF " 1372 "partition table, nor Sun, SGI or OSF "
1373 "disklabel\n"); 1373 "disklabel\n");
1374#ifdef __sparc__ 1374#ifdef __sparc__
1375 USE_FEATURE_SUN_LABEL(create_sunlabel();) 1375 IF_FEATURE_SUN_LABEL(create_sunlabel();)
1376#else 1376#else
1377 create_doslabel(); 1377 create_doslabel();
1378#endif 1378#endif
@@ -1385,7 +1385,7 @@ static int get_boot(void)
1385#endif /* FEATURE_FDISK_WRITABLE */ 1385#endif /* FEATURE_FDISK_WRITABLE */
1386 1386
1387 1387
1388 USE_FEATURE_FDISK_WRITABLE(warn_cylinders();) 1388 IF_FEATURE_FDISK_WRITABLE(warn_cylinders();)
1389 warn_geometry(); 1389 warn_geometry();
1390 1390
1391 for (i = 0; i < 4; i++) { 1391 for (i = 0; i < 4; i++) {
@@ -1406,7 +1406,7 @@ static int get_boot(void)
1406 pe->sectorbuffer[510], 1406 pe->sectorbuffer[510],
1407 pe->sectorbuffer[511], 1407 pe->sectorbuffer[511],
1408 i + 1); 1408 i + 1);
1409 USE_FEATURE_FDISK_WRITABLE(pe->changed = 1;) 1409 IF_FEATURE_FDISK_WRITABLE(pe->changed = 1;)
1410 } 1410 }
1411 } 1411 }
1412 1412
@@ -2797,7 +2797,7 @@ int fdisk_main(int argc, char **argv)
2797 close_dev_fd(); /* needed: fd 3 must not stay closed */ 2797 close_dev_fd(); /* needed: fd 3 must not stay closed */
2798 2798
2799 opt_complementary = "b+:C+:H+:S+"; /* numeric params */ 2799 opt_complementary = "b+:C+:H+:S+"; /* numeric params */
2800 opt = getopt32(argv, "b:C:H:lS:u" USE_FEATURE_FDISK_BLKSIZE("s"), 2800 opt = getopt32(argv, "b:C:H:lS:u" IF_FEATURE_FDISK_BLKSIZE("s"),
2801 &sector_size, &user_cylinders, &user_heads, &user_sectors); 2801 &sector_size, &user_cylinders, &user_heads, &user_sectors);
2802 argc -= optind; 2802 argc -= optind;
2803 argv += optind; 2803 argv += optind;
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 78a7c826b..0c33c1b02 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -151,7 +151,7 @@ struct globals {
151 char superblock_buffer[BLOCK_SIZE]; 151 char superblock_buffer[BLOCK_SIZE];
152 char add_zone_ind_blk[BLOCK_SIZE]; 152 char add_zone_ind_blk[BLOCK_SIZE];
153 char add_zone_dind_blk[BLOCK_SIZE]; 153 char add_zone_dind_blk[BLOCK_SIZE];
154 USE_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];) 154 IF_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];)
155 char check_file_blk[BLOCK_SIZE]; 155 char check_file_blk[BLOCK_SIZE];
156 156
157 /* File-name data */ 157 /* File-name data */
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index 48edd70a9..98d1ac2ba 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -41,7 +41,7 @@ static const char *const add_strings[] = {
41 41
42static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\""; 42static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\"";
43 43
44static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v" USE_FEATURE_HEXDUMP_REVERSE("R"); 44static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v" IF_FEATURE_HEXDUMP_REVERSE("R");
45 45
46static const struct suffix_mult suffixes[] = { 46static const struct suffix_mult suffixes[] = {
47 { "b", 512 }, 47 { "b", 512 },
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 694057bbe..d954febe5 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -105,22 +105,22 @@ enum {
105static const int32_t mount_options[] = { 105static const int32_t mount_options[] = {
106 // MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs. 106 // MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs.
107 107
108 USE_FEATURE_MOUNT_LOOP( 108 IF_FEATURE_MOUNT_LOOP(
109 /* "loop" */ 0, 109 /* "loop" */ 0,
110 ) 110 )
111 111
112 USE_FEATURE_MOUNT_FSTAB( 112 IF_FEATURE_MOUNT_FSTAB(
113 /* "defaults" */ 0, 113 /* "defaults" */ 0,
114 /* "quiet" 0 - do not filter out, vfat wants to see it */ 114 /* "quiet" 0 - do not filter out, vfat wants to see it */
115 /* "noauto" */ MOUNT_NOAUTO, 115 /* "noauto" */ MOUNT_NOAUTO,
116 /* "sw" */ MOUNT_SWAP, 116 /* "sw" */ MOUNT_SWAP,
117 /* "swap" */ MOUNT_SWAP, 117 /* "swap" */ MOUNT_SWAP,
118 USE_DESKTOP(/* "user" */ MOUNT_USERS,) 118 IF_DESKTOP(/* "user" */ MOUNT_USERS,)
119 USE_DESKTOP(/* "users" */ MOUNT_USERS,) 119 IF_DESKTOP(/* "users" */ MOUNT_USERS,)
120 /* "_netdev" */ 0, 120 /* "_netdev" */ 0,
121 ) 121 )
122 122
123 USE_FEATURE_MOUNT_FLAGS( 123 IF_FEATURE_MOUNT_FLAGS(
124 // vfs flags 124 // vfs flags
125 /* "nosuid" */ MS_NOSUID, 125 /* "nosuid" */ MS_NOSUID,
126 /* "suid" */ ~MS_NOSUID, 126 /* "suid" */ ~MS_NOSUID,
@@ -161,20 +161,20 @@ static const int32_t mount_options[] = {
161}; 161};
162 162
163static const char mount_option_str[] = 163static const char mount_option_str[] =
164 USE_FEATURE_MOUNT_LOOP( 164 IF_FEATURE_MOUNT_LOOP(
165 "loop\0" 165 "loop\0"
166 ) 166 )
167 USE_FEATURE_MOUNT_FSTAB( 167 IF_FEATURE_MOUNT_FSTAB(
168 "defaults\0" 168 "defaults\0"
169 // "quiet\0" - do not filter out, vfat wants to see it 169 // "quiet\0" - do not filter out, vfat wants to see it
170 "noauto\0" 170 "noauto\0"
171 "sw\0" 171 "sw\0"
172 "swap\0" 172 "swap\0"
173 USE_DESKTOP("user\0") 173 IF_DESKTOP("user\0")
174 USE_DESKTOP("users\0") 174 IF_DESKTOP("users\0")
175 "_netdev\0" 175 "_netdev\0"
176 ) 176 )
177 USE_FEATURE_MOUNT_FLAGS( 177 IF_FEATURE_MOUNT_FLAGS(
178 // vfs flags 178 // vfs flags
179 "nosuid\0" 179 "nosuid\0"
180 "suid\0" 180 "suid\0"
@@ -1781,9 +1781,9 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
1781 int i, j, rc = 0; 1781 int i, j, rc = 0;
1782 unsigned opt; 1782 unsigned opt;
1783 struct mntent mtpair[2], *mtcur = mtpair; 1783 struct mntent mtpair[2], *mtcur = mtpair;
1784 SKIP_DESKTOP(const int nonroot = 0;) 1784 IF_NOT_DESKTOP(const int nonroot = 0;)
1785 1785
1786 USE_DESKTOP(int nonroot = ) sanitize_env_if_suid(); 1786 IF_DESKTOP(int nonroot = ) sanitize_env_if_suid();
1787 1787
1788 // Parse long options, like --bind and --move. Note that -o option 1788 // Parse long options, like --bind and --move. Note that -o option
1789 // and --option are synonymous. Yes, this means --remount,rw works. 1789 // and --option are synonymous. Yes, this means --remount,rw works.
@@ -1797,9 +1797,9 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
1797 1797
1798 // Parse remaining options 1798 // Parse remaining options
1799 // Max 2 params; -o is a list, -v is a counter 1799 // Max 2 params; -o is a list, -v is a counter
1800 opt_complementary = "?2o::" USE_FEATURE_MOUNT_VERBOSE("vv"); 1800 opt_complementary = "?2o::" IF_FEATURE_MOUNT_VERBOSE("vv");
1801 opt = getopt32(argv, OPTION_STR, &lst_o, &fstype, &O_optmatch 1801 opt = getopt32(argv, OPTION_STR, &lst_o, &fstype, &O_optmatch
1802 USE_FEATURE_MOUNT_VERBOSE(, &verbose)); 1802 IF_FEATURE_MOUNT_VERBOSE(, &verbose));
1803 while (lst_o) append_mount_options(&cmdopts, llist_pop(&lst_o)); // -o 1803 while (lst_o) append_mount_options(&cmdopts, llist_pop(&lst_o)); // -o
1804 if (opt & OPT_r) append_mount_options(&cmdopts, "ro"); // -r 1804 if (opt & OPT_r) append_mount_options(&cmdopts, "ro"); // -r
1805 if (opt & OPT_w) append_mount_options(&cmdopts, "rw"); // -w 1805 if (opt & OPT_w) append_mount_options(&cmdopts, "rw"); // -w