diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | TODO_config_nommu | 35 | ||||
-rw-r--r-- | applets/applet_tables.c | 6 | ||||
-rw-r--r-- | coreutils/fsync.c | 3 | ||||
-rw-r--r-- | coreutils/md5_sha1_sum.c | 6 | ||||
-rw-r--r-- | coreutils/tail.c | 3 | ||||
-rw-r--r-- | coreutils/touch.c | 4 | ||||
-rw-r--r-- | coreutils/wc.c | 2 | ||||
-rw-r--r-- | editors/diff.c | 84 | ||||
-rw-r--r-- | include/usage.h | 374 | ||||
-rw-r--r-- | miscutils/beep.c | 4 | ||||
-rw-r--r-- | miscutils/fbsplash.c | 74 | ||||
-rw-r--r-- | miscutils/microcom.c | 4 | ||||
-rw-r--r-- | networking/httpd.c | 6 | ||||
-rw-r--r-- | networking/telnet.c | 4 | ||||
-rw-r--r-- | networking/tftp.c | 2 | ||||
-rw-r--r-- | networking/udhcp/dhcpd.c | 2 | ||||
-rw-r--r-- | networking/wget.c | 3 | ||||
-rw-r--r-- | scripts/defconfig | 56 | ||||
-rw-r--r-- | shell/ash.c | 13 | ||||
-rw-r--r-- | shell/ash_test/ash-misc/nulltick1.right | 3 | ||||
-rwxr-xr-x | shell/ash_test/ash-misc/nulltick1.tests | 3 | ||||
-rw-r--r-- | shell/hush.c | 12 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 2 | ||||
-rwxr-xr-x | testsuite/cpio.tests | 5 | ||||
-rw-r--r-- | util-linux/script.c | 4 | ||||
-rw-r--r-- | util-linux/volume_id/linux_swap.c | 6 |
27 files changed, 408 insertions, 314 deletions
@@ -1,6 +1,6 @@ | |||
1 | VERSION = 1 | 1 | VERSION = 1 |
2 | PATCHLEVEL = 16 | 2 | PATCHLEVEL = 16 |
3 | SUBLEVEL = 0 | 3 | SUBLEVEL = 1 |
4 | EXTRAVERSION = | 4 | EXTRAVERSION = |
5 | NAME = Unnamed | 5 | NAME = Unnamed |
6 | 6 | ||
diff --git a/TODO_config_nommu b/TODO_config_nommu index 804fc61c9..2c8210cfe 100644 --- a/TODO_config_nommu +++ b/TODO_config_nommu | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Busybox version: 1.15.0.svn | 3 | # Busybox version: 1.16.0 |
4 | # Fri Aug 21 00:13:18 2009 | 4 | # Wed Jan 27 21:01:26 2010 |
5 | # | 5 | # |
6 | CONFIG_HAVE_DOT_CONFIG=y | 6 | CONFIG_HAVE_DOT_CONFIG=y |
7 | 7 | ||
@@ -14,6 +14,8 @@ CONFIG_HAVE_DOT_CONFIG=y | |||
14 | # | 14 | # |
15 | CONFIG_DESKTOP=y | 15 | CONFIG_DESKTOP=y |
16 | CONFIG_EXTRA_COMPAT=y | 16 | CONFIG_EXTRA_COMPAT=y |
17 | CONFIG_INCLUDE_SUSv2=y | ||
18 | # CONFIG_USE_PORTABLE_CODE is not set | ||
17 | CONFIG_FEATURE_BUFFERS_USE_MALLOC=y | 19 | CONFIG_FEATURE_BUFFERS_USE_MALLOC=y |
18 | # CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set | 20 | # CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set |
19 | # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set | 21 | # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set |
@@ -59,7 +61,6 @@ CONFIG_EXTRA_CFLAGS="" | |||
59 | CONFIG_NO_DEBUG_LIB=y | 61 | CONFIG_NO_DEBUG_LIB=y |
60 | # CONFIG_DMALLOC is not set | 62 | # CONFIG_DMALLOC is not set |
61 | # CONFIG_EFENCE is not set | 63 | # CONFIG_EFENCE is not set |
62 | CONFIG_INCLUDE_SUSv2=y | ||
63 | 64 | ||
64 | # | 65 | # |
65 | # Installation Options | 66 | # Installation Options |
@@ -120,6 +121,7 @@ CONFIG_DPKG_DEB=y | |||
120 | CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY=y | 121 | CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY=y |
121 | CONFIG_GUNZIP=y | 122 | CONFIG_GUNZIP=y |
122 | CONFIG_GZIP=y | 123 | CONFIG_GZIP=y |
124 | CONFIG_FEATURE_GZIP_LONG_OPTIONS=y | ||
123 | CONFIG_LZOP=y | 125 | CONFIG_LZOP=y |
124 | CONFIG_LZOP_COMPR_HIGH=y | 126 | CONFIG_LZOP_COMPR_HIGH=y |
125 | CONFIG_RPM2CPIO=y | 127 | CONFIG_RPM2CPIO=y |
@@ -133,6 +135,7 @@ CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y | |||
133 | CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y | 135 | CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y |
134 | CONFIG_FEATURE_TAR_LONG_OPTIONS=y | 136 | CONFIG_FEATURE_TAR_LONG_OPTIONS=y |
135 | CONFIG_FEATURE_TAR_UNAME_GNAME=y | 137 | CONFIG_FEATURE_TAR_UNAME_GNAME=y |
138 | CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y | ||
136 | CONFIG_UNCOMPRESS=y | 139 | CONFIG_UNCOMPRESS=y |
137 | CONFIG_UNLZMA=y | 140 | CONFIG_UNLZMA=y |
138 | CONFIG_FEATURE_LZMA_FAST=y | 141 | CONFIG_FEATURE_LZMA_FAST=y |
@@ -148,15 +151,19 @@ CONFIG_CATV=y | |||
148 | CONFIG_CHGRP=y | 151 | CONFIG_CHGRP=y |
149 | CONFIG_CHMOD=y | 152 | CONFIG_CHMOD=y |
150 | CONFIG_CHOWN=y | 153 | CONFIG_CHOWN=y |
154 | CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y | ||
151 | CONFIG_CHROOT=y | 155 | CONFIG_CHROOT=y |
152 | CONFIG_CKSUM=y | 156 | CONFIG_CKSUM=y |
153 | CONFIG_COMM=y | 157 | CONFIG_COMM=y |
154 | CONFIG_CP=y | 158 | CONFIG_CP=y |
159 | CONFIG_FEATURE_CP_LONG_OPTIONS=y | ||
155 | CONFIG_CUT=y | 160 | CONFIG_CUT=y |
156 | CONFIG_DATE=y | 161 | CONFIG_DATE=y |
157 | CONFIG_FEATURE_DATE_ISOFMT=y | 162 | CONFIG_FEATURE_DATE_ISOFMT=y |
163 | CONFIG_FEATURE_DATE_COMPAT=y | ||
158 | CONFIG_DD=y | 164 | CONFIG_DD=y |
159 | CONFIG_FEATURE_DD_SIGNAL_HANDLING=y | 165 | CONFIG_FEATURE_DD_SIGNAL_HANDLING=y |
166 | CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y | ||
160 | CONFIG_FEATURE_DD_IBS_OBS=y | 167 | CONFIG_FEATURE_DD_IBS_OBS=y |
161 | CONFIG_DF=y | 168 | CONFIG_DF=y |
162 | CONFIG_FEATURE_DF_FANCY=y | 169 | CONFIG_FEATURE_DF_FANCY=y |
@@ -271,7 +278,7 @@ CONFIG_FEATURE_AUTOWIDTH=y | |||
271 | CONFIG_FEATURE_HUMAN_READABLE=y | 278 | CONFIG_FEATURE_HUMAN_READABLE=y |
272 | 279 | ||
273 | # | 280 | # |
274 | # Common options for md5sum, sha1sum | 281 | # Common options for md5sum, sha1sum, sha256sum, sha512sum |
275 | # | 282 | # |
276 | CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y | 283 | CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y |
277 | 284 | ||
@@ -318,9 +325,8 @@ CONFIG_AWK=y | |||
318 | CONFIG_FEATURE_AWK_LIBM=y | 325 | CONFIG_FEATURE_AWK_LIBM=y |
319 | CONFIG_CMP=y | 326 | CONFIG_CMP=y |
320 | CONFIG_DIFF=y | 327 | CONFIG_DIFF=y |
321 | CONFIG_FEATURE_DIFF_BINARY=y | 328 | CONFIG_FEATURE_DIFF_LONG_OPTIONS=y |
322 | CONFIG_FEATURE_DIFF_DIR=y | 329 | CONFIG_FEATURE_DIFF_DIR=y |
323 | CONFIG_FEATURE_DIFF_MINIMAL=y | ||
324 | CONFIG_ED=y | 330 | CONFIG_ED=y |
325 | CONFIG_PATCH=y | 331 | CONFIG_PATCH=y |
326 | CONFIG_SED=y | 332 | CONFIG_SED=y |
@@ -364,6 +370,7 @@ CONFIG_FEATURE_FIND_DELETE=y | |||
364 | CONFIG_FEATURE_FIND_PATH=y | 370 | CONFIG_FEATURE_FIND_PATH=y |
365 | CONFIG_FEATURE_FIND_REGEX=y | 371 | CONFIG_FEATURE_FIND_REGEX=y |
366 | CONFIG_FEATURE_FIND_CONTEXT=y | 372 | CONFIG_FEATURE_FIND_CONTEXT=y |
373 | CONFIG_FEATURE_FIND_LINKS=y | ||
367 | CONFIG_GREP=y | 374 | CONFIG_GREP=y |
368 | CONFIG_FEATURE_GREP_EGREP_ALIAS=y | 375 | CONFIG_FEATURE_GREP_EGREP_ALIAS=y |
369 | CONFIG_FEATURE_GREP_FGREP_ALIAS=y | 376 | CONFIG_FEATURE_GREP_FGREP_ALIAS=y |
@@ -453,6 +460,7 @@ CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y | |||
453 | # Options common to multiple modutils | 460 | # Options common to multiple modutils |
454 | # | 461 | # |
455 | # CONFIG_FEATURE_2_4_MODULES is not set | 462 | # CONFIG_FEATURE_2_4_MODULES is not set |
463 | CONFIG_FEATURE_INSMOD_TRY_MMAP=y | ||
456 | # CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set | 464 | # CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set |
457 | # CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set | 465 | # CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set |
458 | # CONFIG_FEATURE_INSMOD_LOADINKMEM is not set | 466 | # CONFIG_FEATURE_INSMOD_LOADINKMEM is not set |
@@ -488,12 +496,14 @@ CONFIG_FEATURE_FDISK_ADVANCED=y | |||
488 | CONFIG_FINDFS=y | 496 | CONFIG_FINDFS=y |
489 | CONFIG_FREERAMDISK=y | 497 | CONFIG_FREERAMDISK=y |
490 | CONFIG_FSCK_MINIX=y | 498 | CONFIG_FSCK_MINIX=y |
499 | CONFIG_MKFS_EXT2=y | ||
491 | CONFIG_MKFS_MINIX=y | 500 | CONFIG_MKFS_MINIX=y |
492 | 501 | ||
493 | # | 502 | # |
494 | # Minix filesystem support | 503 | # Minix filesystem support |
495 | # | 504 | # |
496 | CONFIG_FEATURE_MINIX2=y | 505 | CONFIG_FEATURE_MINIX2=y |
506 | CONFIG_MKFS_REISER=y | ||
497 | CONFIG_MKFS_VFAT=y | 507 | CONFIG_MKFS_VFAT=y |
498 | CONFIG_GETOPT=y | 508 | CONFIG_GETOPT=y |
499 | CONFIG_FEATURE_GETOPT_LONG=y | 509 | CONFIG_FEATURE_GETOPT_LONG=y |
@@ -506,6 +516,8 @@ CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y | |||
506 | CONFIG_IPCRM=y | 516 | CONFIG_IPCRM=y |
507 | CONFIG_IPCS=y | 517 | CONFIG_IPCS=y |
508 | CONFIG_LOSETUP=y | 518 | CONFIG_LOSETUP=y |
519 | CONFIG_LSPCI=y | ||
520 | CONFIG_LSUSB=y | ||
509 | CONFIG_MDEV=y | 521 | CONFIG_MDEV=y |
510 | CONFIG_FEATURE_MDEV_CONF=y | 522 | CONFIG_FEATURE_MDEV_CONF=y |
511 | CONFIG_FEATURE_MDEV_RENAME=y | 523 | CONFIG_FEATURE_MDEV_RENAME=y |
@@ -518,6 +530,7 @@ CONFIG_MORE=y | |||
518 | CONFIG_FEATURE_USE_TERMIOS=y | 530 | CONFIG_FEATURE_USE_TERMIOS=y |
519 | CONFIG_VOLUMEID=y | 531 | CONFIG_VOLUMEID=y |
520 | CONFIG_FEATURE_VOLUMEID_EXT=y | 532 | CONFIG_FEATURE_VOLUMEID_EXT=y |
533 | CONFIG_FEATURE_VOLUMEID_BTRFS=y | ||
521 | CONFIG_FEATURE_VOLUMEID_REISERFS=y | 534 | CONFIG_FEATURE_VOLUMEID_REISERFS=y |
522 | CONFIG_FEATURE_VOLUMEID_FAT=y | 535 | CONFIG_FEATURE_VOLUMEID_FAT=y |
523 | CONFIG_FEATURE_VOLUMEID_HFS=y | 536 | CONFIG_FEATURE_VOLUMEID_HFS=y |
@@ -595,6 +608,7 @@ CONFIG_DEVMEM=y | |||
595 | CONFIG_EJECT=y | 608 | CONFIG_EJECT=y |
596 | CONFIG_FEATURE_EJECT_SCSI=y | 609 | CONFIG_FEATURE_EJECT_SCSI=y |
597 | CONFIG_FBSPLASH=y | 610 | CONFIG_FBSPLASH=y |
611 | CONFIG_FLASHCP=y | ||
598 | # CONFIG_FLASH_LOCK is not set | 612 | # CONFIG_FLASH_LOCK is not set |
599 | # CONFIG_FLASH_UNLOCK is not set | 613 | # CONFIG_FLASH_UNLOCK is not set |
600 | # CONFIG_FLASH_ERASEALL is not set | 614 | # CONFIG_FLASH_ERASEALL is not set |
@@ -638,6 +652,7 @@ CONFIG_TIME=y | |||
638 | CONFIG_TIMEOUT=y | 652 | CONFIG_TIMEOUT=y |
639 | CONFIG_TTYSIZE=y | 653 | CONFIG_TTYSIZE=y |
640 | CONFIG_VOLNAME=y | 654 | CONFIG_VOLNAME=y |
655 | CONFIG_WALL=y | ||
641 | CONFIG_WATCHDOG=y | 656 | CONFIG_WATCHDOG=y |
642 | 657 | ||
643 | # | 658 | # |
@@ -657,6 +672,7 @@ CONFIG_ETHER_WAKE=y | |||
657 | CONFIG_FAKEIDENTD=y | 672 | CONFIG_FAKEIDENTD=y |
658 | CONFIG_FTPD=y | 673 | CONFIG_FTPD=y |
659 | CONFIG_FEATURE_FTP_WRITE=y | 674 | CONFIG_FEATURE_FTP_WRITE=y |
675 | CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y | ||
660 | CONFIG_FTPGET=y | 676 | CONFIG_FTPGET=y |
661 | CONFIG_FTPPUT=y | 677 | CONFIG_FTPPUT=y |
662 | CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y | 678 | CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y |
@@ -722,6 +738,8 @@ CONFIG_NETSTAT=y | |||
722 | CONFIG_FEATURE_NETSTAT_WIDE=y | 738 | CONFIG_FEATURE_NETSTAT_WIDE=y |
723 | CONFIG_FEATURE_NETSTAT_PRG=y | 739 | CONFIG_FEATURE_NETSTAT_PRG=y |
724 | CONFIG_NSLOOKUP=y | 740 | CONFIG_NSLOOKUP=y |
741 | CONFIG_NTPD=y | ||
742 | CONFIG_FEATURE_NTPD_SERVER=y | ||
725 | CONFIG_PING=y | 743 | CONFIG_PING=y |
726 | CONFIG_PING6=y | 744 | CONFIG_PING6=y |
727 | CONFIG_FEATURE_FANCY_PING=y | 745 | CONFIG_FEATURE_FANCY_PING=y |
@@ -733,13 +751,16 @@ CONFIG_FEATURE_TELNET_TTYPE=y | |||
733 | CONFIG_FEATURE_TELNET_AUTOLOGIN=y | 751 | CONFIG_FEATURE_TELNET_AUTOLOGIN=y |
734 | CONFIG_TELNETD=y | 752 | CONFIG_TELNETD=y |
735 | CONFIG_FEATURE_TELNETD_STANDALONE=y | 753 | CONFIG_FEATURE_TELNETD_STANDALONE=y |
754 | CONFIG_FEATURE_TELNETD_INETD_WAIT=y | ||
736 | CONFIG_TFTP=y | 755 | CONFIG_TFTP=y |
737 | CONFIG_TFTPD=y | 756 | CONFIG_TFTPD=y |
738 | CONFIG_FEATURE_TFTP_GET=y | 757 | CONFIG_FEATURE_TFTP_GET=y |
739 | CONFIG_FEATURE_TFTP_PUT=y | 758 | CONFIG_FEATURE_TFTP_PUT=y |
740 | CONFIG_FEATURE_TFTP_BLOCKSIZE=y | 759 | CONFIG_FEATURE_TFTP_BLOCKSIZE=y |
760 | CONFIG_FEATURE_TFTP_PROGRESS_BAR=y | ||
741 | CONFIG_TFTP_DEBUG=y | 761 | CONFIG_TFTP_DEBUG=y |
742 | CONFIG_TRACEROUTE=y | 762 | CONFIG_TRACEROUTE=y |
763 | CONFIG_TRACEROUTE6=y | ||
743 | CONFIG_FEATURE_TRACEROUTE_VERBOSE=y | 764 | CONFIG_FEATURE_TRACEROUTE_VERBOSE=y |
744 | CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE=y | 765 | CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE=y |
745 | CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y | 766 | CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y |
@@ -813,6 +834,7 @@ CONFIG_FEATURE_TOP_SMP_CPU=y | |||
813 | CONFIG_FEATURE_TOP_DECIMALS=y | 834 | CONFIG_FEATURE_TOP_DECIMALS=y |
814 | CONFIG_FEATURE_TOP_SMP_PROCESS=y | 835 | CONFIG_FEATURE_TOP_SMP_PROCESS=y |
815 | CONFIG_FEATURE_TOPMEM=y | 836 | CONFIG_FEATURE_TOPMEM=y |
837 | CONFIG_FEATURE_SHOW_THREADS=y | ||
816 | CONFIG_UPTIME=y | 838 | CONFIG_UPTIME=y |
817 | CONFIG_WATCH=y | 839 | CONFIG_WATCH=y |
818 | 840 | ||
@@ -881,6 +903,7 @@ CONFIG_HUSH_CASE=y | |||
881 | CONFIG_HUSH_FUNCTIONS=y | 903 | CONFIG_HUSH_FUNCTIONS=y |
882 | CONFIG_HUSH_LOCAL=y | 904 | CONFIG_HUSH_LOCAL=y |
883 | CONFIG_HUSH_EXPORT_N=y | 905 | CONFIG_HUSH_EXPORT_N=y |
906 | CONFIG_HUSH_RANDOM_SUPPORT=y | ||
884 | CONFIG_LASH=y | 907 | CONFIG_LASH=y |
885 | CONFIG_MSH=y | 908 | CONFIG_MSH=y |
886 | CONFIG_SH_MATH_SUPPORT=y | 909 | CONFIG_SH_MATH_SUPPORT=y |
diff --git a/applets/applet_tables.c b/applets/applet_tables.c index e67f017e7..e48be4682 100644 --- a/applets/applet_tables.c +++ b/applets/applet_tables.c | |||
@@ -79,6 +79,7 @@ int main(int argc, char **argv) | |||
79 | } | 79 | } |
80 | printf("\n"); | 80 | printf("\n"); |
81 | 81 | ||
82 | printf("#ifndef SKIP_definitions\n"); | ||
82 | printf("const char applet_names[] ALIGN1 = \"\"\n"); | 83 | printf("const char applet_names[] ALIGN1 = \"\"\n"); |
83 | for (i = 0; i < NUM_APPLETS; i++) { | 84 | for (i = 0; i < NUM_APPLETS; i++) { |
84 | printf("\"%s\" \"\\0\"\n", applets[i].name); | 85 | printf("\"%s\" \"\\0\"\n", applets[i].name); |
@@ -120,9 +121,10 @@ int main(int argc, char **argv) | |||
120 | printf("0x%02x,\n", v); | 121 | printf("0x%02x,\n", v); |
121 | i++; | 122 | i++; |
122 | } | 123 | } |
123 | printf("};\n\n"); | 124 | printf("};\n"); |
124 | #endif | 125 | #endif |
125 | 126 | printf("#endif /* SKIP_definitions */\n"); | |
127 | printf("\n"); | ||
126 | printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN); | 128 | printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN); |
127 | 129 | ||
128 | return 0; | 130 | return 0; |
diff --git a/coreutils/fsync.c b/coreutils/fsync.c index f00803c5b..53900f8d2 100644 --- a/coreutils/fsync.c +++ b/coreutils/fsync.c | |||
@@ -7,6 +7,9 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | #include "libbb.h" | 9 | #include "libbb.h" |
10 | #ifndef O_NOATIME | ||
11 | # define O_NOATIME 0 | ||
12 | #endif | ||
10 | 13 | ||
11 | /* This is a NOFORK applet. Be very careful! */ | 14 | /* This is a NOFORK applet. Be very careful! */ |
12 | 15 | ||
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index a64026d3d..3d50bb0f5 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c | |||
@@ -101,8 +101,10 @@ int md5_sha1_sum_main(int argc UNUSED_PARAM, char **argv) | |||
101 | unsigned flags; | 101 | unsigned flags; |
102 | /*hash_algo_t hash_algo = applet_name[3];*/ | 102 | /*hash_algo_t hash_algo = applet_name[3];*/ |
103 | 103 | ||
104 | if (ENABLE_FEATURE_MD5_SHA1_SUM_CHECK) | 104 | if (ENABLE_FEATURE_MD5_SHA1_SUM_CHECK) { |
105 | flags = getopt32(argv, "scw"); | 105 | /* -b "binary", -t "text" are ignored (shaNNNsum compat) */ |
106 | flags = getopt32(argv, "scwbt"); | ||
107 | } | ||
106 | else optind = 1; | 108 | else optind = 1; |
107 | argv += optind; | 109 | argv += optind; |
108 | //argc -= optind; | 110 | //argc -= optind; |
diff --git a/coreutils/tail.c b/coreutils/tail.c index 0be166315..c9d86f459 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
@@ -241,7 +241,8 @@ int tail_main(int argc, char **argv) | |||
241 | } while (nwrite); | 241 | } while (nwrite); |
242 | } | 242 | } |
243 | } | 243 | } |
244 | xwrite(STDOUT_FILENO, buf + nread - nwrite, nwrite); | 244 | if (nwrite > 0) |
245 | xwrite(STDOUT_FILENO, buf + nread - nwrite, nwrite); | ||
245 | } else if (count) { | 246 | } else if (count) { |
246 | if (COUNT_BYTES) { | 247 | if (COUNT_BYTES) { |
247 | taillen += nread; | 248 | taillen += nread; |
diff --git a/coreutils/touch.c b/coreutils/touch.c index 3f7b265bd..dceb7c1cc 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c | |||
@@ -104,7 +104,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | do { | 106 | do { |
107 | if (utimes(*argv, reference_file ? timebuf : NULL) != 0) { | 107 | if (utimes(*argv, (reference_file || date_str) ? timebuf : NULL) != 0) { |
108 | if (errno == ENOENT) { /* no such file */ | 108 | if (errno == ENOENT) { /* no such file */ |
109 | if (opts) { /* creation is disabled, so ignore */ | 109 | if (opts) { /* creation is disabled, so ignore */ |
110 | continue; | 110 | continue; |
@@ -113,7 +113,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv) | |||
113 | fd = open(*argv, O_RDWR | O_CREAT, 0666); | 113 | fd = open(*argv, O_RDWR | O_CREAT, 0666); |
114 | if (fd >= 0) { | 114 | if (fd >= 0) { |
115 | xclose(fd); | 115 | xclose(fd); |
116 | if (reference_file) | 116 | if (reference_file || date_str) |
117 | utimes(*argv, timebuf); | 117 | utimes(*argv, timebuf); |
118 | continue; | 118 | continue; |
119 | } | 119 | } |
diff --git a/coreutils/wc.c b/coreutils/wc.c index 08f3c2dc4..711684225 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c | |||
@@ -88,6 +88,8 @@ int wc_main(int argc UNUSED_PARAM, char **argv) | |||
88 | if (!argv[0]) { | 88 | if (!argv[0]) { |
89 | *--argv = (char *) bb_msg_standard_input; | 89 | *--argv = (char *) bb_msg_standard_input; |
90 | fname_fmt = "\n"; | 90 | fname_fmt = "\n"; |
91 | } | ||
92 | if (!argv[1]) { /* zero or one filename? */ | ||
91 | if (!((print_type-1) & print_type)) /* exactly one option? */ | 93 | if (!((print_type-1) & print_type)) /* exactly one option? */ |
92 | start_fmt = "%"COUNT_FMT; | 94 | start_fmt = "%"COUNT_FMT; |
93 | } | 95 | } |
diff --git a/editors/diff.c b/editors/diff.c index e4d74abca..07594e8d8 100644 --- a/editors/diff.c +++ b/editors/diff.c | |||
@@ -227,10 +227,12 @@ struct cand { | |||
227 | 227 | ||
228 | static int search(const int *c, int k, int y, const struct cand *list) | 228 | static int search(const int *c, int k, int y, const struct cand *list) |
229 | { | 229 | { |
230 | int i, j; | ||
231 | |||
230 | if (list[c[k]].y < y) /* quick look for typical case */ | 232 | if (list[c[k]].y < y) /* quick look for typical case */ |
231 | return k + 1; | 233 | return k + 1; |
232 | 234 | ||
233 | for (int i = 0, j = k + 1;;) { | 235 | for (i = 0, j = k + 1;;) { |
234 | const int l = (i + j) >> 1; | 236 | const int l = (i + j) >> 1; |
235 | if (l > i) { | 237 | if (l > i) { |
236 | const int t = list[c[l]].y; | 238 | const int t = list[c[l]].y; |
@@ -265,11 +267,13 @@ static void stone(const int *a, int n, const int *b, int *J, int pref) | |||
265 | int clistlen = 100; | 267 | int clistlen = 100; |
266 | int k = 0; | 268 | int k = 0; |
267 | struct cand *clist = xzalloc(clistlen * sizeof(clist[0])); | 269 | struct cand *clist = xzalloc(clistlen * sizeof(clist[0])); |
270 | struct cand cand; | ||
271 | struct cand *q; | ||
268 | int *klist = xzalloc((n + 2) * sizeof(klist[0])); | 272 | int *klist = xzalloc((n + 2) * sizeof(klist[0])); |
269 | /*clist[0] = (struct cand){0}; - xzalloc did it */ | 273 | /*clist[0] = (struct cand){0}; - xzalloc did it */ |
270 | /*klist[0] = 0; */ | 274 | /*klist[0] = 0; */ |
271 | 275 | ||
272 | for (struct cand cand = {1}; cand.x <= n; cand.x++) { | 276 | for (cand.x = 1; cand.x <= n; cand.x++) { |
273 | int j = a[cand.x], oldl = 0; | 277 | int j = a[cand.x], oldl = 0; |
274 | unsigned numtries = 0; | 278 | unsigned numtries = 0; |
275 | if (j == 0) | 279 | if (j == 0) |
@@ -303,7 +307,7 @@ static void stone(const int *a, int n, const int *b, int *J, int pref) | |||
303 | } while ((cand.y = b[++j]) > 0 && numtries < bound); | 307 | } while ((cand.y = b[++j]) > 0 && numtries < bound); |
304 | } | 308 | } |
305 | /* Unravel */ | 309 | /* Unravel */ |
306 | for (struct cand *q = clist + klist[k]; q->y; q = clist + q->pred) | 310 | for (q = clist + klist[k]; q->y; q = clist + q->pred) |
307 | J[q->x + pref] = q->y + pref; | 311 | J[q->x + pref] = q->y + pref; |
308 | free(klist); | 312 | free(klist); |
309 | free(clist); | 313 | free(clist); |
@@ -348,10 +352,11 @@ static void equiv(struct line *a, int n, struct line *b, int m, int *c) | |||
348 | 352 | ||
349 | static void unsort(const struct line *f, int l, int *b) | 353 | static void unsort(const struct line *f, int l, int *b) |
350 | { | 354 | { |
355 | int i; | ||
351 | int *a = xmalloc((l + 1) * sizeof(a[0])); | 356 | int *a = xmalloc((l + 1) * sizeof(a[0])); |
352 | for (int i = 1; i <= l; i++) | 357 | for (i = 1; i <= l; i++) |
353 | a[f[i].serial] = f[i].value; | 358 | a[f[i].serial] = f[i].value; |
354 | for (int i = 1; i <= l; i++) | 359 | for (i = 1; i <= l; i++) |
355 | b[i] = a[i]; | 360 | b[i] = a[i]; |
356 | free(a); | 361 | free(a); |
357 | } | 362 | } |
@@ -370,12 +375,13 @@ static int line_compar(const void *a, const void *b) | |||
370 | 375 | ||
371 | static void fetch(FILE_and_pos_t *ft, const off_t *ix, int a, int b, int ch) | 376 | static void fetch(FILE_and_pos_t *ft, const off_t *ix, int a, int b, int ch) |
372 | { | 377 | { |
373 | for (int i = a; i <= b; i++) { | 378 | int i, j, col; |
379 | for (i = a; i <= b; i++) { | ||
374 | seek_ft(ft, ix[i - 1]); | 380 | seek_ft(ft, ix[i - 1]); |
375 | putchar(ch); | 381 | putchar(ch); |
376 | if (option_mask32 & FLAG(T)) | 382 | if (option_mask32 & FLAG(T)) |
377 | putchar('\t'); | 383 | putchar('\t'); |
378 | for (int j = 0, col = 0; j < ix[i] - ix[i - 1]; j++) { | 384 | for (j = 0, col = 0; j < ix[i] - ix[i - 1]; j++) { |
379 | int c = fgetc(ft->ft_fp); | 385 | int c = fgetc(ft->ft_fp); |
380 | if (c == EOF) { | 386 | if (c == EOF) { |
381 | printf("\n\\ No newline at end of file\n"); | 387 | printf("\n\\ No newline at end of file\n"); |
@@ -410,19 +416,20 @@ static NOINLINE int *create_J(FILE_and_pos_t ft[2], int nlen[2], off_t *ix[2]) | |||
410 | { | 416 | { |
411 | int *J, slen[2], *class, *member; | 417 | int *J, slen[2], *class, *member; |
412 | struct line *nfile[2], *sfile[2]; | 418 | struct line *nfile[2], *sfile[2]; |
413 | int pref = 0, suff = 0; | 419 | int pref = 0, suff = 0, i, j, delta; |
414 | 420 | ||
415 | /* Lines of both files are hashed, and in the process | 421 | /* Lines of both files are hashed, and in the process |
416 | * their offsets are stored in the array ix[fileno] | 422 | * their offsets are stored in the array ix[fileno] |
417 | * where fileno == 0 points to the old file, and | 423 | * where fileno == 0 points to the old file, and |
418 | * fileno == 1 points to the new one. | 424 | * fileno == 1 points to the new one. |
419 | */ | 425 | */ |
420 | for (int i = 0; i < 2; i++) { | 426 | for (i = 0; i < 2; i++) { |
421 | unsigned hash; | 427 | unsigned hash; |
422 | token_t tok; | 428 | token_t tok; |
423 | size_t sz = 100; | 429 | size_t sz = 100; |
424 | nfile[i] = xmalloc((sz + 3) * sizeof(nfile[i][0])); | 430 | nfile[i] = xmalloc((sz + 3) * sizeof(nfile[i][0])); |
425 | /* ft gets here without the correct position, cant use seek_ft */ | 431 | /* ft gets here without the correct position, cant use seek_ft */ |
432 | ft[i].ft_pos = 0; | ||
426 | fseeko(ft[i].ft_fp, 0, SEEK_SET); | 433 | fseeko(ft[i].ft_fp, 0, SEEK_SET); |
427 | 434 | ||
428 | nlen[i] = 0; | 435 | nlen[i] = 0; |
@@ -460,11 +467,11 @@ start: | |||
460 | nlen[i]--; | 467 | nlen[i]--; |
461 | /* Now we copy the line offsets into ix */ | 468 | /* Now we copy the line offsets into ix */ |
462 | ix[i] = xmalloc((nlen[i] + 2) * sizeof(ix[i][0])); | 469 | ix[i] = xmalloc((nlen[i] + 2) * sizeof(ix[i][0])); |
463 | for (int j = 0; j < nlen[i] + 1; j++) | 470 | for (j = 0; j < nlen[i] + 1; j++) |
464 | ix[i][j] = nfile[i][j].offset; | 471 | ix[i][j] = nfile[i][j].offset; |
465 | } | 472 | } |
466 | 473 | ||
467 | /* lenght of prefix and suffix is calculated */ | 474 | /* length of prefix and suffix is calculated */ |
468 | for (; pref < nlen[0] && pref < nlen[1] && | 475 | for (; pref < nlen[0] && pref < nlen[1] && |
469 | nfile[0][pref + 1].value == nfile[1][pref + 1].value; | 476 | nfile[0][pref + 1].value == nfile[1][pref + 1].value; |
470 | pref++); | 477 | pref++); |
@@ -475,10 +482,10 @@ start: | |||
475 | * the result being sorted and stored in sfile[fileno], | 482 | * the result being sorted and stored in sfile[fileno], |
476 | * and their sizes are stored in slen[fileno] | 483 | * and their sizes are stored in slen[fileno] |
477 | */ | 484 | */ |
478 | for (int j = 0; j < 2; j++) { | 485 | for (j = 0; j < 2; j++) { |
479 | sfile[j] = nfile[j] + pref; | 486 | sfile[j] = nfile[j] + pref; |
480 | slen[j] = nlen[j] - pref - suff; | 487 | slen[j] = nlen[j] - pref - suff; |
481 | for (int i = 0; i <= slen[j]; i++) | 488 | for (i = 0; i <= slen[j]; i++) |
482 | sfile[j][i].serial = i; | 489 | sfile[j][i].serial = i; |
483 | qsort(sfile[j] + 1, slen[j], sizeof(*sfile[j]), line_compar); | 490 | qsort(sfile[j] + 1, slen[j], sizeof(*sfile[j]), line_compar); |
484 | } | 491 | } |
@@ -494,7 +501,7 @@ start: | |||
494 | free(nfile[1]); | 501 | free(nfile[1]); |
495 | 502 | ||
496 | class = xmalloc((slen[0] + 1) * sizeof(class[0])); | 503 | class = xmalloc((slen[0] + 1) * sizeof(class[0])); |
497 | for (int i = 1; i <= slen[0]; i++) /* Unsorting */ | 504 | for (i = 1; i <= slen[0]; i++) /* Unsorting */ |
498 | class[sfile[0][i].serial] = sfile[0][i].value; | 505 | class[sfile[0][i].serial] = sfile[0][i].value; |
499 | free(nfile[0]); | 506 | free(nfile[0]); |
500 | #else | 507 | #else |
@@ -512,7 +519,7 @@ start: | |||
512 | * are initialized with 0 (no matches), so that function stone can | 519 | * are initialized with 0 (no matches), so that function stone can |
513 | * then assign them their right values | 520 | * then assign them their right values |
514 | */ | 521 | */ |
515 | for (int i = 0, delta = nlen[1] - nlen[0]; i <= nlen[0]; i++) | 522 | for (i = 0, delta = nlen[1] - nlen[0]; i <= nlen[0]; i++) |
516 | J[i] = i <= pref ? i : | 523 | J[i] = i <= pref ? i : |
517 | i > (nlen[0] - suff) ? (i + delta) : 0; | 524 | i > (nlen[0] - suff) ? (i + delta) : 0; |
518 | /* Here the magic is performed */ | 525 | /* Here the magic is performed */ |
@@ -526,14 +533,14 @@ start: | |||
526 | * which, due to limitations intrinsic to any hashing algorithm, | 533 | * which, due to limitations intrinsic to any hashing algorithm, |
527 | * are different but ended up confounded as the same | 534 | * are different but ended up confounded as the same |
528 | */ | 535 | */ |
529 | for (int i = 1; i <= nlen[0]; i++) { | 536 | for (i = 1; i <= nlen[0]; i++) { |
530 | if (!J[i]) | 537 | if (!J[i]) |
531 | continue; | 538 | continue; |
532 | 539 | ||
533 | seek_ft(&ft[0], ix[0][i - 1]); | 540 | seek_ft(&ft[0], ix[0][i - 1]); |
534 | seek_ft(&ft[1], ix[1][J[i] - 1]); | 541 | seek_ft(&ft[1], ix[1][J[i] - 1]); |
535 | 542 | ||
536 | for (int j = J[i]; i <= nlen[0] && J[i] == j; i++, j++) { | 543 | for (j = J[i]; i <= nlen[0] && J[i] == j; i++, j++) { |
537 | token_t tok0 = 0, tok1 = 0; | 544 | token_t tok0 = 0, tok1 = 0; |
538 | do { | 545 | do { |
539 | tok0 = read_token(&ft[0], tok0); | 546 | tok0 = read_token(&ft[0], tok0); |
@@ -555,13 +562,18 @@ static bool diff(FILE* fp[2], char *file[2]) | |||
555 | { | 562 | { |
556 | int nlen[2]; | 563 | int nlen[2]; |
557 | off_t *ix[2]; | 564 | off_t *ix[2]; |
558 | FILE_and_pos_t ft[2] = { { fp[0] }, { fp[1] } }; | 565 | FILE_and_pos_t ft[2]; |
559 | int *J = create_J(ft, nlen, ix); | ||
560 | |||
561 | bool anychange = false; | ||
562 | typedef struct { int a, b; } vec_t[2]; | 566 | typedef struct { int a, b; } vec_t[2]; |
563 | vec_t *vec = NULL; | 567 | vec_t *vec = NULL; |
564 | int i = 1, idx = -1; | 568 | int i = 1, j, k, idx = -1; |
569 | bool anychange = false; | ||
570 | int *J; | ||
571 | |||
572 | ft[0].ft_fp = fp[0]; | ||
573 | ft[1].ft_fp = fp[1]; | ||
574 | /* note that ft[i].ft_pos is unintitalized, create_J() | ||
575 | * must not assume otherwise */ | ||
576 | J = create_J(ft, nlen, ix); | ||
565 | 577 | ||
566 | do { | 578 | do { |
567 | bool nonempty = false; | 579 | bool nonempty = false; |
@@ -596,8 +608,8 @@ static bool diff(FILE* fp[2], char *file[2]) | |||
596 | break; | 608 | break; |
597 | } | 609 | } |
598 | 610 | ||
599 | for (int j = 0; j < 2; j++) | 611 | for (j = 0; j < 2; j++) |
600 | for (int k = v[j].a; k < v[j].b; k++) | 612 | for (k = v[j].a; k < v[j].b; k++) |
601 | nonempty |= (ix[j][k+1] - ix[j][k] != 1); | 613 | nonempty |= (ix[j][k+1] - ix[j][k] != 1); |
602 | 614 | ||
603 | vec = xrealloc_vector(vec, 6, ++idx); | 615 | vec = xrealloc_vector(vec, 6, ++idx); |
@@ -612,6 +624,7 @@ static bool diff(FILE* fp[2], char *file[2]) | |||
612 | if (idx < 0 || ((option_mask32 & FLAG(B)) && !nonempty)) | 624 | if (idx < 0 || ((option_mask32 & FLAG(B)) && !nonempty)) |
613 | goto cont; | 625 | goto cont; |
614 | if (!(option_mask32 & FLAG(q))) { | 626 | if (!(option_mask32 & FLAG(q))) { |
627 | int lowa; | ||
615 | vec_t span, *cvp = vec; | 628 | vec_t span, *cvp = vec; |
616 | 629 | ||
617 | if (!anychange) { | 630 | if (!anychange) { |
@@ -621,7 +634,7 @@ static bool diff(FILE* fp[2], char *file[2]) | |||
621 | } | 634 | } |
622 | 635 | ||
623 | printf("@@"); | 636 | printf("@@"); |
624 | for (int j = 0; j < 2; j++) { | 637 | for (j = 0; j < 2; j++) { |
625 | int a = span[j].a = MAX(1, (*cvp)[j].a - opt_U_context); | 638 | int a = span[j].a = MAX(1, (*cvp)[j].a - opt_U_context); |
626 | int b = span[j].b = MIN(nlen[j], vec[idx][j].b + opt_U_context); | 639 | int b = span[j].b = MIN(nlen[j], vec[idx][j].b + opt_U_context); |
627 | 640 | ||
@@ -635,12 +648,12 @@ static bool diff(FILE* fp[2], char *file[2]) | |||
635 | * Output changes in "unified" diff format--the old and new lines | 648 | * Output changes in "unified" diff format--the old and new lines |
636 | * are printed together. | 649 | * are printed together. |
637 | */ | 650 | */ |
638 | for (int lowa = span[0].a; ; lowa = (*cvp++)[0].b + 1) { | 651 | for (lowa = span[0].a; ; lowa = (*cvp++)[0].b + 1) { |
639 | bool end = cvp > &vec[idx]; | 652 | bool end = cvp > &vec[idx]; |
640 | fetch(&ft[0], ix[0], lowa, end ? span[0].b : (*cvp)[0].a - 1, ' '); | 653 | fetch(&ft[0], ix[0], lowa, end ? span[0].b : (*cvp)[0].a - 1, ' '); |
641 | if (end) | 654 | if (end) |
642 | break; | 655 | break; |
643 | for (int j = 0; j < 2; j++) | 656 | for (j = 0; j < 2; j++) |
644 | fetch(&ft[j], ix[j], (*cvp)[j].a, (*cvp)[j].b, j ? '+' : '-'); | 657 | fetch(&ft[j], ix[j], (*cvp)[j].a, (*cvp)[j].b, j ? '+' : '-'); |
645 | } | 658 | } |
646 | } | 659 | } |
@@ -660,9 +673,9 @@ static int diffreg(char *file[2]) | |||
660 | { | 673 | { |
661 | FILE *fp[2] = { stdin, stdin }; | 674 | FILE *fp[2] = { stdin, stdin }; |
662 | bool binary = false, differ = false; | 675 | bool binary = false, differ = false; |
663 | int status = STATUS_SAME; | 676 | int status = STATUS_SAME, i; |
664 | 677 | ||
665 | for (int i = 0; i < 2; i++) { | 678 | for (i = 0; i < 2; i++) { |
666 | int fd = open_or_warn_stdin(file[i]); | 679 | int fd = open_or_warn_stdin(file[i]); |
667 | if (fd == -1) | 680 | if (fd == -1) |
668 | goto out; | 681 | goto out; |
@@ -688,7 +701,7 @@ static int diffreg(char *file[2]) | |||
688 | const size_t sz = COMMON_BUFSIZE / 2; | 701 | const size_t sz = COMMON_BUFSIZE / 2; |
689 | char *const buf0 = bb_common_bufsiz1; | 702 | char *const buf0 = bb_common_bufsiz1; |
690 | char *const buf1 = buf0 + sz; | 703 | char *const buf1 = buf0 + sz; |
691 | int i, j; | 704 | int j, k; |
692 | i = fread(buf0, 1, sz, fp[0]); | 705 | i = fread(buf0, 1, sz, fp[0]); |
693 | j = fread(buf1, 1, sz, fp[1]); | 706 | j = fread(buf1, 1, sz, fp[1]); |
694 | if (i != j) { | 707 | if (i != j) { |
@@ -697,7 +710,7 @@ static int diffreg(char *file[2]) | |||
697 | } | 710 | } |
698 | if (i == 0) | 711 | if (i == 0) |
699 | break; | 712 | break; |
700 | for (int k = 0; k < i; k++) { | 713 | for (k = 0; k < i; k++) { |
701 | if (!buf0[k] || !buf1[k]) | 714 | if (!buf0[k] || !buf1[k]) |
702 | binary = true; | 715 | binary = true; |
703 | if (buf0[k] != buf1[k]) | 716 | if (buf0[k] != buf1[k]) |
@@ -771,9 +784,10 @@ static int FAST_FUNC skip_dir(const char *filename, | |||
771 | static void diffdir(char *p[2], const char *s_start) | 784 | static void diffdir(char *p[2], const char *s_start) |
772 | { | 785 | { |
773 | struct dlist list[2]; | 786 | struct dlist list[2]; |
787 | int i; | ||
774 | 788 | ||
775 | memset(&list, 0, sizeof(list)); | 789 | memset(&list, 0, sizeof(list)); |
776 | for (int i = 0; i < 2; i++) { | 790 | for (i = 0; i < 2; i++) { |
777 | /*list[i].s = list[i].e = 0; - memset did it */ | 791 | /*list[i].s = list[i].e = 0; - memset did it */ |
778 | /*list[i].dl = NULL; */ | 792 | /*list[i].dl = NULL; */ |
779 | 793 | ||
@@ -815,7 +829,7 @@ static void diffdir(char *p[2], const char *s_start) | |||
815 | else { | 829 | else { |
816 | char *fullpath[2], *path[2]; /* if -N */ | 830 | char *fullpath[2], *path[2]; /* if -N */ |
817 | 831 | ||
818 | for (int i = 0; i < 2; i++) { | 832 | for (i = 0; i < 2; i++) { |
819 | if (pos == 0 || i == k) { | 833 | if (pos == 0 || i == k) { |
820 | path[i] = fullpath[i] = concat_path_file(p[i], dp[i]); | 834 | path[i] = fullpath[i] = concat_path_file(p[i], dp[i]); |
821 | stat(fullpath[i], &stb[i]); | 835 | stat(fullpath[i], &stb[i]); |
@@ -883,7 +897,7 @@ static const char diff_longopts[] ALIGN1 = | |||
883 | int diff_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 897 | int diff_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
884 | int diff_main(int argc UNUSED_PARAM, char **argv) | 898 | int diff_main(int argc UNUSED_PARAM, char **argv) |
885 | { | 899 | { |
886 | int gotstdin = 0; | 900 | int gotstdin = 0, i; |
887 | char *file[2], *s_start = NULL; | 901 | char *file[2], *s_start = NULL; |
888 | llist_t *L_arg = NULL; | 902 | llist_t *L_arg = NULL; |
889 | 903 | ||
@@ -900,7 +914,7 @@ int diff_main(int argc UNUSED_PARAM, char **argv) | |||
900 | while (L_arg) | 914 | while (L_arg) |
901 | label[!!label[0]] = llist_pop(&L_arg); | 915 | label[!!label[0]] = llist_pop(&L_arg); |
902 | xfunc_error_retval = 2; | 916 | xfunc_error_retval = 2; |
903 | for (int i = 0; i < 2; i++) { | 917 | for (i = 0; i < 2; i++) { |
904 | file[i] = argv[i]; | 918 | file[i] = argv[i]; |
905 | /* Compat: "diff file name_which_doesnt_exist" exits with 2 */ | 919 | /* Compat: "diff file name_which_doesnt_exist" exits with 2 */ |
906 | if (LONE_DASH(file[i])) { | 920 | if (LONE_DASH(file[i])) { |
diff --git a/include/usage.h b/include/usage.h index 44cc83422..fb983c1cd 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define NOUSAGE_STR "\b" | 16 | #define NOUSAGE_STR "\b" |
17 | 17 | ||
18 | #define acpid_trivial_usage \ | 18 | #define acpid_trivial_usage \ |
19 | "[-d] [-c CONFDIR] [-l LOGFILE] [-e PROC_EVENT_FILE] [EVDEV_EVENT_FILE...]" | 19 | "[-d] [-c CONFDIR] [-l LOGFILE] [-e PROC_EVENT_FILE] [EVDEV_EVENT_FILE]..." |
20 | #define acpid_full_usage "\n\n" \ | 20 | #define acpid_full_usage "\n\n" \ |
21 | "Listen to ACPI events and spawn specific helpers on event arrival\n" \ | 21 | "Listen to ACPI events and spawn specific helpers on event arrival\n" \ |
22 | "\nOptions:" \ | 22 | "\nOptions:" \ |
@@ -33,7 +33,7 @@ | |||
33 | "# acpid -d /dev/input/event*\n" | 33 | "# acpid -d /dev/input/event*\n" |
34 | 34 | ||
35 | #define addgroup_trivial_usage \ | 35 | #define addgroup_trivial_usage \ |
36 | "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[user_name] ") "group_name" | 36 | "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP" |
37 | #define addgroup_full_usage "\n\n" \ | 37 | #define addgroup_full_usage "\n\n" \ |
38 | "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \ | 38 | "Add a group " IF_FEATURE_ADDUSER_TO_GROUP("or add a user to a group") "\n" \ |
39 | "\nOptions:" \ | 39 | "\nOptions:" \ |
@@ -41,7 +41,7 @@ | |||
41 | "\n -S Create a system group" \ | 41 | "\n -S Create a system group" \ |
42 | 42 | ||
43 | #define adduser_trivial_usage \ | 43 | #define adduser_trivial_usage \ |
44 | "[OPTIONS] user_name" | 44 | "[OPTIONS] USER" |
45 | #define adduser_full_usage "\n\n" \ | 45 | #define adduser_full_usage "\n\n" \ |
46 | "Add a user\n" \ | 46 | "Add a user\n" \ |
47 | "\nOptions:" \ | 47 | "\nOptions:" \ |
@@ -55,16 +55,16 @@ | |||
55 | "\n -u UID User id" \ | 55 | "\n -u UID User id" \ |
56 | 56 | ||
57 | #define adjtimex_trivial_usage \ | 57 | #define adjtimex_trivial_usage \ |
58 | "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]" | 58 | "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" |
59 | #define adjtimex_full_usage "\n\n" \ | 59 | #define adjtimex_full_usage "\n\n" \ |
60 | "Read and optionally set system timebase parameters. See adjtimex(2).\n" \ | 60 | "Read and optionally set system timebase parameters. See adjtimex(2)\n" \ |
61 | "\nOptions:" \ | 61 | "\nOptions:" \ |
62 | "\n -q Quiet" \ | 62 | "\n -q Quiet" \ |
63 | "\n -o offset Time offset, microseconds" \ | 63 | "\n -o OFF Time offset, microseconds" \ |
64 | "\n -f frequency Frequency adjust, integer kernel units (65536 is 1ppm)" \ | 64 | "\n -f FREQ Frequency adjust, integer kernel units (65536 is 1ppm)" \ |
65 | "\n (positive values make clock run faster)" \ | 65 | "\n (positive values make clock run faster)" \ |
66 | "\n -t tick Microseconds per tick, usually 10000" \ | 66 | "\n -t TICK Microseconds per tick, usually 10000" \ |
67 | "\n -p timeconstant" \ | 67 | "\n -p TCONST" \ |
68 | 68 | ||
69 | #define ar_trivial_usage \ | 69 | #define ar_trivial_usage \ |
70 | "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES" | 70 | "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES" |
@@ -78,11 +78,11 @@ | |||
78 | "\n -v Verbose" \ | 78 | "\n -v Verbose" \ |
79 | 79 | ||
80 | #define arp_trivial_usage \ | 80 | #define arp_trivial_usage \ |
81 | "\n[-vn] [-H type] [-i if] -a [hostname]" \ | 81 | "\n[-vn] [-H HWTYPE] [-i IF] -a [HOSTNAME]" \ |
82 | "\n[-v] [-i if] -d hostname [pub]" \ | 82 | "\n[-v] [-i IF] -d HOSTNAME [pub]" \ |
83 | "\n[-v] [-H type] [-i if] -s hostname hw_addr [temp]" \ | 83 | "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [temp]" \ |
84 | "\n[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub" \ | 84 | "\n[-v] [-H HWTYPE] [-i IF] -s HOSTNAME HWADDR [netmask MASK] pub" \ |
85 | "\n[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub" | 85 | "\n[-v] [-H HWTYPE] [-i IF] -Ds HOSTNAME IFACE [netmask MASK] pub" |
86 | #define arp_full_usage "\n\n" \ | 86 | #define arp_full_usage "\n\n" \ |
87 | "Manipulate ARP cache\n" \ | 87 | "Manipulate ARP cache\n" \ |
88 | "\nOptions:" \ | 88 | "\nOptions:" \ |
@@ -97,7 +97,7 @@ | |||
97 | "\n -H HWTYPE Hardware address type" \ | 97 | "\n -H HWTYPE Hardware address type" \ |
98 | 98 | ||
99 | #define arping_trivial_usage \ | 99 | #define arping_trivial_usage \ |
100 | "[-fqbDUA] [-c count] [-w timeout] [-I dev] [-s sender] target" | 100 | "[-fqbDUA] [-c CNT] [-w TIMEOUT] [-I IFACE] [-s SRC_IP] DST_IP" |
101 | #define arping_full_usage "\n\n" \ | 101 | #define arping_full_usage "\n\n" \ |
102 | "Send ARP requests/replies\n" \ | 102 | "Send ARP requests/replies\n" \ |
103 | "\nOptions:" \ | 103 | "\nOptions:" \ |
@@ -108,10 +108,10 @@ | |||
108 | "\n -U Unsolicited ARP mode, update your neighbors" \ | 108 | "\n -U Unsolicited ARP mode, update your neighbors" \ |
109 | "\n -A ARP answer mode, update your neighbors" \ | 109 | "\n -A ARP answer mode, update your neighbors" \ |
110 | "\n -c N Stop after sending N ARP requests" \ | 110 | "\n -c N Stop after sending N ARP requests" \ |
111 | "\n -w timeout Time to wait for ARP reply, in seconds" \ | 111 | "\n -w TIMEOUT Time to wait for ARP reply, seconds" \ |
112 | "\n -I dev Interface to use (default eth0)" \ | 112 | "\n -I IFACE Interface to use (default eth0)" \ |
113 | "\n -s sender Sender IP address" \ | 113 | "\n -s SRC_IP Sender IP address" \ |
114 | "\n target Target IP address" \ | 114 | "\n DST_IP Target IP address" \ |
115 | 115 | ||
116 | #define sh_trivial_usage NOUSAGE_STR | 116 | #define sh_trivial_usage NOUSAGE_STR |
117 | #define sh_full_usage "" | 117 | #define sh_full_usage "" |
@@ -191,19 +191,19 @@ | |||
191 | ) \ | 191 | ) \ |
192 | 192 | ||
193 | #define bunzip2_trivial_usage \ | 193 | #define bunzip2_trivial_usage \ |
194 | "[OPTIONS] [FILE]" | 194 | "[OPTIONS] [FILE]..." |
195 | #define bunzip2_full_usage "\n\n" \ | 195 | #define bunzip2_full_usage "\n\n" \ |
196 | "Uncompress FILE (or standard input)\n" \ | 196 | "Uncompress FILEs (or stdin)\n" \ |
197 | "\nOptions:" \ | 197 | "\nOptions:" \ |
198 | "\n -c Write to standard output" \ | 198 | "\n -c Write to stdout" \ |
199 | "\n -f Force" \ | 199 | "\n -f Force" \ |
200 | 200 | ||
201 | #define bzip2_trivial_usage \ | 201 | #define bzip2_trivial_usage \ |
202 | "[OPTIONS] [FILE]..." | 202 | "[OPTIONS] [FILE]..." |
203 | #define bzip2_full_usage "\n\n" \ | 203 | #define bzip2_full_usage "\n\n" \ |
204 | "Compress FILEs (or standard input) with bzip2 algorithm.\n" \ | 204 | "Compress FILEs (or stdin) with bzip2 algorithm\n" \ |
205 | "\nOptions:" \ | 205 | "\nOptions:" \ |
206 | "\n -c Write to standard output" \ | 206 | "\n -c Write to stdout" \ |
207 | "\n -d Decompress" \ | 207 | "\n -d Decompress" \ |
208 | "\n -f Force" \ | 208 | "\n -f Force" \ |
209 | "\n -1..-9 Compression level" \ | 209 | "\n -1..-9 Compression level" \ |
@@ -214,7 +214,7 @@ | |||
214 | #define lzop_trivial_usage \ | 214 | #define lzop_trivial_usage \ |
215 | "[-cfvd123456789CF] [FILE]..." | 215 | "[-cfvd123456789CF] [FILE]..." |
216 | #define lzop_full_usage "\n\n" \ | 216 | #define lzop_full_usage "\n\n" \ |
217 | " -c Write to standard output" \ | 217 | " -c Write to stdout" \ |
218 | "\n -f Force" \ | 218 | "\n -f Force" \ |
219 | "\n -v Verbose" \ | 219 | "\n -v Verbose" \ |
220 | "\n -d Decompress" \ | 220 | "\n -d Decompress" \ |
@@ -231,7 +231,7 @@ | |||
231 | #define unlzop_trivial_usage \ | 231 | #define unlzop_trivial_usage \ |
232 | "[-cfvCF] [FILE]..." | 232 | "[-cfvCF] [FILE]..." |
233 | #define unlzop_full_usage "\n\n" \ | 233 | #define unlzop_full_usage "\n\n" \ |
234 | " -c Write to standard output" \ | 234 | " -c Write to stdout" \ |
235 | "\n -f Force" \ | 235 | "\n -f Force" \ |
236 | "\n -v Verbose" \ | 236 | "\n -v Verbose" \ |
237 | "\n -F Don't store or verify checksum" \ | 237 | "\n -F Don't store or verify checksum" \ |
@@ -242,11 +242,11 @@ | |||
242 | "Uncompress to stdout" | 242 | "Uncompress to stdout" |
243 | 243 | ||
244 | #define unlzma_trivial_usage \ | 244 | #define unlzma_trivial_usage \ |
245 | "[OPTIONS] [FILE]" | 245 | "[OPTIONS] [FILE]..." |
246 | #define unlzma_full_usage "\n\n" \ | 246 | #define unlzma_full_usage "\n\n" \ |
247 | "Uncompress FILE (or standard input)\n" \ | 247 | "Uncompress FILE (or stdin)\n" \ |
248 | "\nOptions:" \ | 248 | "\nOptions:" \ |
249 | "\n -c Write to standard output" \ | 249 | "\n -c Write to stdout" \ |
250 | "\n -f Force" \ | 250 | "\n -f Force" \ |
251 | 251 | ||
252 | #define lzmacat_trivial_usage \ | 252 | #define lzmacat_trivial_usage \ |
@@ -255,7 +255,7 @@ | |||
255 | "Uncompress to stdout" | 255 | "Uncompress to stdout" |
256 | 256 | ||
257 | #define cal_trivial_usage \ | 257 | #define cal_trivial_usage \ |
258 | "[-jy] [[month] year]" | 258 | "[-jy] [[MONTH] YEAR]" |
259 | #define cal_full_usage "\n\n" \ | 259 | #define cal_full_usage "\n\n" \ |
260 | "Display a calendar\n" \ | 260 | "Display a calendar\n" \ |
261 | "\nOptions:" \ | 261 | "\nOptions:" \ |
@@ -436,21 +436,21 @@ | |||
436 | "\n -c BYTES Limit core file size" \ | 436 | "\n -c BYTES Limit core file size" \ |
437 | "\n -v Verbose" \ | 437 | "\n -v Verbose" \ |
438 | "\n -P Create new process group" \ | 438 | "\n -P Create new process group" \ |
439 | "\n -0 Close standard input" \ | 439 | "\n -0 Close stdin" \ |
440 | "\n -1 Close standard output" \ | 440 | "\n -1 Close stdout" \ |
441 | "\n -2 Close standard error" \ | 441 | "\n -2 Close stderr" \ |
442 | 442 | ||
443 | #define setuidgid_trivial_usage \ | 443 | #define setuidgid_trivial_usage \ |
444 | "account prog args" | 444 | "USER PROG ARGS" |
445 | #define setuidgid_full_usage "\n\n" \ | 445 | #define setuidgid_full_usage "\n\n" \ |
446 | "Set uid and gid to account's uid and gid, removing all supplementary\n" \ | 446 | "Set uid and gid to USER's uid and gid, removing all supplementary\n" \ |
447 | "groups and run PROG" | 447 | "groups and run PROG" |
448 | #define envuidgid_trivial_usage \ | 448 | #define envuidgid_trivial_usage \ |
449 | "account prog args" | 449 | "USER PROG ARGS" |
450 | #define envuidgid_full_usage "\n\n" \ | 450 | #define envuidgid_full_usage "\n\n" \ |
451 | "Set $UID to account's uid and $GID to account's gid and run PROG" | 451 | "Set $UID to USER's uid and $GID to USER's gid and run PROG" |
452 | #define envdir_trivial_usage \ | 452 | #define envdir_trivial_usage \ |
453 | "dir prog args" | 453 | "DIR PROG ARGS" |
454 | #define envdir_full_usage "\n\n" \ | 454 | #define envdir_full_usage "\n\n" \ |
455 | "Set various environment variables as specified by files\n" \ | 455 | "Set various environment variables as specified by files\n" \ |
456 | "in the directory dir and run PROG" | 456 | "in the directory dir and run PROG" |
@@ -477,7 +477,7 @@ | |||
477 | "\n a SIGXCPU after N seconds" \ | 477 | "\n a SIGXCPU after N seconds" \ |
478 | 478 | ||
479 | #define chroot_trivial_usage \ | 479 | #define chroot_trivial_usage \ |
480 | "NEWROOT [PROG [ARGS]]" | 480 | "NEWROOT [PROG ARGS]" |
481 | #define chroot_full_usage "\n\n" \ | 481 | #define chroot_full_usage "\n\n" \ |
482 | "Run PROG with root directory set to NEWROOT" | 482 | "Run PROG with root directory set to NEWROOT" |
483 | #define chroot_example_usage \ | 483 | #define chroot_example_usage \ |
@@ -527,7 +527,7 @@ | |||
527 | "Print the config file which built busybox" | 527 | "Print the config file which built busybox" |
528 | 528 | ||
529 | #define chrt_trivial_usage \ | 529 | #define chrt_trivial_usage \ |
530 | "[OPTIONS] [PRIO] [PID | PROG [ARGS]]" | 530 | "[OPTIONS] [PRIO] [PID | PROG ARGS]" |
531 | #define chrt_full_usage "\n\n" \ | 531 | #define chrt_full_usage "\n\n" \ |
532 | "Manipulate real-time attributes of a process\n" \ | 532 | "Manipulate real-time attributes of a process\n" \ |
533 | "\nOptions:" \ | 533 | "\nOptions:" \ |
@@ -567,7 +567,7 @@ | |||
567 | "Extract or list files from a cpio archive" \ | 567 | "Extract or list files from a cpio archive" \ |
568 | IF_FEATURE_CPIO_O(", or" \ | 568 | IF_FEATURE_CPIO_O(", or" \ |
569 | "\ncreate an archive" IF_FEATURE_CPIO_P(" (-o) or copy files (-p)") \ | 569 | "\ncreate an archive" IF_FEATURE_CPIO_P(" (-o) or copy files (-p)") \ |
570 | " using file list on standard input" \ | 570 | " using file list on stdin" \ |
571 | ) \ | 571 | ) \ |
572 | "\n" \ | 572 | "\n" \ |
573 | "\nMain operation mode:" \ | 573 | "\nMain operation mode:" \ |
@@ -658,7 +658,7 @@ | |||
658 | #define cut_trivial_usage \ | 658 | #define cut_trivial_usage \ |
659 | "[OPTIONS] [FILE]..." | 659 | "[OPTIONS] [FILE]..." |
660 | #define cut_full_usage "\n\n" \ | 660 | #define cut_full_usage "\n\n" \ |
661 | "Print selected fields from each input FILE to standard output\n" \ | 661 | "Print selected fields from each input FILE to stdout\n" \ |
662 | "\nOptions:" \ | 662 | "\nOptions:" \ |
663 | "\n -b LIST Output only bytes from LIST" \ | 663 | "\n -b LIST Output only bytes from LIST" \ |
664 | "\n -c LIST Output only characters from LIST" \ | 664 | "\n -c LIST Output only characters from LIST" \ |
@@ -721,7 +721,7 @@ | |||
721 | "p - print top of the stack (without altering the stack),\n" \ | 721 | "p - print top of the stack (without altering the stack),\n" \ |
722 | "f - print entire stack, o - pop the value and set output radix\n" \ | 722 | "f - print entire stack, o - pop the value and set output radix\n" \ |
723 | "(value must be 10 or 16).\n" \ | 723 | "(value must be 10 or 16).\n" \ |
724 | "Examples: 'dc 2 2 add' -> 4, 'dc 8 8 * 2 2 + /' -> 16.\n" \ | 724 | "Examples: 'dc 2 2 add' -> 4, 'dc 8 8 * 2 2 + /' -> 16\n" \ |
725 | 725 | ||
726 | #define dc_example_usage \ | 726 | #define dc_example_usage \ |
727 | "$ dc 2 2 + p\n" \ | 727 | "$ dc 2 2 + p\n" \ |
@@ -815,7 +815,7 @@ | |||
815 | "[-Pk" \ | 815 | "[-Pk" \ |
816 | IF_FEATURE_HUMAN_READABLE("mh") \ | 816 | IF_FEATURE_HUMAN_READABLE("mh") \ |
817 | IF_FEATURE_DF_FANCY("ai] [-B SIZE") \ | 817 | IF_FEATURE_DF_FANCY("ai] [-B SIZE") \ |
818 | "] [FILESYSTEM...]" | 818 | "] [FILESYSTEM]..." |
819 | #define df_full_usage "\n\n" \ | 819 | #define df_full_usage "\n\n" \ |
820 | "Print filesystem usage statistics\n" \ | 820 | "Print filesystem usage statistics\n" \ |
821 | "\nOptions:" \ | 821 | "\nOptions:" \ |
@@ -847,7 +847,7 @@ | |||
847 | "/dev/sda3 17381728 17107080 274648 98% /\n" | 847 | "/dev/sda3 17381728 17107080 274648 98% /\n" |
848 | 848 | ||
849 | #define dhcprelay_trivial_usage \ | 849 | #define dhcprelay_trivial_usage \ |
850 | "CLIENT_IFACE[,CLIENT_IFACE2...] SERVER_IFACE [SERVER_IP]" | 850 | "CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]" |
851 | #define dhcprelay_full_usage "\n\n" \ | 851 | #define dhcprelay_full_usage "\n\n" \ |
852 | "Relay DHCP requests between clients and server" \ | 852 | "Relay DHCP requests between clients and server" \ |
853 | 853 | ||
@@ -893,15 +893,20 @@ | |||
893 | "\n -s SIZE Buffer size" \ | 893 | "\n -s SIZE Buffer size" \ |
894 | 894 | ||
895 | #define dnsd_trivial_usage \ | 895 | #define dnsd_trivial_usage \ |
896 | "[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]" | 896 | "[-dvs] [-c CONFFILE] [-t TTL_SEC] [-p PORT] [-i ADDR]" |
897 | #define dnsd_full_usage "\n\n" \ | 897 | #define dnsd_full_usage "\n\n" \ |
898 | "Small static DNS server daemon\n" \ | 898 | "Small static DNS server daemon\n" \ |
899 | "\nOptions:" \ | 899 | "\nOptions:" \ |
900 | "\n -c Config filename" \ | 900 | "\n -c FILE Config file" \ |
901 | "\n -t TTL in seconds" \ | 901 | "\n -t SEC TTL" \ |
902 | "\n -p Listening port" \ | 902 | "\n -p PORT Listen on PORT" \ |
903 | "\n -i Listening ip (default all)" \ | 903 | "\n -i ADDR Listen on ADDR" \ |
904 | "\n -d Daemonize" \ | 904 | "\n -d Daemonize" \ |
905 | "\n -v Verbose" \ | ||
906 | "\n -s Send successful replies only. Use this if you want" \ | ||
907 | "\n to use /etc/resolv.conf with two nameserver lines:" \ | ||
908 | "\n nameserver DNSD_SERVER" \ | ||
909 | "\n nameserver NORNAL_DNS_SERVER" \ | ||
905 | 910 | ||
906 | #define dos2unix_trivial_usage \ | 911 | #define dos2unix_trivial_usage \ |
907 | "[OPTIONS] [FILE]" | 912 | "[OPTIONS] [FILE]" |
@@ -922,7 +927,7 @@ | |||
922 | "\n -d unix2dos" \ | 927 | "\n -d unix2dos" \ |
923 | 928 | ||
924 | #define dpkg_trivial_usage \ | 929 | #define dpkg_trivial_usage \ |
925 | "[-ilCPru] [-F option] package_name" | 930 | "[-ilCPru] [-F OPT] PACKAGE" |
926 | #define dpkg_full_usage "\n\n" \ | 931 | #define dpkg_full_usage "\n\n" \ |
927 | "Install, remove and manage Debian packages\n" \ | 932 | "Install, remove and manage Debian packages\n" \ |
928 | "\nOptions:" \ | 933 | "\nOptions:" \ |
@@ -988,7 +993,7 @@ | |||
988 | #define dumpkmap_trivial_usage \ | 993 | #define dumpkmap_trivial_usage \ |
989 | "> keymap" | 994 | "> keymap" |
990 | #define dumpkmap_full_usage "\n\n" \ | 995 | #define dumpkmap_full_usage "\n\n" \ |
991 | "Print a binary keyboard translation table to standard output" | 996 | "Print a binary keyboard translation table to stdout" |
992 | #define dumpkmap_example_usage \ | 997 | #define dumpkmap_example_usage \ |
993 | "$ dumpkmap > keymap\n" | 998 | "$ dumpkmap > keymap\n" |
994 | 999 | ||
@@ -1031,7 +1036,7 @@ | |||
1031 | */ | 1036 | */ |
1032 | 1037 | ||
1033 | #define echo_trivial_usage \ | 1038 | #define echo_trivial_usage \ |
1034 | IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG...]" | 1039 | IF_FEATURE_FANCY_ECHO("[-neE] ") "[ARG]..." |
1035 | #define echo_full_usage "\n\n" \ | 1040 | #define echo_full_usage "\n\n" \ |
1036 | "Print the specified ARGs to stdout" \ | 1041 | "Print the specified ARGs to stdout" \ |
1037 | IF_FEATURE_FANCY_ECHO( "\n" \ | 1042 | IF_FEATURE_FANCY_ECHO( "\n" \ |
@@ -1053,7 +1058,7 @@ | |||
1053 | #define eject_trivial_usage \ | 1058 | #define eject_trivial_usage \ |
1054 | "[-t] [-T] [DEVICE]" | 1059 | "[-t] [-T] [DEVICE]" |
1055 | #define eject_full_usage "\n\n" \ | 1060 | #define eject_full_usage "\n\n" \ |
1056 | "Eject specified DEVICE (or default /dev/cdrom)\n" \ | 1061 | "Eject DEVICE or default /dev/cdrom\n" \ |
1057 | "\nOptions:" \ | 1062 | "\nOptions:" \ |
1058 | IF_FEATURE_EJECT_SCSI( \ | 1063 | IF_FEATURE_EJECT_SCSI( \ |
1059 | "\n -s SCSI device" \ | 1064 | "\n -s SCSI device" \ |
@@ -1065,7 +1070,7 @@ | |||
1065 | #define ed_full_usage "" | 1070 | #define ed_full_usage "" |
1066 | 1071 | ||
1067 | #define env_trivial_usage \ | 1072 | #define env_trivial_usage \ |
1068 | "[-iu] [-] [name=value]... [PROG [ARGS]]" | 1073 | "[-iu] [-] [name=value]... [PROG ARGS]" |
1069 | #define env_full_usage "\n\n" \ | 1074 | #define env_full_usage "\n\n" \ |
1070 | "Print the current environment or run PROG after setting up\n" \ | 1075 | "Print the current environment or run PROG after setting up\n" \ |
1071 | "the specified environment\n" \ | 1076 | "the specified environment\n" \ |
@@ -1087,7 +1092,7 @@ | |||
1087 | #define expand_trivial_usage \ | 1092 | #define expand_trivial_usage \ |
1088 | "[-i] [-t N] [FILE|-]" | 1093 | "[-i] [-t N] [FILE|-]" |
1089 | #define expand_full_usage "\n\n" \ | 1094 | #define expand_full_usage "\n\n" \ |
1090 | "Convert tabs to spaces, writing to standard output\n" \ | 1095 | "Convert tabs to spaces, writing to stdout\n" \ |
1091 | "\nOptions:" \ | 1096 | "\nOptions:" \ |
1092 | IF_FEATURE_EXPAND_LONG_OPTIONS( \ | 1097 | IF_FEATURE_EXPAND_LONG_OPTIONS( \ |
1093 | "\n -i,--initial Don't convert tabs after non blanks" \ | 1098 | "\n -i,--initial Don't convert tabs after non blanks" \ |
@@ -1101,7 +1106,7 @@ | |||
1101 | #define expr_trivial_usage \ | 1106 | #define expr_trivial_usage \ |
1102 | "EXPRESSION" | 1107 | "EXPRESSION" |
1103 | #define expr_full_usage "\n\n" \ | 1108 | #define expr_full_usage "\n\n" \ |
1104 | "Print the value of EXPRESSION to standard output\n" \ | 1109 | "Print the value of EXPRESSION to stdout\n" \ |
1105 | "\n" \ | 1110 | "\n" \ |
1106 | "EXPRESSION may be:\n" \ | 1111 | "EXPRESSION may be:\n" \ |
1107 | " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \ | 1112 | " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \ |
@@ -1216,7 +1221,7 @@ | |||
1216 | "$ findfs LABEL=MyDevice" | 1221 | "$ findfs LABEL=MyDevice" |
1217 | 1222 | ||
1218 | #define find_trivial_usage \ | 1223 | #define find_trivial_usage \ |
1219 | "[PATH...] [EXPRESSION]" | 1224 | "[PATH]... [EXPRESSION]" |
1220 | #define find_full_usage "\n\n" \ | 1225 | #define find_full_usage "\n\n" \ |
1221 | "Search for files. The default PATH is the current directory,\n" \ | 1226 | "Search for files. The default PATH is the current directory,\n" \ |
1222 | "default EXPRESSION is '-print'\n" \ | 1227 | "default EXPRESSION is '-print'\n" \ |
@@ -1256,7 +1261,7 @@ | |||
1256 | IF_FEATURE_FIND_DEPTH( \ | 1261 | IF_FEATURE_FIND_DEPTH( \ |
1257 | "\n -depth Process directory name after traversing it") \ | 1262 | "\n -depth Process directory name after traversing it") \ |
1258 | IF_FEATURE_FIND_SIZE( \ | 1263 | IF_FEATURE_FIND_SIZE( \ |
1259 | "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))." \ | 1264 | "\n -size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))" \ |
1260 | "\n +/-N: file size is bigger/smaller than N") \ | 1265 | "\n +/-N: file size is bigger/smaller than N") \ |
1261 | IF_FEATURE_FIND_LINKS( \ | 1266 | IF_FEATURE_FIND_LINKS( \ |
1262 | "\n -links N Number of links is greater than (+N), less than (-N)," \ | 1267 | "\n -links N Number of links is greater than (+N), less than (-N)," \ |
@@ -1308,10 +1313,9 @@ | |||
1308 | "\n -v Verbose" \ | 1313 | "\n -v Verbose" \ |
1309 | 1314 | ||
1310 | #define fold_trivial_usage \ | 1315 | #define fold_trivial_usage \ |
1311 | "[-bs] [-w WIDTH] [FILE]" | 1316 | "[-bs] [-w WIDTH] [FILE]..." |
1312 | #define fold_full_usage "\n\n" \ | 1317 | #define fold_full_usage "\n\n" \ |
1313 | "Wrap input lines in each FILE (standard input by default), writing to\n" \ | 1318 | "Wrap input lines in each FILE (or stdin), writing to stdout\n" \ |
1314 | "standard output\n" \ | ||
1315 | "\nOptions:" \ | 1319 | "\nOptions:" \ |
1316 | "\n -b Count bytes rather than columns" \ | 1320 | "\n -b Count bytes rather than columns" \ |
1317 | "\n -s Break at spaces" \ | 1321 | "\n -s Break at spaces" \ |
@@ -1336,7 +1340,7 @@ | |||
1336 | "$ freeramdisk /dev/ram2\n" | 1340 | "$ freeramdisk /dev/ram2\n" |
1337 | 1341 | ||
1338 | #define fsck_trivial_usage \ | 1342 | #define fsck_trivial_usage \ |
1339 | "[-ANPRTV] [-C fd] [-t fstype] [fs-options] [filesys...]" | 1343 | "[-ANPRTV] [-C FD] [-t FSTYPE] [FS_OPTS] [BLOCKDEV]..." |
1340 | #define fsck_full_usage "\n\n" \ | 1344 | #define fsck_full_usage "\n\n" \ |
1341 | "Check and repair filesystems\n" \ | 1345 | "Check and repair filesystems\n" \ |
1342 | "\nOptions:" \ | 1346 | "\nOptions:" \ |
@@ -1347,10 +1351,10 @@ | |||
1347 | "\n -T Don't show title on startup" \ | 1351 | "\n -T Don't show title on startup" \ |
1348 | "\n -V Verbose" \ | 1352 | "\n -V Verbose" \ |
1349 | "\n -C n Write status information to specified filedescriptor" \ | 1353 | "\n -C n Write status information to specified filedescriptor" \ |
1350 | "\n -t type List of filesystem types to check" \ | 1354 | "\n -t TYPE List of filesystem types to check" \ |
1351 | 1355 | ||
1352 | #define fsck_minix_trivial_usage \ | 1356 | #define fsck_minix_trivial_usage \ |
1353 | "[-larvsmf] /dev/name" | 1357 | "[-larvsmf] BLOCKDEV" |
1354 | #define fsck_minix_full_usage "\n\n" \ | 1358 | #define fsck_minix_full_usage "\n\n" \ |
1355 | "Check MINIX filesystem\n" \ | 1359 | "Check MINIX filesystem\n" \ |
1356 | "\nOptions:" \ | 1360 | "\nOptions:" \ |
@@ -1463,7 +1467,7 @@ | |||
1463 | "#!/bin/sh\n" \ | 1467 | "#!/bin/sh\n" \ |
1464 | "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \ | 1468 | "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \ |
1465 | " -n 'example.busybox' -- \"$@\"`\n" \ | 1469 | " -n 'example.busybox' -- \"$@\"`\n" \ |
1466 | "if [ $? != 0 ]; then exit 1; fi\n" \ | 1470 | "if [ $? != 0 ]; then exit 1; fi\n" \ |
1467 | "eval set -- \"$GETOPT\"\n" \ | 1471 | "eval set -- \"$GETOPT\"\n" \ |
1468 | "while true; do\n" \ | 1472 | "while true; do\n" \ |
1469 | " case $1 in\n" \ | 1473 | " case $1 in\n" \ |
@@ -1502,42 +1506,47 @@ | |||
1502 | "\n -H HOST Log HOST into the utmp file as the hostname" \ | 1506 | "\n -H HOST Log HOST into the utmp file as the hostname" \ |
1503 | 1507 | ||
1504 | #define grep_trivial_usage \ | 1508 | #define grep_trivial_usage \ |
1505 | "[-HhrilLnqvso" \ | 1509 | "[-HhnlLoqvsri" \ |
1506 | IF_DESKTOP("w") \ | 1510 | IF_DESKTOP("w") \ |
1507 | "eF" \ | 1511 | "F" \ |
1508 | IF_FEATURE_GREP_EGREP_ALIAS("E") \ | 1512 | IF_FEATURE_GREP_EGREP_ALIAS("E") \ |
1509 | IF_FEATURE_GREP_CONTEXT("ABC") \ | ||
1510 | IF_EXTRA_COMPAT("z") \ | 1513 | IF_EXTRA_COMPAT("z") \ |
1511 | "] PATTERN [FILE]..." | 1514 | "] [-m N] " \ |
1515 | IF_FEATURE_GREP_CONTEXT("[-A/B/C N] ") \ | ||
1516 | "PATTERN/-e PATTERN.../-f FILE [FILE]..." | ||
1512 | #define grep_full_usage "\n\n" \ | 1517 | #define grep_full_usage "\n\n" \ |
1513 | "Search for PATTERN in each FILE or standard input\n" \ | 1518 | "Search for PATTERN in FILEs (or stdin)\n" \ |
1514 | "\nOptions:" \ | 1519 | "\nOptions:" \ |
1515 | "\n -H Prefix output lines with filename where match was found" \ | 1520 | "\n -H Add 'filename:' prefix" \ |
1516 | "\n -h Suppress the prefixing filename on output" \ | 1521 | "\n -h Do not add 'filename:' prefix" \ |
1517 | "\n -r Recurse" \ | 1522 | "\n -n Add 'line_no:' prefix" \ |
1518 | "\n -i Ignore case distinctions" \ | 1523 | "\n -l Show only names of files that match" \ |
1519 | "\n -l List names of files that match" \ | 1524 | "\n -L Show only names of files that don't match" \ |
1520 | "\n -L List names of files that don't match" \ | 1525 | "\n -c Show only count of matching lines" \ |
1521 | "\n -n Print line number with output lines" \ | 1526 | "\n -o Show only the matching part of line" \ |
1522 | "\n -q Quiet. Return 0 if PATTERN is found, 1 otherwise" \ | 1527 | "\n -q Quiet. Return 0 if PATTERN is found, 1 otherwise" \ |
1523 | "\n -v Select non-matching lines" \ | 1528 | "\n -v Select non-matching lines" \ |
1524 | "\n -s Suppress file open/read error messages" \ | 1529 | "\n -s Suppress open and read errors" \ |
1525 | "\n -c Only print count of matching lines" \ | 1530 | "\n -r Recurse" \ |
1526 | "\n -o Show only the part of a line that matches PATTERN" \ | 1531 | "\n -i Ignore case" \ |
1527 | "\n -m N Match up to N times per file" \ | ||
1528 | IF_DESKTOP( \ | 1532 | IF_DESKTOP( \ |
1529 | "\n -w Match whole words only") \ | 1533 | "\n -w Match whole words only" \ |
1530 | "\n -F PATTERN is a set of newline-separated strings" \ | 1534 | ) \ |
1535 | "\n -F PATTERN is a literal (not regexp)" \ | ||
1531 | IF_FEATURE_GREP_EGREP_ALIAS( \ | 1536 | IF_FEATURE_GREP_EGREP_ALIAS( \ |
1532 | "\n -E PATTERN is an extended regular expression") \ | 1537 | "\n -E PATTERN is an extended regexp" \ |
1533 | "\n -e PTRN Pattern to match" \ | 1538 | ) \ |
1534 | "\n -f FILE Read pattern from file" \ | 1539 | IF_EXTRA_COMPAT( \ |
1540 | "\n -z Input is NUL terminated" \ | ||
1541 | ) \ | ||
1542 | "\n -m N Match up to N times per file" \ | ||
1535 | IF_FEATURE_GREP_CONTEXT( \ | 1543 | IF_FEATURE_GREP_CONTEXT( \ |
1536 | "\n -A N Print N lines of trailing context" \ | 1544 | "\n -A N Print N lines of trailing context" \ |
1537 | "\n -B N Print N lines of leading context" \ | 1545 | "\n -B N Print N lines of leading context" \ |
1538 | "\n -C N Print N lines of output context") \ | 1546 | "\n -C N Same as '-A N -B N'" \ |
1539 | IF_EXTRA_COMPAT( \ | 1547 | ) \ |
1540 | "\n -z Input is NUL terminated") \ | 1548 | "\n -e PTRN Pattern to match" \ |
1549 | "\n -f FILE Read pattern from file" \ | ||
1541 | 1550 | ||
1542 | #define grep_example_usage \ | 1551 | #define grep_example_usage \ |
1543 | "$ grep root /etc/passwd\n" \ | 1552 | "$ grep root /etc/passwd\n" \ |
@@ -1554,9 +1563,9 @@ | |||
1554 | #define gunzip_trivial_usage \ | 1563 | #define gunzip_trivial_usage \ |
1555 | "[OPTIONS] [FILE]..." | 1564 | "[OPTIONS] [FILE]..." |
1556 | #define gunzip_full_usage "\n\n" \ | 1565 | #define gunzip_full_usage "\n\n" \ |
1557 | "Uncompress FILEs (or standard input)\n" \ | 1566 | "Uncompress FILEs (or stdin)\n" \ |
1558 | "\nOptions:" \ | 1567 | "\nOptions:" \ |
1559 | "\n -c Write to standard output" \ | 1568 | "\n -c Write to stdout" \ |
1560 | "\n -f Force" \ | 1569 | "\n -f Force" \ |
1561 | "\n -t Test file integrity" \ | 1570 | "\n -t Test file integrity" \ |
1562 | 1571 | ||
@@ -1570,9 +1579,9 @@ | |||
1570 | #define gzip_trivial_usage \ | 1579 | #define gzip_trivial_usage \ |
1571 | "[OPTIONS] [FILE]..." | 1580 | "[OPTIONS] [FILE]..." |
1572 | #define gzip_full_usage "\n\n" \ | 1581 | #define gzip_full_usage "\n\n" \ |
1573 | "Compress FILEs (or standard input)\n" \ | 1582 | "Compress FILEs (or stdin)\n" \ |
1574 | "\nOptions:" \ | 1583 | "\nOptions:" \ |
1575 | "\n -c Write to standard output" \ | 1584 | "\n -c Write to stdout" \ |
1576 | "\n -d Decompress" \ | 1585 | "\n -d Decompress" \ |
1577 | "\n -f Force" \ | 1586 | "\n -f Force" \ |
1578 | 1587 | ||
@@ -1649,7 +1658,7 @@ | |||
1649 | #define head_trivial_usage \ | 1658 | #define head_trivial_usage \ |
1650 | "[OPTIONS] [FILE]..." | 1659 | "[OPTIONS] [FILE]..." |
1651 | #define head_full_usage "\n\n" \ | 1660 | #define head_full_usage "\n\n" \ |
1652 | "Print first 10 lines of each FILE (or standard input) to standard output.\n" \ | 1661 | "Print first 10 lines of each FILE (or stdin) to stdout.\n" \ |
1653 | "With more than one FILE, precede each with a header giving the file name.\n" \ | 1662 | "With more than one FILE, precede each with a header giving the file name.\n" \ |
1654 | "\nOptions:" \ | 1663 | "\nOptions:" \ |
1655 | "\n -n N Print first N lines instead of first 10" \ | 1664 | "\n -n N Print first N lines instead of first 10" \ |
@@ -1664,9 +1673,9 @@ | |||
1664 | "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n" | 1673 | "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n" |
1665 | 1674 | ||
1666 | #define hexdump_trivial_usage \ | 1675 | #define hexdump_trivial_usage \ |
1667 | "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] FILE..." | 1676 | "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..." |
1668 | #define hexdump_full_usage "\n\n" \ | 1677 | #define hexdump_full_usage "\n\n" \ |
1669 | "Display FILEs or standard input in a user specified format\n" \ | 1678 | "Display FILEs (or stdin) in a user specified format\n" \ |
1670 | "\nOptions:" \ | 1679 | "\nOptions:" \ |
1671 | "\n -b One-byte octal display" \ | 1680 | "\n -b One-byte octal display" \ |
1672 | "\n -c One-byte character display" \ | 1681 | "\n -c One-byte character display" \ |
@@ -1795,7 +1804,7 @@ | |||
1795 | " [up|down] ..." | 1804 | " [up|down] ..." |
1796 | 1805 | ||
1797 | #define ifenslave_trivial_usage \ | 1806 | #define ifenslave_trivial_usage \ |
1798 | "[-cdf] master-iface <slave-iface...>" | 1807 | "[-cdf] MASTER_IFACE SLAVE_IFACE..." |
1799 | #define ifenslave_full_usage "\n\n" \ | 1808 | #define ifenslave_full_usage "\n\n" \ |
1800 | "Configure network interfaces for parallel routing\n" \ | 1809 | "Configure network interfaces for parallel routing\n" \ |
1801 | "\nOptions:" \ | 1810 | "\nOptions:" \ |
@@ -1847,7 +1856,7 @@ | |||
1847 | "\n -k Kill running daemon" \ | 1856 | "\n -k Kill running daemon" \ |
1848 | 1857 | ||
1849 | #define ifup_trivial_usage \ | 1858 | #define ifup_trivial_usage \ |
1850 | "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..." | 1859 | "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] IFACE..." |
1851 | #define ifup_full_usage "\n\n" \ | 1860 | #define ifup_full_usage "\n\n" \ |
1852 | "Options:" \ | 1861 | "Options:" \ |
1853 | "\n -a De/configure all interfaces automatically" \ | 1862 | "\n -a De/configure all interfaces automatically" \ |
@@ -2018,11 +2027,11 @@ | |||
2018 | " ::shutdown:/sbin/swapoff -a\n" | 2027 | " ::shutdown:/sbin/swapoff -a\n" |
2019 | 2028 | ||
2020 | #define inotifyd_trivial_usage \ | 2029 | #define inotifyd_trivial_usage \ |
2021 | "PROG FILE1[:MASK] ..." | 2030 | "PROG FILE1[:MASK]..." |
2022 | #define inotifyd_full_usage "\n\n" \ | 2031 | #define inotifyd_full_usage "\n\n" \ |
2023 | "Run PROG on filesystem changes." \ | 2032 | "Run PROG on filesystem changes." \ |
2024 | "\nWhen a filesystem event matching MASK occurs on FILEn," \ | 2033 | "\nWhen a filesystem event matching MASK occurs on FILEn," \ |
2025 | "\nPROG <actual_event(s)> <FILEn> [<subfile_name>] is run." \ | 2034 | "\nPROG ACTUAL_EVENTS FILEn [SUBFILE] is run." \ |
2026 | "\nEvents:" \ | 2035 | "\nEvents:" \ |
2027 | "\n a File is accessed" \ | 2036 | "\n a File is accessed" \ |
2028 | "\n c File is modified" \ | 2037 | "\n c File is modified" \ |
@@ -2042,7 +2051,7 @@ | |||
2042 | "\n d Subfile is deleted" \ | 2051 | "\n d Subfile is deleted" \ |
2043 | "\n" \ | 2052 | "\n" \ |
2044 | "\ninotifyd waits for PROG to exit." \ | 2053 | "\ninotifyd waits for PROG to exit." \ |
2045 | "\nWhen x event happens for all FILEs, inotifyd exits" \ | 2054 | "\nWhen x event happens for all FILEs, inotifyd exits." \ |
2046 | 2055 | ||
2047 | /* 2.6 style insmod has no options and required filename | 2056 | /* 2.6 style insmod has no options and required filename |
2048 | * (not module name - .ko can't be omitted) */ | 2057 | * (not module name - .ko can't be omitted) */ |
@@ -2068,7 +2077,7 @@ | |||
2068 | 2077 | ||
2069 | /* -v, -b, -c are ignored */ | 2078 | /* -v, -b, -c are ignored */ |
2070 | #define install_trivial_usage \ | 2079 | #define install_trivial_usage \ |
2071 | "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory" | 2080 | "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [SOURCE]... DEST" |
2072 | #define install_full_usage "\n\n" \ | 2081 | #define install_full_usage "\n\n" \ |
2073 | "Copy files and set attributes\n" \ | 2082 | "Copy files and set attributes\n" \ |
2074 | "\nOptions:" \ | 2083 | "\nOptions:" \ |
@@ -2247,7 +2256,7 @@ | |||
2247 | "$ kill 252\n" | 2256 | "$ kill 252\n" |
2248 | 2257 | ||
2249 | #define killall_trivial_usage \ | 2258 | #define killall_trivial_usage \ |
2250 | "[-l] [-q] [-SIG] process-name..." | 2259 | "[-l] [-q] [-SIG] PROCESS_NAME..." |
2251 | #define killall_full_usage "\n\n" \ | 2260 | #define killall_full_usage "\n\n" \ |
2252 | "Send a signal (default: TERM) to given processes\n" \ | 2261 | "Send a signal (default: TERM) to given processes\n" \ |
2253 | "\nOptions:" \ | 2262 | "\nOptions:" \ |
@@ -2287,8 +2296,7 @@ | |||
2287 | #define less_trivial_usage \ | 2296 | #define less_trivial_usage \ |
2288 | "[-EMNmh~I?] [FILE]..." | 2297 | "[-EMNmh~I?] [FILE]..." |
2289 | #define less_full_usage "\n\n" \ | 2298 | #define less_full_usage "\n\n" \ |
2290 | "View a file or list of files. The position within files can be\n" \ | 2299 | "View FILE (or stdin) one screenful at a time\n" \ |
2291 | "changed, and files can be manipulated in various ways.\n" \ | ||
2292 | "\nOptions:" \ | 2300 | "\nOptions:" \ |
2293 | "\n -E Quit once the end of a file is reached" \ | 2301 | "\n -E Quit once the end of a file is reached" \ |
2294 | "\n -M,-m Display status line with line numbers" \ | 2302 | "\n -M,-m Display status line with line numbers" \ |
@@ -2306,7 +2314,7 @@ | |||
2306 | #define linuxrc_full_usage "" | 2314 | #define linuxrc_full_usage "" |
2307 | 2315 | ||
2308 | #define setarch_trivial_usage \ | 2316 | #define setarch_trivial_usage \ |
2309 | "personality program [args...]" | 2317 | "personality PROG ARGS" |
2310 | #define setarch_full_usage "\n\n" \ | 2318 | #define setarch_full_usage "\n\n" \ |
2311 | "Personality may be:\n" \ | 2319 | "Personality may be:\n" \ |
2312 | " linux32 Set 32bit uname emulation\n" \ | 2320 | " linux32 Set 32bit uname emulation\n" \ |
@@ -2334,7 +2342,7 @@ | |||
2334 | #define loadfont_trivial_usage \ | 2342 | #define loadfont_trivial_usage \ |
2335 | "< font" | 2343 | "< font" |
2336 | #define loadfont_full_usage "\n\n" \ | 2344 | #define loadfont_full_usage "\n\n" \ |
2337 | "Load a console font from standard input" \ | 2345 | "Load a console font from stdin" \ |
2338 | /* "\n -C TTY Affect TTY instead of /dev/tty" */ \ | 2346 | /* "\n -C TTY Affect TTY instead of /dev/tty" */ \ |
2339 | 2347 | ||
2340 | #define loadfont_example_usage \ | 2348 | #define loadfont_example_usage \ |
@@ -2343,7 +2351,7 @@ | |||
2343 | #define loadkmap_trivial_usage \ | 2351 | #define loadkmap_trivial_usage \ |
2344 | "< keymap" | 2352 | "< keymap" |
2345 | #define loadkmap_full_usage "\n\n" \ | 2353 | #define loadkmap_full_usage "\n\n" \ |
2346 | "Load a binary keyboard translation table from standard input\n" \ | 2354 | "Load a binary keyboard translation table from stdin\n" \ |
2347 | /* "\n -C TTY Affect TTY instead of /dev/tty" */ \ | 2355 | /* "\n -C TTY Affect TTY instead of /dev/tty" */ \ |
2348 | 2356 | ||
2349 | #define loadkmap_example_usage \ | 2357 | #define loadkmap_example_usage \ |
@@ -2352,7 +2360,7 @@ | |||
2352 | #define logger_trivial_usage \ | 2360 | #define logger_trivial_usage \ |
2353 | "[OPTIONS] [MESSAGE]" | 2361 | "[OPTIONS] [MESSAGE]" |
2354 | #define logger_full_usage "\n\n" \ | 2362 | #define logger_full_usage "\n\n" \ |
2355 | "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.\n" \ | 2363 | "Write MESSAGE (or stdin) to syslog\n" \ |
2356 | "\nOptions:" \ | 2364 | "\nOptions:" \ |
2357 | "\n -s Log to stderr as well as the system log" \ | 2365 | "\n -s Log to stderr as well as the system log" \ |
2358 | "\n -t TAG Log using the specified tag (defaults to user name)" \ | 2366 | "\n -t TAG Log using the specified tag (defaults to user name)" \ |
@@ -2415,7 +2423,7 @@ | |||
2415 | "\n tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print" \ | 2423 | "\n tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print" \ |
2416 | 2424 | ||
2417 | #define lpq_trivial_usage \ | 2425 | #define lpq_trivial_usage \ |
2418 | "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID...] [-fs]" | 2426 | "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID]... [-fs]" |
2419 | #define lpq_full_usage "\n\n" \ | 2427 | #define lpq_full_usage "\n\n" \ |
2420 | "Options:" \ | 2428 | "Options:" \ |
2421 | "\n -P lp service to connect to (else uses $PRINTER)" \ | 2429 | "\n -P lp service to connect to (else uses $PRINTER)" \ |
@@ -2764,8 +2772,8 @@ | |||
2764 | "[-L LABEL] " \ | 2772 | "[-L LABEL] " \ |
2765 | /* "[-M last-mounted-directory] [-S] [-T filesystem-type] " */ \ | 2773 | /* "[-M last-mounted-directory] [-S] [-T filesystem-type] " */ \ |
2766 | "BLOCKDEV [KBYTES]" | 2774 | "BLOCKDEV [KBYTES]" |
2767 | #define mkfs_ext2_full_usage "\n" \ | 2775 | #define mkfs_ext2_full_usage "\n\n" \ |
2768 | "\n -b BLK_SIZE Block size, bytes" \ | 2776 | " -b BLK_SIZE Block size, bytes" \ |
2769 | /* "\n -c Check device for bad blocks" */ \ | 2777 | /* "\n -c Check device for bad blocks" */ \ |
2770 | /* "\n -E opts Set extended options" */ \ | 2778 | /* "\n -E opts Set extended options" */ \ |
2771 | /* "\n -f size Fragment size in bytes" */ \ | 2779 | /* "\n -f size Fragment size in bytes" */ \ |
@@ -2790,14 +2798,14 @@ | |||
2790 | /* "\n -v Verbose" */ \ | 2798 | /* "\n -v Verbose" */ \ |
2791 | 2799 | ||
2792 | #define mkfs_minix_trivial_usage \ | 2800 | #define mkfs_minix_trivial_usage \ |
2793 | "[-c | -l filename] [-nXX] [-iXX] BLOCKDEV [KBYTES]" | 2801 | "[-c | -l FILE] [-nXX] [-iXX] BLOCKDEV [KBYTES]" |
2794 | #define mkfs_minix_full_usage "\n\n" \ | 2802 | #define mkfs_minix_full_usage "\n\n" \ |
2795 | "Make a MINIX filesystem\n" \ | 2803 | "Make a MINIX filesystem\n" \ |
2796 | "\nOptions:" \ | 2804 | "\nOptions:" \ |
2797 | "\n -c Check device for bad blocks" \ | 2805 | "\n -c Check device for bad blocks" \ |
2798 | "\n -n [14|30] Maximum length of filenames" \ | 2806 | "\n -n [14|30] Maximum length of filenames" \ |
2799 | "\n -i INODES Number of inodes for the filesystem" \ | 2807 | "\n -i INODES Number of inodes for the filesystem" \ |
2800 | "\n -l FILENAME Read bad blocks list from FILENAME" \ | 2808 | "\n -l FILE Read bad blocks list from FILE" \ |
2801 | "\n -v Make version 2 filesystem" \ | 2809 | "\n -v Make version 2 filesystem" \ |
2802 | 2810 | ||
2803 | #define mkfs_reiser_trivial_usage \ | 2811 | #define mkfs_reiser_trivial_usage \ |
@@ -2844,7 +2852,7 @@ | |||
2844 | "$ mknod -m 644 /tmp/pipe p\n" | 2852 | "$ mknod -m 644 /tmp/pipe p\n" |
2845 | 2853 | ||
2846 | #define mkswap_trivial_usage \ | 2854 | #define mkswap_trivial_usage \ |
2847 | "[OPTIONS] BLOCKDEV" /* [SIZE_IN_KB] */ | 2855 | "[OPTIONS] BLOCKDEV [KBYTES]" |
2848 | #define mkswap_full_usage "\n\n" \ | 2856 | #define mkswap_full_usage "\n\n" \ |
2849 | "Prepare BLOCKDEV to be used as swap partition\n" \ | 2857 | "Prepare BLOCKDEV to be used as swap partition\n" \ |
2850 | "\nOptions:" \ | 2858 | "\nOptions:" \ |
@@ -2871,10 +2879,10 @@ | |||
2871 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" | 2879 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" |
2872 | 2880 | ||
2873 | #define modprobe_trivial_usage \ | 2881 | #define modprobe_trivial_usage \ |
2874 | IF_MODPROBE_SMALL("[-qfwrsv] MODULE [symbol=value...]") \ | 2882 | IF_MODPROBE_SMALL("[-qfwrsv] MODULE [symbol=value]...") \ |
2875 | IF_NOT_MODPROBE_SMALL("[-" \ | 2883 | IF_NOT_MODPROBE_SMALL("[-" \ |
2876 | IF_FEATURE_2_4_MODULES("k")"nqrsv" \ | 2884 | IF_FEATURE_2_4_MODULES("k")"nqrsv" \ |
2877 | IF_FEATURE_MODPROBE_BLACKLIST("b")"] MODULE [symbol=value...]") | 2885 | IF_FEATURE_MODPROBE_BLACKLIST("b")"] MODULE [symbol=value]...") |
2878 | #define modprobe_full_usage "\n\n" \ | 2886 | #define modprobe_full_usage "\n\n" \ |
2879 | "Options:" \ | 2887 | "Options:" \ |
2880 | IF_MODPROBE_SMALL( \ | 2888 | IF_MODPROBE_SMALL( \ |
@@ -2962,7 +2970,7 @@ | |||
2962 | #define more_trivial_usage \ | 2970 | #define more_trivial_usage \ |
2963 | "[FILE]..." | 2971 | "[FILE]..." |
2964 | #define more_full_usage "\n\n" \ | 2972 | #define more_full_usage "\n\n" \ |
2965 | "View FILE or standard input one screenful at a time" | 2973 | "View FILE (or stdin) one screenful at a time" |
2966 | 2974 | ||
2967 | #define more_example_usage \ | 2975 | #define more_example_usage \ |
2968 | "$ dmesg | more\n" | 2976 | "$ dmesg | more\n" |
@@ -3180,7 +3188,7 @@ | |||
3180 | ) | 3188 | ) |
3181 | 3189 | ||
3182 | #define nice_trivial_usage \ | 3190 | #define nice_trivial_usage \ |
3183 | "[-n ADJUST] [PROG [ARGS]]" | 3191 | "[-n ADJUST] [PROG ARGS]" |
3184 | #define nice_full_usage "\n\n" \ | 3192 | #define nice_full_usage "\n\n" \ |
3185 | "Run PROG with modified scheduling priority\n" \ | 3193 | "Run PROG with modified scheduling priority\n" \ |
3186 | "\nOptions:" \ | 3194 | "\nOptions:" \ |
@@ -3212,7 +3220,7 @@ | |||
3212 | "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'" | 3220 | "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'" |
3213 | 3221 | ||
3214 | #define nohup_trivial_usage \ | 3222 | #define nohup_trivial_usage \ |
3215 | "PROG [ARGS]" | 3223 | "PROG ARGS" |
3216 | #define nohup_full_usage "\n\n" \ | 3224 | #define nohup_full_usage "\n\n" \ |
3217 | "Run PROG immune to hangups, with output to a non-tty" | 3225 | "Run PROG immune to hangups, with output to a non-tty" |
3218 | #define nohup_example_usage \ | 3226 | #define nohup_example_usage \ |
@@ -3251,10 +3259,10 @@ | |||
3251 | "[-aBbcDdeFfHhIiLlOovXx] " IF_DESKTOP("[-t TYPE] ") "[FILE]" | 3259 | "[-aBbcDdeFfHhIiLlOovXx] " IF_DESKTOP("[-t TYPE] ") "[FILE]" |
3252 | #define od_full_usage "\n\n" \ | 3260 | #define od_full_usage "\n\n" \ |
3253 | "Write an unambiguous representation, octal bytes by default, of FILE\n" \ | 3261 | "Write an unambiguous representation, octal bytes by default, of FILE\n" \ |
3254 | "(or standard input) to standard output." | 3262 | "(or stdin) to stdout" |
3255 | 3263 | ||
3256 | #define openvt_trivial_usage \ | 3264 | #define openvt_trivial_usage \ |
3257 | "[-c N] [-sw] [PROG [ARGS]]" | 3265 | "[-c N] [-sw] [PROG ARGS]" |
3258 | #define openvt_full_usage "\n\n" \ | 3266 | #define openvt_full_usage "\n\n" \ |
3259 | "Start PROG on a new virtual terminal\n" \ | 3267 | "Start PROG on a new virtual terminal\n" \ |
3260 | "\nOptions:" \ | 3268 | "\nOptions:" \ |
@@ -3334,11 +3342,11 @@ | |||
3334 | 3342 | ||
3335 | #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT) | 3343 | #if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT) |
3336 | #define pidof_trivial_usage \ | 3344 | #define pidof_trivial_usage \ |
3337 | "[OPTIONS] [NAME...]" | 3345 | "[OPTIONS] [NAME]..." |
3338 | #define USAGE_PIDOF "\n\nOptions:" | 3346 | #define USAGE_PIDOF "\n\nOptions:" |
3339 | #else | 3347 | #else |
3340 | #define pidof_trivial_usage \ | 3348 | #define pidof_trivial_usage \ |
3341 | "[NAME...]" | 3349 | "[NAME]..." |
3342 | #define USAGE_PIDOF /* none */ | 3350 | #define USAGE_PIDOF /* none */ |
3343 | #endif | 3351 | #endif |
3344 | #define pidof_full_usage "\n\n" \ | 3352 | #define pidof_full_usage "\n\n" \ |
@@ -3473,13 +3481,13 @@ | |||
3473 | "\n -f Force power off (don't go through init)" \ | 3481 | "\n -f Force power off (don't go through init)" \ |
3474 | 3482 | ||
3475 | #define printenv_trivial_usage \ | 3483 | #define printenv_trivial_usage \ |
3476 | "[VARIABLE...]" | 3484 | "[VARIABLE]..." |
3477 | #define printenv_full_usage "\n\n" \ | 3485 | #define printenv_full_usage "\n\n" \ |
3478 | "Print all or part of environment.\n" \ | 3486 | "Print environment VARIABLEs.\n" \ |
3479 | "If no environment VARIABLE specified, print them all." | 3487 | "If no VARIABLE specified, print all." |
3480 | 3488 | ||
3481 | #define printf_trivial_usage \ | 3489 | #define printf_trivial_usage \ |
3482 | "FORMAT [ARGUMENT...]" | 3490 | "FORMAT [ARGUMENT]..." |
3483 | #define printf_full_usage "\n\n" \ | 3491 | #define printf_full_usage "\n\n" \ |
3484 | "Format and print ARGUMENT(s) according to FORMAT,\n" \ | 3492 | "Format and print ARGUMENT(s) according to FORMAT,\n" \ |
3485 | "where FORMAT controls the output exactly as in C printf" | 3493 | "where FORMAT controls the output exactly as in C printf" |
@@ -3610,9 +3618,9 @@ | |||
3610 | "\n -n Disable byte order auto-detection" \ | 3618 | "\n -n Disable byte order auto-detection" \ |
3611 | 3619 | ||
3612 | #define realpath_trivial_usage \ | 3620 | #define realpath_trivial_usage \ |
3613 | "pathname..." | 3621 | "FILE..." |
3614 | #define realpath_full_usage "\n\n" \ | 3622 | #define realpath_full_usage "\n\n" \ |
3615 | "Return the absolute pathnames of given argument" | 3623 | "Return the absolute pathnames of given FILE" |
3616 | 3624 | ||
3617 | #define reboot_trivial_usage \ | 3625 | #define reboot_trivial_usage \ |
3618 | "[-d DELAY] [-n] [-f]" | 3626 | "[-d DELAY] [-n] [-f]" |
@@ -3628,11 +3636,11 @@ | |||
3628 | #define reformime_full_usage "\n\n" \ | 3636 | #define reformime_full_usage "\n\n" \ |
3629 | "Parse MIME-encoded message\n" \ | 3637 | "Parse MIME-encoded message\n" \ |
3630 | "\nOptions:" \ | 3638 | "\nOptions:" \ |
3631 | "\n -x prefix Extract content of MIME sections to files" \ | 3639 | "\n -x PREFIX Extract content of MIME sections to files" \ |
3632 | "\n -X prog [args] Filter content of MIME sections through prog." \ | 3640 | "\n -X PROG ARGS Filter content of MIME sections through PROG" \ |
3633 | "\n Must be the last option" \ | 3641 | "\n Must be the last option" \ |
3634 | "\n" \ | 3642 | "\n" \ |
3635 | "\nOther options are silently ignored." \ | 3643 | "\nOther options are silently ignored" \ |
3636 | 3644 | ||
3637 | #define renice_trivial_usage \ | 3645 | #define renice_trivial_usage \ |
3638 | "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]" | 3646 | "{{-n INCREMENT} | PRIORITY} [[-p | -g | -u] ID...]" |
@@ -3725,7 +3733,7 @@ | |||
3725 | "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family" \ | 3733 | "\n -A inet" IF_FEATURE_IPV6("{6}") " Select address family" \ |
3726 | 3734 | ||
3727 | #define rpm_trivial_usage \ | 3735 | #define rpm_trivial_usage \ |
3728 | "-i -q[ildc]p package.rpm" | 3736 | "-i -q[ildc]p PACKAGE.rpm" |
3729 | #define rpm_full_usage "\n\n" \ | 3737 | #define rpm_full_usage "\n\n" \ |
3730 | "Manipulate RPM packages\n" \ | 3738 | "Manipulate RPM packages\n" \ |
3731 | "\nOptions:" \ | 3739 | "\nOptions:" \ |
@@ -3766,8 +3774,8 @@ | |||
3766 | ) | 3774 | ) |
3767 | 3775 | ||
3768 | #define runcon_trivial_usage \ | 3776 | #define runcon_trivial_usage \ |
3769 | "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] PROG [ARGS]\n" \ | 3777 | "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] PROG ARGS\n" \ |
3770 | " runcon CONTEXT PROG [ARGS]" | 3778 | " runcon CONTEXT PROG ARGS" |
3771 | #define runcon_full_usage "\n\n" \ | 3779 | #define runcon_full_usage "\n\n" \ |
3772 | "Run PROG in a different security context\n" \ | 3780 | "Run PROG in a different security context\n" \ |
3773 | "\n CONTEXT Complete security context\n" \ | 3781 | "\n CONTEXT Complete security context\n" \ |
@@ -3813,23 +3821,23 @@ | |||
3813 | "+ shutdown -h +4m" | 3821 | "+ shutdown -h +4m" |
3814 | 3822 | ||
3815 | #define runlevel_trivial_usage \ | 3823 | #define runlevel_trivial_usage \ |
3816 | "[utmp]" | 3824 | "[FILE]" |
3817 | #define runlevel_full_usage "\n\n" \ | 3825 | #define runlevel_full_usage "\n\n" \ |
3818 | "Find the current and previous system runlevel\n" \ | 3826 | "Find the current and previous system runlevel\n" \ |
3819 | "\n" \ | 3827 | "\n" \ |
3820 | "If no utmp file exists or if no runlevel record can be found,\n" \ | 3828 | "If no utmp FILE exists or if no runlevel record can be found,\n" \ |
3821 | "print \"unknown\"" | 3829 | "print \"unknown\"" |
3822 | #define runlevel_example_usage \ | 3830 | #define runlevel_example_usage \ |
3823 | "$ runlevel /var/run/utmp\n" \ | 3831 | "$ runlevel /var/run/utmp\n" \ |
3824 | "N 2" | 3832 | "N 2" |
3825 | 3833 | ||
3826 | #define runsv_trivial_usage \ | 3834 | #define runsv_trivial_usage \ |
3827 | "dir" | 3835 | "DIR" |
3828 | #define runsv_full_usage "\n\n" \ | 3836 | #define runsv_full_usage "\n\n" \ |
3829 | "Start and monitor a service and optionally an appendant log service" | 3837 | "Start and monitor a service and optionally an appendant log service" |
3830 | 3838 | ||
3831 | #define runsvdir_trivial_usage \ | 3839 | #define runsvdir_trivial_usage \ |
3832 | "[-P] [-s SCRIPT] dir" | 3840 | "[-P] [-s SCRIPT] DIR" |
3833 | #define runsvdir_full_usage "\n\n" \ | 3841 | #define runsvdir_full_usage "\n\n" \ |
3834 | "Start a runsv process for each subdirectory. If it exits, restart it.\n" \ | 3842 | "Start a runsv process for each subdirectory. If it exits, restart it.\n" \ |
3835 | "\n -P Put each runsv in a new session" \ | 3843 | "\n -P Put each runsv in a new session" \ |
@@ -3908,7 +3916,7 @@ | |||
3908 | "[-w] [-s SEP] [FIRST [INC]] LAST" | 3916 | "[-w] [-s SEP] [FIRST [INC]] LAST" |
3909 | #define seq_full_usage "\n\n" \ | 3917 | #define seq_full_usage "\n\n" \ |
3910 | "Print numbers from FIRST to LAST, in steps of INC.\n" \ | 3918 | "Print numbers from FIRST to LAST, in steps of INC.\n" \ |
3911 | "FIRST, INC default to 1\n" \ | 3919 | "FIRST, INC default to 1.\n" \ |
3912 | "\nOptions:" \ | 3920 | "\nOptions:" \ |
3913 | "\n -w Pad to last with leading zeros" \ | 3921 | "\n -w Pad to last with leading zeros" \ |
3914 | "\n -s SEP String separator" \ | 3922 | "\n -s SEP String separator" \ |
@@ -3949,7 +3957,7 @@ | |||
3949 | "\n -e DIR Exclude DIR" \ | 3957 | "\n -e DIR Exclude DIR" \ |
3950 | "\n -F Force reset of context to match file_context for customizable files" \ | 3958 | "\n -F Force reset of context to match file_context for customizable files" \ |
3951 | "\n -o FILE Save list of files with incorrect context" \ | 3959 | "\n -o FILE Save list of files with incorrect context" \ |
3952 | "\n -s Take a list of files from standard input (instead of command line)" \ | 3960 | "\n -s Take a list of files from stdin (instead of command line)" \ |
3953 | "\n -v Show changes in file labels, if type or role are changing" \ | 3961 | "\n -v Show changes in file labels, if type or role are changing" \ |
3954 | "\n -vv Show changes in file labels, if type, role, or user are changing" \ | 3962 | "\n -vv Show changes in file labels, if type, role, or user are changing" \ |
3955 | "\n -W Display warnings about entries that had no matching files" \ | 3963 | "\n -W Display warnings about entries that had no matching files" \ |
@@ -3971,7 +3979,7 @@ | |||
3971 | "Set entries into the kernel's scancode-to-keycode map,\n" \ | 3979 | "Set entries into the kernel's scancode-to-keycode map,\n" \ |
3972 | "allowing unusual keyboards to generate usable keycodes.\n\n" \ | 3980 | "allowing unusual keyboards to generate usable keycodes.\n\n" \ |
3973 | "SCANCODE may be either xx or e0xx (hexadecimal),\n" \ | 3981 | "SCANCODE may be either xx or e0xx (hexadecimal),\n" \ |
3974 | "and KEYCODE is given in decimal" \ | 3982 | "and KEYCODE is given in decimal." \ |
3975 | 3983 | ||
3976 | #define setkeycodes_example_usage \ | 3984 | #define setkeycodes_example_usage \ |
3977 | "$ setkeycodes e030 127\n" | 3985 | "$ setkeycodes e030 127\n" |
@@ -3988,7 +3996,7 @@ | |||
3988 | "Change boolean setting" | 3996 | "Change boolean setting" |
3989 | 3997 | ||
3990 | #define setsid_trivial_usage \ | 3998 | #define setsid_trivial_usage \ |
3991 | "PROG [ARG...]" | 3999 | "PROG ARGS" |
3992 | #define setsid_full_usage "\n\n" \ | 4000 | #define setsid_full_usage "\n\n" \ |
3993 | "Run PROG in a new session. PROG will have no controlling terminal\n" \ | 4001 | "Run PROG in a new session. PROG will have no controlling terminal\n" \ |
3994 | "and will not be affected by keyboard signals (Ctrl-C etc).\n" \ | 4002 | "and will not be affected by keyboard signals (Ctrl-C etc).\n" \ |
@@ -4103,7 +4111,7 @@ | |||
4103 | "$ cat TODO | split -a 2 -l 2 TODO_\n" | 4111 | "$ cat TODO | split -a 2 -l 2 TODO_\n" |
4104 | 4112 | ||
4105 | #define start_stop_daemon_trivial_usage \ | 4113 | #define start_stop_daemon_trivial_usage \ |
4106 | "[OPTIONS] [-S|-K] ... [-- arguments...]" | 4114 | "[OPTIONS] [-S|-K] ... [-- ARGS...]" |
4107 | #define start_stop_daemon_full_usage "\n\n" \ | 4115 | #define start_stop_daemon_full_usage "\n\n" \ |
4108 | "Search for matching processes, and then\n" \ | 4116 | "Search for matching processes, and then\n" \ |
4109 | "-K: stop all matching processes.\n" \ | 4117 | "-K: stop all matching processes.\n" \ |
@@ -4256,7 +4264,7 @@ | |||
4256 | "\n -s SH Shell to use instead of default shell" \ | 4264 | "\n -s SH Shell to use instead of default shell" \ |
4257 | 4265 | ||
4258 | #define sulogin_trivial_usage \ | 4266 | #define sulogin_trivial_usage \ |
4259 | "[OPTIONS] [TTY]" | 4267 | "[-t N] [TTY]" |
4260 | #define sulogin_full_usage "\n\n" \ | 4268 | #define sulogin_full_usage "\n\n" \ |
4261 | "Single user login\n" \ | 4269 | "Single user login\n" \ |
4262 | "\nOptions:" \ | 4270 | "\nOptions:" \ |
@@ -4271,7 +4279,7 @@ | |||
4271 | "\n -s Use System V sum algorithm (512byte blocks)" \ | 4279 | "\n -s Use System V sum algorithm (512byte blocks)" \ |
4272 | 4280 | ||
4273 | #define sv_trivial_usage \ | 4281 | #define sv_trivial_usage \ |
4274 | "[-v] [-w SEC] command service..." | 4282 | "[-v] [-w SEC] CMD SERVICE_DIR..." |
4275 | #define sv_full_usage "\n\n" \ | 4283 | #define sv_full_usage "\n\n" \ |
4276 | "Control services monitored by runsv supervisor.\n" \ | 4284 | "Control services monitored by runsv supervisor.\n" \ |
4277 | "Commands (only first character is enough):\n" \ | 4285 | "Commands (only first character is enough):\n" \ |
@@ -4289,7 +4297,7 @@ | |||
4289 | #define svlogd_trivial_usage \ | 4297 | #define svlogd_trivial_usage \ |
4290 | "[-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir..." | 4298 | "[-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir..." |
4291 | #define svlogd_full_usage "\n\n" \ | 4299 | #define svlogd_full_usage "\n\n" \ |
4292 | "Continuously read log data from standard input, optionally\n" \ | 4300 | "Continuously read log data from stdin, optionally\n" \ |
4293 | "filter log messages, and write the data to one or more automatically\n" \ | 4301 | "filter log messages, and write the data to one or more automatically\n" \ |
4294 | "rotated logs" \ | 4302 | "rotated logs" \ |
4295 | 4303 | ||
@@ -4326,7 +4334,7 @@ | |||
4326 | 4334 | ||
4327 | #define fsync_trivial_usage \ | 4335 | #define fsync_trivial_usage \ |
4328 | "[OPTIONS] FILE..." | 4336 | "[OPTIONS] FILE..." |
4329 | #define fsync_full_usage \ | 4337 | #define fsync_full_usage "\n\n" \ |
4330 | "Write files' buffered blocks to disk\n" \ | 4338 | "Write files' buffered blocks to disk\n" \ |
4331 | "\nOptions:" \ | 4339 | "\nOptions:" \ |
4332 | "\n -d Avoid syncing metadata" | 4340 | "\n -d Avoid syncing metadata" |
@@ -4354,11 +4362,11 @@ | |||
4354 | "[OPTIONS]" | 4362 | "[OPTIONS]" |
4355 | #define syslogd_full_usage "\n\n" \ | 4363 | #define syslogd_full_usage "\n\n" \ |
4356 | "System logging utility.\n" \ | 4364 | "System logging utility.\n" \ |
4357 | "Note that this version of syslogd ignores /etc/syslog.conf.\n" \ | 4365 | "This version of syslogd ignores /etc/syslog.conf\n" \ |
4358 | "\nOptions:" \ | 4366 | "\nOptions:" \ |
4359 | "\n -n Run in foreground" \ | 4367 | "\n -n Run in foreground" \ |
4360 | "\n -O FILE Log to given file (default:/var/log/messages)" \ | 4368 | "\n -O FILE Log to given file (default:/var/log/messages)" \ |
4361 | "\n -l n Set local log level" \ | 4369 | "\n -l N Set local log level" \ |
4362 | "\n -S Smaller logging output" \ | 4370 | "\n -S Smaller logging output" \ |
4363 | IF_FEATURE_ROTATE_LOGFILE( \ | 4371 | IF_FEATURE_ROTATE_LOGFILE( \ |
4364 | "\n -s SIZE Max size (KB) before rotate (default:200KB, 0=off)" \ | 4372 | "\n -s SIZE Max size (KB) before rotate (default:200KB, 0=off)" \ |
@@ -4385,7 +4393,7 @@ | |||
4385 | #define tail_trivial_usage \ | 4393 | #define tail_trivial_usage \ |
4386 | "[OPTIONS] [FILE]..." | 4394 | "[OPTIONS] [FILE]..." |
4387 | #define tail_full_usage "\n\n" \ | 4395 | #define tail_full_usage "\n\n" \ |
4388 | "Print last 10 lines of each FILE (or standard input) to standard output.\n" \ | 4396 | "Print last 10 lines of each FILE (or stdin) to stdout.\n" \ |
4389 | "With more than one FILE, precede each with a header giving the file name.\n" \ | 4397 | "With more than one FILE, precede each with a header giving the file name.\n" \ |
4390 | "\nOptions:" \ | 4398 | "\nOptions:" \ |
4391 | IF_FEATURE_FANCY_TAIL( \ | 4399 | IF_FEATURE_FANCY_TAIL( \ |
@@ -4454,7 +4462,7 @@ | |||
4454 | "$ tar -cf /tmp/tarball.tar /usr/local\n" | 4462 | "$ tar -cf /tmp/tarball.tar /usr/local\n" |
4455 | 4463 | ||
4456 | #define taskset_trivial_usage \ | 4464 | #define taskset_trivial_usage \ |
4457 | "[-p] [MASK] [PID | PROG [ARGS]]" | 4465 | "[-p] [MASK] [PID | PROG ARGS]" |
4458 | #define taskset_full_usage "\n\n" \ | 4466 | #define taskset_full_usage "\n\n" \ |
4459 | "Set or get CPU affinity\n" \ | 4467 | "Set or get CPU affinity\n" \ |
4460 | "\nOptions:" \ | 4468 | "\nOptions:" \ |
@@ -4474,7 +4482,7 @@ | |||
4474 | #define tee_trivial_usage \ | 4482 | #define tee_trivial_usage \ |
4475 | "[OPTIONS] [FILE]..." | 4483 | "[OPTIONS] [FILE]..." |
4476 | #define tee_full_usage "\n\n" \ | 4484 | #define tee_full_usage "\n\n" \ |
4477 | "Copy standard input to each FILE, and also to standard output\n" \ | 4485 | "Copy stdin to each FILE, and also to stdout\n" \ |
4478 | "\nOptions:" \ | 4486 | "\nOptions:" \ |
4479 | "\n -a Append to the given FILEs, don't overwrite" \ | 4487 | "\n -a Append to the given FILEs, don't overwrite" \ |
4480 | "\n -i Ignore interrupt signals (SIGINT)" \ | 4488 | "\n -i Ignore interrupt signals (SIGINT)" \ |
@@ -4514,9 +4522,9 @@ | |||
4514 | "\n -p PORT Port to listen on" \ | 4522 | "\n -p PORT Port to listen on" \ |
4515 | "\n -b ADDR[:PORT] Address to bind to" \ | 4523 | "\n -b ADDR[:PORT] Address to bind to" \ |
4516 | "\n -F Run in foreground" \ | 4524 | "\n -F Run in foreground" \ |
4517 | "\n -i Run as inetd service" \ | 4525 | "\n -i Inetd mode" \ |
4518 | IF_FEATURE_TELNETD_INETD_WAIT( \ | 4526 | IF_FEATURE_TELNETD_INETD_WAIT( \ |
4519 | "\n -w SEC Run as inetd service in wait mode, linger time SEC" \ | 4527 | "\n -w SEC Inetd 'wait' mode, linger time SEC" \ |
4520 | "\n -S Log to syslog (implied by -i or without -F and -w)" \ | 4528 | "\n -S Log to syslog (implied by -i or without -F and -w)" \ |
4521 | ) \ | 4529 | ) \ |
4522 | ) | 4530 | ) |
@@ -4568,11 +4576,11 @@ | |||
4568 | /* with not-implemented options: */ | 4576 | /* with not-implemented options: */ |
4569 | /* "[-hpEvv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] [-i DIR|-x CDB] [-t SEC] IP PORT PROG" */ | 4577 | /* "[-hpEvv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] [-i DIR|-x CDB] [-t SEC] IP PORT PROG" */ |
4570 | #define tcpsvd_full_usage "\n\n" \ | 4578 | #define tcpsvd_full_usage "\n\n" \ |
4571 | "Create TCP socket, bind to IP:PORT and listen\n" \ | 4579 | "Create TCP socket, bind to IP:PORT and listen\n" \ |
4572 | "for incoming connection. Run PROG for each connection.\n" \ | 4580 | "for incoming connection. Run PROG for each connection.\n" \ |
4573 | "\n IP IP to listen on. '0' = all" \ | 4581 | "\n IP IP to listen on. '0' = all" \ |
4574 | "\n PORT Port to listen on" \ | 4582 | "\n PORT Port to listen on" \ |
4575 | "\n PROG [ARGS] Program to run" \ | 4583 | "\n PROG ARGS Program to run" \ |
4576 | "\n -l NAME Local hostname (else looks up local hostname in DNS)" \ | 4584 | "\n -l NAME Local hostname (else looks up local hostname in DNS)" \ |
4577 | "\n -u USER[:GRP] Change to user/group after bind" \ | 4585 | "\n -u USER[:GRP] Change to user/group after bind" \ |
4578 | "\n -c N Handle up to N connections simultaneously" \ | 4586 | "\n -c N Handle up to N connections simultaneously" \ |
@@ -4592,7 +4600,7 @@ | |||
4592 | "redirecting all further packets with same peer ip:port to it.\n" \ | 4600 | "redirecting all further packets with same peer ip:port to it.\n" \ |
4593 | "\n IP IP to listen on. '0' = all" \ | 4601 | "\n IP IP to listen on. '0' = all" \ |
4594 | "\n PORT Port to listen on" \ | 4602 | "\n PORT Port to listen on" \ |
4595 | "\n PROG [ARGS] Program to run" \ | 4603 | "\n PROG ARGS Program to run" \ |
4596 | "\n -l NAME Local hostname (else looks up local hostname in DNS)" \ | 4604 | "\n -l NAME Local hostname (else looks up local hostname in DNS)" \ |
4597 | "\n -u USER[:GRP] Change to user/group after bind" \ | 4605 | "\n -u USER[:GRP] Change to user/group after bind" \ |
4598 | "\n -c N Handle up to N connections simultaneously" \ | 4606 | "\n -c N Handle up to N connections simultaneously" \ |
@@ -4633,14 +4641,14 @@ | |||
4633 | "\n -u Access files as USER" \ | 4641 | "\n -u Access files as USER" \ |
4634 | 4642 | ||
4635 | #define time_trivial_usage \ | 4643 | #define time_trivial_usage \ |
4636 | "[OPTIONS] PROG [ARGS]" | 4644 | "[OPTIONS] PROG ARGS" |
4637 | #define time_full_usage "\n\n" \ | 4645 | #define time_full_usage "\n\n" \ |
4638 | "Run PROG. When it finishes, its resource usage is displayed.\n" \ | 4646 | "Run PROG, display resource usage when it exits\n" \ |
4639 | "\nOptions:" \ | 4647 | "\nOptions:" \ |
4640 | "\n -v Verbose" \ | 4648 | "\n -v Verbose" \ |
4641 | 4649 | ||
4642 | #define timeout_trivial_usage \ | 4650 | #define timeout_trivial_usage \ |
4643 | "[-t SECS] [-s SIG] PROG [ARGS]" | 4651 | "[-t SECS] [-s SIG] PROG ARGS" |
4644 | #define timeout_full_usage "\n\n" \ | 4652 | #define timeout_full_usage "\n\n" \ |
4645 | "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \ | 4653 | "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n" \ |
4646 | "Defaults: SECS: 10, SIG: TERM." \ | 4654 | "Defaults: SECS: 10, SIG: TERM." \ |
@@ -4650,7 +4658,8 @@ | |||
4650 | #define top_full_usage "\n\n" \ | 4658 | #define top_full_usage "\n\n" \ |
4651 | "Provide a view of process activity in real time.\n" \ | 4659 | "Provide a view of process activity in real time.\n" \ |
4652 | "Read the status of all processes from /proc each SECONDS\n" \ | 4660 | "Read the status of all processes from /proc each SECONDS\n" \ |
4653 | "and show the status for however many processes will fit on the screen." \ | 4661 | "and display a screenful of them." \ |
4662 | //TODO: add options and keyboard commands | ||
4654 | 4663 | ||
4655 | #define touch_trivial_usage \ | 4664 | #define touch_trivial_usage \ |
4656 | "[-c] [-d DATE] FILE [FILE]..." | 4665 | "[-c] [-d DATE] FILE [FILE]..." |
@@ -4670,8 +4679,7 @@ | |||
4670 | #define tr_trivial_usage \ | 4679 | #define tr_trivial_usage \ |
4671 | "[-cds] STRING1 [STRING2]" | 4680 | "[-cds] STRING1 [STRING2]" |
4672 | #define tr_full_usage "\n\n" \ | 4681 | #define tr_full_usage "\n\n" \ |
4673 | "Translate, squeeze, and/or delete characters from\n" \ | 4682 | "Translate, squeeze, or delete characters from stdin, writing to stdout\n" \ |
4674 | "standard input, writing to standard output\n" \ | ||
4675 | "\nOptions:" \ | 4683 | "\nOptions:" \ |
4676 | "\n -c Take complement of STRING1" \ | 4684 | "\n -c Take complement of STRING1" \ |
4677 | "\n -d Delete input characters coded STRING1" \ | 4685 | "\n -d Delete input characters coded STRING1" \ |
@@ -4693,7 +4701,7 @@ | |||
4693 | ) \ | 4701 | ) \ |
4694 | "\n -F Set the don't fragment bit" \ | 4702 | "\n -F Set the don't fragment bit" \ |
4695 | "\n -I Use ICMP ECHO instead of UDP datagrams" \ | 4703 | "\n -I Use ICMP ECHO instead of UDP datagrams" \ |
4696 | "\n -l Display the ttl value of the returned packet" \ | 4704 | "\n -l Display the TTL value of the returned packet" \ |
4697 | "\n -d Set SO_DEBUG options to socket" \ | 4705 | "\n -d Set SO_DEBUG options to socket" \ |
4698 | "\n -n Print numeric addresses" \ | 4706 | "\n -n Print numeric addresses" \ |
4699 | "\n -r Bypass routing tables, send directly to HOST" \ | 4707 | "\n -r Bypass routing tables, send directly to HOST" \ |
@@ -4701,7 +4709,7 @@ | |||
4701 | "\n -m Max time-to-live (max number of hops)" \ | 4709 | "\n -m Max time-to-live (max number of hops)" \ |
4702 | "\n -p Base UDP port number used in probes" \ | 4710 | "\n -p Base UDP port number used in probes" \ |
4703 | "\n (default 33434)" \ | 4711 | "\n (default 33434)" \ |
4704 | "\n -q Number of probes per 'ttl' (default 3)" \ | 4712 | "\n -q Number of probes per TTL (default 3)" \ |
4705 | "\n -s IP address to use as the source address" \ | 4713 | "\n -s IP address to use as the source address" \ |
4706 | "\n -t Type-of-service in probe packets (default 0)" \ | 4714 | "\n -t Type-of-service in probe packets (default 0)" \ |
4707 | "\n -w Time in seconds to wait for a response (default 3)" \ | 4715 | "\n -w Time in seconds to wait for a response (default 3)" \ |
@@ -4721,7 +4729,7 @@ | |||
4721 | "\n -m Max time-to-live (max number of hops)" \ | 4729 | "\n -m Max time-to-live (max number of hops)" \ |
4722 | "\n -p Base UDP port number used in probes" \ | 4730 | "\n -p Base UDP port number used in probes" \ |
4723 | "\n (default is 33434)" \ | 4731 | "\n (default is 33434)" \ |
4724 | "\n -q Number of probes per 'ttl' (default 3)" \ | 4732 | "\n -q Number of probes per TTL (default 3)" \ |
4725 | "\n -s IP address to use as the source address" \ | 4733 | "\n -s IP address to use as the source address" \ |
4726 | "\n -t Type-of-service in probe packets (default 0)" \ | 4734 | "\n -t Type-of-service in probe packets (default 0)" \ |
4727 | "\n -w Time in seconds to wait for a response (default 3)" \ | 4735 | "\n -w Time in seconds to wait for a response (default 3)" \ |
@@ -4738,7 +4746,7 @@ | |||
4738 | #define tty_trivial_usage \ | 4746 | #define tty_trivial_usage \ |
4739 | "" | 4747 | "" |
4740 | #define tty_full_usage "\n\n" \ | 4748 | #define tty_full_usage "\n\n" \ |
4741 | "Print file name of standard input's terminal" \ | 4749 | "Print file name of stdin's terminal" \ |
4742 | IF_INCLUDE_SUSv2( "\n" \ | 4750 | IF_INCLUDE_SUSv2( "\n" \ |
4743 | "\nOptions:" \ | 4751 | "\nOptions:" \ |
4744 | "\n -s Print nothing, only return exit status" \ | 4752 | "\n -s Print nothing, only return exit status" \ |
@@ -4750,7 +4758,7 @@ | |||
4750 | #define ttysize_trivial_usage \ | 4758 | #define ttysize_trivial_usage \ |
4751 | "[w] [h]" | 4759 | "[w] [h]" |
4752 | #define ttysize_full_usage "\n\n" \ | 4760 | #define ttysize_full_usage "\n\n" \ |
4753 | "Print dimension(s) of standard input's terminal, on error return 80x25" | 4761 | "Print dimension(s) of stdin's terminal, on error return 80x25" |
4754 | 4762 | ||
4755 | #define tunctl_trivial_usage \ | 4763 | #define tunctl_trivial_usage \ |
4756 | "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]") | 4764 | "[-f device] ([-t name] | -d name)" IF_FEATURE_TUNCTL_UG(" [-u owner] [-g group] [-b]") |
@@ -4894,7 +4902,7 @@ | |||
4894 | "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" | 4902 | "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" |
4895 | 4903 | ||
4896 | #define uncompress_trivial_usage \ | 4904 | #define uncompress_trivial_usage \ |
4897 | "[-c] [-f] [FILE...]" | 4905 | "[-c] [-f] [FILE]..." |
4898 | #define uncompress_full_usage "\n\n" \ | 4906 | #define uncompress_full_usage "\n\n" \ |
4899 | "Uncompress .Z file[s]\n" \ | 4907 | "Uncompress .Z file[s]\n" \ |
4900 | "\nOptions:" \ | 4908 | "\nOptions:" \ |
@@ -4904,7 +4912,7 @@ | |||
4904 | #define unexpand_trivial_usage \ | 4912 | #define unexpand_trivial_usage \ |
4905 | "[-f][-a][-t N] [FILE|-]" | 4913 | "[-f][-a][-t N] [FILE|-]" |
4906 | #define unexpand_full_usage "\n\n" \ | 4914 | #define unexpand_full_usage "\n\n" \ |
4907 | "Convert spaces to tabs, writing to standard output\n" \ | 4915 | "Convert spaces to tabs, writing to stdout\n" \ |
4908 | "\nOptions:" \ | 4916 | "\nOptions:" \ |
4909 | IF_FEATURE_UNEXPAND_LONG_OPTIONS( \ | 4917 | IF_FEATURE_UNEXPAND_LONG_OPTIONS( \ |
4910 | "\n -a,--all Convert all blanks" \ | 4918 | "\n -a,--all Convert all blanks" \ |
@@ -5029,13 +5037,13 @@ | |||
5029 | #define wall_trivial_usage \ | 5037 | #define wall_trivial_usage \ |
5030 | "[FILE]" | 5038 | "[FILE]" |
5031 | #define wall_full_usage "\n\n" \ | 5039 | #define wall_full_usage "\n\n" \ |
5032 | "Write content of FILE or standard-input to all logged-in users" | 5040 | "Write content of FILE or stdin to all logged-in users" |
5033 | #define wall_sample_usage \ | 5041 | #define wall_sample_usage \ |
5034 | "echo foo | wall\n" \ | 5042 | "echo foo | wall\n" \ |
5035 | "wall ./mymessage" | 5043 | "wall ./mymessage" |
5036 | 5044 | ||
5037 | #define watch_trivial_usage \ | 5045 | #define watch_trivial_usage \ |
5038 | "[-n seconds] [-t] PROG [ARGS]" | 5046 | "[-n SEC] [-t] PROG ARGS" |
5039 | #define watch_full_usage "\n\n" \ | 5047 | #define watch_full_usage "\n\n" \ |
5040 | "Run PROG periodically\n" \ | 5048 | "Run PROG periodically\n" \ |
5041 | "\nOptions:" \ | 5049 | "\nOptions:" \ |
@@ -5062,8 +5070,8 @@ | |||
5062 | #define wc_trivial_usage \ | 5070 | #define wc_trivial_usage \ |
5063 | "[OPTIONS] [FILE]..." | 5071 | "[OPTIONS] [FILE]..." |
5064 | #define wc_full_usage "\n\n" \ | 5072 | #define wc_full_usage "\n\n" \ |
5065 | "Print line, word, and byte counts for each FILE, and a total line if\n" \ | 5073 | "Print line, word, and byte counts for each FILE (or stdin),\n" \ |
5066 | "more than one FILE is specified. With no FILE, read standard input.\n" \ | 5074 | "and a total line if more than one FILE is specified\n" \ |
5067 | "\nOptions:" \ | 5075 | "\nOptions:" \ |
5068 | "\n -c Print the byte counts" \ | 5076 | "\n -c Print the byte counts" \ |
5069 | "\n -l Print the newline counts" \ | 5077 | "\n -l Print the newline counts" \ |
@@ -5078,7 +5086,7 @@ | |||
5078 | IF_FEATURE_WGET_LONG_OPTIONS( \ | 5086 | IF_FEATURE_WGET_LONG_OPTIONS( \ |
5079 | "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]\n" \ | 5087 | "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]\n" \ |
5080 | " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \ | 5088 | " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \ |
5081 | " [-U|--user-agent agent] url" \ | 5089 | " [--no-check-certificate] [-U|--user-agent agent] url" \ |
5082 | ) \ | 5090 | ) \ |
5083 | IF_NOT_FEATURE_WGET_LONG_OPTIONS( \ | 5091 | IF_NOT_FEATURE_WGET_LONG_OPTIONS( \ |
5084 | "[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \ | 5092 | "[-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url" \ |
@@ -5115,9 +5123,9 @@ | |||
5115 | "Print the user name associated with the current effective user id" | 5123 | "Print the user name associated with the current effective user id" |
5116 | 5124 | ||
5117 | #define xargs_trivial_usage \ | 5125 | #define xargs_trivial_usage \ |
5118 | "[OPTIONS] [PROG [ARGS]]" | 5126 | "[OPTIONS] [PROG ARGS]" |
5119 | #define xargs_full_usage "\n\n" \ | 5127 | #define xargs_full_usage "\n\n" \ |
5120 | "Run PROG on every item given by standard input\n" \ | 5128 | "Run PROG on every item given by stdin\n" \ |
5121 | "\nOptions:" \ | 5129 | "\nOptions:" \ |
5122 | IF_FEATURE_XARGS_SUPPORT_CONFIRMATION( \ | 5130 | IF_FEATURE_XARGS_SUPPORT_CONFIRMATION( \ |
5123 | "\n -p Ask user whether to run each command") \ | 5131 | "\n -p Ask user whether to run each command") \ |
diff --git a/miscutils/beep.c b/miscutils/beep.c index c17cbfdad..b0ee7ea25 100644 --- a/miscutils/beep.c +++ b/miscutils/beep.c | |||
@@ -79,11 +79,11 @@ int beep_main(int argc, char **argv) | |||
79 | } | 79 | } |
80 | while (rep) { | 80 | while (rep) { |
81 | //bb_info_msg("rep[%d] freq=%d, length=%d, delay=%d", rep, freq, length, delay); | 81 | //bb_info_msg("rep[%d] freq=%d, length=%d, delay=%d", rep, freq, length, delay); |
82 | xioctl(speaker, KIOCSOUND, (void*)(long)tickrate_div_freq); | 82 | xioctl(speaker, KIOCSOUND, (void*)(uintptr_t)tickrate_div_freq); |
83 | usleep(1000 * length); | 83 | usleep(1000 * length); |
84 | ioctl(speaker, KIOCSOUND, (void*)0); | 84 | ioctl(speaker, KIOCSOUND, (void*)0); |
85 | if (--rep) | 85 | if (--rep) |
86 | usleep(delay); | 86 | usleep(1000 * delay); |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index 4560bb2e9..5974006bb 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c | |||
@@ -84,7 +84,7 @@ static void fb_open(const char *strfb_device) | |||
84 | // map the device in memory | 84 | // map the device in memory |
85 | G.addr = mmap(NULL, | 85 | G.addr = mmap(NULL, |
86 | G.scr_var.xres * G.scr_var.yres | 86 | G.scr_var.xres * G.scr_var.yres |
87 | * BYTES_PER_PIXEL /*(G.scr_var.bits_per_pixel / 8)*/ , | 87 | * BYTES_PER_PIXEL /*(G.scr_var.bits_per_pixel / 8)*/, |
88 | PROT_WRITE, MAP_SHARED, fbfd, 0); | 88 | PROT_WRITE, MAP_SHARED, fbfd, 0); |
89 | if (G.addr == MAP_FAILED) | 89 | if (G.addr == MAP_FAILED) |
90 | bb_perror_msg_and_die("mmap"); | 90 | bb_perror_msg_and_die("mmap"); |
@@ -121,7 +121,7 @@ static void fb_drawrectangle(void) | |||
121 | // vertical lines | 121 | // vertical lines |
122 | ptr1 = (DATA*)(G.addr + (G.nbar_posy * G.scr_var.xres + G.nbar_posx) * BYTES_PER_PIXEL); | 122 | ptr1 = (DATA*)(G.addr + (G.nbar_posy * G.scr_var.xres + G.nbar_posx) * BYTES_PER_PIXEL); |
123 | ptr2 = (DATA*)(G.addr + (G.nbar_posy * G.scr_var.xres + G.nbar_posx + G.nbar_width - 1) * BYTES_PER_PIXEL); | 123 | ptr2 = (DATA*)(G.addr + (G.nbar_posy * G.scr_var.xres + G.nbar_posx + G.nbar_width - 1) * BYTES_PER_PIXEL); |
124 | cnt = G.nbar_height - 1 /* HUH?! G.nbar_posy + G.nbar_height - 1 - G.nbar_posy*/; | 124 | cnt = G.nbar_height - 1; |
125 | do { | 125 | do { |
126 | *ptr1 = thispix; ptr1 += G.scr_var.xres; | 126 | *ptr1 = thispix; ptr1 += G.scr_var.xres; |
127 | *ptr2 = thispix; ptr2 += G.scr_var.xres; | 127 | *ptr2 = thispix; ptr2 += G.scr_var.xres; |
@@ -216,70 +216,69 @@ static void fb_drawprogressbar(unsigned percent) | |||
216 | */ | 216 | */ |
217 | static void fb_drawimage(void) | 217 | static void fb_drawimage(void) |
218 | { | 218 | { |
219 | char *head, *ptr; | ||
220 | FILE *theme_file; | 219 | FILE *theme_file; |
220 | char *read_ptr; | ||
221 | unsigned char *pixline; | 221 | unsigned char *pixline; |
222 | unsigned i, j, width, height, line_size; | 222 | unsigned i, j, width, height, line_size; |
223 | 223 | ||
224 | if (LONE_DASH(G.image_filename)) | 224 | if (LONE_DASH(G.image_filename)) { |
225 | theme_file = stdin; | 225 | theme_file = stdin; |
226 | else { | 226 | } else { |
227 | int fd = open_zipped(G.image_filename); | 227 | int fd = open_zipped(G.image_filename); |
228 | if (fd < 0) | 228 | if (fd < 0) |
229 | bb_simple_perror_msg_and_die(G.image_filename); | 229 | bb_simple_perror_msg_and_die(G.image_filename); |
230 | theme_file = xfdopen_for_read(fd); | 230 | theme_file = xfdopen_for_read(fd); |
231 | } | 231 | } |
232 | head = xmalloc(256); | ||
233 | 232 | ||
234 | /* parse ppm header | 233 | /* Parse ppm header: |
235 | * - A ppm image’s magic number is the two characters "P6". | 234 | * - Magic: two characters "P6". |
236 | * - Whitespace (blanks, TABs, CRs, LFs). | 235 | * - Whitespace (blanks, TABs, CRs, LFs). |
237 | * - A width, formatted as ASCII characters in decimal. | 236 | * - A width, formatted as ASCII characters in decimal. |
238 | * - Whitespace. | 237 | * - Whitespace. |
239 | * - A height, again in ASCII decimal. | 238 | * - A height, ASCII decimal. |
240 | * - Whitespace. | 239 | * - Whitespace. |
241 | * - The maximum color value (Maxval), again in ASCII decimal. Must be | 240 | * - The maximum color value, ASCII decimal, in 0..65535 |
242 | * less than 65536. | ||
243 | * - Newline or other single whitespace character. | 241 | * - Newline or other single whitespace character. |
242 | * (we support newline only) | ||
244 | * - A raster of Width * Height pixels in triplets of rgb | 243 | * - A raster of Width * Height pixels in triplets of rgb |
245 | * in pure binary by 1 (or not implemented 2) bytes. | 244 | * in pure binary by 1 or 2 bytes. (we support only 1 byte) |
246 | */ | 245 | */ |
246 | #define concat_buf bb_common_bufsiz1 | ||
247 | read_ptr = concat_buf; | ||
247 | while (1) { | 248 | while (1) { |
248 | if (fgets(head, 256, theme_file) == NULL | 249 | int w, h, max_color_val; |
249 | /* do not overrun the buffer */ | 250 | int rem = concat_buf + sizeof(concat_buf) - read_ptr; |
250 | || strlen(bb_common_bufsiz1) >= sizeof(bb_common_bufsiz1) - 256) | 251 | if (rem < 2 |
252 | || fgets(read_ptr, rem, theme_file) == NULL | ||
253 | ) { | ||
251 | bb_error_msg_and_die("bad PPM file '%s'", G.image_filename); | 254 | bb_error_msg_and_die("bad PPM file '%s'", G.image_filename); |
252 | 255 | } | |
253 | ptr = memchr(skip_whitespace(head), '#', 256); | 256 | read_ptr = strchrnul(read_ptr, '#'); |
254 | if (ptr != NULL) | 257 | *read_ptr = '\0'; /* ignore #comments */ |
255 | *ptr = 0; /* ignore comments */ | 258 | if (sscanf(concat_buf, "P6 %u %u %u", &w, &h, &max_color_val) == 3 |
256 | strcat(bb_common_bufsiz1, head); | 259 | && max_color_val <= 255 |
257 | // width, height, max_color_val | 260 | ) { |
258 | if (sscanf(bb_common_bufsiz1, "P6 %u %u %u", &width, &height, &i) == 3 | 261 | width = w; /* w is on stack, width may be in register */ |
259 | && i <= 255) | 262 | height = h; |
260 | break; | 263 | break; |
261 | /* If we do not find a signature throughout the whole file then | 264 | } |
262 | we will diagnose this via EOF on read in the head of the loop. */ | ||
263 | } | 265 | } |
264 | 266 | ||
265 | if (ENABLE_FEATURE_CLEAN_UP) | ||
266 | free(head); | ||
267 | if (width != G.scr_var.xres || height != G.scr_var.yres) | ||
268 | bb_error_msg_and_die("PPM %dx%d does not match screen %dx%d", | ||
269 | width, height, G.scr_var.xres, G.scr_var.yres); | ||
270 | line_size = width*3; | 267 | line_size = width*3; |
268 | pixline = xmalloc(line_size); | ||
269 | |||
271 | if (width > G.scr_var.xres) | 270 | if (width > G.scr_var.xres) |
272 | width = G.scr_var.xres; | 271 | width = G.scr_var.xres; |
273 | if (height > G.scr_var.yres) | 272 | if (height > G.scr_var.yres) |
274 | height = G.scr_var.yres; | 273 | height = G.scr_var.yres; |
275 | |||
276 | pixline = xmalloc(line_size); | ||
277 | for (j = 0; j < height; j++) { | 274 | for (j = 0; j < height; j++) { |
278 | unsigned char *pixel = pixline; | 275 | unsigned char *pixel; |
279 | DATA *src = (DATA *)(G.addr + j * G.scr_fix.line_length); | 276 | DATA *src; |
280 | 277 | ||
281 | if (fread(pixline, 1, line_size, theme_file) != line_size) | 278 | if (fread(pixline, 1, line_size, theme_file) != line_size) |
282 | bb_error_msg_and_die("bad PPM file '%s'", G.image_filename); | 279 | bb_error_msg_and_die("bad PPM file '%s'", G.image_filename); |
280 | pixel = pixline; | ||
281 | src = (DATA *)(G.addr + j * G.scr_fix.line_length); | ||
283 | for (i = 0; i < width; i++) { | 282 | for (i = 0; i < width; i++) { |
284 | unsigned thispix; | 283 | unsigned thispix; |
285 | thispix = (((unsigned)pixel[0] << 8) & 0xf800) | 284 | thispix = (((unsigned)pixel[0] << 8) & 0xf800) |
@@ -289,8 +288,7 @@ static void fb_drawimage(void) | |||
289 | pixel += 3; | 288 | pixel += 3; |
290 | } | 289 | } |
291 | } | 290 | } |
292 | if (ENABLE_FEATURE_CLEAN_UP) | 291 | free(pixline); |
293 | free(pixline); | ||
294 | fclose(theme_file); | 292 | fclose(theme_file); |
295 | } | 293 | } |
296 | 294 | ||
@@ -301,7 +299,7 @@ static void fb_drawimage(void) | |||
301 | */ | 299 | */ |
302 | static void init(const char *cfg_filename) | 300 | static void init(const char *cfg_filename) |
303 | { | 301 | { |
304 | static const char const param_names[] ALIGN1 = | 302 | static const char param_names[] ALIGN1 = |
305 | "BAR_WIDTH\0" "BAR_HEIGHT\0" | 303 | "BAR_WIDTH\0" "BAR_HEIGHT\0" |
306 | "BAR_LEFT\0" "BAR_TOP\0" | 304 | "BAR_LEFT\0" "BAR_TOP\0" |
307 | "BAR_R\0" "BAR_G\0" "BAR_B\0" | 305 | "BAR_R\0" "BAR_G\0" "BAR_B\0" |
@@ -312,7 +310,7 @@ static void init(const char *cfg_filename) | |||
312 | char *token[2]; | 310 | char *token[2]; |
313 | parser_t *parser = config_open2(cfg_filename, xfopen_stdin); | 311 | parser_t *parser = config_open2(cfg_filename, xfopen_stdin); |
314 | while (config_read(parser, token, 2, 2, "#=", | 312 | while (config_read(parser, token, 2, 2, "#=", |
315 | (PARSE_NORMAL | PARSE_MIN_DIE) & ~(PARSE_TRIM | PARSE_COLLAPSE))) { | 313 | (PARSE_NORMAL | PARSE_MIN_DIE) & ~(PARSE_TRIM | PARSE_COLLAPSE))) { |
316 | unsigned val = xatoi_u(token[1]); | 314 | unsigned val = xatoi_u(token[1]); |
317 | int i = index_in_strings(param_names, token[0]); | 315 | int i = index_in_strings(param_names, token[0]); |
318 | if (i < 0) | 316 | if (i < 0) |
diff --git a/miscutils/microcom.c b/miscutils/microcom.c index 9a7a41d53..0fb51d2e8 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c | |||
@@ -119,7 +119,7 @@ int microcom_main(int argc UNUSED_PARAM, char **argv) | |||
119 | nfd = 2; | 119 | nfd = 2; |
120 | // Not safe_poll: we want to exit on signal | 120 | // Not safe_poll: we want to exit on signal |
121 | while (!bb_got_signal && poll(pfd, nfd, timeout) > 0) { | 121 | while (!bb_got_signal && poll(pfd, nfd, timeout) > 0) { |
122 | if (nfd > 1 && (pfd[1].revents & POLLIN)) { | 122 | if (nfd > 1 && pfd[1].revents) { |
123 | char c; | 123 | char c; |
124 | // read from stdin -> write to device | 124 | // read from stdin -> write to device |
125 | if (safe_read(STDIN_FILENO, &c, 1) < 1) { | 125 | if (safe_read(STDIN_FILENO, &c, 1) < 1) { |
@@ -143,7 +143,7 @@ int microcom_main(int argc UNUSED_PARAM, char **argv) | |||
143 | safe_poll(pfd, 1, delay); | 143 | safe_poll(pfd, 1, delay); |
144 | skip_write: ; | 144 | skip_write: ; |
145 | } | 145 | } |
146 | if (pfd[0].revents & POLLIN) { | 146 | if (pfd[0].revents) { |
147 | #define iobuf bb_common_bufsiz1 | 147 | #define iobuf bb_common_bufsiz1 |
148 | ssize_t len; | 148 | ssize_t len; |
149 | // read from device -> write to stdout | 149 | // read from device -> write to stdout |
diff --git a/networking/httpd.c b/networking/httpd.c index 227803abf..0a8322c88 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1167,7 +1167,7 @@ static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post | |||
1167 | break; | 1167 | break; |
1168 | } | 1168 | } |
1169 | 1169 | ||
1170 | if (pfd[TO_CGI].revents & POLLOUT) { | 1170 | if (pfd[TO_CGI].revents) { |
1171 | /* hdr_cnt > 0 here due to the way pfd[TO_CGI].events set */ | 1171 | /* hdr_cnt > 0 here due to the way pfd[TO_CGI].events set */ |
1172 | /* Have data from peer and can write to CGI */ | 1172 | /* Have data from peer and can write to CGI */ |
1173 | count = safe_write(toCgi_wr, hdr_ptr, hdr_cnt); | 1173 | count = safe_write(toCgi_wr, hdr_ptr, hdr_cnt); |
@@ -1184,7 +1184,7 @@ static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post | |||
1184 | } | 1184 | } |
1185 | } | 1185 | } |
1186 | 1186 | ||
1187 | if (pfd[0].revents & POLLIN) { | 1187 | if (pfd[0].revents) { |
1188 | /* post_len > 0 && hdr_cnt == 0 here */ | 1188 | /* post_len > 0 && hdr_cnt == 0 here */ |
1189 | /* We expect data, prev data portion is eaten by CGI | 1189 | /* We expect data, prev data portion is eaten by CGI |
1190 | * and there *is* data to read from the peer | 1190 | * and there *is* data to read from the peer |
@@ -1202,7 +1202,7 @@ static NOINLINE void cgi_io_loop_and_exit(int fromCgi_rd, int toCgi_wr, int post | |||
1202 | } | 1202 | } |
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | if (pfd[FROM_CGI].revents & POLLIN) { | 1205 | if (pfd[FROM_CGI].revents) { |
1206 | /* There is something to read from CGI */ | 1206 | /* There is something to read from CGI */ |
1207 | char *rbuf = iobuf; | 1207 | char *rbuf = iobuf; |
1208 | 1208 | ||
diff --git a/networking/telnet.c b/networking/telnet.c index 013d959a1..6a84e9405 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -618,7 +618,7 @@ int telnet_main(int argc UNUSED_PARAM, char **argv) | |||
618 | default: | 618 | default: |
619 | 619 | ||
620 | #ifdef USE_POLL | 620 | #ifdef USE_POLL |
621 | if (ufds[0].revents & POLLIN) | 621 | if (ufds[0].revents) |
622 | #else | 622 | #else |
623 | if (FD_ISSET(STDIN_FILENO, &rfds)) | 623 | if (FD_ISSET(STDIN_FILENO, &rfds)) |
624 | #endif | 624 | #endif |
@@ -631,7 +631,7 @@ int telnet_main(int argc UNUSED_PARAM, char **argv) | |||
631 | } | 631 | } |
632 | 632 | ||
633 | #ifdef USE_POLL | 633 | #ifdef USE_POLL |
634 | if (ufds[1].revents & POLLIN) | 634 | if (ufds[1].revents) |
635 | #else | 635 | #else |
636 | if (FD_ISSET(netfd, &rfds)) | 636 | if (FD_ISSET(netfd, &rfds)) |
637 | #endif | 637 | #endif |
diff --git a/networking/tftp.c b/networking/tftp.c index 8d6038853..b2c3c033c 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -308,7 +308,7 @@ static int tftp_protocol( | |||
308 | 308 | ||
309 | if (!ENABLE_TFTP || our_lsa) { /* tftpd */ | 309 | if (!ENABLE_TFTP || our_lsa) { /* tftpd */ |
310 | /* Open file (must be after changing user) */ | 310 | /* Open file (must be after changing user) */ |
311 | local_fd = open(local_file, open_mode); | 311 | local_fd = open(local_file, open_mode, 0666); |
312 | if (local_fd < 0) { | 312 | if (local_fd < 0) { |
313 | error_pkt_reason = ERR_NOFILE; | 313 | error_pkt_reason = ERR_NOFILE; |
314 | strcpy((char*)error_pkt_str, "can't open file"); | 314 | strcpy((char*)error_pkt_str, "can't open file"); |
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index dc5d9ffe9..7fff56b4b 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
@@ -61,7 +61,7 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv) | |||
61 | logmode |= LOGMODE_SYSLOG; | 61 | logmode |= LOGMODE_SYSLOG; |
62 | } | 62 | } |
63 | #if ENABLE_FEATURE_UDHCP_PORT | 63 | #if ENABLE_FEATURE_UDHCP_PORT |
64 | if (opt & 4) { /* -P */ | 64 | if (opt & 8) { /* -P */ |
65 | SERVER_PORT = xatou16(str_P); | 65 | SERVER_PORT = xatou16(str_P); |
66 | CLIENT_PORT = SERVER_PORT + 1; | 66 | CLIENT_PORT = SERVER_PORT + 1; |
67 | } | 67 | } |
diff --git a/networking/wget.c b/networking/wget.c index ad1770b58..0aab3c288 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -546,6 +546,8 @@ int wget_main(int argc UNUSED_PARAM, char **argv) | |||
546 | "passive-ftp\0" No_argument "\xff" | 546 | "passive-ftp\0" No_argument "\xff" |
547 | "header\0" Required_argument "\xfe" | 547 | "header\0" Required_argument "\xfe" |
548 | "post-data\0" Required_argument "\xfd" | 548 | "post-data\0" Required_argument "\xfd" |
549 | /* Ignored (we don't do ssl) */ | ||
550 | "no-check-certificate\0" No_argument "\xfc" | ||
549 | ; | 551 | ; |
550 | #endif | 552 | #endif |
551 | 553 | ||
@@ -590,6 +592,7 @@ int wget_main(int argc UNUSED_PARAM, char **argv) | |||
590 | if (use_proxy) { | 592 | if (use_proxy) { |
591 | proxy = getenv(target.is_ftp ? "ftp_proxy" : "http_proxy"); | 593 | proxy = getenv(target.is_ftp ? "ftp_proxy" : "http_proxy"); |
592 | if (proxy && proxy[0]) { | 594 | if (proxy && proxy[0]) { |
595 | server.user = NULL; | ||
593 | parse_url(proxy, &server); | 596 | parse_url(proxy, &server); |
594 | } else { | 597 | } else { |
595 | use_proxy = 0; | 598 | use_proxy = 0; |
diff --git a/scripts/defconfig b/scripts/defconfig index 3a3d08260..c2f6bd40e 100644 --- a/scripts/defconfig +++ b/scripts/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Busybox version: 1.15.0.svn | 3 | # Busybox version: 1.16.1 |
4 | # Fri Aug 21 00:14:11 2009 | 4 | # Sun Mar 28 20:00:00 2010 |
5 | # | 5 | # |
6 | CONFIG_HAVE_DOT_CONFIG=y | 6 | CONFIG_HAVE_DOT_CONFIG=y |
7 | 7 | ||
@@ -14,6 +14,8 @@ CONFIG_HAVE_DOT_CONFIG=y | |||
14 | # | 14 | # |
15 | # CONFIG_DESKTOP is not set | 15 | # CONFIG_DESKTOP is not set |
16 | # CONFIG_EXTRA_COMPAT is not set | 16 | # CONFIG_EXTRA_COMPAT is not set |
17 | CONFIG_INCLUDE_SUSv2=y | ||
18 | # CONFIG_USE_PORTABLE_CODE is not set | ||
17 | CONFIG_FEATURE_BUFFERS_USE_MALLOC=y | 19 | CONFIG_FEATURE_BUFFERS_USE_MALLOC=y |
18 | # CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set | 20 | # CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set |
19 | # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set | 21 | # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set |
@@ -22,7 +24,7 @@ CONFIG_FEATURE_VERBOSE_USAGE=y | |||
22 | CONFIG_FEATURE_COMPRESS_USAGE=y | 24 | CONFIG_FEATURE_COMPRESS_USAGE=y |
23 | CONFIG_FEATURE_INSTALLER=y | 25 | CONFIG_FEATURE_INSTALLER=y |
24 | CONFIG_LOCALE_SUPPORT=y | 26 | CONFIG_LOCALE_SUPPORT=y |
25 | # CONFIG_FEATURE_ASSUME_UNICODE is not set | 27 | CONFIG_FEATURE_ASSUME_UNICODE=y |
26 | # CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set | 28 | # CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set |
27 | CONFIG_LONG_OPTS=y | 29 | CONFIG_LONG_OPTS=y |
28 | CONFIG_FEATURE_DEVPTS=y | 30 | CONFIG_FEATURE_DEVPTS=y |
@@ -59,7 +61,6 @@ CONFIG_EXTRA_CFLAGS="" | |||
59 | CONFIG_NO_DEBUG_LIB=y | 61 | CONFIG_NO_DEBUG_LIB=y |
60 | # CONFIG_DMALLOC is not set | 62 | # CONFIG_DMALLOC is not set |
61 | # CONFIG_EFENCE is not set | 63 | # CONFIG_EFENCE is not set |
62 | CONFIG_INCLUDE_SUSv2=y | ||
63 | 64 | ||
64 | # | 65 | # |
65 | # Installation Options | 66 | # Installation Options |
@@ -120,10 +121,11 @@ CONFIG_FEATURE_CPIO_P=y | |||
120 | # CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set | 121 | # CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set |
121 | CONFIG_GUNZIP=y | 122 | CONFIG_GUNZIP=y |
122 | CONFIG_GZIP=y | 123 | CONFIG_GZIP=y |
124 | CONFIG_FEATURE_GZIP_LONG_OPTIONS=y | ||
123 | CONFIG_LZOP=y | 125 | CONFIG_LZOP=y |
124 | # CONFIG_LZOP_COMPR_HIGH is not set | 126 | # CONFIG_LZOP_COMPR_HIGH is not set |
125 | # CONFIG_RPM2CPIO is not set | 127 | CONFIG_RPM2CPIO=y |
126 | # CONFIG_RPM is not set | 128 | CONFIG_RPM=y |
127 | CONFIG_TAR=y | 129 | CONFIG_TAR=y |
128 | CONFIG_FEATURE_TAR_CREATE=y | 130 | CONFIG_FEATURE_TAR_CREATE=y |
129 | CONFIG_FEATURE_TAR_AUTODETECT=y | 131 | CONFIG_FEATURE_TAR_AUTODETECT=y |
@@ -133,6 +135,7 @@ CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y | |||
133 | CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y | 135 | CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y |
134 | CONFIG_FEATURE_TAR_LONG_OPTIONS=y | 136 | CONFIG_FEATURE_TAR_LONG_OPTIONS=y |
135 | CONFIG_FEATURE_TAR_UNAME_GNAME=y | 137 | CONFIG_FEATURE_TAR_UNAME_GNAME=y |
138 | CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y | ||
136 | CONFIG_UNCOMPRESS=y | 139 | CONFIG_UNCOMPRESS=y |
137 | CONFIG_UNLZMA=y | 140 | CONFIG_UNLZMA=y |
138 | CONFIG_FEATURE_LZMA_FAST=y | 141 | CONFIG_FEATURE_LZMA_FAST=y |
@@ -148,15 +151,19 @@ CONFIG_CATV=y | |||
148 | CONFIG_CHGRP=y | 151 | CONFIG_CHGRP=y |
149 | CONFIG_CHMOD=y | 152 | CONFIG_CHMOD=y |
150 | CONFIG_CHOWN=y | 153 | CONFIG_CHOWN=y |
154 | CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y | ||
151 | CONFIG_CHROOT=y | 155 | CONFIG_CHROOT=y |
152 | CONFIG_CKSUM=y | 156 | CONFIG_CKSUM=y |
153 | CONFIG_COMM=y | 157 | CONFIG_COMM=y |
154 | CONFIG_CP=y | 158 | CONFIG_CP=y |
159 | CONFIG_FEATURE_CP_LONG_OPTIONS=y | ||
155 | CONFIG_CUT=y | 160 | CONFIG_CUT=y |
156 | CONFIG_DATE=y | 161 | CONFIG_DATE=y |
157 | CONFIG_FEATURE_DATE_ISOFMT=y | 162 | CONFIG_FEATURE_DATE_ISOFMT=y |
163 | CONFIG_FEATURE_DATE_COMPAT=y | ||
158 | CONFIG_DD=y | 164 | CONFIG_DD=y |
159 | CONFIG_FEATURE_DD_SIGNAL_HANDLING=y | 165 | CONFIG_FEATURE_DD_SIGNAL_HANDLING=y |
166 | CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y | ||
160 | CONFIG_FEATURE_DD_IBS_OBS=y | 167 | CONFIG_FEATURE_DD_IBS_OBS=y |
161 | CONFIG_DF=y | 168 | CONFIG_DF=y |
162 | CONFIG_FEATURE_DF_FANCY=y | 169 | CONFIG_FEATURE_DF_FANCY=y |
@@ -271,7 +278,7 @@ CONFIG_FEATURE_AUTOWIDTH=y | |||
271 | CONFIG_FEATURE_HUMAN_READABLE=y | 278 | CONFIG_FEATURE_HUMAN_READABLE=y |
272 | 279 | ||
273 | # | 280 | # |
274 | # Common options for md5sum, sha1sum | 281 | # Common options for md5sum, sha1sum, sha256sum, sha512sum |
275 | # | 282 | # |
276 | CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y | 283 | CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y |
277 | 284 | ||
@@ -318,9 +325,8 @@ CONFIG_AWK=y | |||
318 | CONFIG_FEATURE_AWK_LIBM=y | 325 | CONFIG_FEATURE_AWK_LIBM=y |
319 | CONFIG_CMP=y | 326 | CONFIG_CMP=y |
320 | CONFIG_DIFF=y | 327 | CONFIG_DIFF=y |
321 | CONFIG_FEATURE_DIFF_BINARY=y | 328 | CONFIG_FEATURE_DIFF_LONG_OPTIONS=y |
322 | CONFIG_FEATURE_DIFF_DIR=y | 329 | CONFIG_FEATURE_DIFF_DIR=y |
323 | CONFIG_FEATURE_DIFF_MINIMAL=y | ||
324 | CONFIG_ED=y | 330 | CONFIG_ED=y |
325 | CONFIG_PATCH=y | 331 | CONFIG_PATCH=y |
326 | CONFIG_SED=y | 332 | CONFIG_SED=y |
@@ -364,6 +370,7 @@ CONFIG_FEATURE_FIND_DELETE=y | |||
364 | CONFIG_FEATURE_FIND_PATH=y | 370 | CONFIG_FEATURE_FIND_PATH=y |
365 | CONFIG_FEATURE_FIND_REGEX=y | 371 | CONFIG_FEATURE_FIND_REGEX=y |
366 | # CONFIG_FEATURE_FIND_CONTEXT is not set | 372 | # CONFIG_FEATURE_FIND_CONTEXT is not set |
373 | CONFIG_FEATURE_FIND_LINKS=y | ||
367 | CONFIG_GREP=y | 374 | CONFIG_GREP=y |
368 | CONFIG_FEATURE_GREP_EGREP_ALIAS=y | 375 | CONFIG_FEATURE_GREP_EGREP_ALIAS=y |
369 | CONFIG_FEATURE_GREP_FGREP_ALIAS=y | 376 | CONFIG_FEATURE_GREP_FGREP_ALIAS=y |
@@ -453,6 +460,7 @@ CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y | |||
453 | # Options common to multiple modutils | 460 | # Options common to multiple modutils |
454 | # | 461 | # |
455 | # CONFIG_FEATURE_2_4_MODULES is not set | 462 | # CONFIG_FEATURE_2_4_MODULES is not set |
463 | # CONFIG_FEATURE_INSMOD_TRY_MMAP is not set | ||
456 | # CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set | 464 | # CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set |
457 | # CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set | 465 | # CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set |
458 | # CONFIG_FEATURE_INSMOD_LOADINKMEM is not set | 466 | # CONFIG_FEATURE_INSMOD_LOADINKMEM is not set |
@@ -467,8 +475,8 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" | |||
467 | # | 475 | # |
468 | # Linux System Utilities | 476 | # Linux System Utilities |
469 | # | 477 | # |
470 | # CONFIG_ACPID is not set | 478 | CONFIG_ACPID=y |
471 | # CONFIG_FEATURE_ACPID_COMPAT is not set | 479 | CONFIG_FEATURE_ACPID_COMPAT=y |
472 | CONFIG_BLKID=y | 480 | CONFIG_BLKID=y |
473 | CONFIG_DMESG=y | 481 | CONFIG_DMESG=y |
474 | CONFIG_FEATURE_DMESG_PRETTY=y | 482 | CONFIG_FEATURE_DMESG_PRETTY=y |
@@ -488,12 +496,14 @@ CONFIG_FEATURE_FDISK_ADVANCED=y | |||
488 | CONFIG_FINDFS=y | 496 | CONFIG_FINDFS=y |
489 | CONFIG_FREERAMDISK=y | 497 | CONFIG_FREERAMDISK=y |
490 | CONFIG_FSCK_MINIX=y | 498 | CONFIG_FSCK_MINIX=y |
499 | CONFIG_MKFS_EXT2=y | ||
491 | CONFIG_MKFS_MINIX=y | 500 | CONFIG_MKFS_MINIX=y |
492 | 501 | ||
493 | # | 502 | # |
494 | # Minix filesystem support | 503 | # Minix filesystem support |
495 | # | 504 | # |
496 | CONFIG_FEATURE_MINIX2=y | 505 | CONFIG_FEATURE_MINIX2=y |
506 | # CONFIG_MKFS_REISER is not set | ||
497 | CONFIG_MKFS_VFAT=y | 507 | CONFIG_MKFS_VFAT=y |
498 | CONFIG_GETOPT=y | 508 | CONFIG_GETOPT=y |
499 | CONFIG_FEATURE_GETOPT_LONG=y | 509 | CONFIG_FEATURE_GETOPT_LONG=y |
@@ -506,6 +516,8 @@ CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y | |||
506 | CONFIG_IPCRM=y | 516 | CONFIG_IPCRM=y |
507 | CONFIG_IPCS=y | 517 | CONFIG_IPCS=y |
508 | CONFIG_LOSETUP=y | 518 | CONFIG_LOSETUP=y |
519 | CONFIG_LSPCI=y | ||
520 | CONFIG_LSUSB=y | ||
509 | CONFIG_MDEV=y | 521 | CONFIG_MDEV=y |
510 | CONFIG_FEATURE_MDEV_CONF=y | 522 | CONFIG_FEATURE_MDEV_CONF=y |
511 | CONFIG_FEATURE_MDEV_RENAME=y | 523 | CONFIG_FEATURE_MDEV_RENAME=y |
@@ -518,6 +530,7 @@ CONFIG_MORE=y | |||
518 | CONFIG_FEATURE_USE_TERMIOS=y | 530 | CONFIG_FEATURE_USE_TERMIOS=y |
519 | CONFIG_VOLUMEID=y | 531 | CONFIG_VOLUMEID=y |
520 | CONFIG_FEATURE_VOLUMEID_EXT=y | 532 | CONFIG_FEATURE_VOLUMEID_EXT=y |
533 | CONFIG_FEATURE_VOLUMEID_BTRFS=y | ||
521 | CONFIG_FEATURE_VOLUMEID_REISERFS=y | 534 | CONFIG_FEATURE_VOLUMEID_REISERFS=y |
522 | CONFIG_FEATURE_VOLUMEID_FAT=y | 535 | CONFIG_FEATURE_VOLUMEID_FAT=y |
523 | CONFIG_FEATURE_VOLUMEID_HFS=y | 536 | CONFIG_FEATURE_VOLUMEID_HFS=y |
@@ -595,11 +608,12 @@ CONFIG_DEVMEM=y | |||
595 | CONFIG_EJECT=y | 608 | CONFIG_EJECT=y |
596 | CONFIG_FEATURE_EJECT_SCSI=y | 609 | CONFIG_FEATURE_EJECT_SCSI=y |
597 | CONFIG_FBSPLASH=y | 610 | CONFIG_FBSPLASH=y |
598 | # CONFIG_FLASH_LOCK is not set | 611 | CONFIG_FLASHCP=y |
599 | # CONFIG_FLASH_UNLOCK is not set | 612 | CONFIG_FLASH_LOCK=y |
600 | # CONFIG_FLASH_ERASEALL is not set | 613 | CONFIG_FLASH_UNLOCK=y |
614 | CONFIG_FLASH_ERASEALL=y | ||
601 | CONFIG_IONICE=y | 615 | CONFIG_IONICE=y |
602 | # CONFIG_INOTIFYD is not set | 616 | CONFIG_INOTIFYD=y |
603 | CONFIG_LAST=y | 617 | CONFIG_LAST=y |
604 | # CONFIG_FEATURE_LAST_SMALL is not set | 618 | # CONFIG_FEATURE_LAST_SMALL is not set |
605 | CONFIG_FEATURE_LAST_FANCY=y | 619 | CONFIG_FEATURE_LAST_FANCY=y |
@@ -632,8 +646,8 @@ CONFIG_RUNLEVEL=y | |||
632 | CONFIG_RX=y | 646 | CONFIG_RX=y |
633 | CONFIG_SETSID=y | 647 | CONFIG_SETSID=y |
634 | CONFIG_STRINGS=y | 648 | CONFIG_STRINGS=y |
635 | # CONFIG_TASKSET is not set | 649 | CONFIG_TASKSET=y |
636 | # CONFIG_FEATURE_TASKSET_FANCY is not set | 650 | CONFIG_FEATURE_TASKSET_FANCY=y |
637 | CONFIG_TIME=y | 651 | CONFIG_TIME=y |
638 | CONFIG_TIMEOUT=y | 652 | CONFIG_TIMEOUT=y |
639 | CONFIG_TTYSIZE=y | 653 | CONFIG_TTYSIZE=y |
@@ -658,6 +672,7 @@ CONFIG_ETHER_WAKE=y | |||
658 | CONFIG_FAKEIDENTD=y | 672 | CONFIG_FAKEIDENTD=y |
659 | CONFIG_FTPD=y | 673 | CONFIG_FTPD=y |
660 | CONFIG_FEATURE_FTP_WRITE=y | 674 | CONFIG_FEATURE_FTP_WRITE=y |
675 | CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y | ||
661 | CONFIG_FTPGET=y | 676 | CONFIG_FTPGET=y |
662 | CONFIG_FTPPUT=y | 677 | CONFIG_FTPPUT=y |
663 | CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y | 678 | CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y |
@@ -723,6 +738,8 @@ CONFIG_NETSTAT=y | |||
723 | CONFIG_FEATURE_NETSTAT_WIDE=y | 738 | CONFIG_FEATURE_NETSTAT_WIDE=y |
724 | CONFIG_FEATURE_NETSTAT_PRG=y | 739 | CONFIG_FEATURE_NETSTAT_PRG=y |
725 | CONFIG_NSLOOKUP=y | 740 | CONFIG_NSLOOKUP=y |
741 | CONFIG_NTPD=y | ||
742 | CONFIG_FEATURE_NTPD_SERVER=y | ||
726 | CONFIG_PING=y | 743 | CONFIG_PING=y |
727 | CONFIG_PING6=y | 744 | CONFIG_PING6=y |
728 | CONFIG_FEATURE_FANCY_PING=y | 745 | CONFIG_FEATURE_FANCY_PING=y |
@@ -734,13 +751,16 @@ CONFIG_FEATURE_TELNET_TTYPE=y | |||
734 | CONFIG_FEATURE_TELNET_AUTOLOGIN=y | 751 | CONFIG_FEATURE_TELNET_AUTOLOGIN=y |
735 | CONFIG_TELNETD=y | 752 | CONFIG_TELNETD=y |
736 | CONFIG_FEATURE_TELNETD_STANDALONE=y | 753 | CONFIG_FEATURE_TELNETD_STANDALONE=y |
754 | CONFIG_FEATURE_TELNETD_INETD_WAIT=y | ||
737 | CONFIG_TFTP=y | 755 | CONFIG_TFTP=y |
738 | CONFIG_TFTPD=y | 756 | CONFIG_TFTPD=y |
739 | CONFIG_FEATURE_TFTP_GET=y | 757 | CONFIG_FEATURE_TFTP_GET=y |
740 | CONFIG_FEATURE_TFTP_PUT=y | 758 | CONFIG_FEATURE_TFTP_PUT=y |
741 | CONFIG_FEATURE_TFTP_BLOCKSIZE=y | 759 | CONFIG_FEATURE_TFTP_BLOCKSIZE=y |
760 | CONFIG_FEATURE_TFTP_PROGRESS_BAR=y | ||
742 | # CONFIG_TFTP_DEBUG is not set | 761 | # CONFIG_TFTP_DEBUG is not set |
743 | CONFIG_TRACEROUTE=y | 762 | CONFIG_TRACEROUTE=y |
763 | CONFIG_TRACEROUTE6=y | ||
744 | CONFIG_FEATURE_TRACEROUTE_VERBOSE=y | 764 | CONFIG_FEATURE_TRACEROUTE_VERBOSE=y |
745 | # CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set | 765 | # CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set |
746 | # CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set | 766 | # CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set |
@@ -814,6 +834,7 @@ CONFIG_FEATURE_TOP_SMP_CPU=y | |||
814 | CONFIG_FEATURE_TOP_DECIMALS=y | 834 | CONFIG_FEATURE_TOP_DECIMALS=y |
815 | CONFIG_FEATURE_TOP_SMP_PROCESS=y | 835 | CONFIG_FEATURE_TOP_SMP_PROCESS=y |
816 | CONFIG_FEATURE_TOPMEM=y | 836 | CONFIG_FEATURE_TOPMEM=y |
837 | CONFIG_FEATURE_SHOW_THREADS=y | ||
817 | CONFIG_UPTIME=y | 838 | CONFIG_UPTIME=y |
818 | CONFIG_WATCH=y | 839 | CONFIG_WATCH=y |
819 | 840 | ||
@@ -878,6 +899,7 @@ CONFIG_HUSH_CASE=y | |||
878 | CONFIG_HUSH_FUNCTIONS=y | 899 | CONFIG_HUSH_FUNCTIONS=y |
879 | CONFIG_HUSH_LOCAL=y | 900 | CONFIG_HUSH_LOCAL=y |
880 | CONFIG_HUSH_EXPORT_N=y | 901 | CONFIG_HUSH_EXPORT_N=y |
902 | CONFIG_HUSH_RANDOM_SUPPORT=y | ||
881 | # CONFIG_LASH is not set | 903 | # CONFIG_LASH is not set |
882 | CONFIG_MSH=y | 904 | CONFIG_MSH=y |
883 | CONFIG_SH_MATH_SUPPORT=y | 905 | CONFIG_SH_MATH_SUPPORT=y |
diff --git a/shell/ash.c b/shell/ash.c index 798d15a4c..34f70ecfc 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -43,8 +43,6 @@ | |||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #include "busybox.h" /* for applet_names */ | 45 | #include "busybox.h" /* for applet_names */ |
46 | //TODO: pull in some .h and find out do we have SINGLE_APPLET_MAIN? | ||
47 | //#include "applet_tables.h" doesn't work | ||
48 | #include <paths.h> | 46 | #include <paths.h> |
49 | #include <setjmp.h> | 47 | #include <setjmp.h> |
50 | #include <fnmatch.h> | 48 | #include <fnmatch.h> |
@@ -58,12 +56,15 @@ | |||
58 | # define CLEAR_RANDOM_T(rnd) ((void)0) | 56 | # define CLEAR_RANDOM_T(rnd) ((void)0) |
59 | #endif | 57 | #endif |
60 | 58 | ||
61 | #if defined SINGLE_APPLET_MAIN | 59 | #define SKIP_definitions 1 |
60 | #include "applet_tables.h" | ||
61 | #undef SKIP_definitions | ||
62 | #if NUM_APPLETS == 1 | ||
62 | /* STANDALONE does not make sense, and won't compile */ | 63 | /* STANDALONE does not make sense, and won't compile */ |
63 | # undef CONFIG_FEATURE_SH_STANDALONE | 64 | # undef CONFIG_FEATURE_SH_STANDALONE |
64 | # undef ENABLE_FEATURE_SH_STANDALONE | 65 | # undef ENABLE_FEATURE_SH_STANDALONE |
65 | # undef IF_FEATURE_SH_STANDALONE | 66 | # undef IF_FEATURE_SH_STANDALONE |
66 | # undef IF_NOT_FEATURE_SH_STANDALONE(...) | 67 | # undef IF_NOT_FEATURE_SH_STANDALONE |
67 | # define ENABLE_FEATURE_SH_STANDALONE 0 | 68 | # define ENABLE_FEATURE_SH_STANDALONE 0 |
68 | # define IF_FEATURE_SH_STANDALONE(...) | 69 | # define IF_FEATURE_SH_STANDALONE(...) |
69 | # define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__ | 70 | # define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__ |
@@ -4539,7 +4540,7 @@ forkchild(struct job *jp, union node *n, int mode) | |||
4539 | if (mode == FORK_NOJOB /* is it `xxx` ? */ | 4540 | if (mode == FORK_NOJOB /* is it `xxx` ? */ |
4540 | && n && n->type == NCMD /* is it single cmd? */ | 4541 | && n && n->type == NCMD /* is it single cmd? */ |
4541 | /* && n->ncmd.args->type == NARG - always true? */ | 4542 | /* && n->ncmd.args->type == NARG - always true? */ |
4542 | && strcmp(n->ncmd.args->narg.text, "trap") == 0 | 4543 | && n->ncmd.args && strcmp(n->ncmd.args->narg.text, "trap") == 0 |
4543 | && n->ncmd.args->narg.next == NULL /* "trap" with no arguments */ | 4544 | && n->ncmd.args->narg.next == NULL /* "trap" with no arguments */ |
4544 | /* && n->ncmd.args->narg.backquote == NULL - do we need to check this? */ | 4545 | /* && n->ncmd.args->narg.backquote == NULL - do we need to check this? */ |
4545 | ) { | 4546 | ) { |
@@ -4627,7 +4628,7 @@ forkchild(struct job *jp, union node *n, int mode) | |||
4627 | } | 4628 | } |
4628 | #if JOBS | 4629 | #if JOBS |
4629 | if (n && n->type == NCMD | 4630 | if (n && n->type == NCMD |
4630 | && strcmp(n->ncmd.args->narg.text, "jobs") == 0 | 4631 | && n->ncmd.args && strcmp(n->ncmd.args->narg.text, "jobs") == 0 |
4631 | ) { | 4632 | ) { |
4632 | TRACE(("Job hack\n")); | 4633 | TRACE(("Job hack\n")); |
4633 | /* "jobs": we do not want to clear job list for it, | 4634 | /* "jobs": we do not want to clear job list for it, |
diff --git a/shell/ash_test/ash-misc/nulltick1.right b/shell/ash_test/ash-misc/nulltick1.right new file mode 100644 index 000000000..f90b8209e --- /dev/null +++ b/shell/ash_test/ash-misc/nulltick1.right | |||
@@ -0,0 +1,3 @@ | |||
1 | Test 1 | ||
2 | Test 2 | ||
3 | Done | ||
diff --git a/shell/ash_test/ash-misc/nulltick1.tests b/shell/ash_test/ash-misc/nulltick1.tests new file mode 100755 index 000000000..f81923de3 --- /dev/null +++ b/shell/ash_test/ash-misc/nulltick1.tests | |||
@@ -0,0 +1,3 @@ | |||
1 | echo Test ` ` 1 | ||
2 | echo Test `</dev/null` 2 | ||
3 | echo Done | ||
diff --git a/shell/hush.c b/shell/hush.c index e0c562621..2aeb8e440 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -125,14 +125,18 @@ | |||
125 | # define USE_FOR_MMU(...) | 125 | # define USE_FOR_MMU(...) |
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | #if defined SINGLE_APPLET_MAIN | 128 | #define SKIP_definitions 1 |
129 | #include "applet_tables.h" | ||
130 | #undef SKIP_definitions | ||
131 | #if NUM_APPLETS == 1 | ||
129 | /* STANDALONE does not make sense, and won't compile */ | 132 | /* STANDALONE does not make sense, and won't compile */ |
130 | # undef CONFIG_FEATURE_SH_STANDALONE | 133 | # undef CONFIG_FEATURE_SH_STANDALONE |
131 | # undef ENABLE_FEATURE_SH_STANDALONE | 134 | # undef ENABLE_FEATURE_SH_STANDALONE |
132 | # undef IF_FEATURE_SH_STANDALONE | 135 | # undef IF_FEATURE_SH_STANDALONE |
136 | # undef IF_NOT_FEATURE_SH_STANDALONE | ||
137 | # define ENABLE_FEATURE_SH_STANDALONE 0 | ||
133 | # define IF_FEATURE_SH_STANDALONE(...) | 138 | # define IF_FEATURE_SH_STANDALONE(...) |
134 | # define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__ | 139 | # define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__ |
135 | # define ENABLE_FEATURE_SH_STANDALONE 0 | ||
136 | #endif | 140 | #endif |
137 | 141 | ||
138 | #if !ENABLE_HUSH_INTERACTIVE | 142 | #if !ENABLE_HUSH_INTERACTIVE |
@@ -3568,7 +3572,9 @@ static void execvp_or_die(char **argv) | |||
3568 | { | 3572 | { |
3569 | debug_printf_exec("execing '%s'\n", argv[0]); | 3573 | debug_printf_exec("execing '%s'\n", argv[0]); |
3570 | sigprocmask(SIG_SETMASK, &G.inherited_set, NULL); | 3574 | sigprocmask(SIG_SETMASK, &G.inherited_set, NULL); |
3571 | execvp(argv[0], argv); | 3575 | /* if FEATURE_SH_STANDALONE, "exec <applet_name>" should work, |
3576 | * therefore we should use BB_EXECVP, not execvp */ | ||
3577 | BB_EXECVP(argv[0], argv); | ||
3572 | bb_perror_msg("can't execute '%s'", argv[0]); | 3578 | bb_perror_msg("can't execute '%s'", argv[0]); |
3573 | _exit(127); /* bash compat */ | 3579 | _exit(127); /* bash compat */ |
3574 | } | 3580 | } |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 754fa44b3..8338d6be8 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -698,7 +698,7 @@ int syslogd_main(int argc UNUSED_PARAM, char **argv) | |||
698 | if (!(opts & OPT_nofork)) { | 698 | if (!(opts & OPT_nofork)) { |
699 | bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv); | 699 | bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv); |
700 | } | 700 | } |
701 | umask(0); | 701 | //umask(0); - why?? |
702 | write_pidfile("/var/run/syslogd.pid"); | 702 | write_pidfile("/var/run/syslogd.pid"); |
703 | do_syslogd(); | 703 | do_syslogd(); |
704 | /* return EXIT_SUCCESS; */ | 704 | /* return EXIT_SUCCESS; */ |
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests index 75f085873..e53ade925 100755 --- a/testsuite/cpio.tests +++ b/testsuite/cpio.tests | |||
@@ -7,7 +7,8 @@ | |||
7 | # ls -ln shows date. Need to remove that, it's variable. | 7 | # ls -ln shows date. Need to remove that, it's variable. |
8 | # sed: coalesce spaces | 8 | # sed: coalesce spaces |
9 | # cut: remove date | 9 | # cut: remove date |
10 | FILTER_LS="sed 's/ */ /g' | cut -d' ' -f 1-5,9-" | 10 | # grep: remove "total NNN" lines |
11 | FILTER_LS="sed 's/ */ /g' | cut -d' ' -f 1-5,9- | grep -v '^total '" | ||
11 | 12 | ||
12 | 13 | ||
13 | # newc cpio archive of directory cpio.testdir with empty x and y hardlinks | 14 | # newc cpio archive of directory cpio.testdir with empty x and y hardlinks |
@@ -36,7 +37,6 @@ ls -ln cpio.testdir | $FILTER_LS" \ | |||
36 | "\ | 37 | "\ |
37 | 1 blocks | 38 | 1 blocks |
38 | 0 | 39 | 0 |
39 | total 0 | ||
40 | -rw-r--r-- 2 $user $group 0 x | 40 | -rw-r--r-- 2 $user $group 0 x |
41 | -rw-r--r-- 2 $user $group 0 y | 41 | -rw-r--r-- 2 $user $group 0 y |
42 | " \ | 42 | " \ |
@@ -75,7 +75,6 @@ ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \ | |||
75 | "\ | 75 | "\ |
76 | 2 blocks | 76 | 2 blocks |
77 | 0 | 77 | 0 |
78 | total 8 | ||
79 | -rw-r--r-- 2 $user $group 0 empty | 78 | -rw-r--r-- 2 $user $group 0 empty |
80 | -rw-r--r-- 2 $user $group 0 empty1 | 79 | -rw-r--r-- 2 $user $group 0 empty1 |
81 | -rw-r--r-- 2 $user $group 2 nonempty | 80 | -rw-r--r-- 2 $user $group 2 nonempty |
diff --git a/util-linux/script.c b/util-linux/script.c index 37213eec8..d9a62fbfe 100644 --- a/util-linux/script.c +++ b/util-linux/script.c | |||
@@ -119,7 +119,7 @@ int script_main(int argc UNUSED_PARAM, char **argv) | |||
119 | * for example, try "script -c true" */ | 119 | * for example, try "script -c true" */ |
120 | break; | 120 | break; |
121 | } | 121 | } |
122 | if (pfd[0].revents & POLLIN) { | 122 | if (pfd[0].revents) { |
123 | errno = 0; | 123 | errno = 0; |
124 | count = safe_read(pty, buf, sizeof(buf)); | 124 | count = safe_read(pty, buf, sizeof(buf)); |
125 | if (count <= 0 && errno != EAGAIN) { | 125 | if (count <= 0 && errno != EAGAIN) { |
@@ -143,7 +143,7 @@ int script_main(int argc UNUSED_PARAM, char **argv) | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | } | 145 | } |
146 | if (pfd[1].revents & POLLIN) { | 146 | if (pfd[1].revents) { |
147 | count = safe_read(STDIN_FILENO, buf, sizeof(buf)); | 147 | count = safe_read(STDIN_FILENO, buf, sizeof(buf)); |
148 | if (count <= 0) { | 148 | if (count <= 0) { |
149 | /* err/eof from stdin: don't read stdin anymore */ | 149 | /* err/eof from stdin: don't read stdin anymore */ |
diff --git a/util-linux/volume_id/linux_swap.c b/util-linux/volume_id/linux_swap.c index 1b5488f9e..574354611 100644 --- a/util-linux/volume_id/linux_swap.c +++ b/util-linux/volume_id/linux_swap.c | |||
@@ -52,7 +52,11 @@ int FAST_FUNC volume_id_probe_linux_swap(struct volume_id *id /*,uint64_t off*/) | |||
52 | goto found; | 52 | goto found; |
53 | } | 53 | } |
54 | 54 | ||
55 | if (memcmp(buf, "SWAPSPACE2", 10) == 0) { | 55 | if (memcmp(buf, "SWAPSPACE2", 10) == 0 |
56 | || memcmp(buf, "S1SUSPEND", 9) == 0 | ||
57 | || memcmp(buf, "S2SUSPEND", 9) == 0 | ||
58 | || memcmp(buf, "ULSUSPEND", 9) == 0 | ||
59 | ) { | ||
56 | sw = volume_id_get_buffer(id, off, sizeof(struct swap_header_v1_2)); | 60 | sw = volume_id_get_buffer(id, off, sizeof(struct swap_header_v1_2)); |
57 | if (sw == NULL) | 61 | if (sw == NULL) |
58 | return -1; | 62 | return -1; |