aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 12:47:25 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 12:47:25 +1000
commit9df56f96fd9a213189ca94c1fccfc3c42bd9c16a (patch)
treedb1db005b59e2b78d5daf9527fa8fc604e07e8c4
parent30c62e541a1484fedc3d689d62f96d246a28b147 (diff)
parent5f3303712ef483d270097cae4ba0a559b1056121 (diff)
downloadbusybox-w32-9df56f96fd9a213189ca94c1fccfc3c42bd9c16a.tar.gz
busybox-w32-9df56f96fd9a213189ca94c1fccfc3c42bd9c16a.tar.bz2
busybox-w32-9df56f96fd9a213189ca94c1fccfc3c42bd9c16a.zip
Merge branch 'origin/master' (early part)
-rw-r--r--Config.in22
-rw-r--r--Makefile14
-rw-r--r--Makefile.custom4
-rw-r--r--applets/Kbuild.src (renamed from applets/Kbuild)6
-rw-r--r--applets/usage.c33
-rwxr-xr-xapplets/usage_compressed22
-rw-r--r--applets/usage_pod.c57
-rw-r--r--archival/Config.src (renamed from archival/Config.in)64
-rw-r--r--archival/Kbuild.src (renamed from archival/Kbuild)0
-rw-r--r--archival/bbunzip.c13
-rw-r--r--archival/libunarchive/Kbuild.src (renamed from archival/libunarchive/Kbuild)0
-rw-r--r--console-tools/Config.src (renamed from console-tools/Config.in)42
-rw-r--r--console-tools/Kbuild.src (renamed from console-tools/Kbuild)0
-rw-r--r--console-tools/dumpkmap.c7
-rw-r--r--console-tools/loadkmap.c7
-rw-r--r--coreutils/Config.src (renamed from coreutils/Config.in)281
-rw-r--r--coreutils/Kbuild.src (renamed from coreutils/Kbuild)12
-rw-r--r--coreutils/basename.c10
-rw-r--r--coreutils/cat.c12
-rw-r--r--coreutils/date.c104
-rw-r--r--coreutils/libcoreutils/Kbuild.src (renamed from coreutils/libcoreutils/Kbuild)0
-rw-r--r--coreutils/test.c20
-rw-r--r--coreutils/tr.c29
-rw-r--r--coreutils/yes.c5
-rw-r--r--debianutils/Config.src (renamed from debianutils/Config.in)18
-rw-r--r--debianutils/Kbuild.src (renamed from debianutils/Kbuild)0
-rw-r--r--debianutils/pipe_progress.c12
-rw-r--r--e2fsprogs/Config.src (renamed from e2fsprogs/Config.in)16
-rw-r--r--e2fsprogs/Kbuild.src (renamed from e2fsprogs/Kbuild)0
-rw-r--r--e2fsprogs/old_e2fsprogs/Config.src (renamed from e2fsprogs/old_e2fsprogs/Config.in)0
-rw-r--r--e2fsprogs/old_e2fsprogs/Kbuild.src (renamed from e2fsprogs/old_e2fsprogs/Kbuild)0
-rw-r--r--e2fsprogs/old_e2fsprogs/blkid/Kbuild.src (renamed from e2fsprogs/old_e2fsprogs/blkid/Kbuild)0
-rw-r--r--e2fsprogs/old_e2fsprogs/e2p/Kbuild.src (renamed from e2fsprogs/old_e2fsprogs/e2p/Kbuild)0
-rw-r--r--e2fsprogs/old_e2fsprogs/ext2fs/Kbuild.src (renamed from e2fsprogs/old_e2fsprogs/ext2fs/Kbuild)0
-rw-r--r--e2fsprogs/old_e2fsprogs/uuid/Kbuild.src (renamed from e2fsprogs/old_e2fsprogs/uuid/Kbuild)0
-rw-r--r--editors/Config.src (renamed from editors/Config.in)22
-rw-r--r--editors/Kbuild.src (renamed from editors/Kbuild)0
-rw-r--r--editors/sed.c43
-rw-r--r--findutils/find.c6
-rw-r--r--findutils/grep.c2
-rw-r--r--findutils/xargs.c10
-rw-r--r--include/applets.src.h (renamed from include/applets.h)24
-rw-r--r--include/usage.src.h (renamed from include/usage.h)20
-rw-r--r--init/Config.src (renamed from init/Config.in)22
-rw-r--r--init/Kbuild.src (renamed from init/Kbuild)0
-rw-r--r--libbb/Config.src (renamed from libbb/Config.in)12
-rw-r--r--libbb/Kbuild.src (renamed from libbb/Kbuild)0
-rw-r--r--libbb/appletlib.c43
-rw-r--r--libpwdgrp/Kbuild.src (renamed from libpwdgrp/Kbuild)0
-rw-r--r--loginutils/Config.src (renamed from loginutils/Config.in)40
-rw-r--r--loginutils/Kbuild.src (renamed from loginutils/Kbuild)0
-rw-r--r--mailutils/Config.src (renamed from mailutils/Config.in)10
-rw-r--r--mailutils/Kbuild.src (renamed from mailutils/Kbuild)0
-rw-r--r--miscutils/Config.src (renamed from miscutils/Config.in)120
-rw-r--r--miscutils/Kbuild.src (renamed from miscutils/Kbuild)0
-rw-r--r--modutils/Config.src (renamed from modutils/Config.in)8
-rw-r--r--modutils/Kbuild.src (renamed from modutils/Kbuild)1
-rw-r--r--modutils/modinfo.c150
-rw-r--r--networking/Config.src (renamed from networking/Config.in)156
-rw-r--r--networking/Kbuild.src (renamed from networking/Kbuild)0
-rw-r--r--networking/libiproute/Kbuild.src (renamed from networking/libiproute/Kbuild)0
-rw-r--r--networking/udhcp/Config.src (renamed from networking/udhcp/Config.in)16
-rw-r--r--networking/udhcp/Kbuild.src (renamed from networking/udhcp/Kbuild)0
-rw-r--r--networking/udhcp/dhcpd.c3
-rw-r--r--printutils/Config.src (renamed from printutils/Config.in)6
-rw-r--r--printutils/Kbuild.src (renamed from printutils/Kbuild)0
-rw-r--r--procps/Config.src (renamed from procps/Config.in)50
-rw-r--r--procps/Kbuild.src (renamed from procps/Kbuild)0
-rw-r--r--procps/top.c149
-rw-r--r--runit/Config.src (renamed from runit/Config.in)14
-rw-r--r--runit/Kbuild.src (renamed from runit/Kbuild)0
-rw-r--r--scripts/Kbuild.src (renamed from scripts/Kbuild)0
-rw-r--r--scripts/Makefile.IMA4
-rw-r--r--scripts/defconfig927
-rwxr-xr-xscripts/gen_build_files.sh55
-rw-r--r--scripts/kconfig/confdata.c2
-rwxr-xr-xscripts/test_make_clean14
-rw-r--r--selinux/Config.src (renamed from selinux/Config.in)0
-rw-r--r--selinux/Kbuild.src (renamed from selinux/Kbuild)0
-rw-r--r--shell/Config.src (renamed from shell/Config.in)48
-rw-r--r--shell/Kbuild.src (renamed from shell/Kbuild)0
-rw-r--r--shell/ash.c32
-rw-r--r--sysklogd/Config.src (renamed from sysklogd/Config.in)16
-rw-r--r--sysklogd/Kbuild.src (renamed from sysklogd/Kbuild)0
-rwxr-xr-xtestsuite/sed.tests5
-rw-r--r--util-linux/Config.src (renamed from util-linux/Config.in)186
-rw-r--r--util-linux/Kbuild.src (renamed from util-linux/Kbuild)0
-rw-r--r--util-linux/mkfs_vfat.c7
-rw-r--r--util-linux/volume_id/Kbuild.src (renamed from util-linux/volume_id/Kbuild)0
89 files changed, 1198 insertions, 1835 deletions
diff --git a/Config.in b/Config.in
index 5339b4ab7..0f0601245 100644
--- a/Config.in
+++ b/Config.in
@@ -96,8 +96,8 @@ config SHOW_USAGE
96 96
97config FEATURE_VERBOSE_USAGE 97config FEATURE_VERBOSE_USAGE
98 bool "Show verbose applet usage messages" 98 bool "Show verbose applet usage messages"
99 default n 99 default y
100 select SHOW_USAGE 100 depends on SHOW_USAGE
101 help 101 help
102 All BusyBox applets will show more verbose help messages when 102 All BusyBox applets will show more verbose help messages when
103 busybox is invoked with --help. This will add a lot of text to the 103 busybox is invoked with --help. This will add a lot of text to the
@@ -120,7 +120,7 @@ config FEATURE_COMPRESS_USAGE
120 120
121config FEATURE_INSTALLER 121config FEATURE_INSTALLER
122 bool "Support --install [-s] to install applet links at runtime" 122 bool "Support --install [-s] to install applet links at runtime"
123 default n 123 default y
124 help 124 help
125 Enable 'busybox --install [-s]' support. This will allow you to use 125 Enable 'busybox --install [-s]' support. This will allow you to use
126 busybox at runtime to create hard links or symlinks for all the 126 busybox at runtime to create hard links or symlinks for all the
@@ -135,7 +135,7 @@ config LOCALE_SUPPORT
135 135
136config UNICODE_SUPPORT 136config UNICODE_SUPPORT
137 bool "Support Unicode" 137 bool "Support Unicode"
138 default n 138 default y
139 help 139 help
140 This makes various applets aware that one byte is not 140 This makes various applets aware that one byte is not
141 one character on screen. 141 one character on screen.
@@ -155,7 +155,7 @@ config UNICODE_USING_LOCALE
155 155
156config FEATURE_CHECK_UNICODE_IN_ENV 156config FEATURE_CHECK_UNICODE_IN_ENV
157 bool "Check $LANG environment variable" 157 bool "Check $LANG environment variable"
158 default y 158 default n
159 depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE 159 depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE
160 help 160 help
161 With this option on, Unicode support is activated 161 With this option on, Unicode support is activated
@@ -279,7 +279,7 @@ config FEATURE_CLEAN_UP
279 279
280config FEATURE_UTMP 280config FEATURE_UTMP
281 bool "Support utmp file" 281 bool "Support utmp file"
282 default n 282 default y
283 help 283 help
284 The file /var/run/utmp is used to track who is currently logged in. 284 The file /var/run/utmp is used to track who is currently logged in.
285 With this option on, certain applets (getty, login, telnetd etc) 285 With this option on, certain applets (getty, login, telnetd etc)
@@ -288,7 +288,7 @@ config FEATURE_UTMP
288 288
289config FEATURE_WTMP 289config FEATURE_WTMP
290 bool "Support wtmp file" 290 bool "Support wtmp file"
291 default n 291 default y
292 select FEATURE_UTMP 292 select FEATURE_UTMP
293 help 293 help
294 The file /var/run/wtmp is used to track when users have logged into 294 The file /var/run/wtmp is used to track when users have logged into
@@ -299,14 +299,14 @@ config FEATURE_WTMP
299 299
300config FEATURE_PIDFILE 300config FEATURE_PIDFILE
301 bool "Support writing pidfiles" 301 bool "Support writing pidfiles"
302 default n 302 default y
303 help 303 help
304 This option makes some applets (e.g. crond, syslogd, inetd) write 304 This option makes some applets (e.g. crond, syslogd, inetd) write
305 a pidfile in /var/run. Some applications rely on them. 305 a pidfile in /var/run. Some applications rely on them.
306 306
307config FEATURE_SUID 307config FEATURE_SUID
308 bool "Support for SUID/SGID handling" 308 bool "Support for SUID/SGID handling"
309 default n 309 default y
310 help 310 help
311 With this option you can install the busybox binary belonging 311 With this option you can install the busybox binary belonging
312 to root with the suid bit set, and it will automatically drop 312 to root with the suid bit set, and it will automatically drop
@@ -323,7 +323,7 @@ config FEATURE_SUID
323 323
324config FEATURE_SUID_CONFIG 324config FEATURE_SUID_CONFIG
325 bool "Runtime SUID/SGID configuration via /etc/busybox.conf" 325 bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
326 default n if FEATURE_SUID 326 default y if FEATURE_SUID
327 depends on FEATURE_SUID 327 depends on FEATURE_SUID
328 help 328 help
329 Allow the SUID / SGID state of an applet to be determined at runtime 329 Allow the SUID / SGID state of an applet to be determined at runtime
@@ -542,7 +542,7 @@ config FEATURE_SHARED_BUSYBOX
542 542
543config LFS 543config LFS
544 bool "Build with Large File Support (for accessing files > 2 GB)" 544 bool "Build with Large File Support (for accessing files > 2 GB)"
545 default n 545 default y
546 select FDISK_SUPPORT_LARGE_DISKS 546 select FDISK_SUPPORT_LARGE_DISKS
547 help 547 help
548 If you want to build BusyBox with large file support, then enable 548 If you want to build BusyBox with large file support, then enable
diff --git a/Makefile b/Makefile
index 6f332825f..a1b6250a4 100644
--- a/Makefile
+++ b/Makefile
@@ -359,11 +359,16 @@ scripts_basic:
359# To avoid any implicit rule to kick in, define an empty command. 359# To avoid any implicit rule to kick in, define an empty command.
360scripts/basic/%: scripts_basic ; 360scripts/basic/%: scripts_basic ;
361 361
362# This target generates Kbuild's and Config.in's from *.c files
363PHONY += gen_build_files
364gen_build_files:
365 $(Q)$(srctree)/scripts/gen_build_files.sh $(srctree) $(objtree)
366
362# bbox: we have helpers in applets/ 367# bbox: we have helpers in applets/
363# we depend on scripts_basic, since scripts/basic/fixdep 368# we depend on scripts_basic, since scripts/basic/fixdep
364# must be built before any other host prog 369# must be built before any other host prog
365PHONY += applets_dir 370PHONY += applets_dir
366applets_dir: scripts_basic 371applets_dir: scripts_basic gen_build_files
367 $(Q)$(MAKE) $(build)=applets 372 $(Q)$(MAKE) $(build)=applets
368 373
369applets/%: applets_dir ; 374applets/%: applets_dir ;
@@ -378,11 +383,6 @@ ifneq ($(KBUILD_SRC),)
378 $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) 383 $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
379endif 384endif
380 385
381# This target generates Kbuild's and Config.in's from *.c files
382PHONY += gen_build_files
383gen_build_files:
384 $(Q)$(srctree)/scripts/gen_build_files.sh $(srctree) $(objtree)
385
386# To make sure we do not include .config for any of the *config targets 386# To make sure we do not include .config for any of the *config targets
387# catch them early, and hand them over to scripts/kconfig/Makefile 387# catch them early, and hand them over to scripts/kconfig/Makefile
388# It is allowed to specify more targets when calling make, including 388# It is allowed to specify more targets when calling make, including
@@ -447,7 +447,7 @@ else
447ifeq ($(KBUILD_EXTMOD),) 447ifeq ($(KBUILD_EXTMOD),)
448# Additional helpers built in scripts/ 448# Additional helpers built in scripts/
449# Carefully list dependencies so we do not try to build scripts twice 449# Carefully list dependencies so we do not try to build scripts twice
450# in parrallel 450# in parallel
451PHONY += scripts 451PHONY += scripts
452scripts: gen_build_files scripts_basic include/config/MARKER 452scripts: gen_build_files scripts_basic include/config/MARKER
453 $(Q)$(MAKE) $(build)=$(@) 453 $(Q)$(MAKE) $(build)=$(@)
diff --git a/Makefile.custom b/Makefile.custom
index ecba6bd79..01d69ddf8 100644
--- a/Makefile.custom
+++ b/Makefile.custom
@@ -2,7 +2,7 @@
2# Build system 2# Build system
3# ========================================================================== 3# ==========================================================================
4 4
5busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h $(srctree)/include/applets.h 5busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h include/applets.h
6 $(Q)-$(SHELL) $^ >$@ 6 $(Q)-$(SHELL) $^ >$@
7 7
8.PHONY: install 8.PHONY: install
@@ -118,7 +118,7 @@ disp_doc = $($(quiet)cmd_doc)
118# sed adds newlines after "Options:" etc, 118# sed adds newlines after "Options:" etc,
119# this is needed in order to get good BusyBox.{1,txt,html} 119# this is needed in order to get good BusyBox.{1,txt,html}
120docs/busybox.pod: $(srctree)/docs/busybox_header.pod \ 120docs/busybox.pod: $(srctree)/docs/busybox_header.pod \
121 $(srctree)/include/usage.h \ 121 include/usage.h \
122 $(srctree)/docs/busybox_footer.pod \ 122 $(srctree)/docs/busybox_footer.pod \
123 applets/usage_pod 123 applets/usage_pod
124 $(disp_doc) 124 $(disp_doc)
diff --git a/applets/Kbuild b/applets/Kbuild.src
index a6b0cf6fb..e3bac9681 100644
--- a/applets/Kbuild
+++ b/applets/Kbuild.src
@@ -27,9 +27,9 @@ HOSTCFLAGS_usage_pod.o = -I$(srctree_slash)include -Iinclude
27 27
28applets/applets.o: include/usage_compressed.h include/applet_tables.h 28applets/applets.o: include/usage_compressed.h include/applet_tables.h
29 29
30applets/applet_tables: .config $(srctree_slash)include/applets.h 30applets/applet_tables: .config include/applets.h
31applets/usage: .config $(srctree_slash)include/applets.h 31applets/usage: .config include/applets.h
32applets/usage_pod: .config include/applet_tables.h $(srctree_slash)include/applets.h 32applets/usage_pod: .config include/applet_tables.h include/applets.h
33 33
34quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h 34quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
35 cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets 35 cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
diff --git a/applets/usage.c b/applets/usage.c
index d4fd12f9b..46adbf475 100644
--- a/applets/usage.c
+++ b/applets/usage.c
@@ -5,9 +5,9 @@
5 * Licensed under GPLv2, see file LICENSE in this tarball for details. 5 * Licensed under GPLv2, see file LICENSE in this tarball for details.
6 */ 6 */
7#include <unistd.h> 7#include <unistd.h>
8#include <stdlib.h>
9#include <string.h>
8 10
9/* Just #include "autoconf.h" doesn't work for builds in separate
10 * object directory */
11#include "autoconf.h" 11#include "autoconf.h"
12 12
13/* Since we can't use platform.h, have to do this again by hand: */ 13/* Since we can't use platform.h, have to do this again by hand: */
@@ -21,14 +21,35 @@
21# define USE_FOR_MMU(...) __VA_ARGS__ 21# define USE_FOR_MMU(...) __VA_ARGS__
22#endif 22#endif
23 23
24static const char usage_messages[] = ""
25#define MAKE_USAGE
26#include "usage.h" 24#include "usage.h"
25#define MAKE_USAGE(aname, usage) { aname, usage },
26static struct usage_data {
27 const char *aname;
28 const char *usage;
29} usage_array[] = {
27#include "applets.h" 30#include "applets.h"
28; 31};
32
33static int compare_func(const void *a, const void *b)
34{
35 const struct usage_data *ua = a;
36 const struct usage_data *ub = b;
37 return strcmp(ua->aname, ub->aname);
38}
29 39
30int main(void) 40int main(void)
31{ 41{
32 write(STDOUT_FILENO, usage_messages, sizeof(usage_messages)); 42 int i;
43 int num_messages = sizeof(usage_array) / sizeof(usage_array[0]);
44
45 if (num_messages == 0)
46 return 0;
47
48 qsort(usage_array,
49 num_messages, sizeof(usage_array[0]),
50 compare_func);
51 for (i = 0; i < num_messages; i++)
52 write(STDOUT_FILENO, usage_array[i].usage, strlen(usage_array[i].usage) + 1);
53
33 return 0; 54 return 0;
34} 55}
diff --git a/applets/usage_compressed b/applets/usage_compressed
index 8d343529d..bfd5aa873 100755
--- a/applets/usage_compressed
+++ b/applets/usage_compressed
@@ -9,12 +9,19 @@ test -x "$loc/usage" || exit 1
9test "$SED" || SED=sed 9test "$SED" || SED=sed
10test "$DD" || DD=dd 10test "$DD" || DD=dd
11 11
12sz=`"$loc/usage" | wc -c` || exit 1
13
14exec >"$target" 12exec >"$target"
15 13
16echo 'static const char packed_usage[] ALIGN1 = {' 14echo '#define UNPACKED_USAGE "" \'
15"$loc/usage" | od -v -t x1 \
16| $SED -e 's/^[^ ]*//' \
17 -e 's/ //g' \
18 -e '/^$/d' \
19 -e 's/\(..\)/\\x\1/g' \
20 -e 's/^/"/' \
21 -e 's/$/" \\/'
22echo ''
17 23
24echo '#define PACKED_USAGE \'
18## Breaks on big-endian systems! 25## Breaks on big-endian systems!
19## # Extra effort to avoid using "od -t x1": -t is not available 26## # Extra effort to avoid using "od -t x1": -t is not available
20## # in non-CONFIG_DESKTOPed busybox od 27## # in non-CONFIG_DESKTOPed busybox od
@@ -24,12 +31,11 @@ echo 'static const char packed_usage[] ALIGN1 = {'
24## -e 's/ //g' \ 31## -e 's/ //g' \
25## -e '/^$/d' \ 32## -e '/^$/d' \
26## -e 's/\(..\)\(..\)/0x\2,0x\1,/g' 33## -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
27 34## -e 's/$/ \\/'
28"$loc/usage" | bzip2 -1 | $DD bs=2 skip=1 2>/dev/null | od -v -t x1 \ 35"$loc/usage" | bzip2 -1 | $DD bs=2 skip=1 2>/dev/null | od -v -t x1 \
29| $SED -e 's/^[^ ]*//' \ 36| $SED -e 's/^[^ ]*//' \
30 -e 's/ //g' \ 37 -e 's/ //g' \
31 -e '/^$/d' \ 38 -e '/^$/d' \
32 -e 's/\(..\)/0x\1,/g' 39 -e 's/\(..\)/0x\1,/g' \
33 40 -e 's/$/ \\/'
34echo '};' 41echo ''
35echo '#define SIZEOF_usage_messages' `expr 0 + $sz`
diff --git a/applets/usage_pod.c b/applets/usage_pod.c
index ee3729d7b..85a2a8ec4 100644
--- a/applets/usage_pod.c
+++ b/applets/usage_pod.c
@@ -6,11 +6,10 @@
6 */ 6 */
7#include <unistd.h> 7#include <unistd.h>
8#include <stdint.h> 8#include <stdint.h>
9#include <stdlib.h>
9#include <string.h> 10#include <string.h>
10#include <stdio.h> 11#include <stdio.h>
11 12
12/* Just #include "autoconf.h" doesn't work for builds in separate
13 * object directory */
14#include "autoconf.h" 13#include "autoconf.h"
15 14
16#define SKIP_applet_main 15#define SKIP_applet_main
@@ -29,22 +28,39 @@
29# define USE_FOR_MMU(...) __VA_ARGS__ 28# define USE_FOR_MMU(...) __VA_ARGS__
30#endif 29#endif
31 30
32static const char usage_messages[] = ""
33#define MAKE_USAGE
34#include "usage.h" 31#include "usage.h"
32#define MAKE_USAGE(aname, usage) { aname, usage },
33static struct usage_data {
34 const char *aname;
35 const char *usage;
36} usage_array[] = {
35#include "applets.h" 37#include "applets.h"
36; 38};
39
40static int compare_func(const void *a, const void *b)
41{
42 const struct usage_data *ua = a;
43 const struct usage_data *ub = b;
44 return strcmp(ua->aname, ub->aname);
45}
37 46
38int main(void) 47int main(void)
39{ 48{
40 const char *names;
41 const char *usage;
42 int col, len2; 49 int col, len2;
43 50
51 int i;
52 int num_messages = sizeof(usage_array) / sizeof(usage_array[0]);
53
54 if (num_messages == 0)
55 return 0;
56
57 qsort(usage_array,
58 num_messages, sizeof(usage_array[0]),
59 compare_func);
60
44 col = 0; 61 col = 0;
45 names = applet_names; 62 for (i = 0; i < num_messages; i++) {
46 while (*names) { 63 len2 = strlen(usage_array[i].aname) + 2;
47 len2 = strlen(names) + 2;
48 if (col >= 76 - len2) { 64 if (col >= 76 - len2) {
49 printf(",\n"); 65 printf(",\n");
50 col = 0; 66 col = 0;
@@ -55,29 +71,24 @@ int main(void)
55 } else { 71 } else {
56 printf(", "); 72 printf(", ");
57 } 73 }
58 printf(names); 74 printf(usage_array[i].aname);
59 col += len2; 75 col += len2;
60 names += len2 - 1;
61 } 76 }
62 printf("\n\n"); 77 printf("\n\n");
63 78
64 printf("=head1 COMMAND DESCRIPTIONS\n\n"); 79 printf("=head1 COMMAND DESCRIPTIONS\n\n");
65 printf("=over 4\n\n"); 80 printf("=over 4\n\n");
66 81
67 names = applet_names; 82 for (i = 0; i < num_messages; i++) {
68 usage = usage_messages; 83 if (usage_array[i].aname[0] >= 'a' && usage_array[i].aname[0] <= 'z'
69 while (*names) { 84 && usage_array[i].usage[0] != NOUSAGE_STR[0]
70 if (*names >= 'a' && *names <= 'z'
71 && *usage != NOUSAGE_STR[0]
72 ) { 85 ) {
73 printf("=item B<%s>\n\n", names); 86 printf("=item B<%s>\n\n", usage_array[i].aname);
74 if (*usage) 87 if (usage_array[i].usage[0])
75 printf("%s %s\n\n", names, usage); 88 printf("%s %s\n\n", usage_array[i].aname, usage_array[i].usage);
76 else 89 else
77 printf("%s\n\n", names); 90 printf("%s\n\n", usage_array[i].aname);
78 } 91 }
79 names += strlen(names) + 1;
80 usage += strlen(usage) + 1;
81 } 92 }
82 return 0; 93 return 0;
83} 94}
diff --git a/archival/Config.in b/archival/Config.src
index 4f762e860..de453bc21 100644
--- a/archival/Config.in
+++ b/archival/Config.src
@@ -7,25 +7,25 @@ menu "Archival Utilities"
7 7
8config FEATURE_SEAMLESS_XZ 8config FEATURE_SEAMLESS_XZ
9 bool "Make tar, rpm, modprobe etc understand .xz data" 9 bool "Make tar, rpm, modprobe etc understand .xz data"
10 default n 10 default y
11 help 11 help
12 Make tar, rpm, modprobe etc understand .xz data. 12 Make tar, rpm, modprobe etc understand .xz data.
13 13
14config FEATURE_SEAMLESS_LZMA 14config FEATURE_SEAMLESS_LZMA
15 bool "Make tar, rpm, modprobe etc understand .lzma data" 15 bool "Make tar, rpm, modprobe etc understand .lzma data"
16 default n 16 default y
17 help 17 help
18 Make tar, rpm, modprobe etc understand .lzma data. 18 Make tar, rpm, modprobe etc understand .lzma data.
19 19
20config FEATURE_SEAMLESS_BZ2 20config FEATURE_SEAMLESS_BZ2
21 bool "Make tar, rpm, modprobe etc understand .bz2 data" 21 bool "Make tar, rpm, modprobe etc understand .bz2 data"
22 default n 22 default y
23 help 23 help
24 Make tar, rpm, modprobe etc understand .bz2 data. 24 Make tar, rpm, modprobe etc understand .bz2 data.
25 25
26config FEATURE_SEAMLESS_GZ 26config FEATURE_SEAMLESS_GZ
27 bool "Make tar, rpm, modprobe etc understand .gz data" 27 bool "Make tar, rpm, modprobe etc understand .gz data"
28 default n 28 default y
29 help 29 help
30 Make tar, rpm, modprobe etc understand .gz data. 30 Make tar, rpm, modprobe etc understand .gz data.
31 31
@@ -37,7 +37,7 @@ config FEATURE_SEAMLESS_Z
37 37
38config AR 38config AR
39 bool "ar" 39 bool "ar"
40 default n 40 default y
41 help 41 help
42 ar is an archival utility program used to create, modify, and 42 ar is an archival utility program used to create, modify, and
43 extract contents from archives. An archive is a single file holding 43 extract contents from archives. An archive is a single file holding
@@ -60,7 +60,7 @@ config AR
60 60
61config FEATURE_AR_LONG_FILENAMES 61config FEATURE_AR_LONG_FILENAMES
62 bool "Support for long filenames (not needed for debs)" 62 bool "Support for long filenames (not needed for debs)"
63 default n 63 default y
64 depends on AR 64 depends on AR
65 help 65 help
66 By default the ar format can only store the first 15 characters 66 By default the ar format can only store the first 15 characters
@@ -70,14 +70,14 @@ config FEATURE_AR_LONG_FILENAMES
70 70
71config FEATURE_AR_CREATE 71config FEATURE_AR_CREATE
72 bool "Support archive creation" 72 bool "Support archive creation"
73 default n 73 default y
74 depends on AR 74 depends on AR
75 help 75 help
76 This enables archive creation (-c and -r) with busybox ar. 76 This enables archive creation (-c and -r) with busybox ar.
77 77
78config BUNZIP2 78config BUNZIP2
79 bool "bunzip2" 79 bool "bunzip2"
80 default n 80 default y
81 help 81 help
82 bunzip2 is a compression utility using the Burrows-Wheeler block 82 bunzip2 is a compression utility using the Burrows-Wheeler block
83 sorting text compression algorithm, and Huffman coding. Compression 83 sorting text compression algorithm, and Huffman coding. Compression
@@ -90,7 +90,7 @@ config BUNZIP2
90 90
91config BZIP2 91config BZIP2
92 bool "bzip2" 92 bool "bzip2"
93 default n 93 default y
94 help 94 help
95 bzip2 is a compression utility using the Burrows-Wheeler block 95 bzip2 is a compression utility using the Burrows-Wheeler block
96 sorting text compression algorithm, and Huffman coding. Compression 96 sorting text compression algorithm, and Huffman coding. Compression
@@ -103,7 +103,7 @@ config BZIP2
103 103
104config CPIO 104config CPIO
105 bool "cpio" 105 bool "cpio"
106 default n 106 default y
107 help 107 help
108 cpio is an archival utility program used to create, modify, and 108 cpio is an archival utility program used to create, modify, and
109 extract contents from archives. 109 extract contents from archives.
@@ -117,7 +117,7 @@ config CPIO
117 117
118config FEATURE_CPIO_O 118config FEATURE_CPIO_O
119 bool "Support for archive creation" 119 bool "Support for archive creation"
120 default n 120 default y
121 depends on CPIO 121 depends on CPIO
122 help 122 help
123 This implementation of cpio can create cpio archives in the "newc" 123 This implementation of cpio can create cpio archives in the "newc"
@@ -125,7 +125,7 @@ config FEATURE_CPIO_O
125 125
126config FEATURE_CPIO_P 126config FEATURE_CPIO_P
127 bool "Support for passthrough mode" 127 bool "Support for passthrough mode"
128 default n 128 default y
129 depends on FEATURE_CPIO_O 129 depends on FEATURE_CPIO_O
130 help 130 help
131 Passthrough mode. Rarely used. 131 Passthrough mode. Rarely used.
@@ -165,7 +165,7 @@ config FEATURE_DPKG_DEB_EXTRACT_ONLY
165 165
166config GUNZIP 166config GUNZIP
167 bool "gunzip" 167 bool "gunzip"
168 default n 168 default y
169 help 169 help
170 gunzip is used to decompress archives created by gzip. 170 gunzip is used to decompress archives created by gzip.
171 You can use the `-t' option to test the integrity of 171 You can use the `-t' option to test the integrity of
@@ -173,21 +173,21 @@ config GUNZIP
173 173
174config GZIP 174config GZIP
175 bool "gzip" 175 bool "gzip"
176 default n 176 default y
177 help 177 help
178 gzip is used to compress files. 178 gzip is used to compress files.
179 It's probably the most widely used UNIX compression program. 179 It's probably the most widely used UNIX compression program.
180 180
181config FEATURE_GZIP_LONG_OPTIONS 181config FEATURE_GZIP_LONG_OPTIONS
182 bool "Enable long options" 182 bool "Enable long options"
183 default n 183 default y
184 depends on GZIP && LONG_OPTS 184 depends on GZIP && LONG_OPTS
185 help 185 help
186 Enable use of long options, increases size by about 106 Bytes 186 Enable use of long options, increases size by about 106 Bytes
187 187
188config LZOP 188config LZOP
189 bool "lzop" 189 bool "lzop"
190 default n 190 default y
191 help 191 help
192 Lzop compression/decompresion. 192 Lzop compression/decompresion.
193 193
@@ -202,19 +202,19 @@ config LZOP_COMPR_HIGH
202 202
203config RPM2CPIO 203config RPM2CPIO
204 bool "rpm2cpio" 204 bool "rpm2cpio"
205 default n 205 default y
206 help 206 help
207 Converts an RPM file into a CPIO archive. 207 Converts an RPM file into a CPIO archive.
208 208
209config RPM 209config RPM
210 bool "rpm" 210 bool "rpm"
211 default n 211 default y
212 help 212 help
213 Mini RPM applet - queries and extracts RPM packages. 213 Mini RPM applet - queries and extracts RPM packages.
214 214
215config TAR 215config TAR
216 bool "tar" 216 bool "tar"
217 default n 217 default y
218 help 218 help
219 tar is an archiving program. It's commonly used with gzip to 219 tar is an archiving program. It's commonly used with gzip to
220 create compressed archives. It's probably the most widely used 220 create compressed archives. It's probably the most widely used
@@ -230,7 +230,7 @@ config FEATURE_TAR_CREATE
230 230
231config FEATURE_TAR_AUTODETECT 231config FEATURE_TAR_AUTODETECT
232 bool "Autodetect compressed tarballs" 232 bool "Autodetect compressed tarballs"
233 default n 233 default y
234 depends on TAR && (FEATURE_SEAMLESS_Z || FEATURE_SEAMLESS_GZ || FEATURE_SEAMLESS_BZ2 || FEATURE_SEAMLESS_LZMA || FEATURE_SEAMLESS_XZ) 234 depends on TAR && (FEATURE_SEAMLESS_Z || FEATURE_SEAMLESS_GZ || FEATURE_SEAMLESS_BZ2 || FEATURE_SEAMLESS_LZMA || FEATURE_SEAMLESS_XZ)
235 help 235 help
236 With this option tar can automatically detect compressed 236 With this option tar can automatically detect compressed
@@ -238,7 +238,7 @@ config FEATURE_TAR_AUTODETECT
238 238
239config FEATURE_TAR_FROM 239config FEATURE_TAR_FROM
240 bool "Enable -X (exclude from) and -T (include from) options)" 240 bool "Enable -X (exclude from) and -T (include from) options)"
241 default n 241 default y
242 depends on TAR 242 depends on TAR
243 help 243 help
244 If you enable this option you'll be able to specify 244 If you enable this option you'll be able to specify
@@ -246,7 +246,7 @@ config FEATURE_TAR_FROM
246 246
247config FEATURE_TAR_OLDGNU_COMPATIBILITY 247config FEATURE_TAR_OLDGNU_COMPATIBILITY
248 bool "Support for old tar header format" 248 bool "Support for old tar header format"
249 default N 249 default y
250 depends on TAR || DPKG 250 depends on TAR || DPKG
251 help 251 help
252 This option is required to unpack archives created in 252 This option is required to unpack archives created in
@@ -255,7 +255,7 @@ config FEATURE_TAR_OLDGNU_COMPATIBILITY
255 255
256config FEATURE_TAR_OLDSUN_COMPATIBILITY 256config FEATURE_TAR_OLDSUN_COMPATIBILITY
257 bool "Enable untarring of tarballs with checksums produced by buggy Sun tar" 257 bool "Enable untarring of tarballs with checksums produced by buggy Sun tar"
258 default N 258 default y
259 depends on TAR || DPKG 259 depends on TAR || DPKG
260 help 260 help
261 This option is required to unpack archives created by some old 261 This option is required to unpack archives created by some old
@@ -273,14 +273,14 @@ config FEATURE_TAR_GNU_EXTENSIONS
273 273
274config FEATURE_TAR_LONG_OPTIONS 274config FEATURE_TAR_LONG_OPTIONS
275 bool "Enable long options" 275 bool "Enable long options"
276 default n 276 default y
277 depends on TAR && LONG_OPTS 277 depends on TAR && LONG_OPTS
278 help 278 help
279 Enable use of long options, increases size by about 400 Bytes 279 Enable use of long options, increases size by about 400 Bytes
280 280
281config FEATURE_TAR_UNAME_GNAME 281config FEATURE_TAR_UNAME_GNAME
282 bool "Enable use of user and group names" 282 bool "Enable use of user and group names"
283 default n 283 default y
284 depends on TAR 284 depends on TAR
285 help 285 help
286 Enables use of user and group names in tar. This affects contents 286 Enables use of user and group names in tar. This affects contents
@@ -289,7 +289,7 @@ config FEATURE_TAR_UNAME_GNAME
289 289
290config FEATURE_TAR_NOPRESERVE_TIME 290config FEATURE_TAR_NOPRESERVE_TIME
291 bool "Enable -m (do not preserve time) option" 291 bool "Enable -m (do not preserve time) option"
292 default n 292 default y
293 depends on TAR 293 depends on TAR
294 help 294 help
295 With this option busybox supports GNU tar -m 295 With this option busybox supports GNU tar -m
@@ -312,7 +312,7 @@ config UNCOMPRESS
312 312
313config UNLZMA 313config UNLZMA
314 bool "unlzma" 314 bool "unlzma"
315 default n 315 default y
316 help 316 help
317 unlzma is a compression utility using the Lempel-Ziv-Markov chain 317 unlzma is a compression utility using the Lempel-Ziv-Markov chain
318 compression algorithm, and range coding. Compression 318 compression algorithm, and range coding. Compression
@@ -327,7 +327,7 @@ config UNLZMA
327 327
328config FEATURE_LZMA_FAST 328config FEATURE_LZMA_FAST
329 bool "Optimize unlzma for speed" 329 bool "Optimize unlzma for speed"
330 default n 330 default y
331 depends on UNLZMA 331 depends on UNLZMA
332 help 332 help
333 This option reduces decompression time by about 25% at the cost of 333 This option reduces decompression time by about 25% at the cost of
@@ -335,7 +335,7 @@ config FEATURE_LZMA_FAST
335 335
336config LZMA 336config LZMA
337 bool "Provide lzma alias which supports only unpacking" 337 bool "Provide lzma alias which supports only unpacking"
338 default n 338 default y
339 depends on UNLZMA 339 depends on UNLZMA
340 help 340 help
341 Enable this option if you want commands like "lzma -d" to work. 341 Enable this option if you want commands like "lzma -d" to work.
@@ -343,13 +343,13 @@ config LZMA
343 343
344config UNXZ 344config UNXZ
345 bool "unxz" 345 bool "unxz"
346 default n 346 default y
347 help 347 help
348 unxz is a unlzma successor. 348 unxz is a unlzma successor.
349 349
350config XZ 350config XZ
351 bool "Provide xz alias which supports only unpacking" 351 bool "Provide xz alias which supports only unpacking"
352 default n 352 default y
353 depends on UNXZ 353 depends on UNXZ
354 help 354 help
355 Enable this option if you want commands like "xz -d" to work. 355 Enable this option if you want commands like "xz -d" to work.
@@ -357,7 +357,7 @@ config XZ
357 357
358config UNZIP 358config UNZIP
359 bool "unzip" 359 bool "unzip"
360 default n 360 default y
361 help 361 help
362 unzip will list or extract files from a ZIP archive, 362 unzip will list or extract files from a ZIP archive,
363 commonly found on DOS/WIN systems. The default behavior 363 commonly found on DOS/WIN systems. The default behavior
diff --git a/archival/Kbuild b/archival/Kbuild.src
index 3300ea90f..3300ea90f 100644
--- a/archival/Kbuild
+++ b/archival/Kbuild.src
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index 08db2752c..b243afb2e 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -304,6 +304,19 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv)
304 * 304 *
305 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 305 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
306 */ 306 */
307//usage:#define bunzip2_trivial_usage
308//usage: "[OPTIONS] [FILE]..."
309//usage:#define bunzip2_full_usage "\n\n"
310//usage: "Decompress FILEs (or stdin)\n"
311//usage: "\nOptions:"
312//usage: "\n -c Write to stdout"
313//usage: "\n -f Force"
314//usage:#define bzcat_trivial_usage
315//usage: "FILE"
316//usage:#define bzcat_full_usage "\n\n"
317//usage: "Decompress to stdout"
318//applet:IF_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP))
319//applet:IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP, bzcat))
307#if ENABLE_BUNZIP2 320#if ENABLE_BUNZIP2
308static 321static
309IF_DESKTOP(long long) int FAST_FUNC unpack_bunzip2(unpack_info_t *info UNUSED_PARAM) 322IF_DESKTOP(long long) int FAST_FUNC unpack_bunzip2(unpack_info_t *info UNUSED_PARAM)
diff --git a/archival/libunarchive/Kbuild b/archival/libunarchive/Kbuild.src
index ed8e85793..ed8e85793 100644
--- a/archival/libunarchive/Kbuild
+++ b/archival/libunarchive/Kbuild.src
diff --git a/console-tools/Config.in b/console-tools/Config.src
index a7e995936..1a8e2e128 100644
--- a/console-tools/Config.in
+++ b/console-tools/Config.src
@@ -7,79 +7,79 @@ menu "Console Utilities"
7 7
8config CHVT 8config CHVT
9 bool "chvt" 9 bool "chvt"
10 default n 10 default y
11 help 11 help
12 This program is used to change to another terminal. 12 This program is used to change to another terminal.
13 Example: chvt 4 (change to terminal /dev/tty4) 13 Example: chvt 4 (change to terminal /dev/tty4)
14 14
15config FGCONSOLE 15config FGCONSOLE
16 bool "fgconsole" 16 bool "fgconsole"
17 default n 17 default y
18 help 18 help
19 This program prints active (foreground) console number. 19 This program prints active (foreground) console number.
20 20
21config CLEAR 21config CLEAR
22 bool "clear" 22 bool "clear"
23 default n 23 default y
24 help 24 help
25 This program clears the terminal screen. 25 This program clears the terminal screen.
26 26
27config DEALLOCVT 27config DEALLOCVT
28 bool "deallocvt" 28 bool "deallocvt"
29 default n 29 default y
30 help 30 help
31 This program deallocates unused virtual consoles. 31 This program deallocates unused virtual consoles.
32 32
33config DUMPKMAP 33config DUMPKMAP
34 bool "dumpkmap" 34 bool "dumpkmap"
35 default n 35 default y
36 help 36 help
37 This program dumps the kernel's keyboard translation table to 37 This program dumps the kernel's keyboard translation table to
38 stdout, in binary format. You can then use loadkmap to load it. 38 stdout, in binary format. You can then use loadkmap to load it.
39 39
40config KBD_MODE 40config KBD_MODE
41 bool "kbd_mode" 41 bool "kbd_mode"
42 default n 42 default y
43 help 43 help
44 This program reports and sets keyboard mode. 44 This program reports and sets keyboard mode.
45 45
46config LOADFONT 46config LOADFONT
47 bool "loadfont" 47 bool "loadfont"
48 default n 48 default y
49 help 49 help
50 This program loads a console font from standard input. 50 This program loads a console font from standard input.
51 51
52config LOADKMAP 52config LOADKMAP
53 bool "loadkmap" 53 bool "loadkmap"
54 default n 54 default y
55 help 55 help
56 This program loads a keyboard translation table from 56 This program loads a keyboard translation table from
57 standard input. 57 standard input.
58 58
59config OPENVT 59config OPENVT
60 bool "openvt" 60 bool "openvt"
61 default n 61 default y
62 help 62 help
63 This program is used to start a command on an unused 63 This program is used to start a command on an unused
64 virtual terminal. 64 virtual terminal.
65 65
66config RESET 66config RESET
67 bool "reset" 67 bool "reset"
68 default n 68 default y
69 help 69 help
70 This program is used to reset the terminal screen, if it 70 This program is used to reset the terminal screen, if it
71 gets messed up. 71 gets messed up.
72 72
73config RESIZE 73config RESIZE
74 bool "resize" 74 bool "resize"
75 default n 75 default y
76 help 76 help
77 This program is used to (re)set the width and height of your current 77 This program is used to (re)set the width and height of your current
78 terminal. 78 terminal.
79 79
80config FEATURE_RESIZE_PRINT 80config FEATURE_RESIZE_PRINT
81 bool "Print environment variables" 81 bool "Print environment variables"
82 default n 82 default y
83 depends on RESIZE 83 depends on RESIZE
84 help 84 help
85 Prints the newly set size (number of columns and rows) of 85 Prints the newly set size (number of columns and rows) of
@@ -89,27 +89,27 @@ config FEATURE_RESIZE_PRINT
89 89
90config SETCONSOLE 90config SETCONSOLE
91 bool "setconsole" 91 bool "setconsole"
92 default n 92 default y
93 help 93 help
94 This program redirects the system console to another device, 94 This program redirects the system console to another device,
95 like the current tty while logged in via telnet. 95 like the current tty while logged in via telnet.
96 96
97config FEATURE_SETCONSOLE_LONG_OPTIONS 97config FEATURE_SETCONSOLE_LONG_OPTIONS
98 bool "Enable long options" 98 bool "Enable long options"
99 default n 99 default y
100 depends on SETCONSOLE && LONG_OPTS 100 depends on SETCONSOLE && LONG_OPTS
101 help 101 help
102 Support long options for the setconsole applet. 102 Support long options for the setconsole applet.
103 103
104config SETFONT 104config SETFONT
105 bool "setfont" 105 bool "setfont"
106 default n 106 default y
107 help 107 help
108 Allows to load console screen map. Useful for i18n. 108 Allows to load console screen map. Useful for i18n.
109 109
110config FEATURE_SETFONT_TEXTUAL_MAP 110config FEATURE_SETFONT_TEXTUAL_MAP
111 bool "Support reading textual screen maps" 111 bool "Support reading textual screen maps"
112 default n 112 default y
113 depends on SETFONT 113 depends on SETFONT
114 help 114 help
115 Support reading textual screen maps. 115 Support reading textual screen maps.
@@ -124,20 +124,20 @@ config DEFAULT_SETFONT_DIR
124 124
125config SETKEYCODES 125config SETKEYCODES
126 bool "setkeycodes" 126 bool "setkeycodes"
127 default n 127 default y
128 help 128 help
129 This program loads entries into the kernel's scancode-to-keycode 129 This program loads entries into the kernel's scancode-to-keycode
130 map, allowing unusual keyboards to generate usable keycodes. 130 map, allowing unusual keyboards to generate usable keycodes.
131 131
132config SETLOGCONS 132config SETLOGCONS
133 bool "setlogcons" 133 bool "setlogcons"
134 default n 134 default y
135 help 135 help
136 This program redirects the output console of kernel messages. 136 This program redirects the output console of kernel messages.
137 137
138config SHOWKEY 138config SHOWKEY
139 bool "showkey" 139 bool "showkey"
140 default n 140 default y
141 help 141 help
142 Shows keys pressed. 142 Shows keys pressed.
143 143
@@ -146,14 +146,14 @@ comment "Common options for loadfont and setfont"
146 146
147config FEATURE_LOADFONT_PSF2 147config FEATURE_LOADFONT_PSF2
148 bool "Support for PSF2 console fonts" 148 bool "Support for PSF2 console fonts"
149 default n 149 default y
150 depends on LOADFONT || SETFONT 150 depends on LOADFONT || SETFONT
151 help 151 help
152 Support PSF2 console fonts. 152 Support PSF2 console fonts.
153 153
154config FEATURE_LOADFONT_RAW 154config FEATURE_LOADFONT_RAW
155 bool "Support for old (raw) console fonts" 155 bool "Support for old (raw) console fonts"
156 default n 156 default y
157 depends on LOADFONT || SETFONT 157 depends on LOADFONT || SETFONT
158 help 158 help
159 Support old (raw) console fonts. 159 Support old (raw) console fonts.
diff --git a/console-tools/Kbuild b/console-tools/Kbuild.src
index ad8b8ce77..ad8b8ce77 100644
--- a/console-tools/Kbuild
+++ b/console-tools/Kbuild.src
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c
index 061fc4792..a03b59340 100644
--- a/console-tools/dumpkmap.c
+++ b/console-tools/dumpkmap.c
@@ -24,12 +24,17 @@ struct kbentry {
24#define MAX_NR_KEYMAPS 256 24#define MAX_NR_KEYMAPS 256
25 25
26int dumpkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 26int dumpkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
27int dumpkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) 27int dumpkmap_main(int argc UNUSED_PARAM, char **argv)
28{ 28{
29 struct kbentry ke; 29 struct kbentry ke;
30 int i, j, fd; 30 int i, j, fd;
31 RESERVE_CONFIG_BUFFER(flags, MAX_NR_KEYMAPS); 31 RESERVE_CONFIG_BUFFER(flags, MAX_NR_KEYMAPS);
32 32
33 /* When user accidentally runs "dumpkmap FILE"
34 * instead of "dumpkmap >FILE", we'd dump binary stuff to tty.
35 * Let's prevent it: */
36 if (argv[1])
37 bb_show_usage();
33/* bb_warn_ignoring_args(argv[1]);*/ 38/* bb_warn_ignoring_args(argv[1]);*/
34 39
35 fd = get_console_fd_or_die(); 40 fd = get_console_fd_or_die();
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c
index 912291a7d..8f1a9153a 100644
--- a/console-tools/loadkmap.c
+++ b/console-tools/loadkmap.c
@@ -24,7 +24,7 @@ struct kbentry {
24#define MAX_NR_KEYMAPS 256 24#define MAX_NR_KEYMAPS 256
25 25
26int loadkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 26int loadkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
27int loadkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) 27int loadkmap_main(int argc UNUSED_PARAM, char **argv)
28{ 28{
29 struct kbentry ke; 29 struct kbentry ke;
30 int i, j, fd; 30 int i, j, fd;
@@ -32,6 +32,11 @@ int loadkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
32/* const char *tty_name = CURRENT_TTY; */ 32/* const char *tty_name = CURRENT_TTY; */
33 RESERVE_CONFIG_BUFFER(flags, MAX_NR_KEYMAPS); 33 RESERVE_CONFIG_BUFFER(flags, MAX_NR_KEYMAPS);
34 34
35 /* When user accidentally runs "loadkmap FILE"
36 * instead of "loadkmap <FILE", we end up waiting for input from tty.
37 * Let's prevent it: */
38 if (argv[1])
39 bb_show_usage();
35/* bb_warn_ignoring_args(argv[1]); */ 40/* bb_warn_ignoring_args(argv[1]); */
36 fd = get_console_fd_or_die(); 41 fd = get_console_fd_or_die();
37/* or maybe: 42/* or maybe:
diff --git a/coreutils/Config.in b/coreutils/Config.src
index ead632a31..d4c9e0541 100644
--- a/coreutils/Config.in
+++ b/coreutils/Config.src
@@ -5,89 +5,76 @@
5 5
6menu "Coreutils" 6menu "Coreutils"
7 7
8config BASENAME 8INSERT
9 bool "basename"
10 default n
11 help
12 basename is used to strip the directory and suffix from filenames,
13 leaving just the filename itself. Enable this option if you wish
14 to enable the 'basename' utility.
15 9
16config CAL 10config CAL
17 bool "cal" 11 bool "cal"
18 default n 12 default y
19 help 13 help
20 cal is used to display a monthly calender. 14 cal is used to display a monthly calender.
21 15
22config CAT
23 bool "cat"
24 default n
25 help
26 cat is used to concatenate files and print them to the standard
27 output. Enable this option if you wish to enable the 'cat' utility.
28
29config CATV 16config CATV
30 bool "catv" 17 bool "catv"
31 default n 18 default y
32 help 19 help
33 Display nonprinting characters as escape sequences (like some 20 Display nonprinting characters as escape sequences (like some
34 implementations' cat -v option). 21 implementations' cat -v option).
35 22
36config CHGRP 23config CHGRP
37 bool "chgrp" 24 bool "chgrp"
38 default n 25 default y
39 help 26 help
40 chgrp is used to change the group ownership of files. 27 chgrp is used to change the group ownership of files.
41 28
42config CHMOD 29config CHMOD
43 bool "chmod" 30 bool "chmod"
44 default n 31 default y
45 help 32 help
46 chmod is used to change the access permission of files. 33 chmod is used to change the access permission of files.
47 34
48config CHOWN 35config CHOWN
49 bool "chown" 36 bool "chown"
50 default n 37 default y
51 help 38 help
52 chown is used to change the user and/or group ownership 39 chown is used to change the user and/or group ownership
53 of files. 40 of files.
54 41
55config FEATURE_CHOWN_LONG_OPTIONS 42config FEATURE_CHOWN_LONG_OPTIONS
56 bool "Enable long options" 43 bool "Enable long options"
57 default n 44 default y
58 depends on CHOWN && LONG_OPTS 45 depends on CHOWN && LONG_OPTS
59 help 46 help
60 Enable use of long options 47 Enable use of long options
61 48
62config CHROOT 49config CHROOT
63 bool "chroot" 50 bool "chroot"
64 default n 51 default y
65 help 52 help
66 chroot is used to change the root directory and run a command. 53 chroot is used to change the root directory and run a command.
67 The default command is `/bin/sh'. 54 The default command is `/bin/sh'.
68 55
69config CKSUM 56config CKSUM
70 bool "cksum" 57 bool "cksum"
71 default n 58 default y
72 help 59 help
73 cksum is used to calculate the CRC32 checksum of a file. 60 cksum is used to calculate the CRC32 checksum of a file.
74 61
75config COMM 62config COMM
76 bool "comm" 63 bool "comm"
77 default n 64 default y
78 help 65 help
79 comm is used to compare two files line by line and return 66 comm is used to compare two files line by line and return
80 a three-column output. 67 a three-column output.
81 68
82config CP 69config CP
83 bool "cp" 70 bool "cp"
84 default n 71 default y
85 help 72 help
86 cp is used to copy files and directories. 73 cp is used to copy files and directories.
87 74
88config FEATURE_CP_LONG_OPTIONS 75config FEATURE_CP_LONG_OPTIONS
89 bool "Enable long options for cp" 76 bool "Enable long options for cp"
90 default n 77 default y
91 depends on CP && LONG_OPTS 78 depends on CP && LONG_OPTS
92 help 79 help
93 Enable long options for cp. 80 Enable long options for cp.
@@ -95,45 +82,14 @@ config FEATURE_CP_LONG_OPTIONS
95 82
96config CUT 83config CUT
97 bool "cut" 84 bool "cut"
98 default n 85 default y
99 help 86 help
100 cut is used to print selected parts of lines from 87 cut is used to print selected parts of lines from
101 each file to stdout. 88 each file to stdout.
102 89
103config DATE
104 bool "date"
105 default n
106 help
107 date is used to set the system date or display the
108 current time in the given format.
109
110config FEATURE_DATE_ISOFMT
111 bool "Enable ISO date format output (-I)"
112 default y
113 depends on DATE
114 help
115 Enable option (-I) to output an ISO-8601 compliant
116 date/time string.
117
118config FEATURE_DATE_COMPAT
119 bool "Support weird 'date MMDDhhmm[[YY]YY][.ss]' format"
120 default y
121 depends on DATE
122 help
123 System time can be set by 'date -s DATE' and simply 'date DATE',
124 but formats of DATE string are different. 'date DATE' accepts
125 a rather weird MMDDhhmm[[YY]YY][.ss] format with completely
126 unnatural placement of year between minutes and seconds.
127 date -s (and other commands like touch -d) use more sensible
128 formats (for one, ISO format YYYY-MM-DD hh:mm:ss.ssssss).
129
130 With this option off, 'date DATE' is 'date -s DATE' support
131 the same format. With it on, 'date DATE' additionally supports
132 MMDDhhmm[[YY]YY][.ss] format.
133
134config DD 90config DD
135 bool "dd" 91 bool "dd"
136 default n 92 default y
137 help 93 help
138 dd copies a file (from standard input to standard output, 94 dd copies a file (from standard input to standard output,
139 by default) using specific input and output blocksizes, 95 by default) using specific input and output blocksizes,
@@ -155,7 +111,7 @@ config FEATURE_DD_SIGNAL_HANDLING
155 111
156config FEATURE_DD_THIRD_STATUS_LINE 112config FEATURE_DD_THIRD_STATUS_LINE
157 bool "Enable the third status line upon signal" 113 bool "Enable the third status line upon signal"
158 default n 114 default y
159 depends on DD && FEATURE_DD_SIGNAL_HANDLING 115 depends on DD && FEATURE_DD_SIGNAL_HANDLING
160 help 116 help
161 Displays a coreutils-like third status line with transferred bytes, 117 Displays a coreutils-like third status line with transferred bytes,
@@ -163,7 +119,7 @@ config FEATURE_DD_THIRD_STATUS_LINE
163 119
164config FEATURE_DD_IBS_OBS 120config FEATURE_DD_IBS_OBS
165 bool "Enable ibs, obs and conv options" 121 bool "Enable ibs, obs and conv options"
166 default n 122 default y
167 depends on DD 123 depends on DD
168 help 124 help
169 Enables support for writing a certain number of bytes in and out, 125 Enables support for writing a certain number of bytes in and out,
@@ -171,14 +127,14 @@ config FEATURE_DD_IBS_OBS
171 127
172config DF 128config DF
173 bool "df" 129 bool "df"
174 default n 130 default y
175 help 131 help
176 df reports the amount of disk space used and available 132 df reports the amount of disk space used and available
177 on filesystems. 133 on filesystems.
178 134
179config FEATURE_DF_FANCY 135config FEATURE_DF_FANCY
180 bool "Enable -a, -i, -B" 136 bool "Enable -a, -i, -B"
181 default n 137 default y
182 depends on DF 138 depends on DF
183 help 139 help
184 This option enables -a, -i and -B. 140 This option enables -a, -i and -B.
@@ -189,14 +145,14 @@ config FEATURE_DF_FANCY
189 145
190config DIRNAME 146config DIRNAME
191 bool "dirname" 147 bool "dirname"
192 default n 148 default y
193 help 149 help
194 dirname is used to strip a non-directory suffix from 150 dirname is used to strip a non-directory suffix from
195 a file name. 151 a file name.
196 152
197config DOS2UNIX 153config DOS2UNIX
198 bool "dos2unix/unix2dos" 154 bool "dos2unix/unix2dos"
199 default n 155 default y
200 help 156 help
201 dos2unix is used to convert a text file from DOS format to 157 dos2unix is used to convert a text file from DOS format to
202 UNIX format, and vice versa. 158 UNIX format, and vice versa.
@@ -211,7 +167,7 @@ config UNIX2DOS
211 167
212config DU 168config DU
213 bool "du (default blocksize of 512 bytes)" 169 bool "du (default blocksize of 512 bytes)"
214 default n 170 default y
215 help 171 help
216 du is used to report the amount of disk space used 172 du is used to report the amount of disk space used
217 for specified files. 173 for specified files.
@@ -225,7 +181,7 @@ config FEATURE_DU_DEFAULT_BLOCKSIZE_1K
225 181
226config ECHO 182config ECHO
227 bool "echo (basic SuSv3 version taking no options)" 183 bool "echo (basic SuSv3 version taking no options)"
228 default n 184 default y
229 help 185 help
230 echo is used to print a specified string to stdout. 186 echo is used to print a specified string to stdout.
231 187
@@ -239,7 +195,7 @@ config FEATURE_FANCY_ECHO
239 195
240config ENV 196config ENV
241 bool "env" 197 bool "env"
242 default n 198 default y
243 help 199 help
244 env is used to set an environment variable and run 200 env is used to set an environment variable and run
245 a command; without options it displays the current 201 a command; without options it displays the current
@@ -247,34 +203,34 @@ config ENV
247 203
248config FEATURE_ENV_LONG_OPTIONS 204config FEATURE_ENV_LONG_OPTIONS
249 bool "Enable long options" 205 bool "Enable long options"
250 default n 206 default y
251 depends on ENV && LONG_OPTS 207 depends on ENV && LONG_OPTS
252 help 208 help
253 Support long options for the env applet. 209 Support long options for the env applet.
254 210
255config EXPAND 211config EXPAND
256 bool "expand" 212 bool "expand"
257 default n 213 default y
258 help 214 help
259 By default, convert all tabs to spaces. 215 By default, convert all tabs to spaces.
260 216
261config FEATURE_EXPAND_LONG_OPTIONS 217config FEATURE_EXPAND_LONG_OPTIONS
262 bool "Enable long options" 218 bool "Enable long options"
263 default n 219 default y
264 depends on EXPAND && LONG_OPTS 220 depends on EXPAND && LONG_OPTS
265 help 221 help
266 Support long options for the expand applet. 222 Support long options for the expand applet.
267 223
268config EXPR 224config EXPR
269 bool "expr" 225 bool "expr"
270 default n 226 default y
271 help 227 help
272 expr is used to calculate numbers and print the result 228 expr is used to calculate numbers and print the result
273 to standard output. 229 to standard output.
274 230
275config EXPR_MATH_SUPPORT_64 231config EXPR_MATH_SUPPORT_64
276 bool "Extend Posix numbers support to 64 bit" 232 bool "Extend Posix numbers support to 64 bit"
277 default n 233 default y
278 depends on EXPR 234 depends on EXPR
279 help 235 help
280 Enable 64-bit math support in the expr applet. This will make 236 Enable 64-bit math support in the expr applet. This will make
@@ -283,83 +239,83 @@ config EXPR_MATH_SUPPORT_64
283 239
284config FALSE 240config FALSE
285 bool "false" 241 bool "false"
286 default n 242 default y
287 help 243 help
288 false returns an exit code of FALSE (1). 244 false returns an exit code of FALSE (1).
289 245
290config FOLD 246config FOLD
291 bool "fold" 247 bool "fold"
292 default n 248 default y
293 help 249 help
294 Wrap text to fit a specific width. 250 Wrap text to fit a specific width.
295 251
296config FSYNC 252config FSYNC
297 bool "fsync" 253 bool "fsync"
298 default n 254 default y
299 help 255 help
300 fsync is used to flush file-related cached blocks to disk. 256 fsync is used to flush file-related cached blocks to disk.
301 257
302config HEAD 258config HEAD
303 bool "head" 259 bool "head"
304 default n 260 default y
305 help 261 help
306 head is used to print the first specified number of lines 262 head is used to print the first specified number of lines
307 from files. 263 from files.
308 264
309config FEATURE_FANCY_HEAD 265config FEATURE_FANCY_HEAD
310 bool "Enable head options (-c, -q, and -v)" 266 bool "Enable head options (-c, -q, and -v)"
311 default n 267 default y
312 depends on HEAD 268 depends on HEAD
313 help 269 help
314 This enables the head options (-c, -q, and -v). 270 This enables the head options (-c, -q, and -v).
315 271
316config HOSTID 272config HOSTID
317 bool "hostid" 273 bool "hostid"
318 default n 274 default y
319 help 275 help
320 hostid prints the numeric identifier (in hexadecimal) for 276 hostid prints the numeric identifier (in hexadecimal) for
321 the current host. 277 the current host.
322 278
323config ID 279config ID
324 bool "id" 280 bool "id"
325 default n 281 default y
326 help 282 help
327 id displays the current user and group ID names. 283 id displays the current user and group ID names.
328 284
329config INSTALL 285config INSTALL
330 bool "install" 286 bool "install"
331 default n 287 default y
332 help 288 help
333 Copy files and set attributes. 289 Copy files and set attributes.
334 290
335config FEATURE_INSTALL_LONG_OPTIONS 291config FEATURE_INSTALL_LONG_OPTIONS
336 bool "Enable long options" 292 bool "Enable long options"
337 default n 293 default y
338 depends on INSTALL && LONG_OPTS 294 depends on INSTALL && LONG_OPTS
339 help 295 help
340 Support long options for the install applet. 296 Support long options for the install applet.
341 297
342config LENGTH 298config LENGTH
343 bool "length" 299 bool "length"
344 default n 300 default y
345 help 301 help
346 length is used to print out the length of a specified string. 302 length is used to print out the length of a specified string.
347 303
348config LN 304config LN
349 bool "ln" 305 bool "ln"
350 default n 306 default y
351 help 307 help
352 ln is used to create hard or soft links between files. 308 ln is used to create hard or soft links between files.
353 309
354config LOGNAME 310config LOGNAME
355 bool "logname" 311 bool "logname"
356 default n 312 default y
357 help 313 help
358 logname is used to print the current user's login name. 314 logname is used to print the current user's login name.
359 315
360config LS 316config LS
361 bool "ls" 317 bool "ls"
362 default n 318 default y
363 help 319 help
364 ls is used to list the contents of directories. 320 ls is used to list the contents of directories.
365 321
@@ -414,7 +370,7 @@ config FEATURE_LS_COLOR
414 370
415config FEATURE_LS_COLOR_IS_DEFAULT 371config FEATURE_LS_COLOR_IS_DEFAULT
416 bool "Produce colored ls output by default" 372 bool "Produce colored ls output by default"
417 default n 373 default y
418 depends on FEATURE_LS_COLOR 374 depends on FEATURE_LS_COLOR
419 help 375 help
420 Saying yes here will turn coloring on by default, 376 Saying yes here will turn coloring on by default,
@@ -425,123 +381,123 @@ config FEATURE_LS_COLOR_IS_DEFAULT
425 381
426config MD5SUM 382config MD5SUM
427 bool "md5sum" 383 bool "md5sum"
428 default n 384 default y
429 help 385 help
430 md5sum is used to print or check MD5 checksums. 386 md5sum is used to print or check MD5 checksums.
431 387
432config MKDIR 388config MKDIR
433 bool "mkdir" 389 bool "mkdir"
434 default n 390 default y
435 help 391 help
436 mkdir is used to create directories with the specified names. 392 mkdir is used to create directories with the specified names.
437 393
438config FEATURE_MKDIR_LONG_OPTIONS 394config FEATURE_MKDIR_LONG_OPTIONS
439 bool "Enable long options" 395 bool "Enable long options"
440 default n 396 default y
441 depends on MKDIR && LONG_OPTS 397 depends on MKDIR && LONG_OPTS
442 help 398 help
443 Support long options for the mkdir applet. 399 Support long options for the mkdir applet.
444 400
445config MKFIFO 401config MKFIFO
446 bool "mkfifo" 402 bool "mkfifo"
447 default n 403 default y
448 help 404 help
449 mkfifo is used to create FIFOs (named pipes). 405 mkfifo is used to create FIFOs (named pipes).
450 The `mknod' program can also create FIFOs. 406 The `mknod' program can also create FIFOs.
451 407
452config MKNOD 408config MKNOD
453 bool "mknod" 409 bool "mknod"
454 default n 410 default y
455 help 411 help
456 mknod is used to create FIFOs or block/character special 412 mknod is used to create FIFOs or block/character special
457 files with the specified names. 413 files with the specified names.
458 414
459config MV 415config MV
460 bool "mv" 416 bool "mv"
461 default n 417 default y
462 help 418 help
463 mv is used to move or rename files or directories. 419 mv is used to move or rename files or directories.
464 420
465config FEATURE_MV_LONG_OPTIONS 421config FEATURE_MV_LONG_OPTIONS
466 bool "Enable long options" 422 bool "Enable long options"
467 default n 423 default y
468 depends on MV && LONG_OPTS 424 depends on MV && LONG_OPTS
469 help 425 help
470 Support long options for the mv applet. 426 Support long options for the mv applet.
471 427
472config NICE 428config NICE
473 bool "nice" 429 bool "nice"
474 default n 430 default y
475 help 431 help
476 nice runs a program with modified scheduling priority. 432 nice runs a program with modified scheduling priority.
477 433
478config NOHUP 434config NOHUP
479 bool "nohup" 435 bool "nohup"
480 default n 436 default y
481 help 437 help
482 run a command immune to hangups, with output to a non-tty. 438 run a command immune to hangups, with output to a non-tty.
483 439
484config OD 440config OD
485 bool "od" 441 bool "od"
486 default n 442 default y
487 help 443 help
488 od is used to dump binary files in octal and other formats. 444 od is used to dump binary files in octal and other formats.
489 445
490config PRINTENV 446config PRINTENV
491 bool "printenv" 447 bool "printenv"
492 default n 448 default y
493 help 449 help
494 printenv is used to print all or part of environment. 450 printenv is used to print all or part of environment.
495 451
496config PRINTF 452config PRINTF
497 bool "printf" 453 bool "printf"
498 default n 454 default y
499 help 455 help
500 printf is used to format and print specified strings. 456 printf is used to format and print specified strings.
501 It's similar to `echo' except it has more options. 457 It's similar to `echo' except it has more options.
502 458
503config PWD 459config PWD
504 bool "pwd" 460 bool "pwd"
505 default n 461 default y
506 help 462 help
507 pwd is used to print the current directory. 463 pwd is used to print the current directory.
508 464
509config READLINK 465config READLINK
510 bool "readlink" 466 bool "readlink"
511 default n 467 default y
512 help 468 help
513 This program reads a symbolic link and returns the name 469 This program reads a symbolic link and returns the name
514 of the file it points to 470 of the file it points to
515 471
516config FEATURE_READLINK_FOLLOW 472config FEATURE_READLINK_FOLLOW
517 bool "Enable canonicalization by following all symlinks (-f)" 473 bool "Enable canonicalization by following all symlinks (-f)"
518 default n 474 default y
519 depends on READLINK 475 depends on READLINK
520 help 476 help
521 Enable the readlink option (-f). 477 Enable the readlink option (-f).
522 478
523config REALPATH 479config REALPATH
524 bool "realpath" 480 bool "realpath"
525 default n 481 default y
526 help 482 help
527 Return the canonicalized absolute pathname. 483 Return the canonicalized absolute pathname.
528 This isn't provided by GNU shellutils, but where else does it belong. 484 This isn't provided by GNU shellutils, but where else does it belong.
529 485
530config RM 486config RM
531 bool "rm" 487 bool "rm"
532 default n 488 default y
533 help 489 help
534 rm is used to remove files or directories. 490 rm is used to remove files or directories.
535 491
536config RMDIR 492config RMDIR
537 bool "rmdir" 493 bool "rmdir"
538 default n 494 default y
539 help 495 help
540 rmdir is used to remove empty directories. 496 rmdir is used to remove empty directories.
541 497
542config FEATURE_RMDIR_LONG_OPTIONS 498config FEATURE_RMDIR_LONG_OPTIONS
543 bool "Enable long options" 499 bool "Enable long options"
544 default n 500 default y
545 depends on RMDIR && LONG_OPTS 501 depends on RMDIR && LONG_OPTS
546 help 502 help
547 Support long options for the rmdir applet, including 503 Support long options for the rmdir applet, including
@@ -549,31 +505,31 @@ config FEATURE_RMDIR_LONG_OPTIONS
549 505
550config SEQ 506config SEQ
551 bool "seq" 507 bool "seq"
552 default n 508 default y
553 help 509 help
554 print a sequence of numbers 510 print a sequence of numbers
555 511
556config SHA1SUM 512config SHA1SUM
557 bool "sha1sum" 513 bool "sha1sum"
558 default n 514 default y
559 help 515 help
560 Compute and check SHA1 message digest 516 Compute and check SHA1 message digest
561 517
562config SHA256SUM 518config SHA256SUM
563 bool "sha256sum" 519 bool "sha256sum"
564 default n 520 default y
565 help 521 help
566 Compute and check SHA256 message digest 522 Compute and check SHA256 message digest
567 523
568config SHA512SUM 524config SHA512SUM
569 bool "sha512sum" 525 bool "sha512sum"
570 default n 526 default y
571 help 527 help
572 Compute and check SHA512 message digest 528 Compute and check SHA512 message digest
573 529
574config SLEEP 530config SLEEP
575 bool "sleep" 531 bool "sleep"
576 default n 532 default y
577 help 533 help
578 sleep is used to pause for a specified number of seconds. 534 sleep is used to pause for a specified number of seconds.
579 It comes in 3 versions: 535 It comes in 3 versions:
@@ -587,21 +543,21 @@ config SLEEP
587 543
588config FEATURE_FANCY_SLEEP 544config FEATURE_FANCY_SLEEP
589 bool "Enable multiple arguments and s/m/h/d suffixes" 545 bool "Enable multiple arguments and s/m/h/d suffixes"
590 default n 546 default y
591 depends on SLEEP 547 depends on SLEEP
592 help 548 help
593 Allow sleep to pause for specified minutes, hours, and days. 549 Allow sleep to pause for specified minutes, hours, and days.
594 550
595config FEATURE_FLOAT_SLEEP 551config FEATURE_FLOAT_SLEEP
596 bool "Enable fractional arguments" 552 bool "Enable fractional arguments"
597 default n 553 default y
598 depends on FEATURE_FANCY_SLEEP 554 depends on FEATURE_FANCY_SLEEP
599 help 555 help
600 Allow for fractional numeric parameters. 556 Allow for fractional numeric parameters.
601 557
602config SORT 558config SORT
603 bool "sort" 559 bool "sort"
604 default n 560 default y
605 help 561 help
606 sort is used to sort lines of text in specified files. 562 sort is used to sort lines of text in specified files.
607 563
@@ -619,13 +575,13 @@ config FEATURE_SORT_BIG
619 575
620config SPLIT 576config SPLIT
621 bool "split" 577 bool "split"
622 default n 578 default y
623 help 579 help
624 split a file into pieces. 580 split a file into pieces.
625 581
626config FEATURE_SPLIT_FANCY 582config FEATURE_SPLIT_FANCY
627 bool "Fancy extensions" 583 bool "Fancy extensions"
628 default n 584 default y
629 depends on SPLIT 585 depends on SPLIT
630 help 586 help
631 Add support for features not required by SUSv3. 587 Add support for features not required by SUSv3.
@@ -634,13 +590,13 @@ config FEATURE_SPLIT_FANCY
634 590
635config STAT 591config STAT
636 bool "stat" 592 bool "stat"
637 default n 593 default y
638 help 594 help
639 display file or filesystem status. 595 display file or filesystem status.
640 596
641config FEATURE_STAT_FORMAT 597config FEATURE_STAT_FORMAT
642 bool "Enable custom formats (-c)" 598 bool "Enable custom formats (-c)"
643 default n 599 default y
644 depends on STAT 600 depends on STAT
645 help 601 help
646 Without this, stat will not support the '-c format' option where 602 Without this, stat will not support the '-c format' option where
@@ -649,31 +605,31 @@ config FEATURE_STAT_FORMAT
649 605
650config STTY 606config STTY
651 bool "stty" 607 bool "stty"
652 default n 608 default y
653 help 609 help
654 stty is used to change and print terminal line settings. 610 stty is used to change and print terminal line settings.
655 611
656config SUM 612config SUM
657 bool "sum" 613 bool "sum"
658 default n 614 default y
659 help 615 help
660 checksum and count the blocks in a file 616 checksum and count the blocks in a file
661 617
662config SYNC 618config SYNC
663 bool "sync" 619 bool "sync"
664 default n 620 default y
665 help 621 help
666 sync is used to flush filesystem buffers. 622 sync is used to flush filesystem buffers.
667 623
668config TAC 624config TAC
669 bool "tac" 625 bool "tac"
670 default n 626 default y
671 help 627 help
672 tac is used to concatenate and print files in reverse. 628 tac is used to concatenate and print files in reverse.
673 629
674config TAIL 630config TAIL
675 bool "tail" 631 bool "tail"
676 default n 632 default y
677 help 633 help
678 tail is used to print the last specified number of lines 634 tail is used to print the last specified number of lines
679 from files. 635 from files.
@@ -692,153 +648,112 @@ config FEATURE_FANCY_TAIL
692 648
693config TEE 649config TEE
694 bool "tee" 650 bool "tee"
695 default n 651 default y
696 help 652 help
697 tee is used to read from standard input and write 653 tee is used to read from standard input and write
698 to standard output and files. 654 to standard output and files.
699 655
700config FEATURE_TEE_USE_BLOCK_IO 656config FEATURE_TEE_USE_BLOCK_IO
701 bool "Enable block I/O (larger/faster) instead of byte I/O" 657 bool "Enable block I/O (larger/faster) instead of byte I/O"
702 default n 658 default y
703 depends on TEE 659 depends on TEE
704 help 660 help
705 Enable this option for a faster tee, at expense of size. 661 Enable this option for a faster tee, at expense of size.
706 662
707config TEST
708 bool "test"
709 default n
710 help
711 test is used to check file types and compare values,
712 returning an appropriate exit code. The bash shell
713 has test built in, ash can build it in optionally.
714
715config FEATURE_TEST_64
716 bool "Extend test to 64 bit"
717 default n
718 depends on TEST || ASH_BUILTIN_TEST || HUSH
719 help
720 Enable 64-bit support in test.
721
722config TOUCH 663config TOUCH
723 bool "touch" 664 bool "touch"
724 default n 665 default y
725 help 666 help
726 touch is used to create or change the access and/or 667 touch is used to create or change the access and/or
727 modification timestamp of specified files. 668 modification timestamp of specified files.
728 669
729config TR
730 bool "tr"
731 default n
732 help
733 tr is used to squeeze, and/or delete characters from standard
734 input, writing to standard output.
735
736config FEATURE_TR_CLASSES
737 bool "Enable character classes (such as [:upper:])"
738 default n
739 depends on TR
740 help
741 Enable character classes, enabling commands such as:
742 tr [:upper:] [:lower:] to convert input into lowercase.
743
744config FEATURE_TR_EQUIV
745 bool "Enable equivalence classes"
746 default n
747 depends on TR
748 help
749 Enable equivalence classes, which essentially add the enclosed
750 character to the current set. For instance, tr [=a=] xyz would
751 replace all instances of 'a' with 'xyz'. This option is mainly
752 useful for cases when no other way of expressing a character
753 is possible.
754
755config TRUE 670config TRUE
756 bool "true" 671 bool "true"
757 default n 672 default y
758 help 673 help
759 true returns an exit code of TRUE (0). 674 true returns an exit code of TRUE (0).
760 675
761config TTY 676config TTY
762 bool "tty" 677 bool "tty"
763 default n 678 default y
764 help 679 help
765 tty is used to print the name of the current terminal to 680 tty is used to print the name of the current terminal to
766 standard output. 681 standard output.
767 682
768config UNAME 683config UNAME
769 bool "uname" 684 bool "uname"
770 default n 685 default y
771 help 686 help
772 uname is used to print system information. 687 uname is used to print system information.
773 688
774config UNEXPAND 689config UNEXPAND
775 bool "unexpand" 690 bool "unexpand"
776 default n 691 default y
777 help 692 help
778 By default, convert only leading sequences of blanks to tabs. 693 By default, convert only leading sequences of blanks to tabs.
779 694
780config FEATURE_UNEXPAND_LONG_OPTIONS 695config FEATURE_UNEXPAND_LONG_OPTIONS
781 bool "Enable long options" 696 bool "Enable long options"
782 default n 697 default y
783 depends on UNEXPAND && LONG_OPTS 698 depends on UNEXPAND && LONG_OPTS
784 help 699 help
785 Support long options for the unexpand applet. 700 Support long options for the unexpand applet.
786 701
787config UNIQ 702config UNIQ
788 bool "uniq" 703 bool "uniq"
789 default n 704 default y
790 help 705 help
791 uniq is used to remove duplicate lines from a sorted file. 706 uniq is used to remove duplicate lines from a sorted file.
792 707
793config USLEEP 708config USLEEP
794 bool "usleep" 709 bool "usleep"
795 default n 710 default y
796 help 711 help
797 usleep is used to pause for a specified number of microseconds. 712 usleep is used to pause for a specified number of microseconds.
798 713
799config UUDECODE 714config UUDECODE
800 bool "uudecode" 715 bool "uudecode"
801 default n 716 default y
802 help 717 help
803 uudecode is used to decode a uuencoded file. 718 uudecode is used to decode a uuencoded file.
804 719
805config UUENCODE 720config UUENCODE
806 bool "uuencode" 721 bool "uuencode"
807 default n 722 default y
808 help 723 help
809 uuencode is used to uuencode a file. 724 uuencode is used to uuencode a file.
810 725
811config WC 726config WC
812 bool "wc" 727 bool "wc"
813 default n 728 default y
814 help 729 help
815 wc is used to print the number of bytes, words, and lines, 730 wc is used to print the number of bytes, words, and lines,
816 in specified files. 731 in specified files.
817 732
818config FEATURE_WC_LARGE 733config FEATURE_WC_LARGE
819 bool "Support very large files in wc" 734 bool "Support very large files in wc"
820 default n 735 default y
821 depends on WC 736 depends on WC
822 help 737 help
823 Use "unsigned long long" in wc for counter variables. 738 Use "unsigned long long" in wc for counter variables.
824 739
825config WHO 740config WHO
826 bool "who" 741 bool "who"
827 default n 742 default y
828 depends on FEATURE_UTMP 743 depends on FEATURE_UTMP
829 help 744 help
830 who is used to show who is logged on. 745 who is used to show who is logged on.
831 746
832config WHOAMI 747config WHOAMI
833 bool "whoami" 748 bool "whoami"
834 default n 749 default y
835 help 750 help
836 whoami is used to print the username of the current 751 whoami is used to print the username of the current
837 user id (same as id -un). 752 user id (same as id -un).
838 753
839config YES 754config YES
840 bool "yes" 755 bool "yes"
841 default n 756 default y
842 help 757 help
843 yes is used to repeatedly output a specific string, or 758 yes is used to repeatedly output a specific string, or
844 the default string `y'. 759 the default string `y'.
@@ -848,7 +763,7 @@ comment "Common options for cp and mv"
848 763
849config FEATURE_PRESERVE_HARDLINKS 764config FEATURE_PRESERVE_HARDLINKS
850 bool "Preserve hard links" 765 bool "Preserve hard links"
851 default n 766 default y
852 depends on CP || MV 767 depends on CP || MV
853 help 768 help
854 Allow cp and mv to preserve hard links. 769 Allow cp and mv to preserve hard links.
@@ -872,7 +787,7 @@ comment "Common options for df, du, ls"
872 787
873config FEATURE_HUMAN_READABLE 788config FEATURE_HUMAN_READABLE
874 bool "Support for human readable output (example 13k, 23M, 235G)" 789 bool "Support for human readable output (example 13k, 23M, 235G)"
875 default n 790 default y
876 depends on DF || DU || LS 791 depends on DF || DU || LS
877 help 792 help
878 Allow df, du, and ls to have human readable output. 793 Allow df, du, and ls to have human readable output.
@@ -882,7 +797,7 @@ comment "Common options for md5sum, sha1sum, sha256sum, sha512sum"
882 797
883config FEATURE_MD5_SHA1_SUM_CHECK 798config FEATURE_MD5_SHA1_SUM_CHECK
884 bool "Enable -c, -s and -w options" 799 bool "Enable -c, -s and -w options"
885 default n 800 default y
886 depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM 801 depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM
887 help 802 help
888 Enabling the -c options allows files to be checked 803 Enabling the -c options allows files to be checked
diff --git a/coreutils/Kbuild b/coreutils/Kbuild.src
index ee22a3f7b..57ea7d6c4 100644
--- a/coreutils/Kbuild
+++ b/coreutils/Kbuild.src
@@ -7,12 +7,8 @@
7libs-y += libcoreutils/ 7libs-y += libcoreutils/
8 8
9lib-y:= 9lib-y:=
10lib-$(CONFIG_BASENAME) += basename.o 10INSERT
11lib-$(CONFIG_CAL) += cal.o 11lib-$(CONFIG_CAL) += cal.o
12lib-$(CONFIG_CAT) += cat.o
13lib-$(CONFIG_MORE) += cat.o # more uses it if stdout isn't a tty
14lib-$(CONFIG_LESS) += cat.o # less too
15lib-$(CONFIG_CRONTAB) += cat.o # crontab -l
16lib-$(CONFIG_CATV) += catv.o 12lib-$(CONFIG_CATV) += catv.o
17lib-$(CONFIG_CHGRP) += chgrp.o chown.o 13lib-$(CONFIG_CHGRP) += chgrp.o chown.o
18lib-$(CONFIG_CHMOD) += chmod.o 14lib-$(CONFIG_CHMOD) += chmod.o
@@ -24,7 +20,6 @@ lib-$(CONFIG_CKSUM) += cksum.o
24lib-$(CONFIG_COMM) += comm.o 20lib-$(CONFIG_COMM) += comm.o
25lib-$(CONFIG_CP) += cp.o 21lib-$(CONFIG_CP) += cp.o
26lib-$(CONFIG_CUT) += cut.o 22lib-$(CONFIG_CUT) += cut.o
27lib-$(CONFIG_DATE) += date.o
28lib-$(CONFIG_DD) += dd.o 23lib-$(CONFIG_DD) += dd.o
29lib-$(CONFIG_DF) += df.o 24lib-$(CONFIG_DF) += df.o
30lib-$(CONFIG_DIRNAME) += dirname.o 25lib-$(CONFIG_DIRNAME) += dirname.o
@@ -78,12 +73,7 @@ lib-$(CONFIG_SYNC) += sync.o
78lib-$(CONFIG_TAC) += tac.o 73lib-$(CONFIG_TAC) += tac.o
79lib-$(CONFIG_TAIL) += tail.o 74lib-$(CONFIG_TAIL) += tail.o
80lib-$(CONFIG_TEE) += tee.o 75lib-$(CONFIG_TEE) += tee.o
81lib-$(CONFIG_TEST) += test.o test_ptr_hack.o
82lib-$(CONFIG_ASH) += test.o test_ptr_hack.o # used by ash
83lib-$(CONFIG_HUSH) += test.o test_ptr_hack.o # used by hush
84lib-$(CONFIG_MSH) += test.o test_ptr_hack.o # used by msh
85lib-$(CONFIG_TOUCH) += touch.o 76lib-$(CONFIG_TOUCH) += touch.o
86lib-$(CONFIG_TR) += tr.o
87lib-$(CONFIG_TRUE) += true.o 77lib-$(CONFIG_TRUE) += true.o
88lib-$(CONFIG_TTY) += tty.o 78lib-$(CONFIG_TTY) += tty.o
89lib-$(CONFIG_UNAME) += uname.o 79lib-$(CONFIG_UNAME) += uname.o
diff --git a/coreutils/basename.c b/coreutils/basename.c
index 8a5597e65..d1ad91ba1 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -20,6 +20,16 @@
20 * 3) Save some space by using strcmp(). Calling strncmp() here was silly. 20 * 3) Save some space by using strcmp(). Calling strncmp() here was silly.
21 */ 21 */
22 22
23//kbuild:lib-$(CONFIG_BASENAME) += basename.o
24
25//config:config BASENAME
26//config: bool "basename"
27//config: default y
28//config: help
29//config: basename is used to strip the directory and suffix from filenames,
30//config: leaving just the filename itself. Enable this option if you wish
31//config: to enable the 'basename' utility.
32
23#include "libbb.h" 33#include "libbb.h"
24 34
25/* This is a NOFORK applet. Be very careful! */ 35/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 0024eb8d5..ab682588f 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -10,6 +10,18 @@
10/* BB_AUDIT SUSv3 compliant */ 10/* BB_AUDIT SUSv3 compliant */
11/* http://www.opengroup.org/onlinepubs/007904975/utilities/cat.html */ 11/* http://www.opengroup.org/onlinepubs/007904975/utilities/cat.html */
12 12
13//kbuild:lib-$(CONFIG_CAT) += cat.o
14//kbuild:lib-$(CONFIG_MORE) += cat.o # more uses it if stdout isn't a tty
15//kbuild:lib-$(CONFIG_LESS) += cat.o # less too
16//kbuild:lib-$(CONFIG_CRONTAB) += cat.o # crontab -l
17
18//config:config CAT
19//config: bool "cat"
20//config: default y
21//config: help
22//config: cat is used to concatenate files and print them to the standard
23//config: output. Enable this option if you wish to enable the 'cat' utility.
24
13#include "libbb.h" 25#include "libbb.h"
14 26
15/* This is a NOFORK applet. Be very careful! */ 27/* This is a NOFORK applet. Be very careful! */
diff --git a/coreutils/date.c b/coreutils/date.c
index 4e5b3b0b8..3d78a5336 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -51,6 +51,47 @@
51 * and does not support -Ins 51 * and does not support -Ins
52 * -D FMT is a bbox extension for _input_ conversion of -d DATE 52 * -D FMT is a bbox extension for _input_ conversion of -d DATE
53 */ 53 */
54
55//kbuild:lib-$(CONFIG_DATE) += date.o
56
57//config:config DATE
58//config: bool "date"
59//config: default y
60//config: help
61//config: date is used to set the system date or display the
62//config: current time in the given format.
63//config:
64//config:config FEATURE_DATE_ISOFMT
65//config: bool "Enable ISO date format output (-I)"
66//config: default y
67//config: depends on DATE
68//config: help
69//config: Enable option (-I) to output an ISO-8601 compliant
70//config: date/time string.
71//config:
72//config:config FEATURE_DATE_NANO
73//config: bool "Support %[num]N nanosecond format specifier"
74//config: default n
75//config: depends on DATE
76//config: help
77//config: Support %[num]N format specifier. Adds ~250 bytes of code.
78//config:
79//config:config FEATURE_DATE_COMPAT
80//config: bool "Support weird 'date MMDDhhmm[[YY]YY][.ss]' format"
81//config: default y
82//config: depends on DATE
83//config: help
84//config: System time can be set by 'date -s DATE' and simply 'date DATE',
85//config: but formats of DATE string are different. 'date DATE' accepts
86//config: a rather weird MMDDhhmm[[YY]YY][.ss] format with completely
87//config: unnatural placement of year between minutes and seconds.
88//config: date -s (and other commands like touch -d) use more sensible
89//config: formats (for one, ISO format YYYY-MM-DD hh:mm:ss.ssssss).
90//config:
91//config: With this option off, 'date DATE' is 'date -s DATE' support
92//config: the same format. With it on, 'date DATE' additionally supports
93//config: MMDDhhmm[[YY]YY][.ss] format.
94
54#include "libbb.h" 95#include "libbb.h"
55 96
56enum { 97enum {
@@ -84,9 +125,9 @@ static const char date_longopts[] ALIGN1 =
84int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 125int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
85int date_main(int argc UNUSED_PARAM, char **argv) 126int date_main(int argc UNUSED_PARAM, char **argv)
86{ 127{
128 struct timespec ts;
87 struct tm tm_time; 129 struct tm tm_time;
88 char buf_fmt_dt2str[64]; 130 char buf_fmt_dt2str[64];
89 time_t tm;
90 unsigned opt; 131 unsigned opt;
91 int ifmt = -1; 132 int ifmt = -1;
92 char *date_str; 133 char *date_str;
@@ -161,11 +202,22 @@ int date_main(int argc UNUSED_PARAM, char **argv)
161 if (opt & OPT_REFERENCE) { 202 if (opt & OPT_REFERENCE) {
162 struct stat statbuf; 203 struct stat statbuf;
163 xstat(filename, &statbuf); 204 xstat(filename, &statbuf);
164 tm = statbuf.st_mtime; 205 ts.tv_sec = statbuf.st_mtime;
206#if ENABLE_FEATURE_DATE_NANO
207# if defined __GLIBC__ && !defined __UCLIBC__
208 ts.tv_nsec = statbuf.st_mtim.tv_nsec;
209# else
210 ts.tv_nsec = statbuf.st_mtimensec;
211# endif
212#endif
165 } else { 213 } else {
166 time(&tm); 214#if ENABLE_FEATURE_DATE_NANO
215 clock_gettime(CLOCK_REALTIME, &ts);
216#else
217 time(&ts.tv_nsec);
218#endif
167 } 219 }
168 localtime_r(&tm, &tm_time); 220 localtime_r(&ts.tv_sec, &tm_time);
169 221
170 /* If date string is given, update tm_time, and maybe set date */ 222 /* If date string is given, update tm_time, and maybe set date */
171 if (date_str != NULL) { 223 if (date_str != NULL) {
@@ -184,12 +236,12 @@ int date_main(int argc UNUSED_PARAM, char **argv)
184 236
185 /* Correct any day of week and day of year etc. fields */ 237 /* Correct any day of week and day of year etc. fields */
186 tm_time.tm_isdst = -1; /* Be sure to recheck dst */ 238 tm_time.tm_isdst = -1; /* Be sure to recheck dst */
187 tm = validate_tm_time(date_str, &tm_time); 239 ts.tv_sec = validate_tm_time(date_str, &tm_time);
188 240
189 maybe_set_utc(opt); 241 maybe_set_utc(opt);
190 242
191 /* if setting time, set it */ 243 /* if setting time, set it */
192 if ((opt & OPT_SET) && stime(&tm) < 0) { 244 if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) {
193 bb_perror_msg("can't set date"); 245 bb_perror_msg("can't set date");
194 } 246 }
195 } 247 }
@@ -222,6 +274,46 @@ int date_main(int argc UNUSED_PARAM, char **argv)
222 fmt_dt2str = (char*)"%a %b %e %H:%M:%S %Z %Y"; 274 fmt_dt2str = (char*)"%a %b %e %H:%M:%S %Z %Y";
223 } 275 }
224 } 276 }
277#if ENABLE_FEATURE_DATE_NANO
278 else {
279 /* User-specified fmt_dt2str */
280 /* Search for and process "%N" */
281 char *p = fmt_dt2str;
282 while ((p = strchr(p, '%')) != NULL) {
283 int n, m;
284 unsigned pres, scale;
285
286 p++;
287 if (*p == '%') {
288 p++;
289 continue;
290 }
291 n = strspn(p, "0123456789");
292 if (p[n] != 'N') {
293 p += n;
294 continue;
295 }
296 /* We have "%[nnn]N" */
297 p[-1] = '\0';
298 p[n] = '\0';
299 scale = 1;
300 pres = 9;
301 if (n) {
302 pres = xatoi_u(p);
303 if (pres == 0)
304 pres = 9;
305 m = 9 - pres;
306 while (--m >= 0)
307 scale *= 10;
308 }
309
310 m = p - fmt_dt2str;
311 p += n + 1;
312 fmt_dt2str = xasprintf("%s%0*u%s", fmt_dt2str, pres, (unsigned)ts.tv_nsec / scale, p);
313 p = fmt_dt2str + m;
314 }
315 }
316#endif
225 317
226#define date_buf bb_common_bufsiz1 318#define date_buf bb_common_bufsiz1
227 if (*fmt_dt2str == '\0') { 319 if (*fmt_dt2str == '\0') {
diff --git a/coreutils/libcoreutils/Kbuild b/coreutils/libcoreutils/Kbuild.src
index 755d01f86..755d01f86 100644
--- a/coreutils/libcoreutils/Kbuild
+++ b/coreutils/libcoreutils/Kbuild.src
diff --git a/coreutils/test.c b/coreutils/test.c
index 0b9322316..fb5778760 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -19,6 +19,26 @@
19 * Original copyright notice states: 19 * Original copyright notice states:
20 * "This program is in the Public Domain." 20 * "This program is in the Public Domain."
21 */ 21 */
22
23//kbuild:lib-$(CONFIG_TEST) += test.o test_ptr_hack.o
24//kbuild:lib-$(CONFIG_ASH) += test.o test_ptr_hack.o
25//kbuild:lib-$(CONFIG_HUSH) += test.o test_ptr_hack.o
26
27//config:config TEST
28//config: bool "test"
29//config: default y
30//config: help
31//config: test is used to check file types and compare values,
32//config: returning an appropriate exit code. The bash shell
33//config: has test built in, ash can build it in optionally.
34//config:
35//config:config FEATURE_TEST_64
36//config: bool "Extend test to 64 bit"
37//config: default y
38//config: depends on TEST || ASH_BUILTIN_TEST || HUSH
39//config: help
40//config: Enable 64-bit support in test.
41
22#include "libbb.h" 42#include "libbb.h"
23#include <setjmp.h> 43#include <setjmp.h>
24 44
diff --git a/coreutils/tr.c b/coreutils/tr.c
index 6d4cb4a14..f3db3793f 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -18,6 +18,35 @@
18/* http://www.opengroup.org/onlinepubs/009695399/utilities/tr.html 18/* http://www.opengroup.org/onlinepubs/009695399/utilities/tr.html
19 * TODO: graph, print 19 * TODO: graph, print
20 */ 20 */
21
22//kbuild:lib-$(CONFIG_TR) += tr.o
23
24//config:config TR
25//config: bool "tr"
26//config: default y
27//config: help
28//config: tr is used to squeeze, and/or delete characters from standard
29//config: input, writing to standard output.
30//config:
31//config:config FEATURE_TR_CLASSES
32//config: bool "Enable character classes (such as [:upper:])"
33//config: default y
34//config: depends on TR
35//config: help
36//config: Enable character classes, enabling commands such as:
37//config: tr [:upper:] [:lower:] to convert input into lowercase.
38//config:
39//config:config FEATURE_TR_EQUIV
40//config: bool "Enable equivalence classes"
41//config: default y
42//config: depends on TR
43//config: help
44//config: Enable equivalence classes, which essentially add the enclosed
45//config: character to the current set. For instance, tr [=a=] xyz would
46//config: replace all instances of 'a' with 'xyz'. This option is mainly
47//config: useful for cases when no other way of expressing a character
48//config: is possible.
49
21#include "libbb.h" 50#include "libbb.h"
22 51
23enum { 52enum {
diff --git a/coreutils/yes.c b/coreutils/yes.c
index d757a4504..ead674b27 100644
--- a/coreutils/yes.c
+++ b/coreutils/yes.c
@@ -18,6 +18,11 @@
18 18
19/* This is a NOFORK applet. Be very careful! */ 19/* This is a NOFORK applet. Be very careful! */
20 20
21//usage:#define yes_trivial_usage
22//usage: "[STRING]"
23//usage:#define yes_full_usage "\n\n"
24//usage: "Repeatedly output a line with STRING, or 'y'"
25
21int yes_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 26int yes_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
22int yes_main(int argc UNUSED_PARAM, char **argv) 27int yes_main(int argc UNUSED_PARAM, char **argv)
23{ 28{
diff --git a/debianutils/Config.in b/debianutils/Config.src
index 9146f3ef4..9bce0498c 100644
--- a/debianutils/Config.in
+++ b/debianutils/Config.src
@@ -7,19 +7,19 @@ menu "Debian Utilities"
7 7
8config MKTEMP 8config MKTEMP
9 bool "mktemp" 9 bool "mktemp"
10 default n 10 default y
11 help 11 help
12 mktemp is used to create unique temporary files 12 mktemp is used to create unique temporary files
13 13
14config PIPE_PROGRESS 14config PIPE_PROGRESS
15 bool "pipe_progress" 15 bool "pipe_progress"
16 default n 16 default y
17 help 17 help
18 Display a dot to indicate pipe activity. 18 Display a dot to indicate pipe activity.
19 19
20config RUN_PARTS 20config RUN_PARTS
21 bool "run-parts" 21 bool "run-parts"
22 default n 22 default y
23 help 23 help
24 run-parts is a utility designed to run all the scripts in a directory. 24 run-parts is a utility designed to run all the scripts in a directory.
25 25
@@ -34,14 +34,14 @@ config RUN_PARTS
34 34
35config FEATURE_RUN_PARTS_LONG_OPTIONS 35config FEATURE_RUN_PARTS_LONG_OPTIONS
36 bool "Enable long options" 36 bool "Enable long options"
37 default n 37 default y
38 depends on RUN_PARTS && LONG_OPTS 38 depends on RUN_PARTS && LONG_OPTS
39 help 39 help
40 Support long options for the run-parts applet. 40 Support long options for the run-parts applet.
41 41
42config FEATURE_RUN_PARTS_FANCY 42config FEATURE_RUN_PARTS_FANCY
43 bool "Support additional arguments" 43 bool "Support additional arguments"
44 default n 44 default y
45 depends on RUN_PARTS 45 depends on RUN_PARTS
46 help 46 help
47 Support additional options: 47 Support additional options:
@@ -50,7 +50,7 @@ config FEATURE_RUN_PARTS_FANCY
50 50
51config START_STOP_DAEMON 51config START_STOP_DAEMON
52 bool "start-stop-daemon" 52 bool "start-stop-daemon"
53 default n 53 default y
54 help 54 help
55 start-stop-daemon is used to control the creation and 55 start-stop-daemon is used to control the creation and
56 termination of system-level processes, usually the ones 56 termination of system-level processes, usually the ones
@@ -58,7 +58,7 @@ config START_STOP_DAEMON
58 58
59config FEATURE_START_STOP_DAEMON_FANCY 59config FEATURE_START_STOP_DAEMON_FANCY
60 bool "Support additional arguments" 60 bool "Support additional arguments"
61 default n 61 default y
62 depends on START_STOP_DAEMON 62 depends on START_STOP_DAEMON
63 help 63 help
64 Support additional arguments. 64 Support additional arguments.
@@ -68,14 +68,14 @@ config FEATURE_START_STOP_DAEMON_FANCY
68 68
69config FEATURE_START_STOP_DAEMON_LONG_OPTIONS 69config FEATURE_START_STOP_DAEMON_LONG_OPTIONS
70 bool "Enable long options" 70 bool "Enable long options"
71 default n 71 default y
72 depends on START_STOP_DAEMON && LONG_OPTS 72 depends on START_STOP_DAEMON && LONG_OPTS
73 help 73 help
74 Support long options for the start-stop-daemon applet. 74 Support long options for the start-stop-daemon applet.
75 75
76config WHICH 76config WHICH
77 bool "which" 77 bool "which"
78 default n 78 default y
79 help 79 help
80 which is used to find programs in your PATH and 80 which is used to find programs in your PATH and
81 print out their pathnames. 81 print out their pathnames.
diff --git a/debianutils/Kbuild b/debianutils/Kbuild.src
index bcf6126ad..bcf6126ad 100644
--- a/debianutils/Kbuild
+++ b/debianutils/Kbuild.src
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c
index fa98e8b38..ced5fb307 100644
--- a/debianutils/pipe_progress.c
+++ b/debianutils/pipe_progress.c
@@ -6,7 +6,6 @@
6 * 6 *
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
10#include "libbb.h" 9#include "libbb.h"
11 10
12#define PIPE_PROGRESS_SIZE 4096 11#define PIPE_PROGRESS_SIZE 4096
@@ -17,23 +16,20 @@
17int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 16int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
18int pipe_progress_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) 17int pipe_progress_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
19{ 18{
20 RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE); 19 char buf[PIPE_PROGRESS_SIZE];
21 time_t t = time(NULL); 20 time_t t = time(NULL);
22 size_t len; 21 int len;
23 22
24 while ((len = fread(buf, 1, PIPE_PROGRESS_SIZE, stdin)) > 0) { 23 while ((len = safe_read(STDIN_FILENO, buf, PIPE_PROGRESS_SIZE)) > 0) {
25 time_t new_time = time(NULL); 24 time_t new_time = time(NULL);
26 if (new_time != t) { 25 if (new_time != t) {
27 t = new_time; 26 t = new_time;
28 fputc('.', stderr); 27 fputc('.', stderr);
29 } 28 }
30 fwrite(buf, len, 1, stdout); 29 full_write(STDOUT_FILENO, buf, len);
31 } 30 }
32 31
33 fputc('\n', stderr); 32 fputc('\n', stderr);
34 33
35 if (ENABLE_FEATURE_CLEAN_UP)
36 RELEASE_CONFIG_BUFFER(buf);
37
38 return 0; 34 return 0;
39} 35}
diff --git a/e2fsprogs/Config.in b/e2fsprogs/Config.src
index 964d08e4c..e331ee5ef 100644
--- a/e2fsprogs/Config.in
+++ b/e2fsprogs/Config.src
@@ -7,13 +7,13 @@ menu "Linux Ext2 FS Progs"
7 7
8config CHATTR 8config CHATTR
9 bool "chattr" 9 bool "chattr"
10 default n 10 default y
11 help 11 help
12 chattr changes the file attributes on a second extended file system. 12 chattr changes the file attributes on a second extended file system.
13 13
14### config E2FSCK 14### config E2FSCK
15### bool "e2fsck" 15### bool "e2fsck"
16### default n 16### default y
17### help 17### help
18### e2fsck is used to check Linux second extended file systems (ext2fs). 18### e2fsck is used to check Linux second extended file systems (ext2fs).
19### e2fsck also supports ext2 filesystems countaining a journal (ext3). 19### e2fsck also supports ext2 filesystems countaining a journal (ext3).
@@ -22,7 +22,7 @@ config CHATTR
22 22
23config FSCK 23config FSCK
24 bool "fsck" 24 bool "fsck"
25 default n 25 default y
26 help 26 help
27 fsck is used to check and optionally repair one or more filesystems. 27 fsck is used to check and optionally repair one or more filesystems.
28 In actuality, fsck is simply a front-end for the various file system 28 In actuality, fsck is simply a front-end for the various file system
@@ -30,27 +30,27 @@ config FSCK
30 30
31config LSATTR 31config LSATTR
32 bool "lsattr" 32 bool "lsattr"
33 default n 33 default y
34 help 34 help
35 lsattr lists the file attributes on a second extended file system. 35 lsattr lists the file attributes on a second extended file system.
36 36
37### config MKE2FS 37### config MKE2FS
38### bool "mke2fs" 38### bool "mke2fs"
39### default n 39### default y
40### help 40### help
41### mke2fs is used to create an ext2/ext3 filesystem. The normal compat 41### mke2fs is used to create an ext2/ext3 filesystem. The normal compat
42### symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. 42### symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided.
43 43
44config TUNE2FS 44config TUNE2FS
45 bool "tune2fs" 45 bool "tune2fs"
46 default n 46 default y
47 help 47 help
48 tune2fs allows the system administrator to adjust various tunable 48 tune2fs allows the system administrator to adjust various tunable
49 filesystem parameters on Linux ext2/ext3 filesystems. 49 filesystem parameters on Linux ext2/ext3 filesystems.
50 50
51### config E2LABEL 51### config E2LABEL
52### bool "e2label" 52### bool "e2label"
53### default n 53### default y
54### depends on TUNE2FS 54### depends on TUNE2FS
55### help 55### help
56### e2label will display or change the filesystem label on the ext2 56### e2label will display or change the filesystem label on the ext2
@@ -59,7 +59,7 @@ config TUNE2FS
59### NB: this one is now provided by util-linux/volume_id/* 59### NB: this one is now provided by util-linux/volume_id/*
60### config FINDFS 60### config FINDFS
61### bool "findfs" 61### bool "findfs"
62### default n 62### default y
63### depends on TUNE2FS 63### depends on TUNE2FS
64### help 64### help
65### findfs will search the disks in the system looking for a filesystem 65### findfs will search the disks in the system looking for a filesystem
diff --git a/e2fsprogs/Kbuild b/e2fsprogs/Kbuild.src
index 0fdc9d215..0fdc9d215 100644
--- a/e2fsprogs/Kbuild
+++ b/e2fsprogs/Kbuild.src
diff --git a/e2fsprogs/old_e2fsprogs/Config.in b/e2fsprogs/old_e2fsprogs/Config.src
index 5990f556c..5990f556c 100644
--- a/e2fsprogs/old_e2fsprogs/Config.in
+++ b/e2fsprogs/old_e2fsprogs/Config.src
diff --git a/e2fsprogs/old_e2fsprogs/Kbuild b/e2fsprogs/old_e2fsprogs/Kbuild.src
index b05bb92e1..b05bb92e1 100644
--- a/e2fsprogs/old_e2fsprogs/Kbuild
+++ b/e2fsprogs/old_e2fsprogs/Kbuild.src
diff --git a/e2fsprogs/old_e2fsprogs/blkid/Kbuild b/e2fsprogs/old_e2fsprogs/blkid/Kbuild.src
index ddcfdfd9a..ddcfdfd9a 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/Kbuild
+++ b/e2fsprogs/old_e2fsprogs/blkid/Kbuild.src
diff --git a/e2fsprogs/old_e2fsprogs/e2p/Kbuild b/e2fsprogs/old_e2fsprogs/e2p/Kbuild.src
index c0ff824e3..c0ff824e3 100644
--- a/e2fsprogs/old_e2fsprogs/e2p/Kbuild
+++ b/e2fsprogs/old_e2fsprogs/e2p/Kbuild.src
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/Kbuild b/e2fsprogs/old_e2fsprogs/ext2fs/Kbuild.src
index 185887a44..185887a44 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/Kbuild
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/Kbuild.src
diff --git a/e2fsprogs/old_e2fsprogs/uuid/Kbuild b/e2fsprogs/old_e2fsprogs/uuid/Kbuild.src
index dde981840..dde981840 100644
--- a/e2fsprogs/old_e2fsprogs/uuid/Kbuild
+++ b/e2fsprogs/old_e2fsprogs/uuid/Kbuild.src
diff --git a/editors/Config.in b/editors/Config.src
index 5f9566f0a..6cf21919c 100644
--- a/editors/Config.in
+++ b/editors/Config.src
@@ -7,14 +7,14 @@ menu "Editors"
7 7
8config AWK 8config AWK
9 bool "awk" 9 bool "awk"
10 default n 10 default y
11 help 11 help
12 Awk is used as a pattern scanning and processing language. This is 12 Awk is used as a pattern scanning and processing language. This is
13 the BusyBox implementation of that programming language. 13 the BusyBox implementation of that programming language.
14 14
15config FEATURE_AWK_LIBM 15config FEATURE_AWK_LIBM
16 bool "Enable math functions (requires libm)" 16 bool "Enable math functions (requires libm)"
17 default n 17 default y
18 depends on AWK 18 depends on AWK
19 help 19 help
20 Enable math functions of the Awk programming language. 20 Enable math functions of the Awk programming language.
@@ -22,14 +22,14 @@ config FEATURE_AWK_LIBM
22 22
23config CMP 23config CMP
24 bool "cmp" 24 bool "cmp"
25 default n 25 default y
26 help 26 help
27 cmp is used to compare two files and returns the result 27 cmp is used to compare two files and returns the result
28 to standard output. 28 to standard output.
29 29
30config DIFF 30config DIFF
31 bool "diff" 31 bool "diff"
32 default n 32 default y
33 help 33 help
34 diff compares two files or directories and outputs the 34 diff compares two files or directories and outputs the
35 differences between them in a form that can be given to 35 differences between them in a form that can be given to
@@ -37,7 +37,7 @@ config DIFF
37 37
38config FEATURE_DIFF_LONG_OPTIONS 38config FEATURE_DIFF_LONG_OPTIONS
39 bool "Enable long options" 39 bool "Enable long options"
40 default n 40 default y
41 depends on DIFF && LONG_OPTS 41 depends on DIFF && LONG_OPTS
42 help 42 help
43 Enable use of long options. 43 Enable use of long options.
@@ -52,7 +52,7 @@ config FEATURE_DIFF_DIR
52 52
53config ED 53config ED
54 bool "ed" 54 bool "ed"
55 default n 55 default y
56 help 56 help
57 The original 1970's Unix text editor, from the days of teletypes. 57 The original 1970's Unix text editor, from the days of teletypes.
58 Small, simple, evil. Part of SUSv3. If you're not already using 58 Small, simple, evil. Part of SUSv3. If you're not already using
@@ -60,20 +60,20 @@ config ED
60 60
61config PATCH 61config PATCH
62 bool "patch" 62 bool "patch"
63 default n 63 default y
64 help 64 help
65 Apply a unified diff formatted patch. 65 Apply a unified diff formatted patch.
66 66
67config SED 67config SED
68 bool "sed" 68 bool "sed"
69 default n 69 default y
70 help 70 help
71 sed is used to perform text transformations on a file 71 sed is used to perform text transformations on a file
72 or input from a pipeline. 72 or input from a pipeline.
73 73
74config VI 74config VI
75 bool "vi" 75 bool "vi"
76 default n 76 default y
77 help 77 help
78 'vi' is a text editor. More specifically, it is the One True 78 'vi' is a text editor. More specifically, it is the One True
79 text editor <grin>. It does, however, have a rather steep 79 text editor <grin>. It does, however, have a rather steep
@@ -91,7 +91,7 @@ config FEATURE_VI_MAX_LEN
91 91
92config FEATURE_VI_8BIT 92config FEATURE_VI_8BIT
93 bool "Allow vi to display 8-bit chars (otherwise shows dots)" 93 bool "Allow vi to display 8-bit chars (otherwise shows dots)"
94 default y 94 default n
95 depends on VI 95 depends on VI
96 help 96 help
97 If your terminal can display characters with high bit set, 97 If your terminal can display characters with high bit set,
@@ -170,7 +170,7 @@ config FEATURE_VI_WIN_RESIZE
170 170
171config FEATURE_VI_ASK_TERMINAL 171config FEATURE_VI_ASK_TERMINAL
172 bool "Use 'tell me cursor position' ESC sequence to measure window" 172 bool "Use 'tell me cursor position' ESC sequence to measure window"
173 default n 173 default y
174 depends on VI 174 depends on VI
175 help 175 help
176 If terminal size can't be retrieved and $LINES/$COLUMNS are not set, 176 If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
diff --git a/editors/Kbuild b/editors/Kbuild.src
index 76302aa76..76302aa76 100644
--- a/editors/Kbuild
+++ b/editors/Kbuild.src
diff --git a/editors/sed.c b/editors/sed.c
index 4bd6e0168..a5ef400fc 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -119,10 +119,10 @@ struct globals {
119 } pipeline; 119 } pipeline;
120} FIX_ALIASING; 120} FIX_ALIASING;
121#define G (*(struct globals*)&bb_common_bufsiz1) 121#define G (*(struct globals*)&bb_common_bufsiz1)
122void BUG_sed_globals_too_big(void); 122struct BUG_G_too_big {
123 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
124};
123#define INIT_G() do { \ 125#define INIT_G() do { \
124 if (sizeof(struct globals) > COMMON_BUFSIZE) \
125 BUG_sed_globals_too_big(); \
126 G.sed_cmd_tail = &G.sed_cmd_head; \ 126 G.sed_cmd_tail = &G.sed_cmd_head; \
127} while (0) 127} while (0)
128 128
@@ -385,7 +385,8 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
385 break; 385 break;
386 /* Comment */ 386 /* Comment */
387 case '#': 387 case '#':
388 while (substr[++idx]) /*skip all*/; 388 // while (substr[++idx]) continue;
389 idx += strlen(substr + idx); // same
389 /* Fall through */ 390 /* Fall through */
390 /* End of command */ 391 /* End of command */
391 case ';': 392 case ';':
@@ -395,7 +396,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
395 bb_error_msg_and_die("bad option in substitution expression"); 396 bb_error_msg_and_die("bad option in substitution expression");
396 } 397 }
397 } 398 }
398out: 399 out:
399 /* compile the match string into a regex */ 400 /* compile the match string into a regex */
400 if (*match != '\0') { 401 if (*match != '\0') {
401 /* If match is empty, we use last regex used at runtime */ 402 /* If match is empty, we use last regex used at runtime */
@@ -896,13 +897,32 @@ static void process_files(void)
896 897
897 /* Determine if this command matches this line: */ 898 /* Determine if this command matches this line: */
898 899
900 //bb_error_msg("match1:%d", sed_cmd->in_match);
901 //bb_error_msg("match2:%d", (!sed_cmd->beg_line && !sed_cmd->end_line
902 // && !sed_cmd->beg_match && !sed_cmd->end_match));
903 //bb_error_msg("match3:%d", (sed_cmd->beg_line > 0
904 // && (sed_cmd->end_line || sed_cmd->end_match
905 // ? (sed_cmd->beg_line <= linenum)
906 // : (sed_cmd->beg_line == linenum)
907 // )
908 // )
909 //bb_error_msg("match4:%d", (beg_match(sed_cmd, pattern_space)));
910 //bb_error_msg("match5:%d", (sed_cmd->beg_line == -1 && next_line == NULL));
911
899 /* Are we continuing a previous multi-line match? */ 912 /* Are we continuing a previous multi-line match? */
900 sed_cmd->in_match = sed_cmd->in_match 913 sed_cmd->in_match = sed_cmd->in_match
901 /* Or is no range necessary? */ 914 /* Or is no range necessary? */
902 || (!sed_cmd->beg_line && !sed_cmd->end_line 915 || (!sed_cmd->beg_line && !sed_cmd->end_line
903 && !sed_cmd->beg_match && !sed_cmd->end_match) 916 && !sed_cmd->beg_match && !sed_cmd->end_match)
904 /* Or did we match the start of a numerical range? */ 917 /* Or did we match the start of a numerical range? */
905 || (sed_cmd->beg_line > 0 && (sed_cmd->beg_line <= linenum)) 918 || (sed_cmd->beg_line > 0
919 && (sed_cmd->end_line || sed_cmd->end_match
920 /* note: even if end is numeric and is < linenum too,
921 * GNU sed matches! We match too */
922 ? (sed_cmd->beg_line <= linenum) /* N,end */
923 : (sed_cmd->beg_line == linenum) /* N */
924 )
925 )
906 /* Or does this line match our begin address regex? */ 926 /* Or does this line match our begin address regex? */
907 || (beg_match(sed_cmd, pattern_space)) 927 || (beg_match(sed_cmd, pattern_space))
908 /* Or did we match last line of input? */ 928 /* Or did we match last line of input? */
@@ -976,7 +996,6 @@ static void process_files(void)
976 case 'P': 996 case 'P':
977 { 997 {
978 char *tmp = strchr(pattern_space, '\n'); 998 char *tmp = strchr(pattern_space, '\n');
979
980 if (tmp) { 999 if (tmp) {
981 *tmp = '\0'; 1000 *tmp = '\0';
982 /* TODO: explain why '\n' below */ 1001 /* TODO: explain why '\n' below */
@@ -999,11 +1018,8 @@ static void process_files(void)
999 case 'D': 1018 case 'D':
1000 { 1019 {
1001 char *tmp = strchr(pattern_space, '\n'); 1020 char *tmp = strchr(pattern_space, '\n');
1002
1003 if (tmp) { 1021 if (tmp) {
1004 tmp = xstrdup(tmp+1); 1022 overlapping_strcpy(pattern_space, tmp + 1);
1005 free(pattern_space);
1006 pattern_space = tmp;
1007 goto restart; 1023 goto restart;
1008 } 1024 }
1009 } 1025 }
@@ -1048,7 +1064,6 @@ static void process_files(void)
1048 case 'r': 1064 case 'r':
1049 { 1065 {
1050 FILE *rfile; 1066 FILE *rfile;
1051
1052 rfile = fopen_for_read(sed_cmd->string); 1067 rfile = fopen_for_read(sed_cmd->string);
1053 if (rfile) { 1068 if (rfile) {
1054 char *line; 1069 char *line;
@@ -1097,12 +1112,11 @@ static void process_files(void)
1097 int len; 1112 int len;
1098 /* If no next line, jump to end of script and exit. */ 1113 /* If no next line, jump to end of script and exit. */
1099 if (next_line == NULL) { 1114 if (next_line == NULL) {
1100 /* Jump to end of script and exit */
1101 free(next_line); 1115 free(next_line);
1102 next_line = NULL; 1116 next_line = NULL;
1103 goto discard_line; 1117 goto discard_line;
1104 /* append next_line, read new next_line. */
1105 } 1118 }
1119 /* Append next_line, read new next_line. */
1106 len = strlen(pattern_space); 1120 len = strlen(pattern_space);
1107 pattern_space = xrealloc(pattern_space, len + strlen(next_line) + 2); 1121 pattern_space = xrealloc(pattern_space, len + strlen(next_line) + 2);
1108 pattern_space[len] = '\n'; 1122 pattern_space[len] = '\n';
@@ -1131,7 +1145,6 @@ static void process_files(void)
1131 case 'y': 1145 case 'y':
1132 { 1146 {
1133 int i, j; 1147 int i, j;
1134
1135 for (i = 0; pattern_space[i]; i++) { 1148 for (i = 0; pattern_space[i]; i++) {
1136 for (j = 0; sed_cmd->string[j]; j += 2) { 1149 for (j = 0; sed_cmd->string[j]; j += 2) {
1137 if (pattern_space[i] == sed_cmd->string[j]) { 1150 if (pattern_space[i] == sed_cmd->string[j]) {
diff --git a/findutils/find.c b/findutils/find.c
index 9022867a2..ca630b6c5 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -57,7 +57,7 @@
57//config: 57//config:
58//config:config FIND 58//config:config FIND
59//config: bool "find" 59//config: bool "find"
60//config: default n 60//config: default y
61//config: help 61//config: help
62//config: find is used to search your system to find specified files. 62//config: find is used to search your system to find specified files.
63//config: 63//config:
@@ -193,7 +193,7 @@
193//config: 193//config:
194//config:config FEATURE_FIND_DELETE 194//config:config FEATURE_FIND_DELETE
195//config: bool "Enable -delete: delete files/dirs" 195//config: bool "Enable -delete: delete files/dirs"
196//config: default n 196//config: default y
197//config: depends on FIND && FEATURE_FIND_DEPTH 197//config: depends on FIND && FEATURE_FIND_DEPTH
198//config: help 198//config: help
199//config: Support the 'find -delete' option for deleting files and directories. 199//config: Support the 'find -delete' option for deleting files and directories.
@@ -223,7 +223,7 @@
223//config: 223//config:
224//config:config FEATURE_FIND_LINKS 224//config:config FEATURE_FIND_LINKS
225//config: bool "Enable -links: link count matching" 225//config: bool "Enable -links: link count matching"
226//config: default n 226//config: default y
227//config: depends on FIND 227//config: depends on FIND
228//config: help 228//config: help
229//config: Support the 'find -links' option for matching number of links. 229//config: Support the 'find -links' option for matching number of links.
diff --git a/findutils/grep.c b/findutils/grep.c
index d5fe10320..fedf12d8a 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -23,7 +23,7 @@
23//config: 23//config:
24//config:config GREP 24//config:config GREP
25//config: bool "grep" 25//config: bool "grep"
26//config: default n 26//config: default y
27//config: help 27//config: help
28//config: grep is used to search files for a specified pattern. 28//config: grep is used to search files for a specified pattern.
29//config: 29//config:
diff --git a/findutils/xargs.c b/findutils/xargs.c
index c55ac5724..7db374c4a 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -21,14 +21,14 @@
21//config: 21//config:
22//config:config XARGS 22//config:config XARGS
23//config: bool "xargs" 23//config: bool "xargs"
24//config: default n 24//config: default y
25//config: help 25//config: help
26//config: xargs is used to execute a specified command for 26//config: xargs is used to execute a specified command for
27//config: every item from standard input. 27//config: every item from standard input.
28//config: 28//config:
29//config:config FEATURE_XARGS_SUPPORT_CONFIRMATION 29//config:config FEATURE_XARGS_SUPPORT_CONFIRMATION
30//config: bool "Enable -p: prompt and confirmation" 30//config: bool "Enable -p: prompt and confirmation"
31//config: default n 31//config: default y
32//config: depends on XARGS 32//config: depends on XARGS
33//config: help 33//config: help
34//config: Support -p: prompt the user whether to run each command 34//config: Support -p: prompt the user whether to run each command
@@ -36,14 +36,14 @@
36//config: 36//config:
37//config:config FEATURE_XARGS_SUPPORT_QUOTES 37//config:config FEATURE_XARGS_SUPPORT_QUOTES
38//config: bool "Enable single and double quotes and backslash" 38//config: bool "Enable single and double quotes and backslash"
39//config: default n 39//config: default y
40//config: depends on XARGS 40//config: depends on XARGS
41//config: help 41//config: help
42//config: Support quoting in the input. 42//config: Support quoting in the input.
43//config: 43//config:
44//config:config FEATURE_XARGS_SUPPORT_TERMOPT 44//config:config FEATURE_XARGS_SUPPORT_TERMOPT
45//config: bool "Enable -x: exit if -s or -n is exceeded" 45//config: bool "Enable -x: exit if -s or -n is exceeded"
46//config: default n 46//config: default y
47//config: depends on XARGS 47//config: depends on XARGS
48//config: help 48//config: help
49//config: Support -x: exit if the command size (see the -s or -n option) 49//config: Support -x: exit if the command size (see the -s or -n option)
@@ -51,7 +51,7 @@
51//config: 51//config:
52//config:config FEATURE_XARGS_SUPPORT_ZERO_TERM 52//config:config FEATURE_XARGS_SUPPORT_ZERO_TERM
53//config: bool "Enable -0: NUL-terminated input" 53//config: bool "Enable -0: NUL-terminated input"
54//config: default n 54//config: default y
55//config: depends on XARGS 55//config: depends on XARGS
56//config: help 56//config: help
57//config: Support -0: input items are terminated by a NUL character 57//config: Support -0: input items are terminated by a NUL character
diff --git a/include/applets.h b/include/applets.src.h
index d8a706b44..2998a0ea9 100644
--- a/include/applets.h
+++ b/include/applets.src.h
@@ -4,11 +4,6 @@
4 * 4 *
5 * If you write a new applet, you need to add an entry to this list to make 5 * If you write a new applet, you need to add an entry to this list to make
6 * busybox aware of it. 6 * busybox aware of it.
7 *
8 * It is CRUCIAL that this listing be kept in ascii order, otherwise the binary
9 * search lookup contributed by Gaute B Strokkenes stops working. If you value
10 * your kneecaps, you'll be sure to *make sure* that any changes made to this
11 * file result in the listing remaining in ascii order. You have been warned.
12 */ 7 */
13 8
14/* 9/*
@@ -36,16 +31,16 @@ s - suid type:
36# define APPLET_NOFORK(name,main,l,s,name2) name main##_main name2 31# define APPLET_NOFORK(name,main,l,s,name2) name main##_main name2
37 32
38#elif defined(MAKE_USAGE) && ENABLE_FEATURE_VERBOSE_USAGE 33#elif defined(MAKE_USAGE) && ENABLE_FEATURE_VERBOSE_USAGE
39# define APPLET(name,l,s) name##_trivial_usage name##_full_usage "\0" 34# define APPLET(name,l,s) MAKE_USAGE(#name, name##_trivial_usage name##_full_usage)
40# define APPLET_ODDNAME(name,main,l,s,name2) name2##_trivial_usage name2##_full_usage "\0" 35# define APPLET_ODDNAME(name,main,l,s,name2) MAKE_USAGE(#name, name2##_trivial_usage name2##_full_usage)
41# define APPLET_NOEXEC(name,main,l,s,name2) name2##_trivial_usage name2##_full_usage "\0" 36# define APPLET_NOEXEC(name,main,l,s,name2) MAKE_USAGE(#name, name2##_trivial_usage name2##_full_usage)
42# define APPLET_NOFORK(name,main,l,s,name2) name2##_trivial_usage name2##_full_usage "\0" 37# define APPLET_NOFORK(name,main,l,s,name2) MAKE_USAGE(#name, name2##_trivial_usage name2##_full_usage)
43 38
44#elif defined(MAKE_USAGE) && !ENABLE_FEATURE_VERBOSE_USAGE 39#elif defined(MAKE_USAGE) && !ENABLE_FEATURE_VERBOSE_USAGE
45# define APPLET(name,l,s) name##_trivial_usage "\0" 40# define APPLET(name,l,s) MAKE_USAGE(#name, name##_trivial_usage)
46# define APPLET_ODDNAME(name,main,l,s,name2) name2##_trivial_usage "\0" 41# define APPLET_ODDNAME(name,main,l,s,name2) MAKE_USAGE(#name, name2##_trivial_usage)
47# define APPLET_NOEXEC(name,main,l,s,name2) name2##_trivial_usage "\0" 42# define APPLET_NOEXEC(name,main,l,s,name2) MAKE_USAGE(#name, name2##_trivial_usage)
48# define APPLET_NOFORK(name,main,l,s,name2) name2##_trivial_usage "\0" 43# define APPLET_NOFORK(name,main,l,s,name2) MAKE_USAGE(#name, name2##_trivial_usage)
49 44
50#elif defined(MAKE_LINKS) 45#elif defined(MAKE_LINKS)
51# define APPLET(name,l,c) LINK l name 46# define APPLET(name,l,c) LINK l name
@@ -67,6 +62,7 @@ s - suid type:
67#endif 62#endif
68 63
69 64
65INSERT
70IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test)) 66IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test))
71IF_TEST(APPLET_NOFORK([[, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test)) 67IF_TEST(APPLET_NOFORK([[, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test))
72IF_ACPID(APPLET(acpid, _BB_DIR_SBIN, _BB_SUID_DROP)) 68IF_ACPID(APPLET(acpid, _BB_DIR_SBIN, _BB_SUID_DROP))
@@ -87,8 +83,6 @@ IF_BEEP(APPLET(beep, _BB_DIR_USR_BIN, _BB_SUID_DROP))
87IF_BLKID(APPLET(blkid, _BB_DIR_SBIN, _BB_SUID_DROP)) 83IF_BLKID(APPLET(blkid, _BB_DIR_SBIN, _BB_SUID_DROP))
88IF_BOOTCHARTD(APPLET(bootchartd, _BB_DIR_SBIN, _BB_SUID_DROP)) 84IF_BOOTCHARTD(APPLET(bootchartd, _BB_DIR_SBIN, _BB_SUID_DROP))
89IF_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 85IF_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
90IF_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP))
91IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP, bzcat))
92IF_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 86IF_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP))
93IF_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 87IF_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_DROP))
94IF_CAT(APPLET_NOFORK(cat, cat, _BB_DIR_BIN, _BB_SUID_DROP, cat)) 88IF_CAT(APPLET_NOFORK(cat, cat, _BB_DIR_BIN, _BB_SUID_DROP, cat))
diff --git a/include/usage.h b/include/usage.src.h
index a9c4c4294..f9f457871 100644
--- a/include/usage.h
+++ b/include/usage.src.h
@@ -15,6 +15,8 @@
15 15
16#define NOUSAGE_STR "\b" 16#define NOUSAGE_STR "\b"
17 17
18INSERT
19
18#define acpid_trivial_usage \ 20#define acpid_trivial_usage \
19 "[-d] [-c CONFDIR] [-l LOGFILE] [-e PROC_EVENT_FILE] [EVDEV_EVENT_FILE]..." 21 "[-d] [-c CONFDIR] [-l LOGFILE] [-e PROC_EVENT_FILE] [EVDEV_EVENT_FILE]..."
20#define acpid_full_usage "\n\n" \ 22#define acpid_full_usage "\n\n" \
@@ -234,19 +236,6 @@
234 "\n -v Verbose" \ 236 "\n -v Verbose" \
235 "\n -F Don't store or verify checksum" \ 237 "\n -F Don't store or verify checksum" \
236 238
237#define bunzip2_trivial_usage \
238 "[OPTIONS] [FILE]..."
239#define bunzip2_full_usage "\n\n" \
240 "Decompress FILEs (or stdin)\n" \
241 "\nOptions:" \
242 "\n -c Write to stdout" \
243 "\n -f Force" \
244
245#define bzcat_trivial_usage \
246 "FILE"
247#define bzcat_full_usage "\n\n" \
248 "Decompress to stdout"
249
250#define unlzma_trivial_usage \ 239#define unlzma_trivial_usage \
251 "[OPTIONS] [FILE]..." 240 "[OPTIONS] [FILE]..."
252#define unlzma_full_usage "\n\n" \ 241#define unlzma_full_usage "\n\n" \
@@ -5247,11 +5236,6 @@
5247 "$ ls | xargs gzip\n" \ 5236 "$ ls | xargs gzip\n" \
5248 "$ find . -name '*.c' -print | xargs rm\n" 5237 "$ find . -name '*.c' -print | xargs rm\n"
5249 5238
5250#define yes_trivial_usage \
5251 "[OPTIONS] [STRING]"
5252#define yes_full_usage "\n\n" \
5253 "Repeatedly output a line with STRING, or 'y'"
5254
5255#define zcat_trivial_usage \ 5239#define zcat_trivial_usage \
5256 "FILE" 5240 "FILE"
5257#define zcat_full_usage "\n\n" \ 5241#define zcat_full_usage "\n\n" \
diff --git a/init/Config.in b/init/Config.src
index 76d509207..e8121c96a 100644
--- a/init/Config.in
+++ b/init/Config.src
@@ -7,7 +7,7 @@ menu "Init Utilities"
7 7
8config INIT 8config INIT
9 bool "init" 9 bool "init"
10 default n 10 default y
11 select FEATURE_SYSLOG 11 select FEATURE_SYSLOG
12 help 12 help
13 init is the first program run when the system boots. 13 init is the first program run when the system boots.
@@ -21,12 +21,12 @@ config FEATURE_USE_INITTAB
21 21
22config FEATURE_KILL_REMOVED 22config FEATURE_KILL_REMOVED
23 bool "Support killing processes that have been removed from inittab" 23 bool "Support killing processes that have been removed from inittab"
24 default y 24 default n
25 depends on FEATURE_USE_INITTAB 25 depends on FEATURE_USE_INITTAB
26 help 26 help
27 When respawn entries are removed from inittab and a SIGHUP is 27 When respawn entries are removed from inittab and a SIGHUP is
28 sent to init, this feature will kill the processes that have 28 sent to init, this option will make init kill the processes
29 been removed. 29 that have been removed.
30 30
31config FEATURE_KILL_DELAY 31config FEATURE_KILL_DELAY
32 int "How long to wait between TERM and KILL (0 - send TERM only)" if FEATURE_KILL_REMOVED 32 int "How long to wait between TERM and KILL (0 - send TERM only)" if FEATURE_KILL_REMOVED
@@ -41,7 +41,7 @@ config FEATURE_KILL_DELAY
41 41
42config FEATURE_INIT_SCTTY 42config FEATURE_INIT_SCTTY
43 bool "Run commands with leading dash with controlling tty" 43 bool "Run commands with leading dash with controlling tty"
44 default n 44 default y
45 depends on INIT 45 depends on INIT
46 help 46 help
47 If this option is enabled, init will try to give a controlling 47 If this option is enabled, init will try to give a controlling
@@ -56,7 +56,7 @@ config FEATURE_INIT_SCTTY
56 56
57config FEATURE_INIT_SYSLOG 57config FEATURE_INIT_SYSLOG
58 bool "Enable init to write to syslog" 58 bool "Enable init to write to syslog"
59 default n 59 default y
60 depends on INIT 60 depends on INIT
61 61
62config FEATURE_EXTRA_QUIET 62config FEATURE_EXTRA_QUIET
@@ -68,7 +68,7 @@ config FEATURE_EXTRA_QUIET
68 68
69config FEATURE_INIT_COREDUMPS 69config FEATURE_INIT_COREDUMPS
70 bool "Support dumping core for child processes (debugging only)" 70 bool "Support dumping core for child processes (debugging only)"
71 default n 71 default y
72 depends on INIT 72 depends on INIT
73 help 73 help
74 If this option is enabled and the file /.init_enable_core 74 If this option is enabled and the file /.init_enable_core
@@ -89,13 +89,13 @@ config FEATURE_INITRD
89 89
90config HALT 90config HALT
91 bool "poweroff, halt, and reboot" 91 bool "poweroff, halt, and reboot"
92 default n 92 default y
93 help 93 help
94 Stop all processes and either halt, reboot, or power off the system. 94 Stop all processes and either halt, reboot, or power off the system.
95 95
96config FEATURE_CALL_TELINIT 96config FEATURE_CALL_TELINIT
97 bool "Call telinit on shutdown and reboot" 97 bool "Call telinit on shutdown and reboot"
98 default n 98 default y
99 depends on HALT && !INIT 99 depends on HALT && !INIT
100 help 100 help
101 Call an external program (normally telinit) to facilitate 101 Call an external program (normally telinit) to facilitate
@@ -115,14 +115,14 @@ config TELINIT_PATH
115 115
116config MESG 116config MESG
117 bool "mesg" 117 bool "mesg"
118 default n 118 default y
119 help 119 help
120 Mesg controls access to your terminal by others. It is typically 120 Mesg controls access to your terminal by others. It is typically
121 used to allow or disallow other users to write to your terminal 121 used to allow or disallow other users to write to your terminal
122 122
123config BOOTCHARTD 123config BOOTCHARTD
124 bool "bootchartd" 124 bool "bootchartd"
125 default n 125 default y
126 help 126 help
127 bootchartd is commonly used to profile the boot process 127 bootchartd is commonly used to profile the boot process
128 for the purpose of speeding it up. In this case, it is started 128 for the purpose of speeding it up. In this case, it is started
diff --git a/init/Kbuild b/init/Kbuild.src
index ce3f30256..ce3f30256 100644
--- a/init/Kbuild
+++ b/init/Kbuild.src
diff --git a/libbb/Config.in b/libbb/Config.src
index 55367b21b..a0aeb3683 100644
--- a/libbb/Config.in
+++ b/libbb/Config.src
@@ -28,7 +28,7 @@ config MD5_SIZE_VS_SPEED
28 28
29config FEATURE_FAST_TOP 29config FEATURE_FAST_TOP
30 bool "Faster /proc scanning code (+100 bytes)" 30 bool "Faster /proc scanning code (+100 bytes)"
31 default n 31 default y
32 help 32 help
33 This option makes top (and ps) ~20% faster (or 20% less CPU hungry), 33 This option makes top (and ps) ~20% faster (or 20% less CPU hungry),
34 but code size is slightly bigger. 34 but code size is slightly bigger.
@@ -43,7 +43,7 @@ config FEATURE_ETC_NETWORKS
43 43
44config FEATURE_EDITING 44config FEATURE_EDITING
45 bool "Command line editing" 45 bool "Command line editing"
46 default n 46 default y
47 help 47 help
48 Enable line editing (mainly for shell command line). 48 Enable line editing (mainly for shell command line).
49 49
@@ -68,21 +68,21 @@ config FEATURE_EDITING_VI
68config FEATURE_EDITING_HISTORY 68config FEATURE_EDITING_HISTORY
69 int "History size" 69 int "History size"
70 range 0 99999 70 range 0 99999
71 default 15 71 default 255
72 depends on FEATURE_EDITING 72 depends on FEATURE_EDITING
73 help 73 help
74 Specify command history size. 74 Specify command history size.
75 75
76config FEATURE_EDITING_SAVEHISTORY 76config FEATURE_EDITING_SAVEHISTORY
77 bool "History saving" 77 bool "History saving"
78 default n 78 default y
79 depends on ASH && FEATURE_EDITING 79 depends on ASH && FEATURE_EDITING
80 help 80 help
81 Enable history saving in ash shell. 81 Enable history saving in ash shell.
82 82
83config FEATURE_TAB_COMPLETION 83config FEATURE_TAB_COMPLETION
84 bool "Tab completion" 84 bool "Tab completion"
85 default n 85 default y
86 depends on FEATURE_EDITING 86 depends on FEATURE_EDITING
87 help 87 help
88 Enable tab completion. 88 Enable tab completion.
@@ -150,7 +150,7 @@ config FEATURE_COPYBUF_KB
150 150
151config MONOTONIC_SYSCALL 151config MONOTONIC_SYSCALL
152 bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" 152 bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
153 default y 153 default n
154 help 154 help
155 Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring 155 Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
156 time intervals (time, ping, traceroute etc need this). 156 time intervals (time, ping, traceroute etc need this).
diff --git a/libbb/Kbuild b/libbb/Kbuild.src
index a8a1da1f9..a8a1da1f9 100644
--- a/libbb/Kbuild
+++ b/libbb/Kbuild.src
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index f6dc1f171..cb18a688e 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -43,35 +43,30 @@
43#include "applets.h" 43#include "applets.h"
44#undef PROTOTYPES 44#undef PROTOTYPES
45 45
46#if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE
47/* Define usage_messages[] */
48static const char usage_messages[] ALIGN1 = ""
49# define MAKE_USAGE
50# include "usage.h"
51# include "applets.h"
52;
53# undef MAKE_USAGE
54#else
55# define usage_messages 0
56#endif /* SHOW_USAGE */
57
58 46
59/* Include generated applet names, pointers to <applet>_main, etc */ 47/* Include generated applet names, pointers to <applet>_main, etc */
60#include "applet_tables.h" 48#include "applet_tables.h"
61/* ...and if applet_tables generator says we have only one applet... */ 49/* ...and if applet_tables generator says we have only one applet... */
62#ifdef SINGLE_APPLET_MAIN 50#ifdef SINGLE_APPLET_MAIN
63#undef ENABLE_FEATURE_INDIVIDUAL 51# undef ENABLE_FEATURE_INDIVIDUAL
64#define ENABLE_FEATURE_INDIVIDUAL 1 52# define ENABLE_FEATURE_INDIVIDUAL 1
65#undef IF_FEATURE_INDIVIDUAL 53# undef IF_FEATURE_INDIVIDUAL
66#define IF_FEATURE_INDIVIDUAL(...) __VA_ARGS__ 54# define IF_FEATURE_INDIVIDUAL(...) __VA_ARGS__
67#endif 55#endif
68 56
69 57
70#if ENABLE_FEATURE_COMPRESS_USAGE
71
72#include "usage_compressed.h" 58#include "usage_compressed.h"
73#include "unarchive.h"
74 59
60#if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE
61static const char usage_messages[] ALIGN1 = UNPACKED_USAGE;
62#else
63# define usage_messages 0
64#endif /* SHOW_USAGE */
65
66#if ENABLE_FEATURE_COMPRESS_USAGE
67
68static const char packed_usage[] = { PACKED_USAGE };
69# include "unarchive.h"
75static const char *unpack_usage_messages(void) 70static const char *unpack_usage_messages(void)
76{ 71{
77 char *outbuf = NULL; 72 char *outbuf = NULL;
@@ -86,19 +81,19 @@ static const char *unpack_usage_messages(void)
86 * end up here with i != 0 on read data errors! Not trivial */ 81 * end up here with i != 0 on read data errors! Not trivial */
87 if (!i) { 82 if (!i) {
88 /* Cannot use xmalloc: will leak bd in NOFORK case! */ 83 /* Cannot use xmalloc: will leak bd in NOFORK case! */
89 outbuf = malloc_or_warn(SIZEOF_usage_messages); 84 outbuf = malloc_or_warn(sizeof(UNPACKED_USAGE));
90 if (outbuf) 85 if (outbuf)
91 read_bunzip(bd, outbuf, SIZEOF_usage_messages); 86 read_bunzip(bd, outbuf, sizeof(UNPACKED_USAGE));
92 } 87 }
93 dealloc_bunzip(bd); 88 dealloc_bunzip(bd);
94 return outbuf; 89 return outbuf;
95} 90}
96#define dealloc_usage_messages(s) free(s) 91# define dealloc_usage_messages(s) free(s)
97 92
98#else 93#else
99 94
100#define unpack_usage_messages() usage_messages 95# define unpack_usage_messages() usage_messages
101#define dealloc_usage_messages(s) ((void)(s)) 96# define dealloc_usage_messages(s) ((void)(s))
102 97
103#endif /* FEATURE_COMPRESS_USAGE */ 98#endif /* FEATURE_COMPRESS_USAGE */
104 99
diff --git a/libpwdgrp/Kbuild b/libpwdgrp/Kbuild.src
index f9f1ddbf3..f9f1ddbf3 100644
--- a/libpwdgrp/Kbuild
+++ b/libpwdgrp/Kbuild.src
diff --git a/loginutils/Config.in b/loginutils/Config.src
index a9b5f5a9f..982d5d669 100644
--- a/loginutils/Config.in
+++ b/loginutils/Config.src
@@ -7,7 +7,7 @@ menu "Login/Password Management Utilities"
7 7
8config FEATURE_SHADOWPASSWDS 8config FEATURE_SHADOWPASSWDS
9 bool "Support for shadow passwords" 9 bool "Support for shadow passwords"
10 default n 10 default y
11 help 11 help
12 Build support for shadow password in /etc/shadow. This file is only 12 Build support for shadow password in /etc/shadow. This file is only
13 readable by root and thus the encrypted passwords are no longer 13 readable by root and thus the encrypted passwords are no longer
@@ -15,7 +15,7 @@ config FEATURE_SHADOWPASSWDS
15 15
16config USE_BB_PWD_GRP 16config USE_BB_PWD_GRP
17 bool "Use internal password and group functions rather than system functions" 17 bool "Use internal password and group functions rather than system functions"
18 default n 18 default y
19 help 19 help
20 If you leave this disabled, busybox will use the system's password 20 If you leave this disabled, busybox will use the system's password
21 and group functions. And if you are using the GNU C library 21 and group functions. And if you are using the GNU C library
@@ -81,7 +81,7 @@ config USE_BB_CRYPT
81 81
82config USE_BB_CRYPT_SHA 82config USE_BB_CRYPT_SHA
83 bool "Enable SHA256/512 crypt functions" 83 bool "Enable SHA256/512 crypt functions"
84 default n 84 default y
85 depends on USE_BB_CRYPT 85 depends on USE_BB_CRYPT
86 help 86 help
87 Enable this if you have passwords starting with "$5$" or "$6$" 87 Enable this if you have passwords starting with "$5$" or "$6$"
@@ -93,20 +93,20 @@ config USE_BB_CRYPT_SHA
93 93
94config ADDGROUP 94config ADDGROUP
95 bool "addgroup" 95 bool "addgroup"
96 default n 96 default y
97 help 97 help
98 Utility for creating a new group account. 98 Utility for creating a new group account.
99 99
100config FEATURE_ADDGROUP_LONG_OPTIONS 100config FEATURE_ADDGROUP_LONG_OPTIONS
101 bool "Enable long options" 101 bool "Enable long options"
102 default n 102 default y
103 depends on ADDGROUP && LONG_OPTS 103 depends on ADDGROUP && LONG_OPTS
104 help 104 help
105 Support long options for the addgroup applet. 105 Support long options for the addgroup applet.
106 106
107config FEATURE_ADDUSER_TO_GROUP 107config FEATURE_ADDUSER_TO_GROUP
108 bool "Support for adding users to groups" 108 bool "Support for adding users to groups"
109 default n 109 default y
110 depends on ADDGROUP 110 depends on ADDGROUP
111 help 111 help
112 If called with two non-option arguments, 112 If called with two non-option arguments,
@@ -115,13 +115,13 @@ config FEATURE_ADDUSER_TO_GROUP
115 115
116config DELGROUP 116config DELGROUP
117 bool "delgroup" 117 bool "delgroup"
118 default n 118 default y
119 help 119 help
120 Utility for deleting a group account. 120 Utility for deleting a group account.
121 121
122config FEATURE_DEL_USER_FROM_GROUP 122config FEATURE_DEL_USER_FROM_GROUP
123 bool "Support for removing users from groups" 123 bool "Support for removing users from groups"
124 default n 124 default y
125 depends on DELGROUP 125 depends on DELGROUP
126 help 126 help
127 If called with two non-option arguments, deluser 127 If called with two non-option arguments, deluser
@@ -141,13 +141,13 @@ config FEATURE_CHECK_NAMES
141 141
142config ADDUSER 142config ADDUSER
143 bool "adduser" 143 bool "adduser"
144 default n 144 default y
145 help 145 help
146 Utility for creating a new user account. 146 Utility for creating a new user account.
147 147
148config FEATURE_ADDUSER_LONG_OPTIONS 148config FEATURE_ADDUSER_LONG_OPTIONS
149 bool "Enable long options" 149 bool "Enable long options"
150 default n 150 default y
151 depends on ADDUSER && LONG_OPTS 151 depends on ADDUSER && LONG_OPTS
152 help 152 help
153 Support long options for the adduser applet. 153 Support long options for the adduser applet.
@@ -170,20 +170,20 @@ config LAST_SYSTEM_ID
170 170
171config DELUSER 171config DELUSER
172 bool "deluser" 172 bool "deluser"
173 default n 173 default y
174 help 174 help
175 Utility for deleting a user account. 175 Utility for deleting a user account.
176 176
177config GETTY 177config GETTY
178 bool "getty" 178 bool "getty"
179 default n 179 default y
180 select FEATURE_SYSLOG 180 select FEATURE_SYSLOG
181 help 181 help
182 getty lets you log in on a tty, it is normally invoked by init. 182 getty lets you log in on a tty, it is normally invoked by init.
183 183
184config LOGIN 184config LOGIN
185 bool "login" 185 bool "login"
186 default n 186 default y
187 select FEATURE_SUID 187 select FEATURE_SUID
188 select FEATURE_SYSLOG 188 select FEATURE_SYSLOG
189 help 189 help
@@ -202,7 +202,7 @@ config PAM
202config LOGIN_SCRIPTS 202config LOGIN_SCRIPTS
203 bool "Support for login scripts" 203 bool "Support for login scripts"
204 depends on LOGIN 204 depends on LOGIN
205 default n 205 default y
206 help 206 help
207 Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT 207 Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT
208 just prior to switching from root to logged-in user. 208 just prior to switching from root to logged-in user.
@@ -226,7 +226,7 @@ config FEATURE_SECURETTY
226 226
227config PASSWD 227config PASSWD
228 bool "passwd" 228 bool "passwd"
229 default n 229 default y
230 select FEATURE_SUID 230 select FEATURE_SUID
231 select FEATURE_SYSLOG 231 select FEATURE_SYSLOG
232 help 232 help
@@ -247,7 +247,7 @@ config FEATURE_PASSWD_WEAK_CHECK
247 247
248config CRYPTPW 248config CRYPTPW
249 bool "cryptpw" 249 bool "cryptpw"
250 default n 250 default y
251 help 251 help
252 Encrypts the given password with the crypt(3) libc function 252 Encrypts the given password with the crypt(3) libc function
253 using the given salt. Debian has this utility under mkpasswd 253 using the given salt. Debian has this utility under mkpasswd
@@ -255,14 +255,14 @@ config CRYPTPW
255 255
256config CHPASSWD 256config CHPASSWD
257 bool "chpasswd" 257 bool "chpasswd"
258 default n 258 default y
259 help 259 help
260 Reads a file of user name and password pairs from standard input 260 Reads a file of user name and password pairs from standard input
261 and uses this information to update a group of existing users. 261 and uses this information to update a group of existing users.
262 262
263config SU 263config SU
264 bool "su" 264 bool "su"
265 default n 265 default y
266 select FEATURE_SUID 266 select FEATURE_SUID
267 select FEATURE_SYSLOG 267 select FEATURE_SYSLOG
268 help 268 help
@@ -284,7 +284,7 @@ config FEATURE_SU_CHECKS_SHELLS
284 284
285config SULOGIN 285config SULOGIN
286 bool "sulogin" 286 bool "sulogin"
287 default n 287 default y
288 select FEATURE_SYSLOG 288 select FEATURE_SYSLOG
289 help 289 help
290 sulogin is invoked when the system goes into single user 290 sulogin is invoked when the system goes into single user
@@ -292,7 +292,7 @@ config SULOGIN
292 292
293config VLOCK 293config VLOCK
294 bool "vlock" 294 bool "vlock"
295 default n 295 default y
296 select FEATURE_SUID 296 select FEATURE_SUID
297 help 297 help
298 Build the "vlock" applet which allows you to lock (virtual) terminals. 298 Build the "vlock" applet which allows you to lock (virtual) terminals.
diff --git a/loginutils/Kbuild b/loginutils/Kbuild.src
index 3d0d777e8..3d0d777e8 100644
--- a/loginutils/Kbuild
+++ b/loginutils/Kbuild.src
diff --git a/mailutils/Config.in b/mailutils/Config.src
index 519d562ae..baa04331a 100644
--- a/mailutils/Config.in
+++ b/mailutils/Config.src
@@ -2,7 +2,7 @@ menu "Mail Utilities"
2 2
3config MAKEMIME 3config MAKEMIME
4 bool "makemime" 4 bool "makemime"
5 default n 5 default y
6 help 6 help
7 Create MIME-formatted messages. 7 Create MIME-formatted messages.
8 8
@@ -15,14 +15,14 @@ config FEATURE_MIME_CHARSET
15 15
16config POPMAILDIR 16config POPMAILDIR
17 bool "popmaildir" 17 bool "popmaildir"
18 default n 18 default y
19 help 19 help
20 Simple yet powerful POP3 mail popper. Delivers content 20 Simple yet powerful POP3 mail popper. Delivers content
21 of remote mailboxes to local Maildir. 21 of remote mailboxes to local Maildir.
22 22
23config FEATURE_POPMAILDIR_DELIVERY 23config FEATURE_POPMAILDIR_DELIVERY
24 bool "Allow message filters and custom delivery program" 24 bool "Allow message filters and custom delivery program"
25 default n 25 default y
26 depends on POPMAILDIR 26 depends on POPMAILDIR
27 help 27 help
28 Allow to use a custom program to filter the content 28 Allow to use a custom program to filter the content
@@ -32,7 +32,7 @@ config FEATURE_POPMAILDIR_DELIVERY
32 32
33config REFORMIME 33config REFORMIME
34 bool "reformime" 34 bool "reformime"
35 default n 35 default y
36 help 36 help
37 Parse MIME-formatted messages. 37 Parse MIME-formatted messages.
38 38
@@ -46,7 +46,7 @@ config FEATURE_REFORMIME_COMPAT
46 46
47config SENDMAIL 47config SENDMAIL
48 bool "sendmail" 48 bool "sendmail"
49 default n 49 default y
50 help 50 help
51 Barebones sendmail. 51 Barebones sendmail.
52 52
diff --git a/mailutils/Kbuild b/mailutils/Kbuild.src
index 871e87981..871e87981 100644
--- a/mailutils/Kbuild
+++ b/mailutils/Kbuild.src
diff --git a/miscutils/Config.in b/miscutils/Config.src
index 7a69dd10f..a822f2a19 100644
--- a/miscutils/Config.in
+++ b/miscutils/Config.src
@@ -7,7 +7,7 @@ menu "Miscellaneous Utilities"
7 7
8config ADJTIMEX 8config ADJTIMEX
9 bool "adjtimex" 9 bool "adjtimex"
10 default n 10 default y
11 help 11 help
12 Adjtimex reads and optionally sets adjustment parameters for 12 Adjtimex reads and optionally sets adjustment parameters for
13 the Linux clock adjustment algorithm. 13 the Linux clock adjustment algorithm.
@@ -21,7 +21,7 @@ config BBCONFIG
21 21
22config BEEP 22config BEEP
23 bool "beep" 23 bool "beep"
24 default n 24 default y
25 help 25 help
26 The beep applets beeps in a given freq/Hz. 26 The beep applets beeps in a given freq/Hz.
27 27
@@ -43,7 +43,7 @@ config FEATURE_BEEP_LENGTH_MS
43 43
44config CHAT 44config CHAT
45 bool "chat" 45 bool "chat"
46 default n 46 default y
47 help 47 help
48 Simple chat utility. 48 Simple chat utility.
49 49
@@ -77,7 +77,7 @@ config FEATURE_CHAT_IMPLICIT_CR
77config FEATURE_CHAT_SWALLOW_OPTS 77config FEATURE_CHAT_SWALLOW_OPTS
78 bool "Swallow options" 78 bool "Swallow options"
79 depends on CHAT 79 depends on CHAT
80 default n 80 default y
81 help 81 help
82 Busybox chat require no options. To make it not fail when used 82 Busybox chat require no options. To make it not fail when used
83 in place of original chat (which has a bunch of options) turn 83 in place of original chat (which has a bunch of options) turn
@@ -86,7 +86,7 @@ config FEATURE_CHAT_SWALLOW_OPTS
86config FEATURE_CHAT_SEND_ESCAPES 86config FEATURE_CHAT_SEND_ESCAPES
87 bool "Support weird SEND escapes" 87 bool "Support weird SEND escapes"
88 depends on CHAT 88 depends on CHAT
89 default n 89 default y
90 help 90 help
91 Original chat uses some escape sequences in SEND arguments which 91 Original chat uses some escape sequences in SEND arguments which
92 are not sent to device but rather performs special actions. 92 are not sent to device but rather performs special actions.
@@ -97,27 +97,27 @@ config FEATURE_CHAT_SEND_ESCAPES
97config FEATURE_CHAT_VAR_ABORT_LEN 97config FEATURE_CHAT_VAR_ABORT_LEN
98 bool "Support variable-length ABORT conditions" 98 bool "Support variable-length ABORT conditions"
99 depends on CHAT 99 depends on CHAT
100 default n 100 default y
101 help 101 help
102 Original chat uses fixed 50-bytes length ABORT conditions. Say N here. 102 Original chat uses fixed 50-bytes length ABORT conditions. Say N here.
103 103
104config FEATURE_CHAT_CLR_ABORT 104config FEATURE_CHAT_CLR_ABORT
105 bool "Support revoking of ABORT conditions" 105 bool "Support revoking of ABORT conditions"
106 depends on CHAT 106 depends on CHAT
107 default n 107 default y
108 help 108 help
109 Support CLR_ABORT directive. 109 Support CLR_ABORT directive.
110 110
111config CHRT 111config CHRT
112 bool "chrt" 112 bool "chrt"
113 default n 113 default y
114 help 114 help
115 manipulate real-time attributes of a process. 115 manipulate real-time attributes of a process.
116 This requires sched_{g,s}etparam support in your libc. 116 This requires sched_{g,s}etparam support in your libc.
117 117
118config CROND 118config CROND
119 bool "crond" 119 bool "crond"
120 default n 120 default y
121 select FEATURE_SUID 121 select FEATURE_SUID
122 select FEATURE_SYSLOG 122 select FEATURE_SYSLOG
123 help 123 help
@@ -132,13 +132,13 @@ config CROND
132config FEATURE_CROND_D 132config FEATURE_CROND_D
133 bool "Support option -d to redirect output to stderr" 133 bool "Support option -d to redirect output to stderr"
134 depends on CROND 134 depends on CROND
135 default n 135 default y
136 help 136 help
137 -d sets loglevel to 0 (most verbose) and directs all output to stderr. 137 -d sets loglevel to 0 (most verbose) and directs all output to stderr.
138 138
139config FEATURE_CROND_CALL_SENDMAIL 139config FEATURE_CROND_CALL_SENDMAIL
140 bool "Report command output via email (using sendmail)" 140 bool "Report command output via email (using sendmail)"
141 default n 141 default y
142 depends on CROND 142 depends on CROND
143 help 143 help
144 Command output will be sent to corresponding user via email. 144 Command output will be sent to corresponding user via email.
@@ -152,7 +152,7 @@ config FEATURE_CROND_DIR
152 152
153config CRONTAB 153config CRONTAB
154 bool "crontab" 154 bool "crontab"
155 default n 155 default y
156 select FEATURE_SUID 156 select FEATURE_SUID
157 help 157 help
158 Crontab manipulates the crontab for a particular user. Only 158 Crontab manipulates the crontab for a particular user. Only
@@ -162,14 +162,14 @@ config CRONTAB
162 162
163config DC 163config DC
164 bool "dc" 164 bool "dc"
165 default n 165 default y
166 help 166 help
167 Dc is a reverse-polish desk calculator which supports unlimited 167 Dc is a reverse-polish desk calculator which supports unlimited
168 precision arithmetic. 168 precision arithmetic.
169 169
170config FEATURE_DC_LIBM 170config FEATURE_DC_LIBM
171 bool "Enable power and exp functions (requires libm)" 171 bool "Enable power and exp functions (requires libm)"
172 default n 172 default y
173 depends on DC 173 depends on DC
174 help 174 help
175 Enable power and exp functions. 175 Enable power and exp functions.
@@ -196,7 +196,7 @@ config DEVFSD
196 196
197config DEVFSD_MODLOAD 197config DEVFSD_MODLOAD
198 bool "Adds support for MODLOAD keyword in devsfd.conf" 198 bool "Adds support for MODLOAD keyword in devsfd.conf"
199 default n 199 default y
200 depends on DEVFSD 200 depends on DEVFSD
201 help 201 help
202 This actually doesn't work with busybox modutils but needs 202 This actually doesn't work with busybox modutils but needs
@@ -204,7 +204,7 @@ config DEVFSD_MODLOAD
204 204
205config DEVFSD_FG_NP 205config DEVFSD_FG_NP
206 bool "Enables the -fg and -np options" 206 bool "Enables the -fg and -np options"
207 default n 207 default y
208 depends on DEVFSD 208 depends on DEVFSD
209 help 209 help
210 -fg Run the daemon in the foreground. 210 -fg Run the daemon in the foreground.
@@ -213,7 +213,7 @@ config DEVFSD_FG_NP
213 213
214config DEVFSD_VERBOSE 214config DEVFSD_VERBOSE
215 bool "Increases logging (and size)" 215 bool "Increases logging (and size)"
216 default n 216 default y
217 depends on DEVFSD 217 depends on DEVFSD
218 help 218 help
219 Increases logging to stderr or syslog. 219 Increases logging to stderr or syslog.
@@ -232,20 +232,20 @@ config FEATURE_DEVFS
232 232
233config DEVMEM 233config DEVMEM
234 bool "devmem" 234 bool "devmem"
235 default n 235 default y
236 help 236 help
237 devmem is a small program that reads and writes from physical 237 devmem is a small program that reads and writes from physical
238 memory using /dev/mem. 238 memory using /dev/mem.
239 239
240config EJECT 240config EJECT
241 bool "eject" 241 bool "eject"
242 default n 242 default y
243 help 243 help
244 Used to eject cdroms. (defaults to /dev/cdrom) 244 Used to eject cdroms. (defaults to /dev/cdrom)
245 245
246config FEATURE_EJECT_SCSI 246config FEATURE_EJECT_SCSI
247 bool "SCSI support" 247 bool "SCSI support"
248 default n 248 default y
249 depends on EJECT 249 depends on EJECT
250 help 250 help
251 Add the -s option to eject, this allows to eject SCSI-Devices and 251 Add the -s option to eject, this allows to eject SCSI-Devices and
@@ -253,7 +253,7 @@ config FEATURE_EJECT_SCSI
253 253
254config FBSPLASH 254config FBSPLASH
255 bool "fbsplash" 255 bool "fbsplash"
256 default n 256 default y
257 help 257 help
258 Shows splash image and progress bar on framebuffer device. 258 Shows splash image and progress bar on framebuffer device.
259 Can be used during boot phase of an embedded device. ~2kb. 259 Can be used during boot phase of an embedded device. ~2kb.
@@ -274,49 +274,49 @@ config FBSPLASH
274 274
275config FLASHCP 275config FLASHCP
276 bool "flashcp" 276 bool "flashcp"
277 default n 277 default y
278 help 278 help
279 The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7. 279 The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
280 This utility is used to copy images into a MTD device. 280 This utility is used to copy images into a MTD device.
281 281
282config FLASH_LOCK 282config FLASH_LOCK
283 bool "flash_lock" 283 bool "flash_lock"
284 default n 284 default y
285 help 285 help
286 The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This 286 The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
287 utility locks part or all of the flash device. 287 utility locks part or all of the flash device.
288 288
289config FLASH_UNLOCK 289config FLASH_UNLOCK
290 bool "flash_unlock" 290 bool "flash_unlock"
291 default n 291 default y
292 help 292 help
293 The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This 293 The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
294 utility unlocks part or all of the flash device. 294 utility unlocks part or all of the flash device.
295 295
296config FLASH_ERASEALL 296config FLASH_ERASEALL
297 bool "flash_eraseall" 297 bool "flash_eraseall"
298 default n 298 default y
299 help 299 help
300 The flash_eraseall binary from mtd-utils as of git head c4c6a59eb. 300 The flash_eraseall binary from mtd-utils as of git head c4c6a59eb.
301 This utility is used to erase the whole MTD device. 301 This utility is used to erase the whole MTD device.
302 302
303config IONICE 303config IONICE
304 bool "ionice" 304 bool "ionice"
305 default n 305 default y
306 help 306 help
307 Set/set program io scheduling class and priority 307 Set/set program io scheduling class and priority
308 Requires kernel >= 2.6.13 308 Requires kernel >= 2.6.13
309 309
310config INOTIFYD 310config INOTIFYD
311 bool "inotifyd" 311 bool "inotifyd"
312 default n 312 default y
313 help 313 help
314 Simple inotify daemon. Reports filesystem changes. Requires 314 Simple inotify daemon. Reports filesystem changes. Requires
315 kernel >= 2.6.13 315 kernel >= 2.6.13
316 316
317config LAST 317config LAST
318 bool "last" 318 bool "last"
319 default n 319 default y
320 depends on FEATURE_WTMP 320 depends on FEATURE_WTMP
321 help 321 help
322 'last' displays a list of the last users that logged into the system. 322 'last' displays a list of the last users that logged into the system.
@@ -324,7 +324,7 @@ config LAST
324choice 324choice
325 prompt "Choose last implementation" 325 prompt "Choose last implementation"
326 depends on LAST 326 depends on LAST
327 default FEATURE_LAST_SMALL 327 default FEATURE_LAST_FANCY
328 328
329config FEATURE_LAST_SMALL 329config FEATURE_LAST_SMALL
330 bool "small" 330 bool "small"
@@ -341,7 +341,7 @@ endchoice
341 341
342config LESS 342config LESS
343 bool "less" 343 bool "less"
344 default n 344 default y
345 help 345 help
346 'less' is a pager, meaning that it displays text files. It possesses 346 'less' is a pager, meaning that it displays text files. It possesses
347 a wide array of features, and is an improvement over 'more'. 347 a wide array of features, and is an improvement over 'more'.
@@ -371,28 +371,28 @@ config FEATURE_LESS_FLAGS
371 371
372config FEATURE_LESS_MARKS 372config FEATURE_LESS_MARKS
373 bool "Enable marks" 373 bool "Enable marks"
374 default n 374 default y
375 depends on LESS 375 depends on LESS
376 help 376 help
377 Marks enable positions in a file to be stored for easy reference. 377 Marks enable positions in a file to be stored for easy reference.
378 378
379config FEATURE_LESS_REGEXP 379config FEATURE_LESS_REGEXP
380 bool "Enable regular expressions" 380 bool "Enable regular expressions"
381 default n 381 default y
382 depends on LESS 382 depends on LESS
383 help 383 help
384 Enable regular expressions, allowing complex file searches. 384 Enable regular expressions, allowing complex file searches.
385 385
386config FEATURE_LESS_WINCH 386config FEATURE_LESS_WINCH
387 bool "Enable automatic resizing on window size changes" 387 bool "Enable automatic resizing on window size changes"
388 default n 388 default y
389 depends on LESS 389 depends on LESS
390 help 390 help
391 Makes less track window size changes. 391 Makes less track window size changes.
392 392
393config FEATURE_LESS_DASHCMD 393config FEATURE_LESS_DASHCMD
394 bool "Enable flag changes ('-' command)" 394 bool "Enable flag changes ('-' command)"
395 default n 395 default y
396 depends on LESS 396 depends on LESS
397 help 397 help
398 This enables the ability to change command-line flags within 398 This enables the ability to change command-line flags within
@@ -400,14 +400,14 @@ config FEATURE_LESS_DASHCMD
400 400
401config FEATURE_LESS_LINENUMS 401config FEATURE_LESS_LINENUMS
402 bool "Enable dynamic switching of line numbers" 402 bool "Enable dynamic switching of line numbers"
403 default n 403 default y
404 depends on FEATURE_LESS_DASHCMD 404 depends on FEATURE_LESS_DASHCMD
405 help 405 help
406 Enable "-N" command. 406 Enable "-N" command.
407 407
408config HDPARM 408config HDPARM
409 bool "hdparm" 409 bool "hdparm"
410 default n 410 default y
411 help 411 help
412 Get/Set hard drive parameters. Primarily intended for ATA 412 Get/Set hard drive parameters. Primarily intended for ATA
413 drives. Adds about 13k (or around 30k if you enable the 413 drives. Adds about 13k (or around 30k if you enable the
@@ -425,7 +425,7 @@ config FEATURE_HDPARM_GET_IDENTITY
425 425
426config FEATURE_HDPARM_HDIO_SCAN_HWIF 426config FEATURE_HDPARM_HDIO_SCAN_HWIF
427 bool "Register an IDE interface (DANGEROUS)" 427 bool "Register an IDE interface (DANGEROUS)"
428 default n 428 default y
429 depends on HDPARM 429 depends on HDPARM
430 help 430 help
431 Enables the 'hdparm -R' option to register an IDE interface. 431 Enables the 'hdparm -R' option to register an IDE interface.
@@ -433,7 +433,7 @@ config FEATURE_HDPARM_HDIO_SCAN_HWIF
433 433
434config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF 434config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
435 bool "Un-register an IDE interface (DANGEROUS)" 435 bool "Un-register an IDE interface (DANGEROUS)"
436 default n 436 default y
437 depends on HDPARM 437 depends on HDPARM
438 help 438 help
439 Enables the 'hdparm -U' option to un-register an IDE interface. 439 Enables the 'hdparm -U' option to un-register an IDE interface.
@@ -441,7 +441,7 @@ config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
441 441
442config FEATURE_HDPARM_HDIO_DRIVE_RESET 442config FEATURE_HDPARM_HDIO_DRIVE_RESET
443 bool "Perform device reset (DANGEROUS)" 443 bool "Perform device reset (DANGEROUS)"
444 default n 444 default y
445 depends on HDPARM 445 depends on HDPARM
446 help 446 help
447 Enables the 'hdparm -w' option to perform a device reset. 447 Enables the 'hdparm -w' option to perform a device reset.
@@ -449,7 +449,7 @@ config FEATURE_HDPARM_HDIO_DRIVE_RESET
449 449
450config FEATURE_HDPARM_HDIO_TRISTATE_HWIF 450config FEATURE_HDPARM_HDIO_TRISTATE_HWIF
451 bool "Tristate device for hotswap (DANGEROUS)" 451 bool "Tristate device for hotswap (DANGEROUS)"
452 default n 452 default y
453 depends on HDPARM 453 depends on HDPARM
454 help 454 help
455 Enables the 'hdparm -x' option to tristate device for hotswap, 455 Enables the 'hdparm -x' option to tristate device for hotswap,
@@ -458,14 +458,14 @@ config FEATURE_HDPARM_HDIO_TRISTATE_HWIF
458 458
459config FEATURE_HDPARM_HDIO_GETSET_DMA 459config FEATURE_HDPARM_HDIO_GETSET_DMA
460 bool "Get/set using_dma flag" 460 bool "Get/set using_dma flag"
461 default n 461 default y
462 depends on HDPARM 462 depends on HDPARM
463 help 463 help
464 Enables the 'hdparm -d' option to get/set using_dma flag. 464 Enables the 'hdparm -d' option to get/set using_dma flag.
465 465
466config MAKEDEVS 466config MAKEDEVS
467 bool "makedevs" 467 bool "makedevs"
468 default n 468 default y
469 help 469 help
470 'makedevs' is a utility used to create a batch of devices with 470 'makedevs' is a utility used to create a batch of devices with
471 one command. 471 one command.
@@ -497,25 +497,25 @@ endchoice
497 497
498config MAN 498config MAN
499 bool "man" 499 bool "man"
500 default n 500 default y
501 help 501 help
502 Format and display manual pages. 502 Format and display manual pages.
503 503
504config MICROCOM 504config MICROCOM
505 bool "microcom" 505 bool "microcom"
506 default n 506 default y
507 help 507 help
508 The poor man's minicom utility for chatting with serial port devices. 508 The poor man's minicom utility for chatting with serial port devices.
509 509
510config MOUNTPOINT 510config MOUNTPOINT
511 bool "mountpoint" 511 bool "mountpoint"
512 default n 512 default y
513 help 513 help
514 mountpoint checks if the directory is a mountpoint. 514 mountpoint checks if the directory is a mountpoint.
515 515
516config MT 516config MT
517 bool "mt" 517 bool "mt"
518 default n 518 default y
519 help 519 help
520 mt is used to control tape devices. You can use the mt utility 520 mt is used to control tape devices. You can use the mt utility
521 to advance or rewind a tape past a specified number of archive 521 to advance or rewind a tape past a specified number of archive
@@ -523,14 +523,14 @@ config MT
523 523
524config RAIDAUTORUN 524config RAIDAUTORUN
525 bool "raidautorun" 525 bool "raidautorun"
526 default n 526 default y
527 help 527 help
528 raidautorun tells the kernel md driver to 528 raidautorun tells the kernel md driver to
529 search and start RAID arrays. 529 search and start RAID arrays.
530 530
531config READAHEAD 531config READAHEAD
532 bool "readahead" 532 bool "readahead"
533 default n 533 default y
534 depends on LFS 534 depends on LFS
535 help 535 help
536 Preload the files listed on the command line into RAM cache so that 536 Preload the files listed on the command line into RAM cache so that
@@ -547,7 +547,7 @@ config READAHEAD
547 547
548config RFKILL 548config RFKILL
549 bool "rfkill" 549 bool "rfkill"
550 default n 550 default y
551 help 551 help
552 Enable/disable wireless devices. 552 Enable/disable wireless devices.
553 553
@@ -558,7 +558,7 @@ config RFKILL
558 558
559config RUNLEVEL 559config RUNLEVEL
560 bool "runlevel" 560 bool "runlevel"
561 default n 561 default y
562 help 562 help
563 find the current and previous system runlevel. 563 find the current and previous system runlevel.
564 564
@@ -567,26 +567,26 @@ config RUNLEVEL
567 567
568config RX 568config RX
569 bool "rx" 569 bool "rx"
570 default n 570 default y
571 help 571 help
572 Receive files using the Xmodem protocol. 572 Receive files using the Xmodem protocol.
573 573
574config SETSID 574config SETSID
575 bool "setsid" 575 bool "setsid"
576 default n 576 default y
577 help 577 help
578 setsid runs a program in a new session 578 setsid runs a program in a new session
579 579
580config STRINGS 580config STRINGS
581 bool "strings" 581 bool "strings"
582 default n 582 default y
583 help 583 help
584 strings prints the printable character sequences for each file 584 strings prints the printable character sequences for each file
585 specified. 585 specified.
586 586
587config TASKSET 587config TASKSET
588 bool "taskset" 588 bool "taskset"
589 default n 589 default y
590 help 590 help
591 Retrieve or set a processes's CPU affinity. 591 Retrieve or set a processes's CPU affinity.
592 This requires sched_{g,s}etaffinity support in your libc. 592 This requires sched_{g,s}etaffinity support in your libc.
@@ -602,7 +602,7 @@ config FEATURE_TASKSET_FANCY
602 602
603config TIME 603config TIME
604 bool "time" 604 bool "time"
605 default n 605 default y
606 help 606 help
607 The time command runs the specified program with the given arguments. 607 The time command runs the specified program with the given arguments.
608 When the command finishes, time writes a message to standard output 608 When the command finishes, time writes a message to standard output
@@ -610,14 +610,14 @@ config TIME
610 610
611config TIMEOUT 611config TIMEOUT
612 bool "timeout" 612 bool "timeout"
613 default n 613 default y
614 help 614 help
615 Runs a program and watches it. If it does not terminate in 615 Runs a program and watches it. If it does not terminate in
616 specified number of seconds, it is sent a signal. 616 specified number of seconds, it is sent a signal.
617 617
618config TTYSIZE 618config TTYSIZE
619 bool "ttysize" 619 bool "ttysize"
620 default n 620 default y
621 help 621 help
622 A replacement for "stty size". Unlike stty, can report only width, 622 A replacement for "stty size". Unlike stty, can report only width,
623 only height, or both, in any order. It also does not complain on 623 only height, or both, in any order. It also does not complain on
@@ -626,19 +626,19 @@ config TTYSIZE
626 626
627config VOLNAME 627config VOLNAME
628 bool "volname" 628 bool "volname"
629 default n 629 default y
630 help 630 help
631 Prints a CD-ROM volume name. 631 Prints a CD-ROM volume name.
632 632
633config WALL 633config WALL
634 bool "wall" 634 bool "wall"
635 default n 635 default y
636 help 636 help
637 Write a message to all users that are logged in. 637 Write a message to all users that are logged in.
638 638
639config WATCHDOG 639config WATCHDOG
640 bool "watchdog" 640 bool "watchdog"
641 default n 641 default y
642 help 642 help
643 The watchdog utility is used with hardware or software watchdog 643 The watchdog utility is used with hardware or software watchdog
644 device drivers. It opens the specified watchdog device special file 644 device drivers. It opens the specified watchdog device special file
diff --git a/miscutils/Kbuild b/miscutils/Kbuild.src
index 3c8ce42ba..3c8ce42ba 100644
--- a/miscutils/Kbuild
+++ b/miscutils/Kbuild.src
diff --git a/modutils/Config.in b/modutils/Config.src
index 83c12b67f..2ced9b308 100644
--- a/modutils/Config.in
+++ b/modutils/Config.src
@@ -5,9 +5,11 @@
5 5
6menu "Linux Module Utilities" 6menu "Linux Module Utilities"
7 7
8INSERT
9
8config MODPROBE_SMALL 10config MODPROBE_SMALL
9 bool "Simplified modutils" 11 bool "Simplified modutils"
10 default n 12 default y
11 help 13 help
12 Simplified modutils. 14 Simplified modutils.
13 15
@@ -40,14 +42,14 @@ config MODPROBE_SMALL
40 42
41config FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE 43config FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE
42 bool "Accept module options on modprobe command line" 44 bool "Accept module options on modprobe command line"
43 default n 45 default y
44 depends on MODPROBE_SMALL 46 depends on MODPROBE_SMALL
45 help 47 help
46 Allow insmod and modprobe take module options from command line. 48 Allow insmod and modprobe take module options from command line.
47 49
48config FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED 50config FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
49 bool "Skip loading of already loaded modules" 51 bool "Skip loading of already loaded modules"
50 default n 52 default y
51 depends on MODPROBE_SMALL 53 depends on MODPROBE_SMALL
52 help 54 help
53 Check if the module is already loaded. 55 Check if the module is already loaded.
diff --git a/modutils/Kbuild b/modutils/Kbuild.src
index 31f7cbf93..fc0808d7f 100644
--- a/modutils/Kbuild
+++ b/modutils/Kbuild.src
@@ -5,6 +5,7 @@
5# Licensed under the GPL v2, see the file LICENSE in this tarball. 5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6 6
7lib-y:= 7lib-y:=
8INSERT
8lib-$(CONFIG_MODPROBE_SMALL) += modprobe-small.o 9lib-$(CONFIG_MODPROBE_SMALL) += modprobe-small.o
9lib-$(CONFIG_DEPMOD) += depmod.o modutils.o 10lib-$(CONFIG_DEPMOD) += depmod.o modutils.o
10lib-$(CONFIG_INSMOD) += insmod.o modutils.o 11lib-$(CONFIG_INSMOD) += insmod.o modutils.o
diff --git a/modutils/modinfo.c b/modutils/modinfo.c
new file mode 100644
index 000000000..c68d2e974
--- /dev/null
+++ b/modutils/modinfo.c
@@ -0,0 +1,150 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * modinfo - retrieve module info
4 * Copyright (c) 2008 Pascal Bellard
5 *
6 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
7 */
8
9//applet:IF_MODINFO(APPLET(modinfo, _BB_DIR_SBIN, _BB_SUID_DROP))
10
11//kbuild:lib-$(CONFIG_MODINFO) += modinfo.o
12
13//config:config MODINFO
14//config: bool "modinfo"
15//config: default y
16//config: help
17//config: Show information about a Linux Kernel module
18
19#include <fnmatch.h>
20#include <sys/utsname.h> /* uname() */
21#include "libbb.h"
22#include "modutils.h"
23
24
25enum {
26 OPT_TAGS = (1 << 6) - 1,
27 OPT_F = (1 << 6), /* field name */
28 OPT_0 = (1 << 7), /* \0 as separator */
29};
30
31struct modinfo_env {
32 char *field;
33 int tags;
34};
35
36static int display(const char *data, const char *pattern, int flag)
37{
38 if (flag) {
39 int n = printf("%s:", pattern);
40 while (n++ < 16)
41 bb_putchar(' ');
42 }
43 return printf("%s%c", data, (option_mask32 & OPT_0) ? '\0' : '\n');
44}
45
46static void modinfo(const char *path, struct modinfo_env *env)
47{
48 static const char *const shortcuts[] = {
49 "filename",
50 "description",
51 "author",
52 "license",
53 "vermagic",
54 "parm",
55 };
56 size_t len;
57 int j, length;
58 char *ptr, *the_module;
59 const char *field = env->field;
60 int tags = env->tags;
61
62 if (tags & 1) { /* filename */
63 display(path, shortcuts[0], 1 != tags);
64 }
65 len = MAXINT(ssize_t);
66 the_module = xmalloc_open_zipped_read_close(path, &len);
67 if (!the_module)
68 return;
69 if (field)
70 tags |= OPT_F;
71 for (j = 1; (1<<j) & (OPT_TAGS + OPT_F); j++) {
72 const char *pattern = field;
73 if ((1<<j) & OPT_TAGS)
74 pattern = shortcuts[j];
75 if (!((1<<j) & tags))
76 continue;
77 length = strlen(pattern);
78 ptr = the_module;
79 while (1) {
80 ptr = memchr(ptr, *pattern, len - (ptr - (char*)the_module));
81 if (ptr == NULL) /* no occurance left, done */
82 break;
83 if (strncmp(ptr, pattern, length) == 0 && ptr[length] == '=') {
84 ptr += length + 1;
85 ptr += display(ptr, pattern, (1<<j) != tags);
86 }
87 ++ptr;
88 }
89 }
90 free(the_module);
91}
92
93//usage:#define modinfo_trivial_usage
94//usage: "[-adlp0] [-F keyword] MODULE"
95//usage:#define modinfo_full_usage "\n\n"
96//usage: "Options:"
97//usage: "\n -a Shortcut for '-F author'"
98//usage: "\n -d Shortcut for '-F description'"
99//usage: "\n -l Shortcut for '-F license'"
100//usage: "\n -p Shortcut for '-F parm'"
101//usage: "\n -F keyword Keyword to look for"
102//usage: "\n -0 Separate output with NULs"
103//usage:#define modinfo_example_usage
104//usage: "$ modinfo -F vermagic loop\n"
105
106int modinfo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
107int modinfo_main(int argc UNUSED_PARAM, char **argv)
108{
109 struct modinfo_env env;
110 char name[MODULE_NAME_LEN];
111 struct utsname uts;
112 parser_t *p;
113 char *colon, *tokens[2];
114 unsigned opts;
115 unsigned i;
116
117 env.field = NULL;
118 opt_complementary = "-1"; /* minimum one param */
119 opts = getopt32(argv, "fdalvpF:0", &env.field);
120 env.tags = opts & OPT_TAGS ? opts & OPT_TAGS : OPT_TAGS;
121 argv += optind;
122
123 uname(&uts);
124 p = config_open2(
125 concat_path_file(
126 concat_path_file(CONFIG_DEFAULT_MODULES_DIR, uts.release),
127 CONFIG_DEFAULT_DEPMOD_FILE),
128 xfopen_for_read
129 );
130
131 while (config_read(p, tokens, 2, 1, "# \t", PARSE_NORMAL)) {
132 colon = last_char_is(tokens[0], ':');
133 if (colon == NULL)
134 continue;
135 *colon = '\0';
136 filename2modname(tokens[0], name);
137 for (i = 0; argv[i]; i++) {
138 if (fnmatch(argv[i], name, 0) == 0) {
139 modinfo(tokens[0], &env);
140 argv[i] = (char *) "";
141 }
142 }
143 }
144 for (i = 0; argv[i]; i++) {
145 if (argv[i][0]) {
146 modinfo(argv[i], &env);
147 }
148 }
149 return 0;
150}
diff --git a/networking/Config.in b/networking/Config.src
index ce7166f98..eb8dc1ce2 100644
--- a/networking/Config.in
+++ b/networking/Config.src
@@ -7,7 +7,7 @@ menu "Networking Utilities"
7 7
8config FEATURE_IPV6 8config FEATURE_IPV6
9 bool "Enable IPv6 support" 9 bool "Enable IPv6 support"
10 default n 10 default y
11 help 11 help
12 Enable IPv6 support in busybox. 12 Enable IPv6 support in busybox.
13 This adds IPv6 support in the networking applets. 13 This adds IPv6 support in the networking applets.
@@ -48,26 +48,26 @@ config VERBOSE_RESOLUTION_ERRORS
48 48
49config ARP 49config ARP
50 bool "arp" 50 bool "arp"
51 default n 51 default y
52 help 52 help
53 Manipulate the system ARP cache. 53 Manipulate the system ARP cache.
54 54
55config ARPING 55config ARPING
56 bool "arping" 56 bool "arping"
57 default n 57 default y
58 help 58 help
59 Ping hosts by ARP packets. 59 Ping hosts by ARP packets.
60 60
61config BRCTL 61config BRCTL
62 bool "brctl" 62 bool "brctl"
63 default n 63 default y
64 help 64 help
65 Manage ethernet bridges. 65 Manage ethernet bridges.
66 Supports addbr/delbr and addif/delif. 66 Supports addbr/delbr and addif/delif.
67 67
68config FEATURE_BRCTL_FANCY 68config FEATURE_BRCTL_FANCY
69 bool "Fancy options" 69 bool "Fancy options"
70 default n 70 default y
71 depends on BRCTL 71 depends on BRCTL
72 help 72 help
73 Add support for extended option like: 73 Add support for extended option like:
@@ -78,7 +78,7 @@ config FEATURE_BRCTL_FANCY
78 78
79config FEATURE_BRCTL_SHOW 79config FEATURE_BRCTL_SHOW
80 bool "Support show, showmac and showstp" 80 bool "Support show, showmac and showstp"
81 default n 81 default y
82 depends on BRCTL && FEATURE_BRCTL_FANCY 82 depends on BRCTL && FEATURE_BRCTL_FANCY
83 help 83 help
84 Add support for option which prints the current config: 84 Add support for option which prints the current config:
@@ -86,19 +86,19 @@ config FEATURE_BRCTL_SHOW
86 86
87config DNSD 87config DNSD
88 bool "dnsd" 88 bool "dnsd"
89 default n 89 default y
90 help 90 help
91 Small and static DNS server daemon. 91 Small and static DNS server daemon.
92 92
93config ETHER_WAKE 93config ETHER_WAKE
94 bool "ether-wake" 94 bool "ether-wake"
95 default n 95 default y
96 help 96 help
97 Send a magic packet to wake up sleeping machines. 97 Send a magic packet to wake up sleeping machines.
98 98
99config FAKEIDENTD 99config FAKEIDENTD
100 bool "fakeidentd" 100 bool "fakeidentd"
101 default n 101 default y
102 select FEATURE_SYSLOG 102 select FEATURE_SYSLOG
103 help 103 help
104 fakeidentd listens on the ident port and returns a predefined 104 fakeidentd listens on the ident port and returns a predefined
@@ -106,7 +106,7 @@ config FAKEIDENTD
106 106
107config FTPD 107config FTPD
108 bool "ftpd" 108 bool "ftpd"
109 default n 109 default y
110 help 110 help
111 simple FTP daemon. You have to run it via inetd. 111 simple FTP daemon. You have to run it via inetd.
112 112
@@ -130,38 +130,38 @@ config FEATURE_FTPD_ACCEPT_BROKEN_LIST
130 130
131config FTPGET 131config FTPGET
132 bool "ftpget" 132 bool "ftpget"
133 default n 133 default y
134 help 134 help
135 Retrieve a remote file via FTP. 135 Retrieve a remote file via FTP.
136 136
137config FTPPUT 137config FTPPUT
138 bool "ftpput" 138 bool "ftpput"
139 default n 139 default y
140 help 140 help
141 Store a remote file via FTP. 141 Store a remote file via FTP.
142 142
143config FEATURE_FTPGETPUT_LONG_OPTIONS 143config FEATURE_FTPGETPUT_LONG_OPTIONS
144 bool "Enable long options in ftpget/ftpput" 144 bool "Enable long options in ftpget/ftpput"
145 default n 145 default y
146 depends on LONG_OPTS && (FTPGET || FTPPUT) 146 depends on LONG_OPTS && (FTPGET || FTPPUT)
147 help 147 help
148 Support long options for the ftpget/ftpput applet. 148 Support long options for the ftpget/ftpput applet.
149 149
150config HOSTNAME 150config HOSTNAME
151 bool "hostname" 151 bool "hostname"
152 default n 152 default y
153 help 153 help
154 Show or set the system's host name. 154 Show or set the system's host name.
155 155
156config HTTPD 156config HTTPD
157 bool "httpd" 157 bool "httpd"
158 default n 158 default y
159 help 159 help
160 Serve web pages via an HTTP server. 160 Serve web pages via an HTTP server.
161 161
162config FEATURE_HTTPD_RANGES 162config FEATURE_HTTPD_RANGES
163 bool "Support 'Ranges:' header" 163 bool "Support 'Ranges:' header"
164 default n 164 default y
165 depends on HTTPD 165 depends on HTTPD
166 help 166 help
167 Makes httpd emit "Accept-Ranges: bytes" header and understand 167 Makes httpd emit "Accept-Ranges: bytes" header and understand
@@ -170,7 +170,7 @@ config FEATURE_HTTPD_RANGES
170 170
171config FEATURE_HTTPD_USE_SENDFILE 171config FEATURE_HTTPD_USE_SENDFILE
172 bool "Use sendfile system call" 172 bool "Use sendfile system call"
173 default n 173 default y
174 depends on HTTPD 174 depends on HTTPD
175 help 175 help
176 When enabled, httpd will use the kernel sendfile() function 176 When enabled, httpd will use the kernel sendfile() function
@@ -178,7 +178,7 @@ config FEATURE_HTTPD_USE_SENDFILE
178 178
179config FEATURE_HTTPD_SETUID 179config FEATURE_HTTPD_SETUID
180 bool "Enable -u <user> option" 180 bool "Enable -u <user> option"
181 default n 181 default y
182 depends on HTTPD 182 depends on HTTPD
183 help 183 help
184 This option allows the server to run as a specific user 184 This option allows the server to run as a specific user
@@ -196,7 +196,7 @@ config FEATURE_HTTPD_BASIC_AUTH
196 196
197config FEATURE_HTTPD_AUTH_MD5 197config FEATURE_HTTPD_AUTH_MD5
198 bool "Support MD5 crypted passwords for http Authentication" 198 bool "Support MD5 crypted passwords for http Authentication"
199 default n 199 default y
200 depends on FEATURE_HTTPD_BASIC_AUTH 200 depends on FEATURE_HTTPD_BASIC_AUTH
201 help 201 help
202 Enables basic per URL authentication from /etc/httpd.conf 202 Enables basic per URL authentication from /etc/httpd.conf
@@ -212,7 +212,7 @@ config FEATURE_HTTPD_CGI
212 212
213config FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR 213config FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
214 bool "Support for running scripts through an interpreter" 214 bool "Support for running scripts through an interpreter"
215 default n 215 default y
216 depends on FEATURE_HTTPD_CGI 216 depends on FEATURE_HTTPD_CGI
217 help 217 help
218 This option enables support for running scripts through an 218 This option enables support for running scripts through an
@@ -223,7 +223,7 @@ config FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
223 223
224config FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV 224config FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
225 bool "Set REMOTE_PORT environment variable for CGI" 225 bool "Set REMOTE_PORT environment variable for CGI"
226 default n 226 default y
227 depends on FEATURE_HTTPD_CGI 227 depends on FEATURE_HTTPD_CGI
228 help 228 help
229 Use of this option can assist scripts in generating 229 Use of this option can assist scripts in generating
@@ -241,7 +241,7 @@ config FEATURE_HTTPD_ENCODE_URL_STR
241 241
242config FEATURE_HTTPD_ERROR_PAGES 242config FEATURE_HTTPD_ERROR_PAGES
243 bool "Support for custom error pages" 243 bool "Support for custom error pages"
244 default n 244 default y
245 depends on HTTPD 245 depends on HTTPD
246 help 246 help
247 This option allows you to define custom error pages in 247 This option allows you to define custom error pages in
@@ -254,7 +254,7 @@ config FEATURE_HTTPD_ERROR_PAGES
254 254
255config FEATURE_HTTPD_PROXY 255config FEATURE_HTTPD_PROXY
256 bool "Support for reverse proxy" 256 bool "Support for reverse proxy"
257 default n 257 default y
258 depends on HTTPD 258 depends on HTTPD
259 help 259 help
260 This option allows you to define URLs that will be forwarded 260 This option allows you to define URLs that will be forwarded
@@ -266,7 +266,7 @@ config FEATURE_HTTPD_PROXY
266 266
267config IFCONFIG 267config IFCONFIG
268 bool "ifconfig" 268 bool "ifconfig"
269 default n 269 default y
270 help 270 help
271 Ifconfig is used to configure the kernel-resident network interfaces. 271 Ifconfig is used to configure the kernel-resident network interfaces.
272 272
@@ -280,7 +280,7 @@ config FEATURE_IFCONFIG_STATUS
280 280
281config FEATURE_IFCONFIG_SLIP 281config FEATURE_IFCONFIG_SLIP
282 bool "Enable slip-specific options \"keepalive\" and \"outfill\"" 282 bool "Enable slip-specific options \"keepalive\" and \"outfill\""
283 default n 283 default y
284 depends on IFCONFIG 284 depends on IFCONFIG
285 help 285 help
286 Allow "keepalive" and "outfill" support for SLIP. If you're not 286 Allow "keepalive" and "outfill" support for SLIP. If you're not
@@ -288,7 +288,7 @@ config FEATURE_IFCONFIG_SLIP
288 288
289config FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ 289config FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
290 bool "Enable options \"mem_start\", \"io_addr\", and \"irq\"" 290 bool "Enable options \"mem_start\", \"io_addr\", and \"irq\""
291 default n 291 default y
292 depends on IFCONFIG 292 depends on IFCONFIG
293 help 293 help
294 Allow the start address for shared memory, start address for I/O, 294 Allow the start address for shared memory, start address for I/O,
@@ -305,7 +305,7 @@ config FEATURE_IFCONFIG_HW
305 305
306config FEATURE_IFCONFIG_BROADCAST_PLUS 306config FEATURE_IFCONFIG_BROADCAST_PLUS
307 bool "Set the broadcast automatically" 307 bool "Set the broadcast automatically"
308 default n 308 default y
309 depends on IFCONFIG 309 depends on IFCONFIG
310 help 310 help
311 Setting this will make ifconfig attempt to find the broadcast 311 Setting this will make ifconfig attempt to find the broadcast
@@ -313,20 +313,20 @@ config FEATURE_IFCONFIG_BROADCAST_PLUS
313 313
314config IFENSLAVE 314config IFENSLAVE
315 bool "ifenslave" 315 bool "ifenslave"
316 default n 316 default y
317 help 317 help
318 Userspace application to bind several interfaces 318 Userspace application to bind several interfaces
319 to a logical interface (use with kernel bonding driver). 319 to a logical interface (use with kernel bonding driver).
320 320
321config IFPLUGD 321config IFPLUGD
322 bool "ifplugd" 322 bool "ifplugd"
323 default n 323 default y
324 help 324 help
325 Network interface plug detection daemon. 325 Network interface plug detection daemon.
326 326
327config IFUPDOWN 327config IFUPDOWN
328 bool "ifupdown" 328 bool "ifupdown"
329 default n 329 default y
330 help 330 help
331 Activate or deactivate the specified interfaces. This applet makes 331 Activate or deactivate the specified interfaces. This applet makes
332 use of either "ifconfig" and "route" or the "ip" command to actually 332 use of either "ifconfig" and "route" or the "ip" command to actually
@@ -353,7 +353,7 @@ config IFUPDOWN_IFSTATE_PATH
353 353
354config FEATURE_IFUPDOWN_IP 354config FEATURE_IFUPDOWN_IP
355 bool "Use ip applet" 355 bool "Use ip applet"
356 default n 356 default y
357 depends on IFUPDOWN 357 depends on IFUPDOWN
358 help 358 help
359 Use the iproute "ip" command to implement "ifup" and "ifdown", rather 359 Use the iproute "ip" command to implement "ifup" and "ifdown", rather
@@ -375,7 +375,7 @@ config FEATURE_IFUPDOWN_IP_BUILTIN
375 375
376config FEATURE_IFUPDOWN_IFCONFIG_BUILTIN 376config FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
377 bool "Use busybox ifconfig and route applets" 377 bool "Use busybox ifconfig and route applets"
378 default y 378 default n
379 depends on IFUPDOWN && !FEATURE_IFUPDOWN_IP 379 depends on IFUPDOWN && !FEATURE_IFUPDOWN_IP
380 select IFCONFIG 380 select IFCONFIG
381 select ROUTE 381 select ROUTE
@@ -396,7 +396,7 @@ config FEATURE_IFUPDOWN_IPV4
396 396
397config FEATURE_IFUPDOWN_IPV6 397config FEATURE_IFUPDOWN_IPV6
398 bool "Support for IPv6" 398 bool "Support for IPv6"
399 default n 399 default y
400 depends on IFUPDOWN && FEATURE_IPV6 400 depends on IFUPDOWN && FEATURE_IPV6
401 help 401 help
402 If you need support for IPv6, turn this option on. 402 If you need support for IPv6, turn this option on.
@@ -404,7 +404,7 @@ config FEATURE_IFUPDOWN_IPV6
404### UNUSED 404### UNUSED
405###config FEATURE_IFUPDOWN_IPX 405###config FEATURE_IFUPDOWN_IPX
406### bool "Support for IPX" 406### bool "Support for IPX"
407### default n 407### default y
408### depends on IFUPDOWN 408### depends on IFUPDOWN
409### help 409### help
410### If this option is selected you can use busybox to work with IPX 410### If this option is selected you can use busybox to work with IPX
@@ -412,7 +412,7 @@ config FEATURE_IFUPDOWN_IPV6
412 412
413config FEATURE_IFUPDOWN_MAPPING 413config FEATURE_IFUPDOWN_MAPPING
414 bool "Enable mapping support" 414 bool "Enable mapping support"
415 default n 415 default y
416 depends on IFUPDOWN 416 depends on IFUPDOWN
417 help 417 help
418 This enables support for the "mapping" stanza, unless you have 418 This enables support for the "mapping" stanza, unless you have
@@ -430,7 +430,7 @@ config FEATURE_IFUPDOWN_EXTERNAL_DHCP
430 430
431config INETD 431config INETD
432 bool "inetd" 432 bool "inetd"
433 default n 433 default y
434 select FEATURE_SYSLOG 434 select FEATURE_SYSLOG
435 help 435 help
436 Internet superserver daemon 436 Internet superserver daemon
@@ -472,7 +472,7 @@ config FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN
472 472
473config FEATURE_INETD_RPC 473config FEATURE_INETD_RPC
474 bool "Support RPC services" 474 bool "Support RPC services"
475 default n 475 default y
476 depends on INETD 476 depends on INETD
477 select FEATURE_HAVE_RPC 477 select FEATURE_HAVE_RPC
478 help 478 help
@@ -480,7 +480,7 @@ config FEATURE_INETD_RPC
480 480
481config IP 481config IP
482 bool "ip" 482 bool "ip"
483 default n 483 default y
484 help 484 help
485 The "ip" applet is a TCP/IP interface configuration and routing 485 The "ip" applet is a TCP/IP interface configuration and routing
486 utility. You generally don't need "ip" to use busybox with 486 utility. You generally don't need "ip" to use busybox with
@@ -509,21 +509,21 @@ config FEATURE_IP_ROUTE
509 509
510config FEATURE_IP_TUNNEL 510config FEATURE_IP_TUNNEL
511 bool "ip tunnel" 511 bool "ip tunnel"
512 default n 512 default y
513 depends on IP 513 depends on IP
514 help 514 help
515 Add support for tunneling commands to "ip". 515 Add support for tunneling commands to "ip".
516 516
517config FEATURE_IP_RULE 517config FEATURE_IP_RULE
518 bool "ip rule" 518 bool "ip rule"
519 default n 519 default y
520 depends on IP 520 depends on IP
521 help 521 help
522 Add support for rule commands to "ip". 522 Add support for rule commands to "ip".
523 523
524config FEATURE_IP_SHORT_FORMS 524config FEATURE_IP_SHORT_FORMS
525 bool "Support short forms of ip commands" 525 bool "Support short forms of ip commands"
526 default n 526 default y
527 depends on IP 527 depends on IP
528 help 528 help
529 Also support short-form of ip <OBJECT> commands: 529 Also support short-form of ip <OBJECT> commands:
@@ -573,7 +573,7 @@ config IPRULE
573 573
574config IPCALC 574config IPCALC
575 bool "ipcalc" 575 bool "ipcalc"
576 default n 576 default y
577 help 577 help
578 ipcalc takes an IP address and netmask and calculates the 578 ipcalc takes an IP address and netmask and calculates the
579 resulting broadcast, network, and host range. 579 resulting broadcast, network, and host range.
@@ -588,14 +588,14 @@ config FEATURE_IPCALC_FANCY
588 588
589config FEATURE_IPCALC_LONG_OPTIONS 589config FEATURE_IPCALC_LONG_OPTIONS
590 bool "Enable long options" 590 bool "Enable long options"
591 default n 591 default y
592 depends on IPCALC && LONG_OPTS 592 depends on IPCALC && LONG_OPTS
593 help 593 help
594 Support long options for the ipcalc applet. 594 Support long options for the ipcalc applet.
595 595
596config NAMEIF 596config NAMEIF
597 bool "nameif" 597 bool "nameif"
598 default n 598 default y
599 select FEATURE_SYSLOG 599 select FEATURE_SYSLOG
600 help 600 help
601 nameif is used to rename network interface by its MAC address. 601 nameif is used to rename network interface by its MAC address.
@@ -610,7 +610,7 @@ config NAMEIF
610 610
611config FEATURE_NAMEIF_EXTENDED 611config FEATURE_NAMEIF_EXTENDED
612 bool "Extended nameif" 612 bool "Extended nameif"
613 default n 613 default y
614 depends on NAMEIF 614 depends on NAMEIF
615 help 615 help
616 This extends the nameif syntax to support the bus_info and driver 616 This extends the nameif syntax to support the bus_info and driver
@@ -623,21 +623,21 @@ config FEATURE_NAMEIF_EXTENDED
623 623
624config NC 624config NC
625 bool "nc" 625 bool "nc"
626 default n 626 default y
627 help 627 help
628 A simple Unix utility which reads and writes data across network 628 A simple Unix utility which reads and writes data across network
629 connections. 629 connections.
630 630
631config NC_SERVER 631config NC_SERVER
632 bool "Netcat server options (-l)" 632 bool "Netcat server options (-l)"
633 default n 633 default y
634 depends on NC 634 depends on NC
635 help 635 help
636 Allow netcat to act as a server. 636 Allow netcat to act as a server.
637 637
638config NC_EXTRA 638config NC_EXTRA
639 bool "Netcat extensions (-eiw and filename)" 639 bool "Netcat extensions (-eiw and filename)"
640 default n 640 default y
641 depends on NC 641 depends on NC
642 help 642 help
643 Add -e (support for executing the rest of the command line after 643 Add -e (support for executing the rest of the command line after
@@ -646,13 +646,13 @@ config NC_EXTRA
646 646
647config NETSTAT 647config NETSTAT
648 bool "netstat" 648 bool "netstat"
649 default n 649 default y
650 help 650 help
651 netstat prints information about the Linux networking subsystem. 651 netstat prints information about the Linux networking subsystem.
652 652
653config FEATURE_NETSTAT_WIDE 653config FEATURE_NETSTAT_WIDE
654 bool "Enable wide netstat output" 654 bool "Enable wide netstat output"
655 default n 655 default y
656 depends on NETSTAT 656 depends on NETSTAT
657 help 657 help
658 Add support for wide columns. Useful when displaying IPv6 addresses 658 Add support for wide columns. Useful when displaying IPv6 addresses
@@ -660,7 +660,7 @@ config FEATURE_NETSTAT_WIDE
660 660
661config FEATURE_NETSTAT_PRG 661config FEATURE_NETSTAT_PRG
662 bool "Enable PID/Program name output" 662 bool "Enable PID/Program name output"
663 default n 663 default y
664 depends on NETSTAT 664 depends on NETSTAT
665 help 665 help
666 Add support for -p flag to print out PID and program name. 666 Add support for -p flag to print out PID and program name.
@@ -668,13 +668,13 @@ config FEATURE_NETSTAT_PRG
668 668
669config NSLOOKUP 669config NSLOOKUP
670 bool "nslookup" 670 bool "nslookup"
671 default n 671 default y
672 help 672 help
673 nslookup is a tool to query Internet name servers. 673 nslookup is a tool to query Internet name servers.
674 674
675config NTPD 675config NTPD
676 bool "ntpd" 676 bool "ntpd"
677 default n 677 default y
678 help 678 help
679 The NTP client/server daemon. 679 The NTP client/server daemon.
680 680
@@ -688,14 +688,14 @@ config FEATURE_NTPD_SERVER
688 688
689config PING 689config PING
690 bool "ping" 690 bool "ping"
691 default n 691 default y
692 help 692 help
693 ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to 693 ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
694 elicit an ICMP ECHO_RESPONSE from a host or gateway. 694 elicit an ICMP ECHO_RESPONSE from a host or gateway.
695 695
696config PING6 696config PING6
697 bool "ping6" 697 bool "ping6"
698 default n 698 default y
699 depends on FEATURE_IPV6 && PING 699 depends on FEATURE_IPV6 && PING
700 help 700 help
701 This will give you a ping that can talk IPv6. 701 This will give you a ping that can talk IPv6.
@@ -710,26 +710,26 @@ config FEATURE_FANCY_PING
710 710
711config PSCAN 711config PSCAN
712 bool "pscan" 712 bool "pscan"
713 default n 713 default y
714 help 714 help
715 Simple network port scanner. 715 Simple network port scanner.
716 716
717config ROUTE 717config ROUTE
718 bool "route" 718 bool "route"
719 default n 719 default y
720 help 720 help
721 Route displays or manipulates the kernel's IP routing tables. 721 Route displays or manipulates the kernel's IP routing tables.
722 722
723config SLATTACH 723config SLATTACH
724 bool "slattach" 724 bool "slattach"
725 default n 725 default y
726 help 726 help
727 slattach is a small utility to attach network interfaces to serial 727 slattach is a small utility to attach network interfaces to serial
728 lines. 728 lines.
729 729
730#config TC 730#config TC
731# bool "tc" 731# bool "tc"
732# default n 732# default y
733# help 733# help
734# show / manipulate traffic control settings 734# show / manipulate traffic control settings
735# 735#
@@ -739,14 +739,14 @@ config SLATTACH
739 739
740config TCPSVD 740config TCPSVD
741 bool "tcpsvd" 741 bool "tcpsvd"
742 default n 742 default y
743 help 743 help
744 tcpsvd listens on a TCP port and runs a program for each new 744 tcpsvd listens on a TCP port and runs a program for each new
745 connection. 745 connection.
746 746
747config TELNET 747config TELNET
748 bool "telnet" 748 bool "telnet"
749 default n 749 default y
750 help 750 help
751 Telnet is an interface to the TELNET protocol, but is also commonly 751 Telnet is an interface to the TELNET protocol, but is also commonly
752 used to test other simple protocols. 752 used to test other simple protocols.
@@ -772,7 +772,7 @@ config FEATURE_TELNET_AUTOLOGIN
772 772
773config TELNETD 773config TELNETD
774 bool "telnetd" 774 bool "telnetd"
775 default n 775 default y
776 select FEATURE_SYSLOG 776 select FEATURE_SYSLOG
777 help 777 help
778 A daemon for the TELNET protocol, allowing you to log onto the host 778 A daemon for the TELNET protocol, allowing you to log onto the host
@@ -815,14 +815,14 @@ config TELNETD
815 815
816config FEATURE_TELNETD_STANDALONE 816config FEATURE_TELNETD_STANDALONE
817 bool "Support standalone telnetd (not inetd only)" 817 bool "Support standalone telnetd (not inetd only)"
818 default n 818 default y
819 depends on TELNETD 819 depends on TELNETD
820 help 820 help
821 Selecting this will make telnetd able to run standalone. 821 Selecting this will make telnetd able to run standalone.
822 822
823config FEATURE_TELNETD_INETD_WAIT 823config FEATURE_TELNETD_INETD_WAIT
824 bool "Support -w SEC option (inetd wait mode)" 824 bool "Support -w SEC option (inetd wait mode)"
825 default n 825 default y
826 depends on FEATURE_TELNETD_STANDALONE 826 depends on FEATURE_TELNETD_STANDALONE
827 help 827 help
828 This option allows you to run telnetd in "inet wait" mode. 828 This option allows you to run telnetd in "inet wait" mode.
@@ -843,7 +843,7 @@ config FEATURE_TELNETD_INETD_WAIT
843 843
844config TFTP 844config TFTP
845 bool "tftp" 845 bool "tftp"
846 default n 846 default y
847 help 847 help
848 This enables the Trivial File Transfer Protocol client program. TFTP 848 This enables the Trivial File Transfer Protocol client program. TFTP
849 is usually used for simple, small transfers such as a root image 849 is usually used for simple, small transfers such as a root image
@@ -851,7 +851,7 @@ config TFTP
851 851
852config TFTPD 852config TFTPD
853 bool "tftpd" 853 bool "tftpd"
854 default n 854 default y
855 help 855 help
856 This enables the Trivial File Transfer Protocol server program. 856 This enables the Trivial File Transfer Protocol server program.
857 It expects that stdin is a datagram socket and a packet 857 It expects that stdin is a datagram socket and a packet
@@ -882,7 +882,7 @@ config FEATURE_TFTP_PUT
882 882
883config FEATURE_TFTP_BLOCKSIZE 883config FEATURE_TFTP_BLOCKSIZE
884 bool "Enable 'blksize' and 'tsize' protocol options" 884 bool "Enable 'blksize' and 'tsize' protocol options"
885 default n 885 default y
886 depends on TFTP || TFTPD 886 depends on TFTP || TFTPD
887 help 887 help
888 Allow tftp to specify block size, and tftpd to understand 888 Allow tftp to specify block size, and tftpd to understand
@@ -890,7 +890,7 @@ config FEATURE_TFTP_BLOCKSIZE
890 890
891config FEATURE_TFTP_PROGRESS_BAR 891config FEATURE_TFTP_PROGRESS_BAR
892 bool "Enable tftp progress meter" 892 bool "Enable tftp progress meter"
893 default n 893 default y
894 depends on TFTP && FEATURE_TFTP_BLOCKSIZE 894 depends on TFTP && FEATURE_TFTP_BLOCKSIZE
895 help 895 help
896 Show progress bar. 896 Show progress bar.
@@ -905,20 +905,20 @@ config TFTP_DEBUG
905 905
906config TRACEROUTE 906config TRACEROUTE
907 bool "traceroute" 907 bool "traceroute"
908 default n 908 default y
909 help 909 help
910 Utility to trace the route of IP packets. 910 Utility to trace the route of IP packets.
911 911
912config TRACEROUTE6 912config TRACEROUTE6
913 bool "traceroute6" 913 bool "traceroute6"
914 default n 914 default y
915 depends on FEATURE_IPV6 && TRACEROUTE 915 depends on FEATURE_IPV6 && TRACEROUTE
916 help 916 help
917 Utility to trace the route of IPv6 packets. 917 Utility to trace the route of IPv6 packets.
918 918
919config FEATURE_TRACEROUTE_VERBOSE 919config FEATURE_TRACEROUTE_VERBOSE
920 bool "Enable verbose output" 920 bool "Enable verbose output"
921 default n 921 default y
922 depends on TRACEROUTE 922 depends on TRACEROUTE
923 help 923 help
924 Add some verbosity to traceroute. This includes among other things 924 Add some verbosity to traceroute. This includes among other things
@@ -941,13 +941,13 @@ config FEATURE_TRACEROUTE_USE_ICMP
941 941
942config TUNCTL 942config TUNCTL
943 bool "tunctl" 943 bool "tunctl"
944 default n 944 default y
945 help 945 help
946 tunctl creates or deletes tun devices. 946 tunctl creates or deletes tun devices.
947 947
948config FEATURE_TUNCTL_UG 948config FEATURE_TUNCTL_UG
949 bool "Support owner:group assignment" 949 bool "Support owner:group assignment"
950 default n 950 default y
951 depends on TUNCTL 951 depends on TUNCTL
952 help 952 help
953 Allow to specify owner and group of newly created interface. 953 Allow to specify owner and group of newly created interface.
@@ -966,20 +966,20 @@ config IFUPDOWN_UDHCPC_CMD_OPTIONS
966 966
967config UDPSVD 967config UDPSVD
968 bool "udpsvd" 968 bool "udpsvd"
969 default n 969 default y
970 help 970 help
971 udpsvd listens on an UDP port and runs a program for each new 971 udpsvd listens on an UDP port and runs a program for each new
972 connection. 972 connection.
973 973
974config VCONFIG 974config VCONFIG
975 bool "vconfig" 975 bool "vconfig"
976 default n 976 default y
977 help 977 help
978 Creates, removes, and configures VLAN interfaces 978 Creates, removes, and configures VLAN interfaces
979 979
980config WGET 980config WGET
981 bool "wget" 981 bool "wget"
982 default n 982 default y
983 help 983 help
984 wget is a utility for non-interactive download of files from HTTP, 984 wget is a utility for non-interactive download of files from HTTP,
985 HTTPS, and FTP servers. 985 HTTPS, and FTP servers.
@@ -1000,14 +1000,14 @@ config FEATURE_WGET_AUTHENTICATION
1000 1000
1001config FEATURE_WGET_LONG_OPTIONS 1001config FEATURE_WGET_LONG_OPTIONS
1002 bool "Enable long options" 1002 bool "Enable long options"
1003 default n 1003 default y
1004 depends on WGET && LONG_OPTS 1004 depends on WGET && LONG_OPTS
1005 help 1005 help
1006 Support long options for the wget applet. 1006 Support long options for the wget applet.
1007 1007
1008config ZCIP 1008config ZCIP
1009 bool "zcip" 1009 bool "zcip"
1010 default n 1010 default y
1011 select FEATURE_SYSLOG 1011 select FEATURE_SYSLOG
1012 help 1012 help
1013 ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927. 1013 ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927.
diff --git a/networking/Kbuild b/networking/Kbuild.src
index b0765bcf6..b0765bcf6 100644
--- a/networking/Kbuild
+++ b/networking/Kbuild.src
diff --git a/networking/libiproute/Kbuild b/networking/libiproute/Kbuild.src
index 5f9dd32b6..5f9dd32b6 100644
--- a/networking/libiproute/Kbuild
+++ b/networking/libiproute/Kbuild.src
diff --git a/networking/udhcp/Config.in b/networking/udhcp/Config.src
index 34adf35fe..f5840a945 100644
--- a/networking/udhcp/Config.in
+++ b/networking/udhcp/Config.src
@@ -5,14 +5,14 @@
5 5
6config UDHCPD 6config UDHCPD
7 bool "udhcp server (udhcpd)" 7 bool "udhcp server (udhcpd)"
8 default n 8 default y
9 help 9 help
10 udhcpd is a DHCP server geared primarily toward embedded systems, 10 udhcpd is a DHCP server geared primarily toward embedded systems,
11 while striving to be fully functional and RFC compliant. 11 while striving to be fully functional and RFC compliant.
12 12
13config DHCPRELAY 13config DHCPRELAY
14 bool "dhcprelay" 14 bool "dhcprelay"
15 default n 15 default y
16 depends on UDHCPD 16 depends on UDHCPD
17 help 17 help
18 dhcprelay listens for dhcp requests on one or more interfaces 18 dhcprelay listens for dhcp requests on one or more interfaces
@@ -21,7 +21,7 @@ config DHCPRELAY
21 21
22config DUMPLEASES 22config DUMPLEASES
23 bool "Lease display utility (dumpleases)" 23 bool "Lease display utility (dumpleases)"
24 default n 24 default y
25 depends on UDHCPD 25 depends on UDHCPD
26 help 26 help
27 dumpleases displays the leases written out by the udhcpd server. 27 dumpleases displays the leases written out by the udhcpd server.
@@ -30,7 +30,7 @@ config DUMPLEASES
30 30
31config FEATURE_UDHCPD_WRITE_LEASES_EARLY 31config FEATURE_UDHCPD_WRITE_LEASES_EARLY
32 bool "Rewrite the lease file at every new acknowledge" 32 bool "Rewrite the lease file at every new acknowledge"
33 default n 33 default y
34 depends on UDHCPD 34 depends on UDHCPD
35 help 35 help
36 If selected, udhcpd will write a new file with leases every 36 If selected, udhcpd will write a new file with leases every
@@ -48,7 +48,7 @@ config DHCPD_LEASES_FILE
48 48
49config UDHCPC 49config UDHCPC
50 bool "udhcp client (udhcpc)" 50 bool "udhcp client (udhcpc)"
51 default n 51 default y
52 help 52 help
53 udhcpc is a DHCP client geared primarily toward embedded systems, 53 udhcpc is a DHCP client geared primarily toward embedded systems,
54 while striving to be fully functional and RFC compliant. 54 while striving to be fully functional and RFC compliant.
@@ -68,7 +68,7 @@ config FEATURE_UDHCPC_ARPING
68 68
69config FEATURE_UDHCP_PORT 69config FEATURE_UDHCP_PORT
70 bool "Enable '-P port' option for udhcpd and udhcpc" 70 bool "Enable '-P port' option for udhcpd and udhcpc"
71 default n 71 default y
72 depends on UDHCPD || UDHCPC 72 depends on UDHCPD || UDHCPC
73 help 73 help
74 At the cost of ~300 bytes, enables -P port option. 74 At the cost of ~300 bytes, enables -P port option.
@@ -76,7 +76,7 @@ config FEATURE_UDHCP_PORT
76 76
77config UDHCP_DEBUG 77config UDHCP_DEBUG
78 int "Maximum verbosity level for udhcp applets (0..9)" 78 int "Maximum verbosity level for udhcp applets (0..9)"
79 default 0 79 default 9
80 range 0 9 80 range 0 9
81 depends on UDHCPD || UDHCPC || DHCPRELAY 81 depends on UDHCPD || UDHCPC || DHCPRELAY
82 help 82 help
@@ -88,7 +88,7 @@ config UDHCP_DEBUG
88 88
89config FEATURE_UDHCP_RFC3397 89config FEATURE_UDHCP_RFC3397
90 bool "Support for RFC3397 domain search (experimental)" 90 bool "Support for RFC3397 domain search (experimental)"
91 default n 91 default y
92 depends on UDHCPD || UDHCPC 92 depends on UDHCPD || UDHCPC
93 help 93 help
94 If selected, both client and server will support passing of domain 94 If selected, both client and server will support passing of domain
diff --git a/networking/udhcp/Kbuild b/networking/udhcp/Kbuild.src
index 1803903f0..1803903f0 100644
--- a/networking/udhcp/Kbuild
+++ b/networking/udhcp/Kbuild.src
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index e48473389..043220de9 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -305,11 +305,12 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
305 , &dhcp_verbose 305 , &dhcp_verbose
306#endif 306#endif
307 ); 307 );
308 argv += optind;
309 if (!(opt & 1)) { /* no -f */ 308 if (!(opt & 1)) { /* no -f */
310 bb_daemonize_or_rexec(0, argv); 309 bb_daemonize_or_rexec(0, argv);
311 logmode = LOGMODE_NONE; 310 logmode = LOGMODE_NONE;
312 } 311 }
312 /* update argv after the possible vfork+exec in daemonize */
313 argv += optind;
313 if (opt & 2) { /* -S */ 314 if (opt & 2) { /* -S */
314 openlog(applet_name, LOG_PID, LOG_DAEMON); 315 openlog(applet_name, LOG_PID, LOG_DAEMON);
315 logmode |= LOGMODE_SYSLOG; 316 logmode |= LOGMODE_SYSLOG;
diff --git a/printutils/Config.in b/printutils/Config.src
index 6912ece6c..194789660 100644
--- a/printutils/Config.in
+++ b/printutils/Config.src
@@ -7,19 +7,19 @@ menu "Print Utilities"
7 7
8config LPD 8config LPD
9 bool "lpd" 9 bool "lpd"
10 default n 10 default y
11 help 11 help
12 lpd is a print spooling daemon. 12 lpd is a print spooling daemon.
13 13
14config LPR 14config LPR
15 bool "lpr" 15 bool "lpr"
16 default n 16 default y
17 help 17 help
18 lpr sends files (or standard input) to a print spooling daemon. 18 lpr sends files (or standard input) to a print spooling daemon.
19 19
20config LPQ 20config LPQ
21 bool "lpq" 21 bool "lpq"
22 default n 22 default y
23 help 23 help
24 lpq is a print spool queue examination and manipulation program. 24 lpq is a print spool queue examination and manipulation program.
25 25
diff --git a/printutils/Kbuild b/printutils/Kbuild.src
index 008290ee9..008290ee9 100644
--- a/printutils/Kbuild
+++ b/printutils/Kbuild.src
diff --git a/procps/Config.in b/procps/Config.src
index 6a9a36638..01f6b0cf9 100644
--- a/procps/Config.in
+++ b/procps/Config.src
@@ -7,7 +7,7 @@ menu "Process Utilities"
7 7
8config FREE 8config FREE
9 bool "free" 9 bool "free"
10 default n 10 default y
11 help 11 help
12 free displays the total amount of free and used physical and swap 12 free displays the total amount of free and used physical and swap
13 memory in the system, as well as the buffers used by the kernel. 13 memory in the system, as well as the buffers used by the kernel.
@@ -15,7 +15,7 @@ config FREE
15 15
16config FUSER 16config FUSER
17 bool "fuser" 17 bool "fuser"
18 default n 18 default y
19 help 19 help
20 fuser lists all PIDs (Process IDs) that currently have a given 20 fuser lists all PIDs (Process IDs) that currently have a given
21 file open. fuser can also list all PIDs that have a given network 21 file open. fuser can also list all PIDs that have a given network
@@ -23,7 +23,7 @@ config FUSER
23 23
24config KILL 24config KILL
25 bool "kill" 25 bool "kill"
26 default n 26 default y
27 help 27 help
28 The command kill sends the specified signal to the specified 28 The command kill sends the specified signal to the specified
29 process or process group. If no signal is specified, the TERM 29 process or process group. If no signal is specified, the TERM
@@ -31,7 +31,7 @@ config KILL
31 31
32config KILLALL 32config KILLALL
33 bool "killall" 33 bool "killall"
34 default n 34 default y
35 depends on KILL 35 depends on KILL
36 help 36 help
37 killall sends a signal to all processes running any of the 37 killall sends a signal to all processes running any of the
@@ -40,38 +40,38 @@ config KILLALL
40 40
41config KILLALL5 41config KILLALL5
42 bool "killall5" 42 bool "killall5"
43 default n 43 default y
44 depends on KILL 44 depends on KILL
45 45
46config NMETER 46config NMETER
47 bool "nmeter" 47 bool "nmeter"
48 default n 48 default y
49 help 49 help
50 Prints selected system stats continuously, one line per update. 50 Prints selected system stats continuously, one line per update.
51 51
52config PGREP 52config PGREP
53 bool "pgrep" 53 bool "pgrep"
54 default n 54 default y
55 help 55 help
56 Look for processes by name. 56 Look for processes by name.
57 57
58config PIDOF 58config PIDOF
59 bool "pidof" 59 bool "pidof"
60 default n 60 default y
61 help 61 help
62 Pidof finds the process id's (pids) of the named programs. It prints 62 Pidof finds the process id's (pids) of the named programs. It prints
63 those id's on the standard output. 63 those id's on the standard output.
64 64
65config FEATURE_PIDOF_SINGLE 65config FEATURE_PIDOF_SINGLE
66 bool "Enable argument for single shot (-s)" 66 bool "Enable argument for single shot (-s)"
67 default n 67 default y
68 depends on PIDOF 68 depends on PIDOF
69 help 69 help
70 Support argument '-s' for returning only the first pid found. 70 Support argument '-s' for returning only the first pid found.
71 71
72config FEATURE_PIDOF_OMIT 72config FEATURE_PIDOF_OMIT
73 bool "Enable argument for omitting pids (-o)" 73 bool "Enable argument for omitting pids (-o)"
74 default n 74 default y
75 depends on PIDOF 75 depends on PIDOF
76 help 76 help
77 Support argument '-o' for omitting the given pids in output. 77 Support argument '-o' for omitting the given pids in output.
@@ -80,19 +80,19 @@ config FEATURE_PIDOF_OMIT
80 80
81config PKILL 81config PKILL
82 bool "pkill" 82 bool "pkill"
83 default n 83 default y
84 help 84 help
85 Send signals to processes by name. 85 Send signals to processes by name.
86 86
87config PS 87config PS
88 bool "ps" 88 bool "ps"
89 default n 89 default y
90 help 90 help
91 ps gives a snapshot of the current processes. 91 ps gives a snapshot of the current processes.
92 92
93config FEATURE_PS_WIDE 93config FEATURE_PS_WIDE
94 bool "Enable wide output option (-w)" 94 bool "Enable wide output option (-w)"
95 default n 95 default y
96 depends on PS 96 depends on PS
97 help 97 help
98 Support argument 'w' for wide output. 98 Support argument 'w' for wide output.
@@ -101,14 +101,14 @@ config FEATURE_PS_WIDE
101 101
102config FEATURE_PS_TIME 102config FEATURE_PS_TIME
103 bool "Enable time and elapsed time output" 103 bool "Enable time and elapsed time output"
104 default n 104 default y
105 depends on PS && DESKTOP 105 depends on PS && DESKTOP
106 help 106 help
107 Support -o time and -o etime output specifiers. 107 Support -o time and -o etime output specifiers.
108 108
109config FEATURE_PS_ADDITIONAL_COLUMNS 109config FEATURE_PS_ADDITIONAL_COLUMNS
110 bool "Enable additional ps columns" 110 bool "Enable additional ps columns"
111 default n 111 default y
112 depends on PS && DESKTOP 112 depends on PS && DESKTOP
113 help 113 help
114 Support -o rgroup, -o ruser, -o nice output specifiers. 114 Support -o rgroup, -o ruser, -o nice output specifiers.
@@ -123,20 +123,20 @@ config FEATURE_PS_UNUSUAL_SYSTEMS
123 123
124config RENICE 124config RENICE
125 bool "renice" 125 bool "renice"
126 default n 126 default y
127 help 127 help
128 Renice alters the scheduling priority of one or more running 128 Renice alters the scheduling priority of one or more running
129 processes. 129 processes.
130 130
131config BB_SYSCTL 131config BB_SYSCTL
132 bool "sysctl" 132 bool "sysctl"
133 default n 133 default y
134 help 134 help
135 Configure kernel parameters at runtime. 135 Configure kernel parameters at runtime.
136 136
137config TOP 137config TOP
138 bool "top" 138 bool "top"
139 default n 139 default y
140 help 140 help
141 The top program provides a dynamic real-time view of a running 141 The top program provides a dynamic real-time view of a running
142 system. 142 system.
@@ -159,7 +159,7 @@ config FEATURE_TOP_CPU_GLOBAL_PERCENTS
159 159
160config FEATURE_TOP_SMP_CPU 160config FEATURE_TOP_SMP_CPU
161 bool "SMP CPU usage display ('c' key)" 161 bool "SMP CPU usage display ('c' key)"
162 default n 162 default y
163 depends on FEATURE_TOP_CPU_GLOBAL_PERCENTS 163 depends on FEATURE_TOP_CPU_GLOBAL_PERCENTS
164 help 164 help
165 Allow 'c' key to switch between individual/cumulative CPU stats 165 Allow 'c' key to switch between individual/cumulative CPU stats
@@ -167,7 +167,7 @@ config FEATURE_TOP_SMP_CPU
167 167
168config FEATURE_TOP_DECIMALS 168config FEATURE_TOP_DECIMALS
169 bool "Show 1/10th of a percent in CPU/mem statistics" 169 bool "Show 1/10th of a percent in CPU/mem statistics"
170 default n 170 default y
171 depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE 171 depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE
172 help 172 help
173 Show 1/10th of a percent in CPU/mem statistics. 173 Show 1/10th of a percent in CPU/mem statistics.
@@ -175,7 +175,7 @@ config FEATURE_TOP_DECIMALS
175 175
176config FEATURE_TOP_SMP_PROCESS 176config FEATURE_TOP_SMP_PROCESS
177 bool "Show CPU process runs on ('j' field)" 177 bool "Show CPU process runs on ('j' field)"
178 default n 178 default y
179 depends on TOP 179 depends on TOP
180 help 180 help
181 Show CPU where process was last found running on. 181 Show CPU where process was last found running on.
@@ -183,21 +183,21 @@ config FEATURE_TOP_SMP_PROCESS
183 183
184config FEATURE_TOPMEM 184config FEATURE_TOPMEM
185 bool "Topmem command ('s' key)" 185 bool "Topmem command ('s' key)"
186 default n 186 default y
187 depends on TOP 187 depends on TOP
188 help 188 help
189 Enable 's' in top (gives lots of memory info). 189 Enable 's' in top (gives lots of memory info).
190 190
191config FEATURE_SHOW_THREADS 191config FEATURE_SHOW_THREADS
192 bool "Support for showing threads in ps/top" 192 bool "Support for showing threads in ps/top"
193 default n 193 default y
194 depends on PS || TOP 194 depends on PS || TOP
195 help 195 help
196 Enables ps -T option and 'h' command in top 196 Enables ps -T option and 'h' command in top
197 197
198config UPTIME 198config UPTIME
199 bool "uptime" 199 bool "uptime"
200 default n 200 default y
201 help 201 help
202 uptime gives a one line display of the current time, how long 202 uptime gives a one line display of the current time, how long
203 the system has been running, how many users are currently logged 203 the system has been running, how many users are currently logged
@@ -205,7 +205,7 @@ config UPTIME
205 205
206config WATCH 206config WATCH
207 bool "watch" 207 bool "watch"
208 default n 208 default y
209 help 209 help
210 watch is used to execute a program periodically, showing 210 watch is used to execute a program periodically, showing
211 output to the screen. 211 output to the screen.
diff --git a/procps/Kbuild b/procps/Kbuild.src
index 8e62fdfa6..8e62fdfa6 100644
--- a/procps/Kbuild
+++ b/procps/Kbuild.src
diff --git a/procps/top.c b/procps/top.c
index e4afafc4c..04dd82633 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -103,11 +103,11 @@ struct globals {
103}; //FIX_ALIASING; - large code growth 103}; //FIX_ALIASING; - large code growth
104enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) }; 104enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) };
105#define G (*(struct globals*)&bb_common_bufsiz1) 105#define G (*(struct globals*)&bb_common_bufsiz1)
106#define INIT_G() do { \ 106struct BUG_bad_size {
107 struct G_sizecheck { \ 107 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
108 char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \ 108 char BUG_line_buf_too_small[LINE_BUF_SIZE > 80 ? 1 : -1];
109 }; \ 109};
110} while (0) 110#define INIT_G() do { } while (0)
111#define top (G.top ) 111#define top (G.top )
112#define ntop (G.ntop ) 112#define ntop (G.ntop )
113#define sort_field (G.sort_field ) 113#define sort_field (G.sort_field )
@@ -696,111 +696,70 @@ static int topmem_sort(char *a, char *b)
696 return inverted ? -n : n; 696 return inverted ? -n : n;
697} 697}
698 698
699/* Cut "NNNN" out of " NNNN kb" */
700static char *grab_number(char *str, const char *match, unsigned sz)
701{
702 if (strncmp(str, match, sz) == 0) {
703 str = skip_whitespace(str + sz);
704 (skip_non_whitespace(str))[0] = '\0';
705 return xstrdup(str);
706 }
707 return NULL;
708}
709
710/* display header info (meminfo / loadavg) */ 699/* display header info (meminfo / loadavg) */
711static void display_topmem_header(int scr_width, int *lines_rem_p) 700static void display_topmem_header(int scr_width, int *lines_rem_p)
712{ 701{
713 char linebuf[128]; 702 enum {
703 TOTAL = 0, MFREE, BUF, CACHE,
704 SWAPTOTAL, SWAPFREE, DIRTY,
705 MWRITE, ANON, MAP, SLAB,
706 NUM_FIELDS
707 };
708 static const char match[NUM_FIELDS][12] = {
709 "\x09" "MemTotal:", // TOTAL
710 "\x08" "MemFree:", // MFREE
711 "\x08" "Buffers:", // BUF
712 "\x07" "Cached:", // CACHE
713 "\x0a" "SwapTotal:", // SWAPTOTAL
714 "\x09" "SwapFree:", // SWAPFREE
715 "\x06" "Dirty:", // DIRTY
716 "\x0a" "Writeback:", // MWRITE
717 "\x0a" "AnonPages:", // ANON
718 "\x07" "Mapped:", // MAP
719 "\x05" "Slab:", // SLAB
720 };
721 char meminfo_buf[4 * 1024];
722 const char *Z[NUM_FIELDS];
714 unsigned i; 723 unsigned i;
715 FILE *fp; 724 int sz;
716 union { 725
717 struct { 726 for (i = 0; i < NUM_FIELDS; i++)
718 /* 1 */ char *total; 727 Z[i] = "?";
719 /* 2 */ char *mfree;
720 /* 3 */ char *buf;
721 /* 4 */ char *cache;
722 /* 5 */ char *swaptotal;
723 /* 6 */ char *swapfree;
724 /* 7 */ char *dirty;
725 /* 8 */ char *mwrite;
726 /* 9 */ char *anon;
727 /* 10 */ char *map;
728 /* 11 */ char *slab;
729 } u;
730 char *str[11];
731 } Z;
732#define total Z.u.total
733#define mfree Z.u.mfree
734#define buf Z.u.buf
735#define cache Z.u.cache
736#define swaptotal Z.u.swaptotal
737#define swapfree Z.u.swapfree
738#define dirty Z.u.dirty
739#define mwrite Z.u.mwrite
740#define anon Z.u.anon
741#define map Z.u.map
742#define slab Z.u.slab
743#define str Z.str
744
745 memset(&Z, 0, sizeof(Z));
746 728
747 /* read memory info */ 729 /* read memory info */
748 fp = xfopen_for_read("meminfo"); 730 sz = open_read_close("meminfo", meminfo_buf, sizeof(meminfo_buf) - 1);
749 while (fgets(linebuf, sizeof(linebuf), fp)) { 731 if (sz >= 0) {
750 char *p; 732 char *p = meminfo_buf;
751 733 meminfo_buf[sz] = '\0';
752#define SCAN(match, name) \ 734 /* Note that fields always appear in the match[] order */
753 p = grab_number(linebuf, match, sizeof(match)-1); \ 735 for (i = 0; i < NUM_FIELDS; i++) {
754 if (p) { name = p; continue; } 736 char *found = strstr(p, match[i] + 1);
755 737 if (found) {
756 SCAN("MemTotal:", total); 738 /* Cut "NNNN" out of " NNNN kb" */
757 SCAN("MemFree:", mfree); 739 char *s = skip_whitespace(found + match[i][0]);
758 SCAN("Buffers:", buf); 740 p = skip_non_whitespace(s);
759 SCAN("Cached:", cache); 741 *p++ = '\0';
760 SCAN("SwapTotal:", swaptotal); 742 Z[i] = s;
761 SCAN("SwapFree:", swapfree); 743 }
762 SCAN("Dirty:", dirty); 744 }
763 SCAN("Writeback:", mwrite);
764 SCAN("AnonPages:", anon);
765 SCAN("Mapped:", map);
766 SCAN("Slab:", slab);
767#undef SCAN
768 } 745 }
769 fclose(fp);
770 746
771#define S(s) (s ? s : "0") 747 snprintf(line_buf, LINE_BUF_SIZE,
772 snprintf(linebuf, sizeof(linebuf),
773 "Mem total:%s anon:%s map:%s free:%s", 748 "Mem total:%s anon:%s map:%s free:%s",
774 S(total), S(anon), S(map), S(mfree)); 749 Z[TOTAL], Z[ANON], Z[MAP], Z[MFREE]);
775 printf(OPT_BATCH_MODE ? "%.*s\n" : "\033[H\033[J%.*s\n", scr_width, linebuf); 750 printf(OPT_BATCH_MODE ? "%.*s\n" : "\033[H\033[J%.*s\n", scr_width, line_buf);
776 751
777 snprintf(linebuf, sizeof(linebuf), 752 snprintf(line_buf, LINE_BUF_SIZE,
778 " slab:%s buf:%s cache:%s dirty:%s write:%s", 753 " slab:%s buf:%s cache:%s dirty:%s write:%s",
779 S(slab), S(buf), S(cache), S(dirty), S(mwrite)); 754 Z[SLAB], Z[BUF], Z[CACHE], Z[DIRTY], Z[MWRITE]);
780 printf("%.*s\n", scr_width, linebuf); 755 printf("%.*s\n", scr_width, line_buf);
781 756
782 snprintf(linebuf, sizeof(linebuf), 757 snprintf(line_buf, LINE_BUF_SIZE,
783 "Swap total:%s free:%s", // TODO: % used? 758 "Swap total:%s free:%s", // TODO: % used?
784 S(swaptotal), S(swapfree)); 759 Z[SWAPTOTAL], Z[SWAPFREE]);
785 printf("%.*s\n", scr_width, linebuf); 760 printf("%.*s\n", scr_width, line_buf);
786 761
787 (*lines_rem_p) -= 3; 762 (*lines_rem_p) -= 3;
788#undef S
789
790 for (i = 0; i < ARRAY_SIZE(str); i++)
791 free(str[i]);
792#undef total
793#undef free
794#undef buf
795#undef cache
796#undef swaptotal
797#undef swapfree
798#undef dirty
799#undef write
800#undef anon
801#undef map
802#undef slab
803#undef str
804} 763}
805 764
806static void ulltoa6_and_space(unsigned long long ul, char buf[6]) 765static void ulltoa6_and_space(unsigned long long ul, char buf[6])
diff --git a/runit/Config.in b/runit/Config.src
index 422ca7517..53b445101 100644
--- a/runit/Config.in
+++ b/runit/Config.src
@@ -7,14 +7,14 @@ menu "Runit Utilities"
7 7
8config RUNSV 8config RUNSV
9 bool "runsv" 9 bool "runsv"
10 default n 10 default y
11 help 11 help
12 runsv starts and monitors a service and optionally an appendant log 12 runsv starts and monitors a service and optionally an appendant log
13 service. 13 service.
14 14
15config RUNSVDIR 15config RUNSVDIR
16 bool "runsvdir" 16 bool "runsvdir"
17 default n 17 default y
18 help 18 help
19 runsvdir starts a runsv process for each subdirectory, or symlink to 19 runsvdir starts a runsv process for each subdirectory, or symlink to
20 a directory, in the services directory dir, up to a limit of 1000 20 a directory, in the services directory dir, up to a limit of 1000
@@ -31,7 +31,7 @@ config FEATURE_RUNSVDIR_LOG
31 31
32config SV 32config SV
33 bool "sv" 33 bool "sv"
34 default n 34 default y
35 help 35 help
36 sv reports the current status and controls the state of services 36 sv reports the current status and controls the state of services
37 monitored by the runsv supervisor. 37 monitored by the runsv supervisor.
@@ -46,7 +46,7 @@ config SV_DEFAULT_SERVICE_DIR
46 46
47config SVLOGD 47config SVLOGD
48 bool "svlogd" 48 bool "svlogd"
49 default n 49 default y
50 help 50 help
51 svlogd continuously reads log data from its standard input, optionally 51 svlogd continuously reads log data from its standard input, optionally
52 filters log messages, and writes the data to one or more automatically 52 filters log messages, and writes the data to one or more automatically
@@ -54,29 +54,33 @@ config SVLOGD
54 54
55config CHPST 55config CHPST
56 bool "chpst" 56 bool "chpst"
57 default n 57 default y
58 help 58 help
59 chpst changes the process state according to the given options, and 59 chpst changes the process state according to the given options, and
60 execs specified program. 60 execs specified program.
61 61
62config SETUIDGID 62config SETUIDGID
63 bool "setuidgid" 63 bool "setuidgid"
64 default y
64 help 65 help
65 Sets soft resource limits as specified by options 66 Sets soft resource limits as specified by options
66 67
67config ENVUIDGID 68config ENVUIDGID
68 bool "envuidgid" 69 bool "envuidgid"
70 default y
69 help 71 help
70 Sets $UID to account's uid and $GID to account's gid 72 Sets $UID to account's uid and $GID to account's gid
71 73
72config ENVDIR 74config ENVDIR
73 bool "envdir" 75 bool "envdir"
76 default y
74 help 77 help
75 Sets various environment variables as specified by files 78 Sets various environment variables as specified by files
76 in the given directory 79 in the given directory
77 80
78config SOFTLIMIT 81config SOFTLIMIT
79 bool "softlimit" 82 bool "softlimit"
83 default y
80 help 84 help
81 Sets soft resource limits as specified by options 85 Sets soft resource limits as specified by options
82 86
diff --git a/runit/Kbuild b/runit/Kbuild.src
index ab9eef6ff..ab9eef6ff 100644
--- a/runit/Kbuild
+++ b/runit/Kbuild.src
diff --git a/scripts/Kbuild b/scripts/Kbuild.src
index 83b423253..83b423253 100644
--- a/scripts/Kbuild
+++ b/scripts/Kbuild.src
diff --git a/scripts/Makefile.IMA b/scripts/Makefile.IMA
index a34db50f4..11ae39eae 100644
--- a/scripts/Makefile.IMA
+++ b/scripts/Makefile.IMA
@@ -200,8 +200,8 @@ applets/usage: include/autoconf.h
200applets/applet_tables: include/autoconf.h 200applets/applet_tables: include/autoconf.h
201 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/applet_tables applets/applet_tables.c 201 $(HOSTCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I$(srctree)/include -o applets/applet_tables applets/applet_tables.c
202 202
203include/usage_compressed.h: $(srctree)/include/usage.h applets/usage 203include/usage_compressed.h: include/usage.h applets/usage
204 $(srctree)/applets/usage_compressed include/usage_compressed.h applets 204 $(srctree)/applets/usage_compressed include/usage_compressed.h applets
205 205
206include/applet_tables.h: $(srctree)/include/applets.h 206include/applet_tables.h: include/applets.h
207 applets/applet_tables include/applet_tables.h 207 applets/applet_tables include/applet_tables.h
diff --git a/scripts/defconfig b/scripts/defconfig
deleted file mode 100644
index 896571bd9..000000000
--- a/scripts/defconfig
+++ /dev/null
@@ -1,927 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Busybox version: 1.16.0
4# Wed Jan 27 20:00:00 2010
5#
6CONFIG_HAVE_DOT_CONFIG=y
7
8#
9# Busybox Settings
10#
11
12#
13# General Configuration
14#
15# CONFIG_DESKTOP is not set
16# CONFIG_EXTRA_COMPAT is not set
17CONFIG_INCLUDE_SUSv2=y
18# CONFIG_USE_PORTABLE_CODE is not set
19CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
20# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
21# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
22CONFIG_SHOW_USAGE=y
23CONFIG_FEATURE_VERBOSE_USAGE=y
24CONFIG_FEATURE_COMPRESS_USAGE=y
25CONFIG_FEATURE_INSTALLER=y
26CONFIG_LOCALE_SUPPORT=y
27CONFIG_UNICODE_SUPPORT=y
28# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
29CONFIG_LONG_OPTS=y
30CONFIG_FEATURE_DEVPTS=y
31# CONFIG_FEATURE_CLEAN_UP is not set
32CONFIG_FEATURE_PIDFILE=y
33CONFIG_FEATURE_SUID=y
34CONFIG_FEATURE_SUID_CONFIG=y
35CONFIG_FEATURE_SUID_CONFIG_QUIET=y
36# CONFIG_SELINUX is not set
37# CONFIG_FEATURE_PREFER_APPLETS is not set
38CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
39CONFIG_FEATURE_SYSLOG=y
40CONFIG_FEATURE_HAVE_RPC=y
41
42#
43# Build Options
44#
45# CONFIG_STATIC is not set
46# CONFIG_PIE is not set
47# CONFIG_NOMMU is not set
48# CONFIG_BUILD_LIBBUSYBOX is not set
49# CONFIG_FEATURE_INDIVIDUAL is not set
50# CONFIG_FEATURE_SHARED_BUSYBOX is not set
51CONFIG_LFS=y
52CONFIG_CROSS_COMPILER_PREFIX=""
53CONFIG_EXTRA_CFLAGS=""
54
55#
56# Debugging Options
57#
58# CONFIG_DEBUG is not set
59# CONFIG_DEBUG_PESSIMIZE is not set
60# CONFIG_WERROR is not set
61CONFIG_NO_DEBUG_LIB=y
62# CONFIG_DMALLOC is not set
63# CONFIG_EFENCE is not set
64
65#
66# Installation Options
67#
68# CONFIG_INSTALL_NO_USR is not set
69CONFIG_INSTALL_APPLET_SYMLINKS=y
70# CONFIG_INSTALL_APPLET_HARDLINKS is not set
71# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
72# CONFIG_INSTALL_APPLET_DONT is not set
73# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
74# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
75# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
76CONFIG_PREFIX="./_install"
77
78#
79# Busybox Library Tuning
80#
81CONFIG_PASSWORD_MINLEN=6
82CONFIG_MD5_SIZE_VS_SPEED=2
83CONFIG_FEATURE_FAST_TOP=y
84# CONFIG_FEATURE_ETC_NETWORKS is not set
85CONFIG_FEATURE_EDITING=y
86CONFIG_FEATURE_EDITING_MAX_LEN=1024
87# CONFIG_FEATURE_EDITING_VI is not set
88CONFIG_FEATURE_EDITING_HISTORY=15
89CONFIG_FEATURE_EDITING_SAVEHISTORY=y
90CONFIG_FEATURE_TAB_COMPLETION=y
91# CONFIG_FEATURE_USERNAME_COMPLETION is not set
92# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
93# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
94CONFIG_FEATURE_NON_POSIX_CP=y
95# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
96CONFIG_FEATURE_COPYBUF_KB=4
97# CONFIG_MONOTONIC_SYSCALL is not set
98CONFIG_IOCTL_HEX2STR_ERROR=y
99CONFIG_FEATURE_HWIB=y
100
101#
102# Applets
103#
104
105#
106# Archival Utilities
107#
108CONFIG_FEATURE_SEAMLESS_LZMA=y
109CONFIG_FEATURE_SEAMLESS_BZ2=y
110CONFIG_FEATURE_SEAMLESS_GZ=y
111CONFIG_FEATURE_SEAMLESS_Z=y
112CONFIG_AR=y
113CONFIG_FEATURE_AR_LONG_FILENAMES=y
114CONFIG_FEATURE_AR_CREATE=y
115CONFIG_BUNZIP2=y
116CONFIG_BZIP2=y
117CONFIG_CPIO=y
118CONFIG_FEATURE_CPIO_O=y
119CONFIG_FEATURE_CPIO_P=y
120# CONFIG_DPKG is not set
121# CONFIG_DPKG_DEB is not set
122# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
123CONFIG_GUNZIP=y
124CONFIG_GZIP=y
125CONFIG_FEATURE_GZIP_LONG_OPTIONS=y
126CONFIG_LZOP=y
127# CONFIG_LZOP_COMPR_HIGH is not set
128CONFIG_RPM2CPIO=y
129CONFIG_RPM=y
130CONFIG_TAR=y
131CONFIG_FEATURE_TAR_CREATE=y
132CONFIG_FEATURE_TAR_AUTODETECT=y
133CONFIG_FEATURE_TAR_FROM=y
134CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
135CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y
136CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
137CONFIG_FEATURE_TAR_LONG_OPTIONS=y
138CONFIG_FEATURE_TAR_UNAME_GNAME=y
139CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
140CONFIG_UNCOMPRESS=y
141CONFIG_UNLZMA=y
142CONFIG_FEATURE_LZMA_FAST=y
143CONFIG_UNZIP=y
144
145#
146# Coreutils
147#
148CONFIG_BASENAME=y
149CONFIG_CAL=y
150CONFIG_CAT=y
151CONFIG_CATV=y
152CONFIG_CHGRP=y
153CONFIG_CHMOD=y
154CONFIG_CHOWN=y
155CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y
156CONFIG_CHROOT=y
157CONFIG_CKSUM=y
158CONFIG_COMM=y
159CONFIG_CP=y
160CONFIG_FEATURE_CP_LONG_OPTIONS=y
161CONFIG_CUT=y
162CONFIG_DATE=y
163CONFIG_FEATURE_DATE_ISOFMT=y
164CONFIG_FEATURE_DATE_COMPAT=y
165CONFIG_DD=y
166CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
167CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y
168CONFIG_FEATURE_DD_IBS_OBS=y
169CONFIG_DF=y
170CONFIG_FEATURE_DF_FANCY=y
171CONFIG_DIRNAME=y
172CONFIG_DOS2UNIX=y
173CONFIG_UNIX2DOS=y
174CONFIG_DU=y
175CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
176CONFIG_ECHO=y
177CONFIG_FEATURE_FANCY_ECHO=y
178CONFIG_ENV=y
179CONFIG_FEATURE_ENV_LONG_OPTIONS=y
180CONFIG_EXPAND=y
181CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y
182CONFIG_EXPR=y
183CONFIG_EXPR_MATH_SUPPORT_64=y
184CONFIG_FALSE=y
185CONFIG_FOLD=y
186CONFIG_FSYNC=y
187CONFIG_HEAD=y
188CONFIG_FEATURE_FANCY_HEAD=y
189CONFIG_HOSTID=y
190CONFIG_ID=y
191CONFIG_INSTALL=y
192CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
193CONFIG_LENGTH=y
194CONFIG_LN=y
195CONFIG_LOGNAME=y
196CONFIG_LS=y
197CONFIG_FEATURE_LS_FILETYPES=y
198CONFIG_FEATURE_LS_FOLLOWLINKS=y
199CONFIG_FEATURE_LS_RECURSIVE=y
200CONFIG_FEATURE_LS_SORTFILES=y
201CONFIG_FEATURE_LS_TIMESTAMPS=y
202CONFIG_FEATURE_LS_USERNAME=y
203CONFIG_FEATURE_LS_COLOR=y
204CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
205CONFIG_MD5SUM=y
206CONFIG_MKDIR=y
207CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
208CONFIG_MKFIFO=y
209CONFIG_MKNOD=y
210CONFIG_MV=y
211CONFIG_FEATURE_MV_LONG_OPTIONS=y
212CONFIG_NICE=y
213CONFIG_NOHUP=y
214CONFIG_OD=y
215CONFIG_PRINTENV=y
216CONFIG_PRINTF=y
217CONFIG_PWD=y
218CONFIG_READLINK=y
219CONFIG_FEATURE_READLINK_FOLLOW=y
220CONFIG_REALPATH=y
221CONFIG_RM=y
222CONFIG_RMDIR=y
223CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y
224CONFIG_SEQ=y
225CONFIG_SHA1SUM=y
226CONFIG_SHA256SUM=y
227CONFIG_SHA512SUM=y
228CONFIG_SLEEP=y
229CONFIG_FEATURE_FANCY_SLEEP=y
230CONFIG_FEATURE_FLOAT_SLEEP=y
231CONFIG_SORT=y
232CONFIG_FEATURE_SORT_BIG=y
233CONFIG_SPLIT=y
234CONFIG_FEATURE_SPLIT_FANCY=y
235CONFIG_STAT=y
236CONFIG_FEATURE_STAT_FORMAT=y
237CONFIG_STTY=y
238CONFIG_SUM=y
239CONFIG_SYNC=y
240CONFIG_TAC=y
241CONFIG_TAIL=y
242CONFIG_FEATURE_FANCY_TAIL=y
243CONFIG_TEE=y
244CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
245CONFIG_TEST=y
246CONFIG_FEATURE_TEST_64=y
247CONFIG_TOUCH=y
248CONFIG_TR=y
249CONFIG_FEATURE_TR_CLASSES=y
250CONFIG_FEATURE_TR_EQUIV=y
251CONFIG_TRUE=y
252CONFIG_TTY=y
253CONFIG_UNAME=y
254CONFIG_UNEXPAND=y
255CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y
256CONFIG_UNIQ=y
257CONFIG_USLEEP=y
258CONFIG_UUDECODE=y
259CONFIG_UUENCODE=y
260CONFIG_WC=y
261CONFIG_FEATURE_WC_LARGE=y
262CONFIG_WHO=y
263CONFIG_WHOAMI=y
264CONFIG_YES=y
265
266#
267# Common options for cp and mv
268#
269CONFIG_FEATURE_PRESERVE_HARDLINKS=y
270
271#
272# Common options for ls, more and telnet
273#
274CONFIG_FEATURE_AUTOWIDTH=y
275
276#
277# Common options for df, du, ls
278#
279CONFIG_FEATURE_HUMAN_READABLE=y
280
281#
282# Common options for md5sum, sha1sum, sha256sum, sha512sum
283#
284CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
285
286#
287# Console Utilities
288#
289CONFIG_CHVT=y
290CONFIG_FGCONSOLE=y
291CONFIG_CLEAR=y
292CONFIG_DEALLOCVT=y
293CONFIG_DUMPKMAP=y
294CONFIG_KBD_MODE=y
295CONFIG_LOADFONT=y
296CONFIG_LOADKMAP=y
297CONFIG_OPENVT=y
298CONFIG_RESET=y
299CONFIG_RESIZE=y
300CONFIG_FEATURE_RESIZE_PRINT=y
301CONFIG_SETCONSOLE=y
302CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y
303CONFIG_SETFONT=y
304CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y
305CONFIG_DEFAULT_SETFONT_DIR=""
306CONFIG_SETKEYCODES=y
307CONFIG_SETLOGCONS=y
308CONFIG_SHOWKEY=y
309
310#
311# Debian Utilities
312#
313CONFIG_MKTEMP=y
314CONFIG_PIPE_PROGRESS=y
315CONFIG_RUN_PARTS=y
316CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
317CONFIG_FEATURE_RUN_PARTS_FANCY=y
318CONFIG_START_STOP_DAEMON=y
319CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
320CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
321CONFIG_WHICH=y
322
323#
324# Editors
325#
326CONFIG_AWK=y
327CONFIG_FEATURE_AWK_LIBM=y
328CONFIG_CMP=y
329CONFIG_DIFF=y
330CONFIG_FEATURE_DIFF_LONG_OPTIONS=y
331CONFIG_FEATURE_DIFF_DIR=y
332CONFIG_ED=y
333CONFIG_PATCH=y
334CONFIG_SED=y
335CONFIG_VI=y
336CONFIG_FEATURE_VI_MAX_LEN=4096
337# CONFIG_FEATURE_VI_8BIT is not set
338CONFIG_FEATURE_VI_COLON=y
339CONFIG_FEATURE_VI_YANKMARK=y
340CONFIG_FEATURE_VI_SEARCH=y
341CONFIG_FEATURE_VI_USE_SIGNALS=y
342CONFIG_FEATURE_VI_DOT_CMD=y
343CONFIG_FEATURE_VI_READONLY=y
344CONFIG_FEATURE_VI_SETOPTS=y
345CONFIG_FEATURE_VI_SET=y
346CONFIG_FEATURE_VI_WIN_RESIZE=y
347CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
348CONFIG_FEATURE_ALLOW_EXEC=y
349
350#
351# Finding Utilities
352#
353CONFIG_FIND=y
354CONFIG_FEATURE_FIND_PRINT0=y
355CONFIG_FEATURE_FIND_MTIME=y
356CONFIG_FEATURE_FIND_MMIN=y
357CONFIG_FEATURE_FIND_PERM=y
358CONFIG_FEATURE_FIND_TYPE=y
359CONFIG_FEATURE_FIND_XDEV=y
360CONFIG_FEATURE_FIND_MAXDEPTH=y
361CONFIG_FEATURE_FIND_NEWER=y
362CONFIG_FEATURE_FIND_INUM=y
363CONFIG_FEATURE_FIND_EXEC=y
364CONFIG_FEATURE_FIND_USER=y
365CONFIG_FEATURE_FIND_GROUP=y
366CONFIG_FEATURE_FIND_NOT=y
367CONFIG_FEATURE_FIND_DEPTH=y
368CONFIG_FEATURE_FIND_PAREN=y
369CONFIG_FEATURE_FIND_SIZE=y
370CONFIG_FEATURE_FIND_PRUNE=y
371CONFIG_FEATURE_FIND_DELETE=y
372CONFIG_FEATURE_FIND_PATH=y
373CONFIG_FEATURE_FIND_REGEX=y
374# CONFIG_FEATURE_FIND_CONTEXT is not set
375CONFIG_FEATURE_FIND_LINKS=y
376CONFIG_GREP=y
377CONFIG_FEATURE_GREP_EGREP_ALIAS=y
378CONFIG_FEATURE_GREP_FGREP_ALIAS=y
379CONFIG_FEATURE_GREP_CONTEXT=y
380CONFIG_XARGS=y
381CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
382CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
383CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
384CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
385
386#
387# Init Utilities
388#
389CONFIG_INIT=y
390CONFIG_FEATURE_USE_INITTAB=y
391# CONFIG_FEATURE_KILL_REMOVED is not set
392CONFIG_FEATURE_KILL_DELAY=0
393CONFIG_FEATURE_INIT_SCTTY=y
394CONFIG_FEATURE_INIT_SYSLOG=y
395CONFIG_FEATURE_EXTRA_QUIET=y
396CONFIG_FEATURE_INIT_COREDUMPS=y
397CONFIG_FEATURE_INITRD=y
398CONFIG_HALT=y
399# CONFIG_FEATURE_CALL_TELINIT is not set
400CONFIG_TELINIT_PATH=""
401CONFIG_MESG=y
402
403#
404# Login/Password Management Utilities
405#
406CONFIG_FEATURE_SHADOWPASSWDS=y
407CONFIG_USE_BB_PWD_GRP=y
408CONFIG_USE_BB_SHADOW=y
409CONFIG_USE_BB_CRYPT=y
410CONFIG_USE_BB_CRYPT_SHA=y
411CONFIG_ADDGROUP=y
412CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y
413CONFIG_FEATURE_ADDUSER_TO_GROUP=y
414CONFIG_DELGROUP=y
415CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
416# CONFIG_FEATURE_CHECK_NAMES is not set
417CONFIG_ADDUSER=y
418CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
419CONFIG_FIRST_SYSTEM_ID=100
420CONFIG_LAST_SYSTEM_ID=999
421CONFIG_DELUSER=y
422CONFIG_GETTY=y
423CONFIG_FEATURE_UTMP=y
424CONFIG_FEATURE_WTMP=y
425CONFIG_LOGIN=y
426# CONFIG_PAM is not set
427CONFIG_LOGIN_SCRIPTS=y
428CONFIG_FEATURE_NOLOGIN=y
429CONFIG_FEATURE_SECURETTY=y
430CONFIG_PASSWD=y
431CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
432CONFIG_CRYPTPW=y
433CONFIG_CHPASSWD=y
434CONFIG_SU=y
435CONFIG_FEATURE_SU_SYSLOG=y
436CONFIG_FEATURE_SU_CHECKS_SHELLS=y
437CONFIG_SULOGIN=y
438CONFIG_VLOCK=y
439
440#
441# Linux Ext2 FS Progs
442#
443CONFIG_CHATTR=y
444CONFIG_FSCK=y
445CONFIG_LSATTR=y
446
447#
448# Linux Module Utilities
449#
450CONFIG_MODPROBE_SMALL=y
451CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y
452CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y
453# CONFIG_INSMOD is not set
454# CONFIG_RMMOD is not set
455# CONFIG_LSMOD is not set
456# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
457# CONFIG_MODPROBE is not set
458# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
459# CONFIG_DEPMOD is not set
460
461#
462# Options common to multiple modutils
463#
464# CONFIG_FEATURE_2_4_MODULES is not set
465# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
466# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
467# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
468# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
469# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
470# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
471# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set
472# CONFIG_FEATURE_MODUTILS_ALIAS is not set
473# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set
474CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
475CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
476
477#
478# Linux System Utilities
479#
480CONFIG_ACPID=y
481CONFIG_FEATURE_ACPID_COMPAT=y
482CONFIG_BLKID=y
483CONFIG_DMESG=y
484CONFIG_FEATURE_DMESG_PRETTY=y
485CONFIG_FBSET=y
486CONFIG_FEATURE_FBSET_FANCY=y
487CONFIG_FEATURE_FBSET_READMODE=y
488CONFIG_FDFLUSH=y
489CONFIG_FDFORMAT=y
490CONFIG_FDISK=y
491CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
492CONFIG_FEATURE_FDISK_WRITABLE=y
493# CONFIG_FEATURE_AIX_LABEL is not set
494# CONFIG_FEATURE_SGI_LABEL is not set
495# CONFIG_FEATURE_SUN_LABEL is not set
496# CONFIG_FEATURE_OSF_LABEL is not set
497CONFIG_FEATURE_FDISK_ADVANCED=y
498CONFIG_FINDFS=y
499CONFIG_FREERAMDISK=y
500CONFIG_FSCK_MINIX=y
501CONFIG_MKFS_EXT2=y
502CONFIG_MKFS_MINIX=y
503
504#
505# Minix filesystem support
506#
507CONFIG_FEATURE_MINIX2=y
508# CONFIG_MKFS_REISER is not set
509CONFIG_MKFS_VFAT=y
510CONFIG_GETOPT=y
511CONFIG_FEATURE_GETOPT_LONG=y
512CONFIG_HEXDUMP=y
513CONFIG_FEATURE_HEXDUMP_REVERSE=y
514CONFIG_HD=y
515CONFIG_HWCLOCK=y
516CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
517CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
518CONFIG_IPCRM=y
519CONFIG_IPCS=y
520CONFIG_LOSETUP=y
521CONFIG_LSPCI=y
522CONFIG_LSUSB=y
523CONFIG_MDEV=y
524CONFIG_FEATURE_MDEV_CONF=y
525CONFIG_FEATURE_MDEV_RENAME=y
526CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
527CONFIG_FEATURE_MDEV_EXEC=y
528CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
529CONFIG_MKSWAP=y
530CONFIG_FEATURE_MKSWAP_UUID=y
531CONFIG_MORE=y
532CONFIG_FEATURE_USE_TERMIOS=y
533CONFIG_VOLUMEID=y
534CONFIG_FEATURE_VOLUMEID_EXT=y
535CONFIG_FEATURE_VOLUMEID_BTRFS=y
536CONFIG_FEATURE_VOLUMEID_REISERFS=y
537CONFIG_FEATURE_VOLUMEID_FAT=y
538CONFIG_FEATURE_VOLUMEID_HFS=y
539CONFIG_FEATURE_VOLUMEID_JFS=y
540CONFIG_FEATURE_VOLUMEID_XFS=y
541CONFIG_FEATURE_VOLUMEID_NTFS=y
542CONFIG_FEATURE_VOLUMEID_ISO9660=y
543CONFIG_FEATURE_VOLUMEID_UDF=y
544CONFIG_FEATURE_VOLUMEID_LUKS=y
545CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
546CONFIG_FEATURE_VOLUMEID_CRAMFS=y
547CONFIG_FEATURE_VOLUMEID_ROMFS=y
548CONFIG_FEATURE_VOLUMEID_SYSV=y
549CONFIG_FEATURE_VOLUMEID_OCFS2=y
550CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
551CONFIG_MOUNT=y
552CONFIG_FEATURE_MOUNT_FAKE=y
553CONFIG_FEATURE_MOUNT_VERBOSE=y
554# CONFIG_FEATURE_MOUNT_HELPERS is not set
555CONFIG_FEATURE_MOUNT_LABEL=y
556CONFIG_FEATURE_MOUNT_NFS=y
557CONFIG_FEATURE_MOUNT_CIFS=y
558CONFIG_FEATURE_MOUNT_FLAGS=y
559CONFIG_FEATURE_MOUNT_FSTAB=y
560CONFIG_PIVOT_ROOT=y
561CONFIG_RDATE=y
562CONFIG_RDEV=y
563CONFIG_READPROFILE=y
564CONFIG_RTCWAKE=y
565CONFIG_SCRIPT=y
566CONFIG_SCRIPTREPLAY=y
567CONFIG_SETARCH=y
568CONFIG_SWAPONOFF=y
569CONFIG_FEATURE_SWAPON_PRI=y
570CONFIG_SWITCH_ROOT=y
571CONFIG_UMOUNT=y
572CONFIG_FEATURE_UMOUNT_ALL=y
573
574#
575# Common options for mount/umount
576#
577CONFIG_FEATURE_MOUNT_LOOP=y
578# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set
579# CONFIG_FEATURE_MTAB_SUPPORT is not set
580
581#
582# Miscellaneous Utilities
583#
584CONFIG_ADJTIMEX=y
585# CONFIG_BBCONFIG is not set
586CONFIG_BEEP=y
587CONFIG_FEATURE_BEEP_FREQ=4000
588CONFIG_FEATURE_BEEP_LENGTH_MS=30
589CONFIG_CHAT=y
590CONFIG_FEATURE_CHAT_NOFAIL=y
591# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
592CONFIG_FEATURE_CHAT_IMPLICIT_CR=y
593CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y
594CONFIG_FEATURE_CHAT_SEND_ESCAPES=y
595CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y
596CONFIG_FEATURE_CHAT_CLR_ABORT=y
597CONFIG_CHRT=y
598CONFIG_CROND=y
599CONFIG_FEATURE_CROND_D=y
600CONFIG_FEATURE_CROND_CALL_SENDMAIL=y
601CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
602CONFIG_CRONTAB=y
603CONFIG_DC=y
604CONFIG_FEATURE_DC_LIBM=y
605# CONFIG_DEVFSD is not set
606# CONFIG_DEVFSD_MODLOAD is not set
607# CONFIG_DEVFSD_FG_NP is not set
608# CONFIG_DEVFSD_VERBOSE is not set
609# CONFIG_FEATURE_DEVFS is not set
610CONFIG_DEVMEM=y
611CONFIG_EJECT=y
612CONFIG_FEATURE_EJECT_SCSI=y
613CONFIG_FBSPLASH=y
614CONFIG_FLASHCP=y
615CONFIG_FLASH_LOCK=y
616CONFIG_FLASH_UNLOCK=y
617CONFIG_FLASH_ERASEALL=y
618CONFIG_IONICE=y
619CONFIG_INOTIFYD=y
620CONFIG_LAST=y
621# CONFIG_FEATURE_LAST_SMALL is not set
622CONFIG_FEATURE_LAST_FANCY=y
623CONFIG_LESS=y
624CONFIG_FEATURE_LESS_MAXLINES=9999999
625CONFIG_FEATURE_LESS_BRACKETS=y
626CONFIG_FEATURE_LESS_FLAGS=y
627CONFIG_FEATURE_LESS_MARKS=y
628CONFIG_FEATURE_LESS_REGEXP=y
629CONFIG_FEATURE_LESS_WINCH=y
630CONFIG_FEATURE_LESS_DASHCMD=y
631CONFIG_FEATURE_LESS_LINENUMS=y
632CONFIG_HDPARM=y
633CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
634CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y
635CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y
636CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y
637CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y
638CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y
639CONFIG_MAKEDEVS=y
640# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
641CONFIG_FEATURE_MAKEDEVS_TABLE=y
642CONFIG_MAN=y
643CONFIG_MICROCOM=y
644CONFIG_MOUNTPOINT=y
645CONFIG_MT=y
646CONFIG_RAIDAUTORUN=y
647CONFIG_READAHEAD=y
648CONFIG_RUNLEVEL=y
649CONFIG_RX=y
650CONFIG_SETSID=y
651CONFIG_STRINGS=y
652CONFIG_TASKSET=y
653CONFIG_FEATURE_TASKSET_FANCY=y
654CONFIG_TIME=y
655CONFIG_TIMEOUT=y
656CONFIG_TTYSIZE=y
657CONFIG_VOLNAME=y
658CONFIG_WALL=y
659CONFIG_WATCHDOG=y
660
661#
662# Networking Utilities
663#
664CONFIG_FEATURE_IPV6=y
665# CONFIG_FEATURE_UNIX_LOCAL is not set
666CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
667# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
668CONFIG_ARP=y
669CONFIG_ARPING=y
670CONFIG_BRCTL=y
671CONFIG_FEATURE_BRCTL_FANCY=y
672CONFIG_FEATURE_BRCTL_SHOW=y
673CONFIG_DNSD=y
674CONFIG_ETHER_WAKE=y
675CONFIG_FAKEIDENTD=y
676CONFIG_FTPD=y
677CONFIG_FEATURE_FTP_WRITE=y
678CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y
679CONFIG_FTPGET=y
680CONFIG_FTPPUT=y
681CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y
682CONFIG_HOSTNAME=y
683CONFIG_HTTPD=y
684CONFIG_FEATURE_HTTPD_RANGES=y
685CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
686CONFIG_FEATURE_HTTPD_SETUID=y
687CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
688CONFIG_FEATURE_HTTPD_AUTH_MD5=y
689CONFIG_FEATURE_HTTPD_CGI=y
690CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
691CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
692CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
693CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
694CONFIG_FEATURE_HTTPD_PROXY=y
695CONFIG_IFCONFIG=y
696CONFIG_FEATURE_IFCONFIG_STATUS=y
697CONFIG_FEATURE_IFCONFIG_SLIP=y
698CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
699CONFIG_FEATURE_IFCONFIG_HW=y
700CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
701CONFIG_IFENSLAVE=y
702CONFIG_IFPLUGD=y
703CONFIG_IFUPDOWN=y
704CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
705CONFIG_FEATURE_IFUPDOWN_IP=y
706CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
707# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
708CONFIG_FEATURE_IFUPDOWN_IPV4=y
709CONFIG_FEATURE_IFUPDOWN_IPV6=y
710CONFIG_FEATURE_IFUPDOWN_MAPPING=y
711# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
712CONFIG_INETD=y
713CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
714CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
715CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
716CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
717CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
718CONFIG_FEATURE_INETD_RPC=y
719CONFIG_IP=y
720CONFIG_FEATURE_IP_ADDRESS=y
721CONFIG_FEATURE_IP_LINK=y
722CONFIG_FEATURE_IP_ROUTE=y
723CONFIG_FEATURE_IP_TUNNEL=y
724CONFIG_FEATURE_IP_RULE=y
725CONFIG_FEATURE_IP_SHORT_FORMS=y
726# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
727CONFIG_IPADDR=y
728CONFIG_IPLINK=y
729CONFIG_IPROUTE=y
730CONFIG_IPTUNNEL=y
731CONFIG_IPRULE=y
732CONFIG_IPCALC=y
733CONFIG_FEATURE_IPCALC_FANCY=y
734CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y
735CONFIG_NAMEIF=y
736CONFIG_FEATURE_NAMEIF_EXTENDED=y
737CONFIG_NC=y
738CONFIG_NC_SERVER=y
739CONFIG_NC_EXTRA=y
740CONFIG_NETSTAT=y
741CONFIG_FEATURE_NETSTAT_WIDE=y
742CONFIG_FEATURE_NETSTAT_PRG=y
743CONFIG_NSLOOKUP=y
744CONFIG_NTPD=y
745CONFIG_FEATURE_NTPD_SERVER=y
746CONFIG_PING=y
747CONFIG_PING6=y
748CONFIG_FEATURE_FANCY_PING=y
749CONFIG_PSCAN=y
750CONFIG_ROUTE=y
751CONFIG_SLATTACH=y
752CONFIG_TELNET=y
753CONFIG_FEATURE_TELNET_TTYPE=y
754CONFIG_FEATURE_TELNET_AUTOLOGIN=y
755CONFIG_TELNETD=y
756CONFIG_FEATURE_TELNETD_STANDALONE=y
757CONFIG_FEATURE_TELNETD_INETD_WAIT=y
758CONFIG_TFTP=y
759CONFIG_TFTPD=y
760CONFIG_FEATURE_TFTP_GET=y
761CONFIG_FEATURE_TFTP_PUT=y
762CONFIG_FEATURE_TFTP_BLOCKSIZE=y
763CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
764# CONFIG_TFTP_DEBUG is not set
765CONFIG_TRACEROUTE=y
766CONFIG_TRACEROUTE6=y
767CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
768# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
769# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
770CONFIG_UDHCPD=y
771CONFIG_DHCPRELAY=y
772CONFIG_DUMPLEASES=y
773CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y
774CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
775CONFIG_UDHCPC=y
776CONFIG_FEATURE_UDHCPC_ARPING=y
777CONFIG_FEATURE_UDHCP_PORT=y
778CONFIG_UDHCP_DEBUG=9
779CONFIG_FEATURE_UDHCP_RFC3397=y
780CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
781CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
782CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
783CONFIG_VCONFIG=y
784CONFIG_WGET=y
785CONFIG_FEATURE_WGET_STATUSBAR=y
786CONFIG_FEATURE_WGET_AUTHENTICATION=y
787CONFIG_FEATURE_WGET_LONG_OPTIONS=y
788CONFIG_ZCIP=y
789CONFIG_TCPSVD=y
790CONFIG_TUNCTL=y
791CONFIG_FEATURE_TUNCTL_UG=y
792CONFIG_UDPSVD=y
793
794#
795# Print Utilities
796#
797CONFIG_LPD=y
798CONFIG_LPR=y
799CONFIG_LPQ=y
800
801#
802# Mail Utilities
803#
804CONFIG_MAKEMIME=y
805CONFIG_FEATURE_MIME_CHARSET="us-ascii"
806CONFIG_POPMAILDIR=y
807CONFIG_FEATURE_POPMAILDIR_DELIVERY=y
808CONFIG_REFORMIME=y
809CONFIG_FEATURE_REFORMIME_COMPAT=y
810CONFIG_SENDMAIL=y
811
812#
813# Process Utilities
814#
815CONFIG_FREE=y
816CONFIG_FUSER=y
817CONFIG_KILL=y
818CONFIG_KILLALL=y
819CONFIG_KILLALL5=y
820CONFIG_NMETER=y
821CONFIG_PGREP=y
822CONFIG_PIDOF=y
823CONFIG_FEATURE_PIDOF_SINGLE=y
824CONFIG_FEATURE_PIDOF_OMIT=y
825CONFIG_PKILL=y
826CONFIG_PS=y
827CONFIG_FEATURE_PS_WIDE=y
828# CONFIG_FEATURE_PS_TIME is not set
829# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
830# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
831CONFIG_RENICE=y
832CONFIG_BB_SYSCTL=y
833CONFIG_TOP=y
834CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
835CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
836CONFIG_FEATURE_TOP_SMP_CPU=y
837CONFIG_FEATURE_TOP_DECIMALS=y
838CONFIG_FEATURE_TOP_SMP_PROCESS=y
839CONFIG_FEATURE_TOPMEM=y
840CONFIG_FEATURE_SHOW_THREADS=y
841CONFIG_UPTIME=y
842CONFIG_WATCH=y
843
844#
845# Runit Utilities
846#
847CONFIG_RUNSV=y
848CONFIG_RUNSVDIR=y
849# CONFIG_FEATURE_RUNSVDIR_LOG is not set
850CONFIG_SV=y
851CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service"
852CONFIG_SVLOGD=y
853CONFIG_CHPST=y
854CONFIG_SETUIDGID=y
855CONFIG_ENVUIDGID=y
856CONFIG_ENVDIR=y
857CONFIG_SOFTLIMIT=y
858# CONFIG_CHCON is not set
859# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
860# CONFIG_GETENFORCE is not set
861# CONFIG_GETSEBOOL is not set
862# CONFIG_LOAD_POLICY is not set
863# CONFIG_MATCHPATHCON is not set
864# CONFIG_RESTORECON is not set
865# CONFIG_RUNCON is not set
866# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
867# CONFIG_SELINUXENABLED is not set
868# CONFIG_SETENFORCE is not set
869# CONFIG_SETFILES is not set
870# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
871# CONFIG_SETSEBOOL is not set
872# CONFIG_SESTATUS is not set
873
874#
875# Shells
876#
877CONFIG_FEATURE_SH_IS_ASH=y
878# CONFIG_FEATURE_SH_IS_HUSH is not set
879# CONFIG_FEATURE_SH_IS_NONE is not set
880CONFIG_ASH=y
881CONFIG_ASH_BASH_COMPAT=y
882CONFIG_ASH_JOB_CONTROL=y
883CONFIG_ASH_ALIAS=y
884CONFIG_ASH_GETOPTS=y
885CONFIG_ASH_BUILTIN_ECHO=y
886CONFIG_ASH_BUILTIN_PRINTF=y
887CONFIG_ASH_BUILTIN_TEST=y
888CONFIG_ASH_CMDCMD=y
889# CONFIG_ASH_MAIL is not set
890CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
891CONFIG_ASH_RANDOM_SUPPORT=y
892CONFIG_ASH_EXPAND_PRMT=y
893CONFIG_HUSH=y
894CONFIG_HUSH_BASH_COMPAT=y
895CONFIG_HUSH_HELP=y
896CONFIG_HUSH_INTERACTIVE=y
897CONFIG_HUSH_JOB=y
898CONFIG_HUSH_TICK=y
899CONFIG_HUSH_IF=y
900CONFIG_HUSH_LOOPS=y
901CONFIG_HUSH_CASE=y
902CONFIG_HUSH_FUNCTIONS=y
903CONFIG_HUSH_LOCAL=y
904CONFIG_HUSH_EXPORT_N=y
905CONFIG_HUSH_RANDOM_SUPPORT=y
906# CONFIG_LASH is not set
907CONFIG_MSH=y
908CONFIG_SH_MATH_SUPPORT=y
909CONFIG_SH_MATH_SUPPORT_64=y
910CONFIG_FEATURE_SH_EXTRA_QUIET=y
911# CONFIG_FEATURE_SH_STANDALONE is not set
912# CONFIG_FEATURE_SH_NOFORK is not set
913CONFIG_CTTYHACK=y
914
915#
916# System Logging Utilities
917#
918CONFIG_SYSLOGD=y
919CONFIG_FEATURE_ROTATE_LOGFILE=y
920CONFIG_FEATURE_REMOTE_LOG=y
921CONFIG_FEATURE_SYSLOGD_DUP=y
922CONFIG_FEATURE_IPC_SYSLOG=y
923CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
924CONFIG_LOGREAD=y
925CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
926CONFIG_KLOGD=y
927CONFIG_LOGGER=y
diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh
index b3aa132a3..647c7daf7 100755
--- a/scripts/gen_build_files.sh
+++ b/scripts/gen_build_files.sh
@@ -7,6 +7,51 @@ cd -- "$2" || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
7 7
8srctree="$1" 8srctree="$1"
9 9
10# (Re)generate include/applets.h
11src="$srctree/include/applets.src.h"
12dst="include/applets.h"
13s=`sed -n 's@^//applet:@@p' -- "$srctree"/*/*.c "$srctree"/*/*/*.c`
14echo "/* DO NOT EDIT. This file is generated from applets.src.h */" >"$dst.$$.tmp"
15# Why "IFS='' read -r REPLY"??
16# This atrocity is needed to read lines without mangling.
17# IFS='' prevents whitespace trimming,
18# -r suppresses backslash handling.
19while IFS='' read -r REPLY; do
20 test x"$REPLY" = x"INSERT" && REPLY="$s"
21 printf "%s\n" "$REPLY"
22done <"$src" >>"$dst.$$.tmp"
23if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
24 rm -- "$dst.$$.tmp"
25else
26 echo " GEN $dst"
27 mv -- "$dst.$$.tmp" "$dst"
28fi
29
30# (Re)generate include/usage.h
31src="$srctree/include/usage.src.h"
32dst="include/usage.h"
33# We add line continuation backslash after each line,
34# and insert empty line before each line which doesn't start
35# with space or tab
36# (note: we need to use \\\\ because of ``)
37s=`sed -n -e 's@^//usage:\([ \t].*\)$@\1 \\\\@p' -e 's@^//usage:\([^ \t].*\)$@\n\1 \\\\@p' -- "$srctree"/*/*.c "$srctree"/*/*/*.c`
38echo "/* DO NOT EDIT. This file is generated from usage.src.h */" >"$dst.$$.tmp"
39# Why "IFS='' read -r REPLY"??
40# This atrocity is needed to read lines without mangling.
41# IFS='' prevents whitespace trimming,
42# -r suppresses backslash handling.
43while IFS='' read -r REPLY; do
44 test x"$REPLY" = x"INSERT" && REPLY="$s"
45 printf "%s\n" "$REPLY"
46done <"$src" >>"$dst.$$.tmp"
47if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
48 rm -- "$dst.$$.tmp"
49else
50 echo " GEN $dst"
51 mv -- "$dst.$$.tmp" "$dst"
52fi
53
54# (Re)generate */Kbuild and */Config.in
10find -type d | while read -r d; do 55find -type d | while read -r d; do
11 d="${d#./}" 56 d="${d#./}"
12 src="$srctree/$d/Kbuild.src" 57 src="$srctree/$d/Kbuild.src"
@@ -15,17 +60,12 @@ find -type d | while read -r d; do
15 #echo " CHK $dst" 60 #echo " CHK $dst"
16 61
17 s=`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c` 62 s=`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c`
18 echo "# DO NOT EDIT. This file is generated from Kbuild.src" >"$dst.$$.tmp"
19 63
20 # Why "IFS='' read -r REPLY"?? 64 echo "# DO NOT EDIT. This file is generated from Kbuild.src" >"$dst.$$.tmp"
21 # This atrocity is needed to read lines without mangling.
22 # IFS='' prevents whitespace trimming,
23 # -r suppresses backslash handling.
24 while IFS='' read -r REPLY; do 65 while IFS='' read -r REPLY; do
25 test x"$REPLY" = x"INSERT" && REPLY="$s" 66 test x"$REPLY" = x"INSERT" && REPLY="$s"
26 printf "%s\n" "$REPLY" 67 printf "%s\n" "$REPLY"
27 done <"$src" >>"$dst.$$.tmp" 68 done <"$src" >>"$dst.$$.tmp"
28
29 if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then 69 if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
30 rm -- "$dst.$$.tmp" 70 rm -- "$dst.$$.tmp"
31 else 71 else
@@ -40,13 +80,12 @@ find -type d | while read -r d; do
40 #echo " CHK $dst" 80 #echo " CHK $dst"
41 81
42 s=`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c` 82 s=`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c`
43 echo "# DO NOT EDIT. This file is generated from Config.src" >"$dst.$$.tmp"
44 83
84 echo "# DO NOT EDIT. This file is generated from Config.src" >"$dst.$$.tmp"
45 while IFS='' read -r REPLY; do 85 while IFS='' read -r REPLY; do
46 test x"$REPLY" = x"INSERT" && REPLY="$s" 86 test x"$REPLY" = x"INSERT" && REPLY="$s"
47 printf "%s\n" "$REPLY" 87 printf "%s\n" "$REPLY"
48 done <"$src" >>"$dst.$$.tmp" 88 done <"$src" >>"$dst.$$.tmp"
49
50 if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then 89 if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
51 rm -- "$dst.$$.tmp" 90 rm -- "$dst.$$.tmp"
52 else 91 else
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 4f83fbfa2..bd2d70e19 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -22,7 +22,7 @@ static int conf_lineno, conf_warnings, conf_unsaved;
22 22
23const char conf_def_filename[] = ".config"; 23const char conf_def_filename[] = ".config";
24 24
25const char conf_defname[] = "scripts/defconfig"; 25const char conf_defname[] = "/dev/null"; //bbox
26 26
27const char *conf_confnames[] = { 27const char *conf_confnames[] = {
28 conf_def_filename, 28 conf_def_filename,
diff --git a/scripts/test_make_clean b/scripts/test_make_clean
new file mode 100755
index 000000000..fa3a543d8
--- /dev/null
+++ b/scripts/test_make_clean
@@ -0,0 +1,14 @@
1#!/bin/sh
2
3b=`basename $PWD`
4test "${b#busybox}" != "$b" || { echo "Must be run in busybox tree"; exit 1; }
5
6cd ..
7cp -pPR "$b" busybox.$$.test_tree
8cd busybox.$$.test_tree
9make defconfig
10make $MAKEOPTS
11make clean
12cd ..
13diff -urp "$b" busybox.$$.test_tree >busybox.$$.test_tree.diff
14cat busybox.$$.test_tree.diff
diff --git a/selinux/Config.in b/selinux/Config.src
index e46030adf..e46030adf 100644
--- a/selinux/Config.in
+++ b/selinux/Config.src
diff --git a/selinux/Kbuild b/selinux/Kbuild.src
index d0c190ceb..d0c190ceb 100644
--- a/selinux/Kbuild
+++ b/selinux/Kbuild.src
diff --git a/shell/Config.in b/shell/Config.src
index 286a3415e..234d05367 100644
--- a/shell/Config.in
+++ b/shell/Config.src
@@ -7,7 +7,7 @@ menu "Shells"
7 7
8choice 8choice
9 prompt "Choose which shell is aliased to 'sh' name" 9 prompt "Choose which shell is aliased to 'sh' name"
10 default FEATURE_SH_IS_NONE 10 default FEATURE_SH_IS_ASH
11 help 11 help
12 Choose which shell you want to be executed by 'sh' alias. 12 Choose which shell you want to be executed by 'sh' alias.
13 The ash shell is the most bash compatible and full featured one. 13 The ash shell is the most bash compatible and full featured one.
@@ -59,7 +59,7 @@ endchoice
59 59
60config ASH 60config ASH
61 bool "ash" 61 bool "ash"
62 default n 62 default y
63 depends on !NOMMU 63 depends on !NOMMU
64 help 64 help
65 Tha 'ash' shell adds about 60k in the default configuration and is 65 Tha 'ash' shell adds about 60k in the default configuration and is
@@ -91,7 +91,7 @@ config ASH_ALIAS
91 91
92config ASH_GETOPTS 92config ASH_GETOPTS
93 bool "Builtin getopt to parse positional parameters" 93 bool "Builtin getopt to parse positional parameters"
94 default n 94 default y
95 depends on ASH 95 depends on ASH
96 help 96 help
97 Enable getopts builtin in the ash shell. 97 Enable getopts builtin in the ash shell.
@@ -119,7 +119,7 @@ config ASH_BUILTIN_TEST
119 119
120config ASH_CMDCMD 120config ASH_CMDCMD
121 bool "'command' command to override shell builtins" 121 bool "'command' command to override shell builtins"
122 default n 122 default y
123 depends on ASH 123 depends on ASH
124 help 124 help
125 Enable support for the ash 'command' builtin, which allows 125 Enable support for the ash 'command' builtin, which allows
@@ -128,7 +128,7 @@ config ASH_CMDCMD
128 128
129config ASH_MAIL 129config ASH_MAIL
130 bool "Check for new mail on interactive shells" 130 bool "Check for new mail on interactive shells"
131 default y 131 default n
132 depends on ASH 132 depends on ASH
133 help 133 help
134 Enable "check for new mail" in the ash shell. 134 Enable "check for new mail" in the ash shell.
@@ -142,7 +142,7 @@ config ASH_OPTIMIZE_FOR_SIZE
142 142
143config ASH_RANDOM_SUPPORT 143config ASH_RANDOM_SUPPORT
144 bool "Pseudorandom generator and $RANDOM variable" 144 bool "Pseudorandom generator and $RANDOM variable"
145 default n 145 default y
146 depends on ASH 146 depends on ASH
147 help 147 help
148 Enable pseudorandom generator and dynamic variable "$RANDOM". 148 Enable pseudorandom generator and dynamic variable "$RANDOM".
@@ -153,7 +153,7 @@ config ASH_RANDOM_SUPPORT
153 153
154config ASH_EXPAND_PRMT 154config ASH_EXPAND_PRMT
155 bool "Expand prompt string" 155 bool "Expand prompt string"
156 default n 156 default y
157 depends on ASH 157 depends on ASH
158 help 158 help
159 "PS#" may contain volatile content, such as backquote commands. 159 "PS#" may contain volatile content, such as backquote commands.
@@ -162,7 +162,7 @@ config ASH_EXPAND_PRMT
162 162
163config HUSH 163config HUSH
164 bool "hush" 164 bool "hush"
165 default n 165 default y
166 help 166 help
167 hush is a small shell (22k). It handles the normal flow control 167 hush is a small shell (22k). It handles the normal flow control
168 constructs such as if/then/elif/else/fi, for/in/do/done, while loops, 168 constructs such as if/then/elif/else/fi, for/in/do/done, while loops,
@@ -183,7 +183,7 @@ config HUSH_BASH_COMPAT
183 183
184config HUSH_HELP 184config HUSH_HELP
185 bool "help builtin" 185 bool "help builtin"
186 default n 186 default y
187 depends on HUSH 187 depends on HUSH
188 help 188 help
189 Enable help builtin in hush. Code size + ~1 kbyte. 189 Enable help builtin in hush. Code size + ~1 kbyte.
@@ -200,7 +200,7 @@ config HUSH_INTERACTIVE
200 200
201config HUSH_JOB 201config HUSH_JOB
202 bool "Job control" 202 bool "Job control"
203 default n 203 default y
204 depends on HUSH_INTERACTIVE 204 depends on HUSH_INTERACTIVE
205 help 205 help
206 Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current 206 Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current
@@ -211,56 +211,56 @@ config HUSH_JOB
211 211
212config HUSH_TICK 212config HUSH_TICK
213 bool "Process substitution" 213 bool "Process substitution"
214 default n 214 default y
215 depends on HUSH 215 depends on HUSH
216 help 216 help
217 Enable process substitution `command` and $(command) in hush. 217 Enable process substitution `command` and $(command) in hush.
218 218
219config HUSH_IF 219config HUSH_IF
220 bool "Support if/then/elif/else/fi" 220 bool "Support if/then/elif/else/fi"
221 default n 221 default y
222 depends on HUSH 222 depends on HUSH
223 help 223 help
224 Enable if/then/elif/else/fi in hush. 224 Enable if/then/elif/else/fi in hush.
225 225
226config HUSH_LOOPS 226config HUSH_LOOPS
227 bool "Support for, while and until loops" 227 bool "Support for, while and until loops"
228 default n 228 default y
229 depends on HUSH 229 depends on HUSH
230 help 230 help
231 Enable for, while and until loops in hush. 231 Enable for, while and until loops in hush.
232 232
233config HUSH_CASE 233config HUSH_CASE
234 bool "Support case ... esac statement" 234 bool "Support case ... esac statement"
235 default n 235 default y
236 depends on HUSH 236 depends on HUSH
237 help 237 help
238 Enable case ... esac statement in hush. +400 bytes. 238 Enable case ... esac statement in hush. +400 bytes.
239 239
240config HUSH_FUNCTIONS 240config HUSH_FUNCTIONS
241 bool "Support funcname() { commands; } syntax" 241 bool "Support funcname() { commands; } syntax"
242 default n 242 default y
243 depends on HUSH 243 depends on HUSH
244 help 244 help
245 Enable support for shell functions in hush. +800 bytes. 245 Enable support for shell functions in hush. +800 bytes.
246 246
247config HUSH_LOCAL 247config HUSH_LOCAL
248 bool "Support local builtin" 248 bool "Support local builtin"
249 default n 249 default y
250 depends on HUSH_FUNCTIONS 250 depends on HUSH_FUNCTIONS
251 help 251 help
252 Enable support for local variables in functions. 252 Enable support for local variables in functions.
253 253
254config HUSH_EXPORT_N 254config HUSH_EXPORT_N
255 bool "Support export '-n' option" 255 bool "Support export '-n' option"
256 default n 256 default y
257 depends on HUSH 257 depends on HUSH
258 help 258 help
259 Enable support for export '-n' option in hush. It is a bash extension. 259 Enable support for export '-n' option in hush. It is a bash extension.
260 260
261config HUSH_RANDOM_SUPPORT 261config HUSH_RANDOM_SUPPORT
262 bool "Pseudorandom generator and $RANDOM variable" 262 bool "Pseudorandom generator and $RANDOM variable"
263 default n 263 default y
264 depends on HUSH 264 depends on HUSH
265 help 265 help
266 Enable pseudorandom generator and dynamic variable "$RANDOM". 266 Enable pseudorandom generator and dynamic variable "$RANDOM".
@@ -298,7 +298,7 @@ config SH_MATH_SUPPORT
298 298
299config SH_MATH_SUPPORT_64 299config SH_MATH_SUPPORT_64
300 bool "Extend POSIX math support to 64 bit" 300 bool "Extend POSIX math support to 64 bit"
301 default n 301 default y
302 depends on SH_MATH_SUPPORT 302 depends on SH_MATH_SUPPORT
303 help 303 help
304 Enable 64-bit math support in the shell. This will make the shell 304 Enable 64-bit math support in the shell. This will make the shell
@@ -307,15 +307,15 @@ config SH_MATH_SUPPORT_64
307 307
308config FEATURE_SH_EXTRA_QUIET 308config FEATURE_SH_EXTRA_QUIET
309 bool "Hide message on interactive shell startup" 309 bool "Hide message on interactive shell startup"
310 default n 310 default y
311 depends on MSH || LASH || HUSH || ASH 311 depends on HUSH || ASH
312 help 312 help
313 Remove the busybox introduction when starting a shell. 313 Remove the busybox introduction when starting a shell.
314 314
315config FEATURE_SH_STANDALONE 315config FEATURE_SH_STANDALONE
316 bool "Standalone shell" 316 bool "Standalone shell"
317 default n 317 default n
318 depends on (MSH || LASH || HUSH || ASH) && FEATURE_PREFER_APPLETS 318 depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS
319 help 319 help
320 This option causes busybox shells to use busybox applets 320 This option causes busybox shells to use busybox applets
321 in preference to executables in the PATH whenever possible. For 321 in preference to executables in the PATH whenever possible. For
@@ -348,7 +348,7 @@ config FEATURE_SH_STANDALONE
348config FEATURE_SH_NOFORK 348config FEATURE_SH_NOFORK
349 bool "Run 'nofork' applets directly" 349 bool "Run 'nofork' applets directly"
350 default n 350 default n
351 depends on (MSH || LASH || HUSH || ASH) && FEATURE_PREFER_APPLETS 351 depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS
352 help 352 help
353 This option causes busybox shells [currently only ash] 353 This option causes busybox shells [currently only ash]
354 to not execute typical fork/exec/wait sequence, but call <applet>_main 354 to not execute typical fork/exec/wait sequence, but call <applet>_main
@@ -364,7 +364,7 @@ config FEATURE_SH_NOFORK
364 364
365config CTTYHACK 365config CTTYHACK
366 bool "cttyhack" 366 bool "cttyhack"
367 default n 367 default y
368 help 368 help
369 One common problem reported on the mailing list is "can't access tty; 369 One common problem reported on the mailing list is "can't access tty;
370 job control turned off" error message which typically appears when 370 job control turned off" error message which typically appears when
diff --git a/shell/Kbuild b/shell/Kbuild.src
index 8bdb68b11..8bdb68b11 100644
--- a/shell/Kbuild
+++ b/shell/Kbuild.src
diff --git a/shell/ash.c b/shell/ash.c
index dcaac1fd8..89e70c1ee 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -1093,7 +1093,7 @@ struct strpush {
1093struct parsefile { 1093struct parsefile {
1094 struct parsefile *prev; /* preceding file on stack */ 1094 struct parsefile *prev; /* preceding file on stack */
1095 int linno; /* current line */ 1095 int linno; /* current line */
1096 int fd; /* file descriptor (or -1 if string) */ 1096 int pf_fd; /* file descriptor (or -1 if string) */
1097 int left_in_line; /* number of chars left in this line */ 1097 int left_in_line; /* number of chars left in this line */
1098 int left_in_buffer; /* number of chars left in this buffer past the line */ 1098 int left_in_buffer; /* number of chars left in this buffer past the line */
1099 char *next_to_pgetc; /* next char in buffer */ 1099 char *next_to_pgetc; /* next char in buffer */
@@ -1119,7 +1119,7 @@ ash_vmsg(const char *msg, va_list ap)
1119 if (commandname) { 1119 if (commandname) {
1120 if (strcmp(arg0, commandname)) 1120 if (strcmp(arg0, commandname))
1121 fprintf(stderr, "%s: ", commandname); 1121 fprintf(stderr, "%s: ", commandname);
1122 if (!iflag || g_parsefile->fd > 0) 1122 if (!iflag || g_parsefile->pf_fd > 0)
1123 fprintf(stderr, "line %d: ", startlinno); 1123 fprintf(stderr, "line %d: ", startlinno);
1124 } 1124 }
1125 vfprintf(stderr, msg, ap); 1125 vfprintf(stderr, msg, ap);
@@ -5356,15 +5356,15 @@ static int is_hidden_fd(struct redirtab *rp, int fd)
5356 /* Check open scripts' fds */ 5356 /* Check open scripts' fds */
5357 pf = g_parsefile; 5357 pf = g_parsefile;
5358 while (pf) { 5358 while (pf) {
5359 /* We skip fd == 0 case because of the following case: 5359 /* We skip pf_fd == 0 case because of the following case:
5360 * $ ash # running ash interactively 5360 * $ ash # running ash interactively
5361 * $ . ./script.sh 5361 * $ . ./script.sh
5362 * and in script.sh: "exec 9>&0". 5362 * and in script.sh: "exec 9>&0".
5363 * Even though top-level fd _is_ 0, 5363 * Even though top-level pf_fd _is_ 0,
5364 * it's still ok to use it: "read" builtin uses it, 5364 * it's still ok to use it: "read" builtin uses it,
5365 * why should we cripple "exec" builtin? 5365 * why should we cripple "exec" builtin?
5366 */ 5366 */
5367 if (pf->fd > 0 && fd == pf->fd) { 5367 if (pf->pf_fd > 0 && fd == pf->pf_fd) {
5368 return 1; 5368 return 1;
5369 } 5369 }
5370 pf = pf->prev; 5370 pf = pf->prev;
@@ -9921,8 +9921,8 @@ preadfd(void)
9921 g_parsefile->next_to_pgetc = buf; 9921 g_parsefile->next_to_pgetc = buf;
9922#if ENABLE_FEATURE_EDITING 9922#if ENABLE_FEATURE_EDITING
9923 retry: 9923 retry:
9924 if (!iflag || g_parsefile->fd != STDIN_FILENO) 9924 if (!iflag || g_parsefile->pf_fd != STDIN_FILENO)
9925 nr = nonblock_safe_read(g_parsefile->fd, buf, IBUFSIZ - 1); 9925 nr = nonblock_safe_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1);
9926 else { 9926 else {
9927#if ENABLE_FEATURE_TAB_COMPLETION 9927#if ENABLE_FEATURE_TAB_COMPLETION
9928 line_input_state->path_lookup = pathval(); 9928 line_input_state->path_lookup = pathval();
@@ -9944,7 +9944,7 @@ preadfd(void)
9944 } 9944 }
9945 } 9945 }
9946#else 9946#else
9947 nr = nonblock_safe_read(g_parsefile->fd, buf, IBUFSIZ - 1); 9947 nr = nonblock_safe_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1);
9948#endif 9948#endif
9949 9949
9950#if 0 9950#if 0
@@ -10171,7 +10171,7 @@ pushfile(void)
10171 10171
10172 pf = ckzalloc(sizeof(*pf)); 10172 pf = ckzalloc(sizeof(*pf));
10173 pf->prev = g_parsefile; 10173 pf->prev = g_parsefile;
10174 pf->fd = -1; 10174 pf->pf_fd = -1;
10175 /*pf->strpush = NULL; - ckzalloc did it */ 10175 /*pf->strpush = NULL; - ckzalloc did it */
10176 /*pf->basestrpush.prev = NULL;*/ 10176 /*pf->basestrpush.prev = NULL;*/
10177 g_parsefile = pf; 10177 g_parsefile = pf;
@@ -10183,8 +10183,8 @@ popfile(void)
10183 struct parsefile *pf = g_parsefile; 10183 struct parsefile *pf = g_parsefile;
10184 10184
10185 INT_OFF; 10185 INT_OFF;
10186 if (pf->fd >= 0) 10186 if (pf->pf_fd >= 0)
10187 close(pf->fd); 10187 close(pf->pf_fd);
10188 free(pf->buf); 10188 free(pf->buf);
10189 while (pf->strpush) 10189 while (pf->strpush)
10190 popstring(); 10190 popstring();
@@ -10211,9 +10211,9 @@ static void
10211closescript(void) 10211closescript(void)
10212{ 10212{
10213 popallfiles(); 10213 popallfiles();
10214 if (g_parsefile->fd > 0) { 10214 if (g_parsefile->pf_fd > 0) {
10215 close(g_parsefile->fd); 10215 close(g_parsefile->pf_fd);
10216 g_parsefile->fd = 0; 10216 g_parsefile->pf_fd = 0;
10217 } 10217 }
10218} 10218}
10219 10219
@@ -10229,7 +10229,7 @@ setinputfd(int fd, int push)
10229 pushfile(); 10229 pushfile();
10230 g_parsefile->buf = NULL; 10230 g_parsefile->buf = NULL;
10231 } 10231 }
10232 g_parsefile->fd = fd; 10232 g_parsefile->pf_fd = fd;
10233 if (g_parsefile->buf == NULL) 10233 if (g_parsefile->buf == NULL)
10234 g_parsefile->buf = ckmalloc(IBUFSIZ); 10234 g_parsefile->buf = ckmalloc(IBUFSIZ);
10235 g_parsefile->left_in_buffer = 0; 10235 g_parsefile->left_in_buffer = 0;
@@ -13562,7 +13562,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
13562 * Ensure we don't falsely claim that 0 (stdin) 13562 * Ensure we don't falsely claim that 0 (stdin)
13563 * is one of stacked source fds. 13563 * is one of stacked source fds.
13564 * Testcase: ash -c 'exec 1>&0' must not complain. */ 13564 * Testcase: ash -c 'exec 1>&0' must not complain. */
13565 // if (!sflag) g_parsefile->fd = -1; 13565 // if (!sflag) g_parsefile->pf_fd = -1;
13566 // ^^ not necessary since now we special-case fd 0 13566 // ^^ not necessary since now we special-case fd 0
13567 // in is_hidden_fd() to not be considered "hidden fd" 13567 // in is_hidden_fd() to not be considered "hidden fd"
13568 evalstring(minusc, 0); 13568 evalstring(minusc, 0);
diff --git a/sysklogd/Config.in b/sysklogd/Config.src
index b500d5471..af00d65bb 100644
--- a/sysklogd/Config.in
+++ b/sysklogd/Config.src
@@ -7,7 +7,7 @@ menu "System Logging Utilities"
7 7
8config SYSLOGD 8config SYSLOGD
9 bool "syslogd" 9 bool "syslogd"
10 default n 10 default y
11 help 11 help
12 The syslogd utility is used to record logs of all the 12 The syslogd utility is used to record logs of all the
13 significant events that occur on a system. Every 13 significant events that occur on a system. Every
@@ -22,7 +22,7 @@ config SYSLOGD
22 22
23config FEATURE_ROTATE_LOGFILE 23config FEATURE_ROTATE_LOGFILE
24 bool "Rotate message files" 24 bool "Rotate message files"
25 default n 25 default y
26 depends on SYSLOGD 26 depends on SYSLOGD
27 help 27 help
28 This enables syslogd to rotate the message files 28 This enables syslogd to rotate the message files
@@ -30,7 +30,7 @@ config FEATURE_ROTATE_LOGFILE
30 30
31config FEATURE_REMOTE_LOG 31config FEATURE_REMOTE_LOG
32 bool "Remote Log support" 32 bool "Remote Log support"
33 default n 33 default y
34 depends on SYSLOGD 34 depends on SYSLOGD
35 help 35 help
36 When you enable this feature, the syslogd utility can 36 When you enable this feature, the syslogd utility can
@@ -44,7 +44,7 @@ config FEATURE_REMOTE_LOG
44 44
45config FEATURE_SYSLOGD_DUP 45config FEATURE_SYSLOGD_DUP
46 bool "Support -D (drop dups) option" 46 bool "Support -D (drop dups) option"
47 default n 47 default y
48 depends on SYSLOGD 48 depends on SYSLOGD
49 help 49 help
50 Option -D instructs syslogd to drop consecutive messages 50 Option -D instructs syslogd to drop consecutive messages
@@ -62,7 +62,7 @@ config FEATURE_SYSLOGD_READ_BUFFER_SIZE
62 62
63config FEATURE_IPC_SYSLOG 63config FEATURE_IPC_SYSLOG
64 bool "Circular Buffer support" 64 bool "Circular Buffer support"
65 default n 65 default y
66 depends on SYSLOGD 66 depends on SYSLOGD
67 help 67 help
68 When you enable this feature, the syslogd utility will 68 When you enable this feature, the syslogd utility will
@@ -95,7 +95,7 @@ config LOGREAD
95 95
96config FEATURE_LOGREAD_REDUCED_LOCKING 96config FEATURE_LOGREAD_REDUCED_LOCKING
97 bool "Double buffering" 97 bool "Double buffering"
98 default n 98 default y
99 depends on LOGREAD 99 depends on LOGREAD
100 help 100 help
101 'logread' ouput to slow serial terminals can have 101 'logread' ouput to slow serial terminals can have
@@ -106,7 +106,7 @@ config FEATURE_LOGREAD_REDUCED_LOCKING
106 106
107config KLOGD 107config KLOGD
108 bool "klogd" 108 bool "klogd"
109 default n 109 default y
110 help 110 help
111 klogd is a utility which intercepts and logs all 111 klogd is a utility which intercepts and logs all
112 messages from the Linux kernel and sends the messages 112 messages from the Linux kernel and sends the messages
@@ -116,7 +116,7 @@ config KLOGD
116 116
117config LOGGER 117config LOGGER
118 bool "logger" 118 bool "logger"
119 default n 119 default y
120 select FEATURE_SYSLOG 120 select FEATURE_SYSLOG
121 help 121 help
122 The logger utility allows you to send arbitrary text 122 The logger utility allows you to send arbitrary text
diff --git a/sysklogd/Kbuild b/sysklogd/Kbuild.src
index d802198e6..d802198e6 100644
--- a/sysklogd/Kbuild
+++ b/sysklogd/Kbuild.src
diff --git a/testsuite/sed.tests b/testsuite/sed.tests
index 88b9c4e4b..3301a25f8 100755
--- a/testsuite/sed.tests
+++ b/testsuite/sed.tests
@@ -270,6 +270,11 @@ testing "sed a cmd ended by double backslash" \
270 | two \\ 270 | two \\
271' 271'
272 272
273# fisrt three lines are deleted; 4th line is matched and printed by "2,3" and by "4" ranges
274testing "sed with N skipping lines past ranges on next cmds" \
275 "sed -n '1{N;N;d};1p;2,3p;3p;4p'" \
276 "4\n4\n" "" "1\n2\n3\n4\n"
277
273# testing "description" "arguments" "result" "infile" "stdin" 278# testing "description" "arguments" "result" "infile" "stdin"
274 279
275exit $FAILCOUNT 280exit $FAILCOUNT
diff --git a/util-linux/Config.in b/util-linux/Config.src
index a59cc1ddf..997cdec83 100644
--- a/util-linux/Config.in
+++ b/util-linux/Config.src
@@ -7,7 +7,7 @@ menu "Linux System Utilities"
7 7
8config ACPID 8config ACPID
9 bool "acpid" 9 bool "acpid"
10 default n 10 default y
11 help 11 help
12 acpid listens to ACPI events coming either in textual form from 12 acpid listens to ACPI events coming either in textual form from
13 /proc/acpi/event (though it is marked deprecated it is still widely 13 /proc/acpi/event (though it is marked deprecated it is still widely
@@ -22,14 +22,14 @@ config ACPID
22 22
23config FEATURE_ACPID_COMPAT 23config FEATURE_ACPID_COMPAT
24 bool "Accept and ignore redundant options" 24 bool "Accept and ignore redundant options"
25 default n 25 default y
26 depends on ACPID 26 depends on ACPID
27 help 27 help
28 Accept and ignore compatibility options -g -m -s -S -v. 28 Accept and ignore compatibility options -g -m -s -S -v.
29 29
30config BLKID 30config BLKID
31 bool "blkid" 31 bool "blkid"
32 default n 32 default y
33 select VOLUMEID 33 select VOLUMEID
34 help 34 help
35 Lists labels and UUIDs of all filesystems. 35 Lists labels and UUIDs of all filesystems.
@@ -38,7 +38,7 @@ config BLKID
38 38
39config DMESG 39config DMESG
40 bool "dmesg" 40 bool "dmesg"
41 default n 41 default y
42 help 42 help
43 dmesg is used to examine or control the kernel ring buffer. When the 43 dmesg is used to examine or control the kernel ring buffer. When the
44 Linux kernel prints messages to the system log, they are stored in 44 Linux kernel prints messages to the system log, they are stored in
@@ -71,7 +71,7 @@ config FEATURE_DMESG_PRETTY
71 71
72config FBSET 72config FBSET
73 bool "fbset" 73 bool "fbset"
74 default n 74 default y
75 help 75 help
76 fbset is used to show or change the settings of a Linux frame buffer 76 fbset is used to show or change the settings of a Linux frame buffer
77 device. The frame buffer device provides a simple and unique 77 device. The frame buffer device provides a simple and unique
@@ -80,7 +80,7 @@ config FBSET
80 80
81config FEATURE_FBSET_FANCY 81config FEATURE_FBSET_FANCY
82 bool "Turn on extra fbset options" 82 bool "Turn on extra fbset options"
83 default n 83 default y
84 depends on FBSET 84 depends on FBSET
85 help 85 help
86 This option enables extended fbset options, allowing one to set the 86 This option enables extended fbset options, allowing one to set the
@@ -90,7 +90,7 @@ config FEATURE_FBSET_FANCY
90 90
91config FEATURE_FBSET_READMODE 91config FEATURE_FBSET_READMODE
92 bool "Turn on fbset readmode support" 92 bool "Turn on fbset readmode support"
93 default n 93 default y
94 depends on FBSET 94 depends on FBSET
95 help 95 help
96 This option allows fbset to read the video mode database stored by 96 This option allows fbset to read the video mode database stored by
@@ -99,7 +99,7 @@ config FEATURE_FBSET_READMODE
99 99
100config FDFLUSH 100config FDFLUSH
101 bool "fdflush" 101 bool "fdflush"
102 default n 102 default y
103 help 103 help
104 fdflush is only needed when changing media on slightly-broken 104 fdflush is only needed when changing media on slightly-broken
105 removable media drives. It is used to make Linux believe that a 105 removable media drives. It is used to make Linux believe that a
@@ -111,13 +111,13 @@ config FDFLUSH
111 111
112config FDFORMAT 112config FDFORMAT
113 bool "fdformat" 113 bool "fdformat"
114 default n 114 default y
115 help 115 help
116 fdformat is used to low-level format a floppy disk. 116 fdformat is used to low-level format a floppy disk.
117 117
118config FDISK 118config FDISK
119 bool "fdisk" 119 bool "fdisk"
120 default n 120 default y
121 help 121 help
122 The fdisk utility is used to divide hard disks into one or more 122 The fdisk utility is used to divide hard disks into one or more
123 logical disks, which are generally called partitions. This utility 123 logical disks, which are generally called partitions. This utility
@@ -174,7 +174,7 @@ config FEATURE_OSF_LABEL
174 174
175config FEATURE_FDISK_ADVANCED 175config FEATURE_FDISK_ADVANCED
176 bool "Support expert mode" 176 bool "Support expert mode"
177 default n 177 default y
178 depends on FDISK && FEATURE_FDISK_WRITABLE 178 depends on FDISK && FEATURE_FDISK_WRITABLE
179 help 179 help
180 Enabling this option allows you to do terribly unsafe things like 180 Enabling this option allows you to do terribly unsafe things like
@@ -184,7 +184,7 @@ config FEATURE_FDISK_ADVANCED
184 184
185config FINDFS 185config FINDFS
186 bool "findfs" 186 bool "findfs"
187 default n 187 default y
188 select VOLUMEID 188 select VOLUMEID
189 help 189 help
190 Prints the name of a filesystem with given label or UUID. 190 Prints the name of a filesystem with given label or UUID.
@@ -193,13 +193,13 @@ config FINDFS
193 193
194config FLOCK 194config FLOCK
195 bool "flock" 195 bool "flock"
196 default n 196 default y
197 help 197 help
198 Manage locks from shell scripts 198 Manage locks from shell scripts
199 199
200config FREERAMDISK 200config FREERAMDISK
201 bool "freeramdisk" 201 bool "freeramdisk"
202 default n 202 default y
203 help 203 help
204 Linux allows you to create ramdisks. This utility allows you to 204 Linux allows you to create ramdisks. This utility allows you to
205 delete them and completely free all memory that was used for the 205 delete them and completely free all memory that was used for the
@@ -210,7 +210,7 @@ config FREERAMDISK
210 210
211config FSCK_MINIX 211config FSCK_MINIX
212 bool "fsck_minix" 212 bool "fsck_minix"
213 default n 213 default y
214 help 214 help
215 The minix filesystem is a nice, small, compact, read-write filesystem 215 The minix filesystem is a nice, small, compact, read-write filesystem
216 with little overhead. It is not a journaling filesystem however and 216 with little overhead. It is not a journaling filesystem however and
@@ -221,21 +221,18 @@ config FSCK_MINIX
221 221
222config MKFS_EXT2 222config MKFS_EXT2
223 bool "mkfs_ext2" 223 bool "mkfs_ext2"
224 default n 224 default y
225 help 225 help
226 Utility to create EXT2 filesystems. 226 Utility to create EXT2 filesystems.
227 227
228config MKFS_MINIX 228config MKFS_MINIX
229 bool "mkfs_minix" 229 bool "mkfs_minix"
230 default n 230 default y
231 help 231 help
232 The minix filesystem is a nice, small, compact, read-write filesystem 232 The minix filesystem is a nice, small, compact, read-write filesystem
233 with little overhead. If you wish to be able to create minix 233 with little overhead. If you wish to be able to create minix
234 filesystems this utility will do the job for you. 234 filesystems this utility will do the job for you.
235 235
236comment "Minix filesystem support"
237 depends on FSCK_MINIX || MKFS_MINIX
238
239config FEATURE_MINIX2 236config FEATURE_MINIX2
240 bool "Support Minix fs v2 (fsck_minix/mkfs_minix)" 237 bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
241 default y 238 default y
@@ -250,16 +247,17 @@ config MKFS_REISER
250 default n 247 default n
251 help 248 help
252 Utility to create ReiserFS filesystems. 249 Utility to create ReiserFS filesystems.
250 Note: this applet needs a lot of testing and polishing.
253 251
254config MKFS_VFAT 252config MKFS_VFAT
255 bool "mkfs_vfat" 253 bool "mkfs_vfat"
256 default n 254 default y
257 help 255 help
258 Utility to create FAT32 filesystems. 256 Utility to create FAT32 filesystems.
259 257
260config GETOPT 258config GETOPT
261 bool "getopt" 259 bool "getopt"
262 default n 260 default y
263 help 261 help
264 The getopt utility is used to break up (parse) options in command 262 The getopt utility is used to break up (parse) options in command
265 lines to make it easy to write complex shell scripts that also check 263 lines to make it easy to write complex shell scripts that also check
@@ -277,14 +275,14 @@ config FEATURE_GETOPT_LONG
277 275
278config HEXDUMP 276config HEXDUMP
279 bool "hexdump" 277 bool "hexdump"
280 default n 278 default y
281 help 279 help
282 The hexdump utility is used to display binary data in a readable 280 The hexdump utility is used to display binary data in a readable
283 way that is comparable to the output from most hex editors. 281 way that is comparable to the output from most hex editors.
284 282
285config FEATURE_HEXDUMP_REVERSE 283config FEATURE_HEXDUMP_REVERSE
286 bool "Support -R, reverse of 'hexdump -Cv'" 284 bool "Support -R, reverse of 'hexdump -Cv'"
287 default n 285 default y
288 depends on HEXDUMP 286 depends on HEXDUMP
289 help 287 help
290 The hexdump utility is used to display binary data in an ascii 288 The hexdump utility is used to display binary data in an ascii
@@ -294,14 +292,14 @@ config FEATURE_HEXDUMP_REVERSE
294 292
295config HD 293config HD
296 bool "hd" 294 bool "hd"
297 default n 295 default y
298 select HEXDUMP 296 depends on HEXDUMP
299 help 297 help
300 hd is an alias to hexdump -C. 298 hd is an alias to hexdump -C.
301 299
302config HWCLOCK 300config HWCLOCK
303 bool "hwclock" 301 bool "hwclock"
304 default n 302 default y
305 help 303 help
306 The hwclock utility is used to read and set the hardware clock 304 The hwclock utility is used to read and set the hardware clock
307 on a system. This is primarily used to set the current time on 305 on a system. This is primarily used to set the current time on
@@ -310,7 +308,7 @@ config HWCLOCK
310 308
311config FEATURE_HWCLOCK_LONG_OPTIONS 309config FEATURE_HWCLOCK_LONG_OPTIONS
312 bool "Support long options (--hctosys,...)" 310 bool "Support long options (--hctosys,...)"
313 default n 311 default y
314 depends on HWCLOCK && LONG_OPTS 312 depends on HWCLOCK && LONG_OPTS
315 help 313 help
316 By default, the hwclock utility only uses short options. If you 314 By default, the hwclock utility only uses short options. If you
@@ -331,7 +329,7 @@ config FEATURE_HWCLOCK_ADJTIME_FHS
331 329
332config IPCRM 330config IPCRM
333 bool "ipcrm" 331 bool "ipcrm"
334 default n 332 default y
335 select FEATURE_SUID 333 select FEATURE_SUID
336 help 334 help
337 The ipcrm utility allows the removal of System V interprocess 335 The ipcrm utility allows the removal of System V interprocess
@@ -340,7 +338,7 @@ config IPCRM
340 338
341config IPCS 339config IPCS
342 bool "ipcs" 340 bool "ipcs"
343 default n 341 default y
344 select FEATURE_SUID 342 select FEATURE_SUID
345 help 343 help
346 The ipcs utility is used to provide information on the currently 344 The ipcs utility is used to provide information on the currently
@@ -348,7 +346,7 @@ config IPCS
348 346
349config LOSETUP 347config LOSETUP
350 bool "losetup" 348 bool "losetup"
351 default n 349 default y
352 help 350 help
353 losetup is used to associate or detach a loop device with a regular 351 losetup is used to associate or detach a loop device with a regular
354 file or block device, and to query the status of a loop device. This 352 file or block device, and to query the status of a loop device. This
@@ -356,7 +354,7 @@ config LOSETUP
356 354
357config LSPCI 355config LSPCI
358 bool "lspci" 356 bool "lspci"
359 default n 357 default y
360 help 358 help
361 lspci is a utility for displaying information about PCI buses in the 359 lspci is a utility for displaying information about PCI buses in the
362 system and devices connected to them. 360 system and devices connected to them.
@@ -365,7 +363,7 @@ config LSPCI
365 363
366config LSUSB 364config LSUSB
367 bool "lsusb" 365 bool "lsusb"
368 default n 366 default y
369 help 367 help
370 lsusb is a utility for displaying information about USB buses in the 368 lsusb is a utility for displaying information about USB buses in the
371 system and devices connected to them. 369 system and devices connected to them.
@@ -374,7 +372,7 @@ config LSUSB
374 372
375config MDEV 373config MDEV
376 bool "mdev" 374 bool "mdev"
377 default n 375 default y
378 help 376 help
379 mdev is a mini-udev implementation for dynamically creating device 377 mdev is a mini-udev implementation for dynamically creating device
380 nodes in the /dev directory. 378 nodes in the /dev directory.
@@ -383,7 +381,7 @@ config MDEV
383 381
384config FEATURE_MDEV_CONF 382config FEATURE_MDEV_CONF
385 bool "Support /etc/mdev.conf" 383 bool "Support /etc/mdev.conf"
386 default n 384 default y
387 depends on MDEV 385 depends on MDEV
388 help 386 help
389 Add support for the mdev config file to control ownership and 387 Add support for the mdev config file to control ownership and
@@ -393,7 +391,7 @@ config FEATURE_MDEV_CONF
393 391
394config FEATURE_MDEV_RENAME 392config FEATURE_MDEV_RENAME
395 bool "Support subdirs/symlinks" 393 bool "Support subdirs/symlinks"
396 default n 394 default y
397 depends on FEATURE_MDEV_CONF 395 depends on FEATURE_MDEV_CONF
398 help 396 help
399 Add support for renaming devices and creating symlinks. 397 Add support for renaming devices and creating symlinks.
@@ -402,7 +400,7 @@ config FEATURE_MDEV_RENAME
402 400
403config FEATURE_MDEV_RENAME_REGEXP 401config FEATURE_MDEV_RENAME_REGEXP
404 bool "Support regular expressions substitutions when renaming device" 402 bool "Support regular expressions substitutions when renaming device"
405 default n 403 default y
406 depends on FEATURE_MDEV_RENAME 404 depends on FEATURE_MDEV_RENAME
407 help 405 help
408 Add support for regular expressions substitutions when renaming 406 Add support for regular expressions substitutions when renaming
@@ -410,7 +408,7 @@ config FEATURE_MDEV_RENAME_REGEXP
410 408
411config FEATURE_MDEV_EXEC 409config FEATURE_MDEV_EXEC
412 bool "Support command execution at device addition/removal" 410 bool "Support command execution at device addition/removal"
413 default n 411 default y
414 depends on FEATURE_MDEV_CONF 412 depends on FEATURE_MDEV_CONF
415 help 413 help
416 This adds support for an optional field to /etc/mdev.conf for 414 This adds support for an optional field to /etc/mdev.conf for
@@ -420,7 +418,7 @@ config FEATURE_MDEV_EXEC
420 418
421config FEATURE_MDEV_LOAD_FIRMWARE 419config FEATURE_MDEV_LOAD_FIRMWARE
422 bool "Support loading of firmwares" 420 bool "Support loading of firmwares"
423 default n 421 default y
424 depends on MDEV 422 depends on MDEV
425 help 423 help
426 Some devices need to load firmware before they can be usable. 424 Some devices need to load firmware before they can be usable.
@@ -431,7 +429,7 @@ config FEATURE_MDEV_LOAD_FIRMWARE
431 429
432config MKSWAP 430config MKSWAP
433 bool "mkswap" 431 bool "mkswap"
434 default n 432 default y
435 help 433 help
436 The mkswap utility is used to configure a file or disk partition as 434 The mkswap utility is used to configure a file or disk partition as
437 Linux swap space. This allows Linux to use the entire file or 435 Linux swap space. This allows Linux to use the entire file or
@@ -444,14 +442,14 @@ config MKSWAP
444 442
445config FEATURE_MKSWAP_UUID 443config FEATURE_MKSWAP_UUID
446 bool "UUID support" 444 bool "UUID support"
447 default n 445 default y
448 depends on MKSWAP 446 depends on MKSWAP
449 help 447 help
450 Generate swap spaces with universally unique identifiers. 448 Generate swap spaces with universally unique identifiers.
451 449
452config MORE 450config MORE
453 bool "more" 451 bool "more"
454 default n 452 default y
455 help 453 help
456 more is a simple utility which allows you to read text one screen 454 more is a simple utility which allows you to read text one screen
457 sized page at a time. If you want to read text that is larger than 455 sized page at a time. If you want to read text that is larger than
@@ -472,137 +470,137 @@ config FEATURE_USE_TERMIOS
472 470
473config VOLUMEID 471config VOLUMEID
474 bool #No description makes it a hidden option 472 bool #No description makes it a hidden option
475 default n 473 default y
476 474
477config FEATURE_VOLUMEID_EXT 475config FEATURE_VOLUMEID_EXT
478 bool "Ext filesystem" 476 bool "Ext filesystem"
479 default n 477 default y
480 depends on VOLUMEID 478 depends on VOLUMEID
481 help 479 help
482 TODO 480 TODO
483 481
484config FEATURE_VOLUMEID_BTRFS 482config FEATURE_VOLUMEID_BTRFS
485 bool "btrfs filesystem" 483 bool "btrfs filesystem"
486 default n 484 default y
487 depends on VOLUMEID 485 depends on VOLUMEID
488 help 486 help
489 TODO 487 TODO
490 488
491config FEATURE_VOLUMEID_REISERFS 489config FEATURE_VOLUMEID_REISERFS
492 bool "Reiser filesystem" 490 bool "Reiser filesystem"
493 default n 491 default y
494 depends on VOLUMEID 492 depends on VOLUMEID
495 help 493 help
496 TODO 494 TODO
497 495
498config FEATURE_VOLUMEID_FAT 496config FEATURE_VOLUMEID_FAT
499 bool "fat filesystem" 497 bool "fat filesystem"
500 default n 498 default y
501 depends on VOLUMEID 499 depends on VOLUMEID
502 help 500 help
503 TODO 501 TODO
504 502
505config FEATURE_VOLUMEID_HFS 503config FEATURE_VOLUMEID_HFS
506 bool "hfs filesystem" 504 bool "hfs filesystem"
507 default n 505 default y
508 depends on VOLUMEID 506 depends on VOLUMEID
509 help 507 help
510 TODO 508 TODO
511 509
512config FEATURE_VOLUMEID_JFS 510config FEATURE_VOLUMEID_JFS
513 bool "jfs filesystem" 511 bool "jfs filesystem"
514 default n 512 default y
515 depends on VOLUMEID 513 depends on VOLUMEID
516 help 514 help
517 TODO 515 TODO
518 516
519### config FEATURE_VOLUMEID_UFS 517### config FEATURE_VOLUMEID_UFS
520### bool "ufs filesystem" 518### bool "ufs filesystem"
521### default n 519### default y
522### depends on VOLUMEID 520### depends on VOLUMEID
523### help 521### help
524### TODO 522### TODO
525 523
526config FEATURE_VOLUMEID_XFS 524config FEATURE_VOLUMEID_XFS
527 bool "xfs filesystem" 525 bool "xfs filesystem"
528 default n 526 default y
529 depends on VOLUMEID 527 depends on VOLUMEID
530 help 528 help
531 TODO 529 TODO
532 530
533config FEATURE_VOLUMEID_NTFS 531config FEATURE_VOLUMEID_NTFS
534 bool "ntfs filesystem" 532 bool "ntfs filesystem"
535 default n 533 default y
536 depends on VOLUMEID 534 depends on VOLUMEID
537 help 535 help
538 TODO 536 TODO
539 537
540config FEATURE_VOLUMEID_ISO9660 538config FEATURE_VOLUMEID_ISO9660
541 bool "iso9660 filesystem" 539 bool "iso9660 filesystem"
542 default n 540 default y
543 depends on VOLUMEID 541 depends on VOLUMEID
544 help 542 help
545 TODO 543 TODO
546 544
547config FEATURE_VOLUMEID_UDF 545config FEATURE_VOLUMEID_UDF
548 bool "udf filesystem" 546 bool "udf filesystem"
549 default n 547 default y
550 depends on VOLUMEID 548 depends on VOLUMEID
551 help 549 help
552 TODO 550 TODO
553 551
554config FEATURE_VOLUMEID_LUKS 552config FEATURE_VOLUMEID_LUKS
555 bool "luks filesystem" 553 bool "luks filesystem"
556 default n 554 default y
557 depends on VOLUMEID 555 depends on VOLUMEID
558 help 556 help
559 TODO 557 TODO
560 558
561config FEATURE_VOLUMEID_LINUXSWAP 559config FEATURE_VOLUMEID_LINUXSWAP
562 bool "linux swap filesystem" 560 bool "linux swap filesystem"
563 default n 561 default y
564 depends on VOLUMEID 562 depends on VOLUMEID
565 help 563 help
566 TODO 564 TODO
567 565
568### config FEATURE_VOLUMEID_LVM 566### config FEATURE_VOLUMEID_LVM
569### bool "lvm" 567### bool "lvm"
570### default n 568### default y
571### depends on VOLUMEID 569### depends on VOLUMEID
572### help 570### help
573### TODO 571### TODO
574 572
575config FEATURE_VOLUMEID_CRAMFS 573config FEATURE_VOLUMEID_CRAMFS
576 bool "cramfs filesystem" 574 bool "cramfs filesystem"
577 default n 575 default y
578 depends on VOLUMEID 576 depends on VOLUMEID
579 help 577 help
580 TODO 578 TODO
581 579
582### config FEATURE_VOLUMEID_HPFS 580### config FEATURE_VOLUMEID_HPFS
583### bool "hpfs filesystem" 581### bool "hpfs filesystem"
584### default n 582### default y
585### depends on VOLUMEID 583### depends on VOLUMEID
586### help 584### help
587### TODO 585### TODO
588 586
589config FEATURE_VOLUMEID_ROMFS 587config FEATURE_VOLUMEID_ROMFS
590 bool "romfs filesystem" 588 bool "romfs filesystem"
591 default n 589 default y
592 depends on VOLUMEID 590 depends on VOLUMEID
593 help 591 help
594 TODO 592 TODO
595 593
596config FEATURE_VOLUMEID_SYSV 594config FEATURE_VOLUMEID_SYSV
597 bool "sysv filesystem" 595 bool "sysv filesystem"
598 default n 596 default y
599 depends on VOLUMEID 597 depends on VOLUMEID
600 help 598 help
601 TODO 599 TODO
602 600
603### config FEATURE_VOLUMEID_MINIX 601### config FEATURE_VOLUMEID_MINIX
604### bool "minix filesystem" 602### bool "minix filesystem"
605### default n 603### default y
606### depends on VOLUMEID 604### depends on VOLUMEID
607### help 605### help
608### TODO 606### TODO
@@ -610,84 +608,84 @@ config FEATURE_VOLUMEID_SYSV
610### These only detect partition tables - not used (yet?) 608### These only detect partition tables - not used (yet?)
611### config FEATURE_VOLUMEID_MAC 609### config FEATURE_VOLUMEID_MAC
612### bool "mac filesystem" 610### bool "mac filesystem"
613### default n 611### default y
614### depends on VOLUMEID 612### depends on VOLUMEID
615### help 613### help
616### TODO 614### TODO
617### 615###
618### config FEATURE_VOLUMEID_MSDOS 616### config FEATURE_VOLUMEID_MSDOS
619### bool "msdos filesystem" 617### bool "msdos filesystem"
620### default n 618### default y
621### depends on VOLUMEID 619### depends on VOLUMEID
622### help 620### help
623### TODO 621### TODO
624 622
625config FEATURE_VOLUMEID_OCFS2 623config FEATURE_VOLUMEID_OCFS2
626 bool "ocfs2 filesystem" 624 bool "ocfs2 filesystem"
627 default n 625 default y
628 depends on VOLUMEID 626 depends on VOLUMEID
629 help 627 help
630 TODO 628 TODO
631 629
632### config FEATURE_VOLUMEID_HIGHPOINTRAID 630### config FEATURE_VOLUMEID_HIGHPOINTRAID
633### bool "highpoint raid" 631### bool "highpoint raid"
634### default n 632### default y
635### depends on VOLUMEID 633### depends on VOLUMEID
636### help 634### help
637### TODO 635### TODO
638 636
639### config FEATURE_VOLUMEID_ISWRAID 637### config FEATURE_VOLUMEID_ISWRAID
640### bool "intel raid" 638### bool "intel raid"
641### default n 639### default y
642### depends on VOLUMEID 640### depends on VOLUMEID
643### help 641### help
644### TODO 642### TODO
645 643
646### config FEATURE_VOLUMEID_LSIRAID 644### config FEATURE_VOLUMEID_LSIRAID
647### bool "lsi raid" 645### bool "lsi raid"
648### default n 646### default y
649### depends on VOLUMEID 647### depends on VOLUMEID
650### help 648### help
651### TODO 649### TODO
652 650
653### config FEATURE_VOLUMEID_VIARAID 651### config FEATURE_VOLUMEID_VIARAID
654### bool "via raid" 652### bool "via raid"
655### default n 653### default y
656### depends on VOLUMEID 654### depends on VOLUMEID
657### help 655### help
658### TODO 656### TODO
659 657
660### config FEATURE_VOLUMEID_SILICONRAID 658### config FEATURE_VOLUMEID_SILICONRAID
661### bool "silicon raid" 659### bool "silicon raid"
662### default n 660### default y
663### depends on VOLUMEID 661### depends on VOLUMEID
664### help 662### help
665### TODO 663### TODO
666 664
667### config FEATURE_VOLUMEID_NVIDIARAID 665### config FEATURE_VOLUMEID_NVIDIARAID
668### bool "nvidia raid" 666### bool "nvidia raid"
669### default n 667### default y
670### depends on VOLUMEID 668### depends on VOLUMEID
671### help 669### help
672### TODO 670### TODO
673 671
674### config FEATURE_VOLUMEID_PROMISERAID 672### config FEATURE_VOLUMEID_PROMISERAID
675### bool "promise raid" 673### bool "promise raid"
676### default n 674### default y
677### depends on VOLUMEID 675### depends on VOLUMEID
678### help 676### help
679### TODO 677### TODO
680 678
681config FEATURE_VOLUMEID_LINUXRAID 679config FEATURE_VOLUMEID_LINUXRAID
682 bool "linuxraid" 680 bool "linuxraid"
683 default n 681 default y
684 depends on VOLUMEID 682 depends on VOLUMEID
685 help 683 help
686 TODO 684 TODO
687 685
688config MOUNT 686config MOUNT
689 bool "mount" 687 bool "mount"
690 default n 688 default y
691 help 689 help
692 All files and filesystems in Unix are arranged into one big directory 690 All files and filesystems in Unix are arranged into one big directory
693 tree. The 'mount' utility is used to graft a filesystem onto a 691 tree. The 'mount' utility is used to graft a filesystem onto a
@@ -698,14 +696,14 @@ config MOUNT
698 696
699config FEATURE_MOUNT_FAKE 697config FEATURE_MOUNT_FAKE
700 bool "Support option -f" 698 bool "Support option -f"
701 default n 699 default y
702 depends on MOUNT 700 depends on MOUNT
703 help 701 help
704 Enable support for faking a file system mount. 702 Enable support for faking a file system mount.
705 703
706config FEATURE_MOUNT_VERBOSE 704config FEATURE_MOUNT_VERBOSE
707 bool "Support option -v" 705 bool "Support option -v"
708 default n 706 default y
709 depends on MOUNT 707 depends on MOUNT
710 help 708 help
711 Enable multi-level -v[vv...] verbose messages. Useful if you 709 Enable multi-level -v[vv...] verbose messages. Useful if you
@@ -726,7 +724,7 @@ config FEATURE_MOUNT_HELPERS
726 724
727config FEATURE_MOUNT_LABEL 725config FEATURE_MOUNT_LABEL
728 bool "Support specifiying devices by label or UUID" 726 bool "Support specifiying devices by label or UUID"
729 default n 727 default y
730 depends on MOUNT 728 depends on MOUNT
731 select VOLUMEID 729 select VOLUMEID
732 help 730 help
@@ -736,7 +734,7 @@ config FEATURE_MOUNT_LABEL
736 734
737config FEATURE_MOUNT_NFS 735config FEATURE_MOUNT_NFS
738 bool "Support mounting NFS file systems" 736 bool "Support mounting NFS file systems"
739 default n 737 default y
740 depends on MOUNT 738 depends on MOUNT
741 select FEATURE_HAVE_RPC 739 select FEATURE_HAVE_RPC
742 select FEATURE_SYSLOG 740 select FEATURE_SYSLOG
@@ -745,7 +743,7 @@ config FEATURE_MOUNT_NFS
745 743
746config FEATURE_MOUNT_CIFS 744config FEATURE_MOUNT_CIFS
747 bool "Support mounting CIFS/SMB file systems" 745 bool "Support mounting CIFS/SMB file systems"
748 default n 746 default y
749 depends on MOUNT 747 depends on MOUNT
750 help 748 help
751 Enable support for samba mounts. 749 Enable support for samba mounts.
@@ -769,7 +767,7 @@ config FEATURE_MOUNT_FSTAB
769 767
770config PIVOT_ROOT 768config PIVOT_ROOT
771 bool "pivot_root" 769 bool "pivot_root"
772 default n 770 default y
773 help 771 help
774 The pivot_root utility swaps the mount points for the root filesystem 772 The pivot_root utility swaps the mount points for the root filesystem
775 with some other mounted filesystem. This allows you to do all sorts 773 with some other mounted filesystem. This allows you to do all sorts
@@ -781,7 +779,7 @@ config PIVOT_ROOT
781 779
782config RDATE 780config RDATE
783 bool "rdate" 781 bool "rdate"
784 default n 782 default y
785 help 783 help
786 The rdate utility allows you to synchronize the date and time of your 784 The rdate utility allows you to synchronize the date and time of your
787 system clock with the date and time of a remote networked system using 785 system clock with the date and time of a remote networked system using
@@ -790,38 +788,38 @@ config RDATE
790 788
791config RDEV 789config RDEV
792 bool "rdev" 790 bool "rdev"
793 default n 791 default y
794 help 792 help
795 Print the device node associated with the filesystem mounted at '/'. 793 Print the device node associated with the filesystem mounted at '/'.
796 794
797config READPROFILE 795config READPROFILE
798 bool "readprofile" 796 bool "readprofile"
799 default n 797 default y
800 help 798 help
801 This allows you to parse /proc/profile for basic profiling. 799 This allows you to parse /proc/profile for basic profiling.
802 800
803config RTCWAKE 801config RTCWAKE
804 bool "rtcwake" 802 bool "rtcwake"
805 default n 803 default y
806 help 804 help
807 Enter a system sleep state until specified wakeup time. 805 Enter a system sleep state until specified wakeup time.
808 806
809config SCRIPT 807config SCRIPT
810 bool "script" 808 bool "script"
811 default n 809 default y
812 help 810 help
813 The script makes typescript of terminal session. 811 The script makes typescript of terminal session.
814 812
815config SCRIPTREPLAY 813config SCRIPTREPLAY
816 bool "scriptreplay" 814 bool "scriptreplay"
817 default n 815 default y
818 help 816 help
819 This program replays a typescript, using timing information 817 This program replays a typescript, using timing information
820 given by script -t. 818 given by script -t.
821 819
822config SETARCH 820config SETARCH
823 bool "setarch" 821 bool "setarch"
824 default n 822 default y
825 help 823 help
826 The linux32 utility is used to create a 32bit environment for the 824 The linux32 utility is used to create a 32bit environment for the
827 specified program (usually a shell). It only makes sense to have 825 specified program (usually a shell). It only makes sense to have
@@ -830,7 +828,7 @@ config SETARCH
830 828
831config SWAPONOFF 829config SWAPONOFF
832 bool "swaponoff" 830 bool "swaponoff"
833 default n 831 default y
834 help 832 help
835 This option enables both the 'swapon' and the 'swapoff' utilities. 833 This option enables both the 'swapon' and the 'swapoff' utilities.
836 Once you have created some swap space using 'mkswap', you also need 834 Once you have created some swap space using 'mkswap', you also need
@@ -841,14 +839,14 @@ config SWAPONOFF
841 839
842config FEATURE_SWAPON_PRI 840config FEATURE_SWAPON_PRI
843 bool "Support priority option -p" 841 bool "Support priority option -p"
844 default n 842 default y
845 depends on SWAPONOFF 843 depends on SWAPONOFF
846 help 844 help
847 Enable support for setting swap device priority in swapon. 845 Enable support for setting swap device priority in swapon.
848 846
849config SWITCH_ROOT 847config SWITCH_ROOT
850 bool "switch_root" 848 bool "switch_root"
851 default n 849 default y
852 help 850 help
853 The switch_root utility is used from initramfs to select a new 851 The switch_root utility is used from initramfs to select a new
854 root device. Under initramfs, you have to use this instead of 852 root device. Under initramfs, you have to use this instead of
@@ -867,7 +865,7 @@ config SWITCH_ROOT
867 865
868config UMOUNT 866config UMOUNT
869 bool "umount" 867 bool "umount"
870 default n 868 default y
871 help 869 help
872 When you want to remove a mounted filesystem from its current mount 870 When you want to remove a mounted filesystem from its current mount
873 point, for example when you are shutting down the system, the 871 point, for example when you are shutting down the system, the
@@ -876,7 +874,7 @@ config UMOUNT
876 874
877config FEATURE_UMOUNT_ALL 875config FEATURE_UMOUNT_ALL
878 bool "Support option -a" 876 bool "Support option -a"
879 default n 877 default y
880 depends on UMOUNT 878 depends on UMOUNT
881 help 879 help
882 Support -a option to unmount all currently mounted filesystems. 880 Support -a option to unmount all currently mounted filesystems.
@@ -886,7 +884,7 @@ comment "Common options for mount/umount"
886 884
887config FEATURE_MOUNT_LOOP 885config FEATURE_MOUNT_LOOP
888 bool "Support loopback mounts" 886 bool "Support loopback mounts"
889 default n 887 default y
890 depends on MOUNT || UMOUNT 888 depends on MOUNT || UMOUNT
891 help 889 help
892 Enabling this feature allows automatic mounting of files (containing 890 Enabling this feature allows automatic mounting of files (containing
@@ -903,7 +901,7 @@ config FEATURE_MOUNT_LOOP
903 901
904config FEATURE_MOUNT_LOOP_CREATE 902config FEATURE_MOUNT_LOOP_CREATE
905 bool "Create new loopback devices if needed" 903 bool "Create new loopback devices if needed"
906 default n 904 default y
907 depends on FEATURE_MOUNT_LOOP 905 depends on FEATURE_MOUNT_LOOP
908 help 906 help
909 Linux kernels >= 2.6.24 support unlimited loopback devices. They are 907 Linux kernels >= 2.6.24 support unlimited loopback devices. They are
diff --git a/util-linux/Kbuild b/util-linux/Kbuild.src
index 4fa392398..4fa392398 100644
--- a/util-linux/Kbuild
+++ b/util-linux/Kbuild.src
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
index ff3e4165a..c57cd9d5a 100644
--- a/util-linux/mkfs_vfat.c
+++ b/util-linux/mkfs_vfat.c
@@ -98,8 +98,9 @@ struct msdos_volume_info { /* (offsets are relative to start of boot sector) */
98} PACKED; /* 05a end. Total size 26 (0x1a) bytes */ 98} PACKED; /* 05a end. Total size 26 (0x1a) bytes */
99 99
100struct msdos_boot_sector { 100struct msdos_boot_sector {
101 char boot_jump[3]; /* 000 short or near jump instruction */ 101 /* We use strcpy to fill both, and gcc-4.4.x complains if they are separate */
102 char system_id[8]; /* 003 name - can be used to special case partition manager volumes */ 102 char boot_jump_and_sys_id[3+8]; /* 000 short or near jump instruction */
103 /*char system_id[8];*/ /* 003 name - can be used to special case partition manager volumes */
103 uint16_t bytes_per_sect; /* 00b bytes per logical sector */ 104 uint16_t bytes_per_sect; /* 00b bytes per logical sector */
104 uint8_t sect_per_clust; /* 00d sectors/cluster */ 105 uint8_t sect_per_clust; /* 00d sectors/cluster */
105 uint16_t reserved_sect; /* 00e reserved sectors (sector offset of 1st FAT relative to volume start) */ 106 uint16_t reserved_sect; /* 00e reserved sectors (sector offset of 1st FAT relative to volume start) */
@@ -457,7 +458,7 @@ int mkfs_vfat_main(int argc UNUSED_PARAM, char **argv)
457 struct msdos_boot_sector *boot_blk = (void*)buf; 458 struct msdos_boot_sector *boot_blk = (void*)buf;
458 struct fat32_fsinfo *info = (void*)(buf + bytes_per_sect); 459 struct fat32_fsinfo *info = (void*)(buf + bytes_per_sect);
459 460
460 strcpy(boot_blk->boot_jump, "\xeb\x58\x90" "mkdosfs"); // system_id[8] included :) 461 strcpy(boot_blk->boot_jump_and_sys_id, "\xeb\x58\x90" "mkdosfs");
461 STORE_LE(boot_blk->bytes_per_sect, bytes_per_sect); 462 STORE_LE(boot_blk->bytes_per_sect, bytes_per_sect);
462 STORE_LE(boot_blk->sect_per_clust, sect_per_clust); 463 STORE_LE(boot_blk->sect_per_clust, sect_per_clust);
463 // cast in needed on big endian to suppress a warning 464 // cast in needed on big endian to suppress a warning
diff --git a/util-linux/volume_id/Kbuild b/util-linux/volume_id/Kbuild.src
index 3520f2480..3520f2480 100644
--- a/util-linux/volume_id/Kbuild
+++ b/util-linux/volume_id/Kbuild.src