aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-07-24 11:40:28 +0100
committerRon Yorston <rmy@pobox.com>2017-07-24 12:03:28 +0100
commit60411636073cdc08e8005f0de00098e6dd00eaf5 (patch)
tree58673b64af1e663280be81f798c8f66ce116d1dd
parenteeceafbc5c4caf513c6d92b7d71ecb0ccd89a3f8 (diff)
parentb72f1ef17b97802d33f0ac522f64bea0f65442c5 (diff)
downloadbusybox-w32-60411636073cdc08e8005f0de00098e6dd00eaf5.tar.gz
busybox-w32-60411636073cdc08e8005f0de00098e6dd00eaf5.tar.bz2
busybox-w32-60411636073cdc08e8005f0de00098e6dd00eaf5.zip
Merge branch 'busybox' into merge
-rw-r--r--Config.in618
-rw-r--r--Makefile2
-rw-r--r--arch/sparc/Makefile11
-rw-r--r--arch/sparc64/Makefile11
-rw-r--r--archival/Config.src8
-rw-r--r--archival/ar.c24
-rw-r--r--archival/bbunzip.c89
-rw-r--r--archival/bzip2.c22
-rw-r--r--archival/cpio.c22
-rw-r--r--archival/dpkg.c10
-rw-r--r--archival/dpkg_deb.c8
-rw-r--r--archival/gzip.c30
-rw-r--r--archival/lzop.c18
-rw-r--r--archival/rpm.c4
-rw-r--r--archival/rpm2cpio.c4
-rw-r--r--archival/tar.c46
-rw-r--r--archival/unzip.c205
-rw-r--r--console-tools/chvt.c6
-rw-r--r--console-tools/clear.c4
-rw-r--r--console-tools/deallocvt.c4
-rw-r--r--console-tools/dumpkmap.c6
-rw-r--r--console-tools/fgconsole.c4
-rw-r--r--console-tools/kbd_mode.c4
-rw-r--r--console-tools/loadfont.c14
-rw-r--r--console-tools/loadkmap.c6
-rw-r--r--console-tools/openvt.c6
-rw-r--r--console-tools/reset.c6
-rw-r--r--console-tools/resize.c14
-rw-r--r--console-tools/setconsole.c6
-rw-r--r--console-tools/setkeycodes.c6
-rw-r--r--console-tools/setlogcons.c4
-rw-r--r--console-tools/showkey.c4
-rw-r--r--coreutils/Config.src10
-rw-r--r--coreutils/basename.c17
-rw-r--r--coreutils/cat.c10
-rw-r--r--coreutils/chgrp.c4
-rw-r--r--coreutils/chmod.c4
-rw-r--r--coreutils/chown.c6
-rw-r--r--coreutils/chroot.c6
-rw-r--r--coreutils/cksum.c4
-rw-r--r--coreutils/comm.c6
-rw-r--r--coreutils/cp.c8
-rw-r--r--coreutils/cut.c6
-rw-r--r--coreutils/date.c30
-rw-r--r--coreutils/dd.c32
-rw-r--r--coreutils/df.c12
-rw-r--r--coreutils/dirname.c6
-rw-r--r--coreutils/dos2unix.c12
-rw-r--r--coreutils/du.c6
-rw-r--r--coreutils/echo.c2
-rw-r--r--coreutils/env.c8
-rw-r--r--coreutils/expand.c8
-rw-r--r--coreutils/expr.c12
-rw-r--r--coreutils/factor.c4
-rw-r--r--coreutils/false.c4
-rw-r--r--coreutils/fold.c4
-rw-r--r--coreutils/fsync.c4
-rw-r--r--coreutils/head.c6
-rw-r--r--coreutils/hostid.c6
-rw-r--r--coreutils/id.c8
-rw-r--r--coreutils/install.c4
-rw-r--r--coreutils/link.c4
-rw-r--r--coreutils/ln.c4
-rw-r--r--coreutils/logname.c4
-rw-r--r--coreutils/ls.c22
-rw-r--r--coreutils/md5_sha1_sum.c26
-rw-r--r--coreutils/mkdir.c4
-rw-r--r--coreutils/mkfifo.c6
-rw-r--r--coreutils/mknod.c6
-rw-r--r--coreutils/mktemp.c4
-rw-r--r--coreutils/mv.c4
-rw-r--r--coreutils/nice.c4
-rw-r--r--coreutils/nl.c4
-rw-r--r--coreutils/nohup.c4
-rw-r--r--coreutils/nproc.c4
-rw-r--r--coreutils/od.c4
-rw-r--r--coreutils/od_bloaty.c3
-rw-r--r--coreutils/paste.c6
-rw-r--r--coreutils/printenv.c4
-rw-r--r--coreutils/printf.c6
-rw-r--r--coreutils/pwd.c4
-rw-r--r--coreutils/readlink.c8
-rw-r--r--coreutils/realpath.c6
-rw-r--r--coreutils/rm.c4
-rw-r--r--coreutils/rmdir.c8
-rw-r--r--coreutils/seq.c4
-rw-r--r--coreutils/shred.c4
-rw-r--r--coreutils/shuf.c4
-rw-r--r--coreutils/sleep.c24
-rw-r--r--coreutils/sort.c14
-rw-r--r--coreutils/split.c10
-rw-r--r--coreutils/stat.c14
-rw-r--r--coreutils/stty.c4
-rw-r--r--coreutils/sum.c4
-rw-r--r--coreutils/sync.c8
-rw-r--r--coreutils/tac.c4
-rw-r--r--coreutils/tail.c18
-rw-r--r--coreutils/tee.c8
-rw-r--r--coreutils/test.c14
-rw-r--r--coreutils/timeout.c6
-rw-r--r--coreutils/touch.c12
-rw-r--r--coreutils/tr.c20
-rw-r--r--coreutils/true.c4
-rw-r--r--coreutils/truncate.c6
-rw-r--r--coreutils/tty.c6
-rw-r--r--coreutils/uname.c26
-rw-r--r--coreutils/uniq.c4
-rw-r--r--coreutils/unlink.c4
-rw-r--r--coreutils/usleep.c4
-rw-r--r--coreutils/uudecode.c8
-rw-r--r--coreutils/uuencode.c4
-rw-r--r--coreutils/wc.c8
-rw-r--r--coreutils/who.c30
-rw-r--r--coreutils/whoami.c6
-rw-r--r--coreutils/yes.c6
-rw-r--r--debianutils/pipe_progress.c4
-rw-r--r--debianutils/run_parts.c22
-rw-r--r--debianutils/start_stop_daemon.c14
-rw-r--r--debianutils/which.c6
-rw-r--r--e2fsprogs/chattr.c4
-rw-r--r--e2fsprogs/fsck.c8
-rw-r--r--e2fsprogs/lsattr.c4
-rw-r--r--e2fsprogs/tune2fs.c6
-rw-r--r--editors/Config.src4
-rw-r--r--editors/awk.c20
-rw-r--r--editors/cmp.c6
-rw-r--r--editors/diff.c12
-rw-r--r--editors/ed.c8
-rw-r--r--editors/patch.c4
-rw-r--r--editors/patch_toybox.c2
-rw-r--r--editors/sed.c6
-rw-r--r--editors/vi.c84
-rw-r--r--findutils/find.c68
-rw-r--r--findutils/grep.c18
-rw-r--r--findutils/xargs.c24
-rw-r--r--include/libbb.h3
-rw-r--r--init/bootchartd.c50
-rw-r--r--init/halt.c26
-rw-r--r--init/init.c88
-rw-r--r--libbb/Config.src286
-rw-r--r--libbb/common_bufsiz.c46
-rw-r--r--libbb/parse_config.c2
-rw-r--r--libbb/u_signal_names.c4
-rw-r--r--libbb/xfuncs_printf.c34
-rw-r--r--loginutils/Config.src104
-rw-r--r--loginutils/add-remove-shell.c16
-rw-r--r--loginutils/addgroup.c10
-rw-r--r--loginutils/adduser.c22
-rw-r--r--loginutils/chpasswd.c8
-rw-r--r--loginutils/cryptpw.c14
-rw-r--r--loginutils/deluser.c12
-rw-r--r--loginutils/getty.c24
-rw-r--r--loginutils/login.c32
-rw-r--r--loginutils/passwd.c16
-rw-r--r--loginutils/su.c10
-rw-r--r--loginutils/sulogin.c6
-rw-r--r--loginutils/vlock.c8
-rw-r--r--mailutils/Config.src2
-rw-r--r--mailutils/makemime.c4
-rw-r--r--mailutils/popmaildir.c14
-rw-r--r--mailutils/reformime.c8
-rw-r--r--mailutils/sendmail.c4
-rw-r--r--miscutils/adjtimex.c6
-rw-r--r--miscutils/bbconfig.c20
-rw-r--r--miscutils/beep.c8
-rw-r--r--miscutils/chat.c42
-rw-r--r--miscutils/conspy.c10
-rw-r--r--miscutils/crond.c57
-rw-r--r--miscutils/crontab.c10
-rw-r--r--miscutils/dc.c10
-rw-r--r--miscutils/devfsd.c45
-rw-r--r--miscutils/devmem.c6
-rw-r--r--miscutils/fbsplash.c18
-rw-r--r--miscutils/flash_eraseall.c6
-rw-r--r--miscutils/flash_lock_unlock.c12
-rw-r--r--miscutils/flashcp.c6
-rw-r--r--miscutils/hdparm.c35
-rw-r--r--miscutils/i2c_tools.c16
-rw-r--r--miscutils/inotifyd.c6
-rw-r--r--miscutils/less.c38
-rw-r--r--miscutils/lsscsi.c8
-rw-r--r--miscutils/makedevs.c24
-rw-r--r--miscutils/man.c4
-rw-r--r--miscutils/microcom.c4
-rw-r--r--miscutils/mt.c8
-rw-r--r--miscutils/nandwrite.c8
-rw-r--r--miscutils/partprobe.c4
-rw-r--r--miscutils/raidautorun.c6
-rw-r--r--miscutils/readahead.c20
-rw-r--r--miscutils/rfkill.c12
-rw-r--r--miscutils/runlevel.c8
-rw-r--r--miscutils/rx.c4
-rw-r--r--miscutils/setserial.c4
-rw-r--r--miscutils/strings.c6
-rw-r--r--miscutils/time.c8
-rw-r--r--miscutils/ttysize.c10
-rw-r--r--miscutils/ubi_tools.c24
-rw-r--r--miscutils/ubirename.c4
-rw-r--r--miscutils/volname.c4
-rw-r--r--miscutils/watchdog.c14
-rw-r--r--modutils/Config.src150
-rw-r--r--modutils/depmod.c8
-rw-r--r--modutils/insmod.c4
-rw-r--r--modutils/lsmod.c10
-rw-r--r--modutils/modinfo.c4
-rw-r--r--modutils/modprobe.c16
-rw-r--r--modutils/rmmod.c4
-rw-r--r--networking/Config.src42
-rw-r--r--networking/arp.c4
-rw-r--r--networking/arping.c4
-rw-r--r--networking/brctl.c20
-rw-r--r--networking/dnsd.c4
-rw-r--r--networking/ether-wake.c4
-rw-r--r--networking/ftpd.c18
-rw-r--r--networking/ftpgetput.c8
-rw-r--r--networking/hostname.c8
-rw-r--r--networking/httpd.c98
-rw-r--r--networking/ifconfig.c26
-rw-r--r--networking/ifenslave.c6
-rw-r--r--networking/ifplugd.c10
-rw-r--r--networking/ifupdown.c68
-rw-r--r--networking/inetd.c16
-rw-r--r--networking/ip.c54
-rw-r--r--networking/ipcalc.c10
-rw-r--r--networking/isrv_identd.c6
-rw-r--r--networking/nameif.c36
-rw-r--r--networking/nbd-client.c4
-rw-r--r--networking/nc.c22
-rw-r--r--networking/netstat.c12
-rw-r--r--networking/nslookup.c4
-rw-r--r--networking/ntpd.c12
-rw-r--r--networking/ping.c25
-rw-r--r--networking/pscan.c4
-rw-r--r--networking/route.c4
-rw-r--r--networking/slattach.c6
-rw-r--r--networking/ssl_client.c4
-rw-r--r--networking/tcpudp.c12
-rw-r--r--networking/telnet.c20
-rw-r--r--networking/telnetd.c60
-rw-r--r--networking/tftp.c44
-rw-r--r--networking/traceroute.c12
-rw-r--r--networking/tunctl.c8
-rw-r--r--networking/udhcp/Config.src132
-rw-r--r--networking/udhcp/d6_dhcpc.c22
-rw-r--r--networking/udhcp/d6_socket.c4
-rw-r--r--networking/udhcp/dhcpc.c8
-rw-r--r--networking/udhcp/socket.c2
-rw-r--r--networking/vconfig.c4
-rw-r--r--networking/wget.c122
-rw-r--r--networking/whois.c4
-rw-r--r--networking/zcip.c21
-rw-r--r--printutils/lpd.c4
-rw-r--r--printutils/lpr.c8
-rw-r--r--procps/Config.src4
-rw-r--r--procps/free.c8
-rw-r--r--procps/fuser.c8
-rw-r--r--procps/iostat.c4
-rw-r--r--procps/kill.c26
-rw-r--r--procps/lsof.c6
-rw-r--r--procps/mpstat.c4
-rw-r--r--procps/nmeter.c4
-rw-r--r--procps/pgrep.c55
-rw-r--r--procps/pidof.c14
-rw-r--r--procps/pmap.c8
-rw-r--r--procps/powertop.c8
-rw-r--r--procps/ps.c18
-rw-r--r--procps/pstree.c4
-rw-r--r--procps/pwdx.c4
-rw-r--r--procps/smemcap.c6
-rw-r--r--procps/sysctl.c4
-rw-r--r--procps/top.c32
-rw-r--r--procps/uptime.c10
-rw-r--r--procps/watch.c6
-rw-r--r--runit/chpst.c24
-rw-r--r--runit/runsv.c6
-rw-r--r--runit/runsvdir.c14
-rw-r--r--runit/sv.c16
-rw-r--r--runit/svlogd.c8
-rw-r--r--scripts/test_setenv_leak.c18
-rw-r--r--selinux/chcon.c4
-rw-r--r--selinux/getenforce.c4
-rw-r--r--selinux/getsebool.c4
-rw-r--r--selinux/load_policy.c4
-rw-r--r--selinux/matchpathcon.c6
-rw-r--r--selinux/runcon.c4
-rw-r--r--selinux/selinuxenabled.c6
-rw-r--r--selinux/sestatus.c4
-rw-r--r--selinux/setenforce.c4
-rw-r--r--selinux/setfiles.c20
-rw-r--r--selinux/setsebool.c6
-rw-r--r--shell/Config.src129
-rw-r--r--shell/ash.c149
-rw-r--r--shell/ash_test/ash-parsing/argv0.right1
-rwxr-xr-xshell/ash_test/ash-parsing/argv0.tests4
-rw-r--r--shell/ash_test/ash-parsing/brace1.right7
-rwxr-xr-xshell/ash_test/ash-parsing/brace1.tests7
-rw-r--r--shell/ash_test/ash-parsing/brace2.right3
-rwxr-xr-xshell/ash_test/ash-parsing/brace2.tests5
-rw-r--r--shell/ash_test/ash-parsing/comment1.right2
-rwxr-xr-xshell/ash_test/ash-parsing/comment1.tests2
-rw-r--r--shell/ash_test/ash-parsing/eol1.right1
-rwxr-xr-xshell/ash_test/ash-parsing/eol1.tests18
-rw-r--r--shell/ash_test/ash-parsing/escape1.right4
-rwxr-xr-xshell/ash_test/ash-parsing/escape1.tests6
-rw-r--r--shell/ash_test/ash-parsing/escape2.right4
-rwxr-xr-xshell/ash_test/ash-parsing/escape2.tests4
-rw-r--r--shell/ash_test/ash-parsing/escape3.right23
-rwxr-xr-xshell/ash_test/ash-parsing/escape3.tests10
-rw-r--r--shell/ash_test/ash-parsing/escape4.right2
-rwxr-xr-xshell/ash_test/ash-parsing/escape4.tests6
-rw-r--r--shell/ash_test/ash-parsing/escape5.right9
-rwxr-xr-xshell/ash_test/ash-parsing/escape5.tests7
-rw-r--r--shell/ash_test/ash-parsing/group1.right1
-rwxr-xr-xshell/ash_test/ash-parsing/group1.tests1
-rw-r--r--shell/ash_test/ash-parsing/group2.right2
-rwxr-xr-xshell/ash_test/ash-parsing/group2.tests3
-rw-r--r--shell/ash_test/ash-parsing/groups_and_keywords1.right11
-rwxr-xr-xshell/ash_test/ash-parsing/groups_and_keywords1.tests10
-rw-r--r--shell/ash_test/ash-parsing/negate.right36
-rwxr-xr-xshell/ash_test/ash-parsing/negate.tests19
-rw-r--r--shell/ash_test/ash-parsing/noeol.right1
-rwxr-xr-xshell/ash_test/ash-parsing/noeol.tests2
-rw-r--r--shell/ash_test/ash-parsing/noeol2.right1
-rwxr-xr-xshell/ash_test/ash-parsing/noeol2.tests7
-rw-r--r--shell/ash_test/ash-parsing/noeol3.right1
-rwxr-xr-xshell/ash_test/ash-parsing/noeol3.tests2
-rw-r--r--shell/ash_test/ash-parsing/process_subst.right3
-rwxr-xr-xshell/ash_test/ash-parsing/process_subst.tests3
-rw-r--r--shell/ash_test/ash-parsing/quote1.right1
-rwxr-xr-xshell/ash_test/ash-parsing/quote1.tests2
-rw-r--r--shell/ash_test/ash-parsing/quote2.right1
-rwxr-xr-xshell/ash_test/ash-parsing/quote2.tests2
-rw-r--r--shell/ash_test/ash-parsing/quote3.right12
-rwxr-xr-xshell/ash_test/ash-parsing/quote3.tests21
-rw-r--r--shell/ash_test/ash-parsing/quote4.right1
-rwxr-xr-xshell/ash_test/ash-parsing/quote4.tests2
-rw-r--r--shell/ash_test/ash-parsing/starquoted.right8
-rwxr-xr-xshell/ash_test/ash-parsing/starquoted.tests8
-rw-r--r--shell/ash_test/ash-parsing/starquoted2.right8
-rwxr-xr-xshell/ash_test/ash-parsing/starquoted2.tests19
-rw-r--r--shell/ash_test/ash-quoting/mode_x.right10
-rwxr-xr-xshell/ash_test/ash-quoting/mode_x.tests14
-rw-r--r--shell/ash_test/ash-read/read_t0.right3
-rwxr-xr-xshell/ash_test/ash-read/read_t0.tests14
-rw-r--r--shell/ash_test/ash-vars/readonly0.right13
-rwxr-xr-xshell/ash_test/ash-vars/readonly0.tests45
-rw-r--r--shell/ash_test/ash-vars/readonly1.right4
-rwxr-xr-xshell/ash_test/ash-vars/readonly1.tests4
-rwxr-xr-xshell/ash_test/run-all22
-rw-r--r--shell/cttyhack.c56
-rw-r--r--shell/hush.c71
-rw-r--r--shell/hush_test/hush-read/read_t0.right3
-rwxr-xr-xshell/hush_test/hush-read/read_t0.tests14
-rw-r--r--shell/shell_common.c82
-rwxr-xr-xsize_single_applets.sh76
-rw-r--r--sysklogd/klogd.c28
-rw-r--r--sysklogd/logger.c10
-rw-r--r--sysklogd/logread.c20
-rw-r--r--sysklogd/syslogd.c84
-rwxr-xr-xtestsuite/od.tests10
-rw-r--r--util-linux/Config.src60
-rw-r--r--util-linux/acpid.c20
-rw-r--r--util-linux/blkdiscard.c4
-rw-r--r--util-linux/blkid.c10
-rw-r--r--util-linux/blockdev.c4
-rw-r--r--util-linux/cal.c4
-rw-r--r--util-linux/chrt.c6
-rw-r--r--util-linux/dmesg.c42
-rw-r--r--util-linux/eject.c8
-rw-r--r--util-linux/fallocate.c4
-rw-r--r--util-linux/fatattr.c4
-rw-r--r--util-linux/fbset.c24
-rw-r--r--util-linux/fdformat.c4
-rw-r--r--util-linux/fdisk.c44
-rw-r--r--util-linux/findfs.c8
-rw-r--r--util-linux/flock.c4
-rw-r--r--util-linux/freeramdisk.c30
-rw-r--r--util-linux/fsck_minix.c12
-rw-r--r--util-linux/fsfreeze.c4
-rw-r--r--util-linux/fstrim.c4
-rw-r--r--util-linux/getopt.c16
-rw-r--r--util-linux/hexdump.c18
-rw-r--r--util-linux/hexdump_xxd.c6
-rw-r--r--util-linux/hwclock.c20
-rw-r--r--util-linux/ionice.c6
-rw-r--r--util-linux/ipcrm.c8
-rw-r--r--util-linux/ipcs.c6
-rw-r--r--util-linux/last.c8
-rw-r--r--util-linux/losetup.c8
-rw-r--r--util-linux/lspci.c8
-rw-r--r--util-linux/lsusb.c8
-rw-r--r--util-linux/mdev.c36
-rw-r--r--util-linux/mesg.c16
-rw-r--r--util-linux/mkfs_ext2.c8
-rw-r--r--util-linux/mkfs_minix.c12
-rw-r--r--util-linux/mkfs_reiser.c4
-rw-r--r--util-linux/mkfs_vfat.c8
-rw-r--r--util-linux/mkswap.c20
-rw-r--r--util-linux/more.c12
-rw-r--r--util-linux/mount.c64
-rw-r--r--util-linux/mountpoint.c4
-rw-r--r--util-linux/nsenter.c8
-rw-r--r--util-linux/pivot_root.c14
-rw-r--r--util-linux/rdate.c10
-rw-r--r--util-linux/rdev.c4
-rw-r--r--util-linux/readprofile.c4
-rw-r--r--util-linux/renice.c6
-rw-r--r--util-linux/rev.c4
-rw-r--r--util-linux/rtcwake.c4
-rw-r--r--util-linux/script.c4
-rw-r--r--util-linux/scriptreplay.c6
-rw-r--r--util-linux/setarch.c18
-rw-r--r--util-linux/setpriv.c26
-rw-r--r--util-linux/setsid.c4
-rw-r--r--util-linux/swaponoff.c25
-rw-r--r--util-linux/switch_root.c26
-rw-r--r--util-linux/taskset.c12
-rw-r--r--util-linux/uevent.c6
-rw-r--r--util-linux/umount.c12
-rw-r--r--util-linux/unshare.c4
-rw-r--r--util-linux/volume_id/exfat.c6
-rw-r--r--util-linux/volume_id/f2fs.c8
-rw-r--r--util-linux/volume_id/nilfs.c18
-rw-r--r--util-linux/volume_id/squashfs.c8
-rw-r--r--util-linux/volume_id/ubifs.c4
-rw-r--r--util-linux/wall.c4
426 files changed, 4005 insertions, 3245 deletions
diff --git a/Config.in b/Config.in
index 0353a0525..2342d8467 100644
--- a/Config.in
+++ b/Config.in
@@ -29,88 +29,88 @@ config DESKTOP
29 bool "Enable compatibility for full-blown desktop systems" 29 bool "Enable compatibility for full-blown desktop systems"
30 default y 30 default y
31 help 31 help
32 Enable applet options and features which are not essential. 32 Enable applet options and features which are not essential.
33 Many applet options have dedicated config options to (de)select them 33 Many applet options have dedicated config options to (de)select them
34 under that applet; this options enables those options which have no 34 under that applet; this options enables those options which have no
35 individual config item for them. 35 individual config item for them.
36 36
37 Select this if you plan to use busybox on full-blown desktop machine 37 Select this if you plan to use busybox on full-blown desktop machine
38 with common Linux distro, which needs higher level of command-line 38 with common Linux distro, which needs higher level of command-line
39 compatibility. 39 compatibility.
40 40
41 If you are preparing your build to be used on an embedded box 41 If you are preparing your build to be used on an embedded box
42 where you have tighter control over the entire set of userspace 42 where you have tighter control over the entire set of userspace
43 tools, you can unselect this option for smaller code size. 43 tools, you can unselect this option for smaller code size.
44 44
45config EXTRA_COMPAT 45config EXTRA_COMPAT
46 bool "Provide compatible behavior for rare corner cases (bigger code)" 46 bool "Provide compatible behavior for rare corner cases (bigger code)"
47 default n 47 default n
48 help 48 help
49 This option makes grep, sed etc handle rare corner cases 49 This option makes grep, sed etc handle rare corner cases
50 (embedded NUL bytes and such). This makes code bigger and uses 50 (embedded NUL bytes and such). This makes code bigger and uses
51 some GNU extensions in libc. You probably only need this option 51 some GNU extensions in libc. You probably only need this option
52 if you plan to run busybox on desktop. 52 if you plan to run busybox on desktop.
53 53
54config INCLUDE_SUSv2 54config INCLUDE_SUSv2
55 bool "Enable obsolete features removed before SUSv3" 55 bool "Enable obsolete features removed before SUSv3"
56 default y 56 default y
57 help 57 help
58 This option will enable backwards compatibility with SuSv2, 58 This option will enable backwards compatibility with SuSv2,
59 specifically, old-style numeric options ('command -1 <file>') 59 specifically, old-style numeric options ('command -1 <file>')
60 will be supported in head, tail, and fold. (Note: should 60 will be supported in head, tail, and fold. (Note: should
61 affect renice too.) 61 affect renice too.)
62 62
63config LONG_OPTS 63config LONG_OPTS
64 bool "Support --long-options" 64 bool "Support --long-options"
65 default y 65 default y
66 help 66 help
67 Enable this if you want busybox applets to use the gnu --long-option 67 Enable this if you want busybox applets to use the gnu --long-option
68 style, in addition to single character -a -b -c style options. 68 style, in addition to single character -a -b -c style options.
69 69
70config SHOW_USAGE 70config SHOW_USAGE
71 bool "Show applet usage messages" 71 bool "Show applet usage messages"
72 default y 72 default y
73 help 73 help
74 Enabling this option, BusyBox applets will show terse help messages 74 Enabling this option, BusyBox applets will show terse help messages
75 when invoked with wrong arguments. 75 when invoked with wrong arguments.
76 If you do not want to show any (helpful) usage message when 76 If you do not want to show any (helpful) usage message when
77 issuing wrong command syntax, you can say 'N' here, 77 issuing wrong command syntax, you can say 'N' here,
78 saving approximately 7k. 78 saving approximately 7k.
79 79
80config FEATURE_VERBOSE_USAGE 80config FEATURE_VERBOSE_USAGE
81 bool "Show verbose applet usage messages" 81 bool "Show verbose applet usage messages"
82 default y 82 default y
83 depends on SHOW_USAGE 83 depends on SHOW_USAGE
84 help 84 help
85 All BusyBox applets will show verbose help messages when 85 All BusyBox applets will show verbose help messages when
86 busybox is invoked with --help. This will add a lot of text to the 86 busybox is invoked with --help. This will add a lot of text to the
87 busybox binary. In the default configuration, this will add about 87 busybox binary. In the default configuration, this will add about
88 13k, but it can add much more depending on your configuration. 88 13k, but it can add much more depending on your configuration.
89 89
90config FEATURE_COMPRESS_USAGE 90config FEATURE_COMPRESS_USAGE
91 bool "Store applet usage messages in compressed form" 91 bool "Store applet usage messages in compressed form"
92 default y 92 default y
93 depends on SHOW_USAGE 93 depends on SHOW_USAGE
94 help 94 help
95 Store usage messages in .bz compressed form, uncompress them 95 Store usage messages in .bz compressed form, uncompress them
96 on-the-fly when <applet> --help is called. 96 on-the-fly when <applet> --help is called.
97 97
98 If you have a really tiny busybox with few applets enabled (and 98 If you have a really tiny busybox with few applets enabled (and
99 bunzip2 isn't one of them), the overhead of the decompressor might 99 bunzip2 isn't one of them), the overhead of the decompressor might
100 be noticeable. Also, if you run executables directly from ROM 100 be noticeable. Also, if you run executables directly from ROM
101 and have very little memory, this might not be a win. Otherwise, 101 and have very little memory, this might not be a win. Otherwise,
102 you probably want this. 102 you probably want this.
103 103
104config LFS 104config LFS
105 bool "Support files > 2 GB" 105 bool "Support files > 2 GB"
106 default y 106 default y
107 help 107 help
108 If you want to build BusyBox with large file support, then enable 108 If you want to build BusyBox with large file support, then enable
109 this option. This will have no effect if your kernel or your C 109 this option. This will have no effect if your kernel or your C
110 library lacks large file support for large files. Some of the 110 library lacks large file support for large files. Some of the
111 programs that can benefit from large file support include dd, gzip, 111 programs that can benefit from large file support include dd, gzip,
112 cp, mount, tar, and many others. If you want to access files larger 112 cp, mount, tar, and many others. If you want to access files larger
113 than 2 Gigabytes, enable this option. 113 than 2 Gigabytes, enable this option.
114 114
115config GLOBBING 115config GLOBBING
116 bool "Allow busybox.exe to expand wildcards" 116 bool "Allow busybox.exe to expand wildcards"
@@ -138,227 +138,227 @@ config PAM
138 bool "Support PAM (Pluggable Authentication Modules)" 138 bool "Support PAM (Pluggable Authentication Modules)"
139 default n 139 default n
140 help 140 help
141 Use PAM in some busybox applets (currently login and httpd) instead 141 Use PAM in some busybox applets (currently login and httpd) instead
142 of direct access to password database. 142 of direct access to password database.
143 143
144config FEATURE_DEVPTS 144config FEATURE_DEVPTS
145 bool "Use the devpts filesystem for Unix98 PTYs" 145 bool "Use the devpts filesystem for Unix98 PTYs"
146 default y 146 default y
147 help 147 help
148 Enable if you want BusyBox to use Unix98 PTY support. If enabled, 148 Enable if you want BusyBox to use Unix98 PTY support. If enabled,
149 busybox will use /dev/ptmx for the master side of the pseudoterminal 149 busybox will use /dev/ptmx for the master side of the pseudoterminal
150 and /dev/pts/<number> for the slave side. Otherwise, BSD style 150 and /dev/pts/<number> for the slave side. Otherwise, BSD style
151 /dev/ttyp<number> will be used. To use this option, you should have 151 /dev/ttyp<number> will be used. To use this option, you should have
152 devpts mounted. 152 devpts mounted.
153 153
154config FEATURE_UTMP 154config FEATURE_UTMP
155 bool "Support utmp file" 155 bool "Support utmp file"
156 default y 156 default y
157 help 157 help
158 The file /var/run/utmp is used to track who is currently logged in. 158 The file /var/run/utmp is used to track who is currently logged in.
159 With this option on, certain applets (getty, login, telnetd etc) 159 With this option on, certain applets (getty, login, telnetd etc)
160 will create and delete entries there. 160 will create and delete entries there.
161 "who" applet requires this option. 161 "who" applet requires this option.
162 162
163config FEATURE_WTMP 163config FEATURE_WTMP
164 bool "Support wtmp file" 164 bool "Support wtmp file"
165 default y 165 default y
166 depends on FEATURE_UTMP 166 depends on FEATURE_UTMP
167 help 167 help
168 The file /var/run/wtmp is used to track when users have logged into 168 The file /var/run/wtmp is used to track when users have logged into
169 and logged out of the system. 169 and logged out of the system.
170 With this option on, certain applets (getty, login, telnetd etc) 170 With this option on, certain applets (getty, login, telnetd etc)
171 will append new entries there. 171 will append new entries there.
172 "last" applet requires this option. 172 "last" applet requires this option.
173 173
174config FEATURE_PIDFILE 174config FEATURE_PIDFILE
175 bool "Support writing pidfiles" 175 bool "Support writing pidfiles"
176 default y 176 default y
177 help 177 help
178 This option makes some applets (e.g. crond, syslogd, inetd) write 178 This option makes some applets (e.g. crond, syslogd, inetd) write
179 a pidfile at the configured PID_FILE_PATH. It has no effect 179 a pidfile at the configured PID_FILE_PATH. It has no effect
180 on applets which require pidfiles to run. 180 on applets which require pidfiles to run.
181 181
182config PID_FILE_PATH 182config PID_FILE_PATH
183 string "Directory for pidfiles" 183 string "Directory for pidfiles"
184 default "/var/run" 184 default "/var/run"
185 depends on FEATURE_PIDFILE 185 depends on FEATURE_PIDFILE
186 help 186 help
187 This is the default path where pidfiles are created. Applets which 187 This is the default path where pidfiles are created. Applets which
188 allow you to set the pidfile path on the command line will override 188 allow you to set the pidfile path on the command line will override
189 this value. The option has no effect on applets that require you to 189 this value. The option has no effect on applets that require you to
190 specify a pidfile path. 190 specify a pidfile path.
191 191
192config BUSYBOX 192config BUSYBOX
193 bool "Include busybox applet" 193 bool "Include busybox applet"
194 default y 194 default y
195 help 195 help
196 The busybox applet provides general help regarding busybox and 196 The busybox applet provides general help regarding busybox and
197 allows the included applets to be listed. It's also required 197 allows the included applets to be listed. It's also required
198 if applet links are to be installed at runtime. If you unselect 198 if applet links are to be installed at runtime. If you unselect
199 this option, running busybox without any arguments will give 199 this option, running busybox without any arguments will give
200 just a cryptic error message: 200 just a cryptic error message:
201 201
202 $ busybox 202 $ busybox
203 busybox: applet not found 203 busybox: applet not found
204 204
205 Running "busybox APPLET [ARGS...]" will still work, of course. 205 Running "busybox APPLET [ARGS...]" will still work, of course.
206 206
207config FEATURE_INSTALLER 207config FEATURE_INSTALLER
208 bool "Support --install [-s] to install applet links at runtime" 208 bool "Support --install [-s] to install applet links at runtime"
209 default y 209 default y
210 depends on BUSYBOX 210 depends on BUSYBOX
211 help 211 help
212 Enable 'busybox --install [-s]' support. This will allow you to use 212 Enable 'busybox --install [-s]' support. This will allow you to use
213 busybox at runtime to create hard links or symlinks for all the 213 busybox at runtime to create hard links or symlinks for all the
214 applets that are compiled into busybox. 214 applets that are compiled into busybox.
215 215
216config INSTALL_NO_USR 216config INSTALL_NO_USR
217 bool "Don't use /usr" 217 bool "Don't use /usr"
218 default n 218 default n
219 help 219 help
220 Disable use of /usr. busybox --install and "make install" 220 Disable use of /usr. busybox --install and "make install"
221 will install applets only to /bin and /sbin, 221 will install applets only to /bin and /sbin,
222 never to /usr/bin or /usr/sbin. 222 never to /usr/bin or /usr/sbin.
223 223
224config FEATURE_SUID 224config FEATURE_SUID
225 bool "Drop SUID state for most applets" 225 bool "Drop SUID state for most applets"
226 default y 226 default y
227 help 227 help
228 With this option you can install the busybox binary belonging 228 With this option you can install the busybox binary belonging
229 to root with the suid bit set, enabling some applets to perform 229 to root with the suid bit set, enabling some applets to perform
230 root-level operations even when run by ordinary users 230 root-level operations even when run by ordinary users
231 (for example, mounting of user mounts in fstab needs this). 231 (for example, mounting of user mounts in fstab needs this).
232 232
233 With this option enabled, Busybox drops privileges for applets 233 With this option enabled, Busybox drops privileges for applets
234 that don't need root access, before entering their main() function. 234 that don't need root access, before entering their main() function.
235 235
236 If you are really paranoid and don't want even initial busybox code 236 If you are really paranoid and don't want even initial busybox code
237 to run under root for evey applet, build two busybox binaries with 237 to run under root for evey applet, build two busybox binaries with
238 different applets in them (and the appropriate symlinks pointing 238 different applets in them (and the appropriate symlinks pointing
239 to each binary), and only set the suid bit on the one that needs it. 239 to each binary), and only set the suid bit on the one that needs it.
240 240
241 Some applets which require root rights (need suid bit on the binary 241 Some applets which require root rights (need suid bit on the binary
242 or to be run by root) and will refuse to execute otherwise: 242 or to be run by root) and will refuse to execute otherwise:
243 crontab, login, passwd, su, vlock, wall. 243 crontab, login, passwd, su, vlock, wall.
244 244
245 The applets which will use root rights if they have them 245 The applets which will use root rights if they have them
246 (via suid bit, or because run by root), but would try to work 246 (via suid bit, or because run by root), but would try to work
247 without root right nevertheless: 247 without root right nevertheless:
248 findfs, ping[6], traceroute[6], mount. 248 findfs, ping[6], traceroute[6], mount.
249 249
250 Note that if you DO NOT select this option, but DO make busybox 250 Note that if you DO NOT select this option, but DO make busybox
251 suid root, ALL applets will run under root, which is a huge 251 suid root, ALL applets will run under root, which is a huge
252 security hole (think "cp /some/file /etc/passwd"). 252 security hole (think "cp /some/file /etc/passwd").
253 253
254config FEATURE_SUID_CONFIG 254config FEATURE_SUID_CONFIG
255 bool "Enable SUID configuration via /etc/busybox.conf" 255 bool "Enable SUID configuration via /etc/busybox.conf"
256 default y 256 default y
257 depends on FEATURE_SUID 257 depends on FEATURE_SUID
258 help 258 help
259 Allow the SUID/SGID state of an applet to be determined at runtime 259 Allow the SUID/SGID state of an applet to be determined at runtime
260 by checking /etc/busybox.conf. (This is sort of a poor man's sudo.) 260 by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
261 The format of this file is as follows: 261 The format of this file is as follows:
262 262
263 APPLET = [Ssx-][Ssx-][x-] [USER.GROUP] 263 APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
264 264
265 s: USER or GROUP is allowed to execute APPLET. 265 s: USER or GROUP is allowed to execute APPLET.
266 APPLET will run under USER or GROUP 266 APPLET will run under USER or GROUP
267 (reagardless of who's running it). 267 (regardless of who's running it).
268 S: USER or GROUP is NOT allowed to execute APPLET. 268 S: USER or GROUP is NOT allowed to execute APPLET.
269 APPLET will run under USER or GROUP. 269 APPLET will run under USER or GROUP.
270 This option is not very sensical. 270 This option is not very sensical.
271 x: USER/GROUP/others are allowed to execute APPLET. 271 x: USER/GROUP/others are allowed to execute APPLET.
272 No UID/GID change will be done when it is run. 272 No UID/GID change will be done when it is run.
273 -: USER/GROUP/others are not allowed to execute APPLET. 273 -: USER/GROUP/others are not allowed to execute APPLET.
274 274
275 An example might help: 275 An example might help:
276 276
277 [SUID] 277 |[SUID]
278 su = ssx root.0 # applet su can be run by anyone and runs with 278 |su = ssx root.0 # applet su can be run by anyone and runs with
279 # euid=0,egid=0 279 | # euid=0,egid=0
280 su = ssx # exactly the same 280 |su = ssx # exactly the same
281 281 |
282 mount = sx- root.disk # applet mount can be run by root and members 282 |mount = sx- root.disk # applet mount can be run by root and members
283 # of group disk (but not anyone else) 283 | # of group disk (but not anyone else)
284 # and runs with euid=0 (egid is not changed) 284 | # and runs with euid=0 (egid is not changed)
285 285 |
286 cp = --- # disable applet cp for everyone 286 |cp = --- # disable applet cp for everyone
287 287
288 The file has to be owned by user root, group root and has to be 288 The file has to be owned by user root, group root and has to be
289 writeable only by root: 289 writeable only by root:
290 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf) 290 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
291 The busybox executable has to be owned by user root, group 291 The busybox executable has to be owned by user root, group
292 root and has to be setuid root for this to work: 292 root and has to be setuid root for this to work:
293 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox) 293 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
294 294
295 Robert 'sandman' Griebl has more information here: 295 Robert 'sandman' Griebl has more information here:
296 <url: http://www.softforge.de/bb/suid.html >. 296 <url: http://www.softforge.de/bb/suid.html >.
297 297
298config FEATURE_SUID_CONFIG_QUIET 298config FEATURE_SUID_CONFIG_QUIET
299 bool "Suppress warning message if /etc/busybox.conf is not readable" 299 bool "Suppress warning message if /etc/busybox.conf is not readable"
300 default y 300 default y
301 depends on FEATURE_SUID_CONFIG 301 depends on FEATURE_SUID_CONFIG
302 help 302 help
303 /etc/busybox.conf should be readable by the user needing the SUID, 303 /etc/busybox.conf should be readable by the user needing the SUID,
304 check this option to avoid users to be notified about missing 304 check this option to avoid users to be notified about missing
305 permissions. 305 permissions.
306 306
307config FEATURE_PREFER_APPLETS 307config FEATURE_PREFER_APPLETS
308 bool "exec prefers applets" 308 bool "exec prefers applets"
309 default n 309 default n
310 help 310 help
311 This is an experimental option which directs applets about to 311 This is an experimental option which directs applets about to
312 call 'exec' to try and find an applicable busybox applet before 312 call 'exec' to try and find an applicable busybox applet before
313 searching the PATH. This is typically done by exec'ing 313 searching the PATH. This is typically done by exec'ing
314 /proc/self/exe. 314 /proc/self/exe.
315 315
316 This may affect shell, find -exec, xargs and similar applets. 316 This may affect shell, find -exec, xargs and similar applets.
317 They will use applets even if /bin/APPLET -> busybox link 317 They will use applets even if /bin/APPLET -> busybox link
318 is missing (or is not a link to busybox). However, this causes 318 is missing (or is not a link to busybox). However, this causes
319 problems in chroot jails without mounted /proc and with ps/top 319 problems in chroot jails without mounted /proc and with ps/top
320 (command name can be shown as 'exe' for applets started this way). 320 (command name can be shown as 'exe' for applets started this way).
321 321
322config BUSYBOX_EXEC_PATH 322config BUSYBOX_EXEC_PATH
323 string "Path to BusyBox executable" 323 string "Path to BusyBox executable"
324 default "/proc/self/exe" 324 default "/proc/self/exe"
325 help 325 help
326 When Busybox applets need to run other busybox applets, BusyBox 326 When Busybox applets need to run other busybox applets, BusyBox
327 sometimes needs to exec() itself. When the /proc filesystem is 327 sometimes needs to exec() itself. When the /proc filesystem is
328 mounted, /proc/self/exe always points to the currently running 328 mounted, /proc/self/exe always points to the currently running
329 executable. If you haven't got /proc, set this to wherever you 329 executable. If you haven't got /proc, set this to wherever you
330 want to run BusyBox from. 330 want to run BusyBox from.
331 331
332config SELINUX 332config SELINUX
333 bool "Support NSA Security Enhanced Linux" 333 bool "Support NSA Security Enhanced Linux"
334 default n 334 default n
335 select PLATFORM_LINUX 335 select PLATFORM_LINUX
336 help 336 help
337 Enable support for SELinux in applets ls, ps, and id. Also provide 337 Enable support for SELinux in applets ls, ps, and id. Also provide
338 the option of compiling in SELinux applets. 338 the option of compiling in SELinux applets.
339 339
340 If you do not have a complete SELinux userland installed, this stuff 340 If you do not have a complete SELinux userland installed, this stuff
341 will not compile. Specifially, libselinux 1.28 or better is 341 will not compile. Specifially, libselinux 1.28 or better is
342 directly required by busybox. If the installation is located in a 342 directly required by busybox. If the installation is located in a
343 non-standard directory, provide it by invoking make as follows: 343 non-standard directory, provide it by invoking make as follows:
344 344
345 CFLAGS=-I<libselinux-include-path> \ 345 CFLAGS=-I<libselinux-include-path> \
346 LDFLAGS=-L<libselinux-lib-path> \ 346 LDFLAGS=-L<libselinux-lib-path> \
347 make 347 make
348 348
349 Most people will leave this set to 'N'. 349 Most people will leave this set to 'N'.
350 350
351config FEATURE_CLEAN_UP 351config FEATURE_CLEAN_UP
352 bool "Clean up all memory before exiting (usually not needed)" 352 bool "Clean up all memory before exiting (usually not needed)"
353 default n 353 default n
354 help 354 help
355 As a size optimization, busybox normally exits without explicitly 355 As a size optimization, busybox normally exits without explicitly
356 freeing dynamically allocated memory or closing files. This saves 356 freeing dynamically allocated memory or closing files. This saves
357 space since the OS will clean up for us, but it can confuse debuggers 357 space since the OS will clean up for us, but it can confuse debuggers
358 like valgrind, which report tons of memory and resource leaks. 358 like valgrind, which report tons of memory and resource leaks.
359 359
360 Don't enable this unless you have a really good reason to clean 360 Don't enable this unless you have a really good reason to clean
361 things up manually. 361 things up manually.
362 362
363# These are auto-selected by other options 363# These are auto-selected by other options
364 364
@@ -366,26 +366,26 @@ config FEATURE_SYSLOG
366 bool #No description makes it a hidden option 366 bool #No description makes it a hidden option
367 default n 367 default n
368 #help 368 #help
369 # This option is auto-selected when you select any applet which may 369 #This option is auto-selected when you select any applet which may
370 # send its output to syslog. You do not need to select it manually. 370 #send its output to syslog. You do not need to select it manually.
371 371
372config FEATURE_HAVE_RPC 372config FEATURE_HAVE_RPC
373 bool #No description makes it a hidden option 373 bool #No description makes it a hidden option
374 default n 374 default n
375 #help 375 #help
376 # This is automatically selected if any of enabled applets need it. 376 #This is automatically selected if any of enabled applets need it.
377 # You do not need to select it manually. 377 #You do not need to select it manually.
378 378
379config PLATFORM_LINUX 379config PLATFORM_LINUX
380 bool #No description makes it a hidden option 380 bool #No description makes it a hidden option
381 default n 381 default n
382 #help 382 #help
383 # For the most part, busybox requires only POSIX compatibility 383 #For the most part, busybox requires only POSIX compatibility
384 # from the target system, but some applets and features use 384 #from the target system, but some applets and features use
385 # Linux-specific interfaces. 385 #Linux-specific interfaces.
386 # 386 #
387 # This is automatically selected if any applet or feature requires 387 #This is automatically selected if any applet or feature requires
388 # Linux-specific interfaces. You do not need to select it manually. 388 #Linux-specific interfaces. You do not need to select it manually.
389 389
390comment 'Build Options' 390comment 'Build Options'
391 391
@@ -393,37 +393,37 @@ config STATIC
393 bool "Build BusyBox as a static binary (no shared libs)" 393 bool "Build BusyBox as a static binary (no shared libs)"
394 default n 394 default n
395 help 395 help
396 If you want to build a static BusyBox binary, which does not 396 If you want to build a static BusyBox binary, which does not
397 use or require any shared libraries, then enable this option. 397 use or require any shared libraries, then enable this option.
398 This can cause BusyBox to be considerably larger, so you should 398 This can cause BusyBox to be considerably larger, so you should
399 leave this option false unless you have a good reason (i.e. 399 leave this option false unless you have a good reason (i.e.
400 your target platform does not support shared libraries, or 400 your target platform does not support shared libraries, or
401 you are building an initrd which doesn't need anything but 401 you are building an initrd which doesn't need anything but
402 BusyBox, etc). 402 BusyBox, etc).
403 403
404 Most people will leave this set to 'N'. 404 Most people will leave this set to 'N'.
405 405
406config PIE 406config PIE
407 bool "Build BusyBox as a position independent executable" 407 bool "Build BusyBox as a position independent executable"
408 default n 408 default n
409 depends on !STATIC 409 depends on !STATIC
410 help 410 help
411 Hardened code option. PIE binaries are loaded at a different 411 Hardened code option. PIE binaries are loaded at a different
412 address at each invocation. This has some overhead, 412 address at each invocation. This has some overhead,
413 particularly on x86-32 which is short on registers. 413 particularly on x86-32 which is short on registers.
414 414
415 Most people will leave this set to 'N'. 415 Most people will leave this set to 'N'.
416 416
417config NOMMU 417config NOMMU
418 bool "Force NOMMU build" 418 bool "Force NOMMU build"
419 default n 419 default n
420 help 420 help
421 Busybox tries to detect whether architecture it is being 421 Busybox tries to detect whether architecture it is being
422 built against supports MMU or not. If this detection fails, 422 built against supports MMU or not. If this detection fails,
423 or if you want to build NOMMU version of busybox for testing, 423 or if you want to build NOMMU version of busybox for testing,
424 you may force NOMMU build here. 424 you may force NOMMU build here.
425 425
426 Most people will leave this set to 'N'. 426 Most people will leave this set to 'N'.
427 427
428# PIE can be made to work with BUILD_LIBBUSYBOX, but currently 428# PIE can be made to work with BUILD_LIBBUSYBOX, but currently
429# build system does not support that 429# build system does not support that
@@ -432,128 +432,128 @@ config BUILD_LIBBUSYBOX
432 default n 432 default n
433 depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC 433 depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
434 help 434 help
435 Build a shared library libbusybox.so.N.N.N which contains all 435 Build a shared library libbusybox.so.N.N.N which contains all
436 busybox code. 436 busybox code.
437 437
438 This feature allows every applet to be built as a really tiny 438 This feature allows every applet to be built as a really tiny
439 separate executable linked against the library: 439 separate executable linked against the library:
440 $ size 0_lib/l* 440 |$ size 0_lib/l*
441 text data bss dec hex filename 441 | text data bss dec hex filename
442 939 212 28 1179 49b 0_lib/last 442 | 939 212 28 1179 49b 0_lib/last
443 939 212 28 1179 49b 0_lib/less 443 | 939 212 28 1179 49b 0_lib/less
444 919138 8328 1556 929022 e2cfe 0_lib/libbusybox.so.1.N.M 444 | 919138 8328 1556 929022 e2cfe 0_lib/libbusybox.so.1.N.M
445 445
446 This is useful on NOMMU systems which are not capable 446 This is useful on NOMMU systems which are not capable
447 of sharing executables, but are capable of sharing code 447 of sharing executables, but are capable of sharing code
448 in dynamic libraries. 448 in dynamic libraries.
449 449
450config FEATURE_LIBBUSYBOX_STATIC 450config FEATURE_LIBBUSYBOX_STATIC
451 bool "Pull in all external references into libbusybox" 451 bool "Pull in all external references into libbusybox"
452 default n 452 default n
453 depends on BUILD_LIBBUSYBOX 453 depends on BUILD_LIBBUSYBOX
454 help 454 help
455 Make libbusybox library independent, not using or requiring 455 Make libbusybox library independent, not using or requiring
456 any other shared libraries. 456 any other shared libraries.
457 457
458config FEATURE_INDIVIDUAL 458config FEATURE_INDIVIDUAL
459 bool "Produce a binary for each applet, linked against libbusybox" 459 bool "Produce a binary for each applet, linked against libbusybox"
460 default y 460 default y
461 depends on BUILD_LIBBUSYBOX 461 depends on BUILD_LIBBUSYBOX
462 help 462 help
463 If your CPU architecture doesn't allow for sharing text/rodata 463 If your CPU architecture doesn't allow for sharing text/rodata
464 sections of running binaries, but allows for runtime dynamic 464 sections of running binaries, but allows for runtime dynamic
465 libraries, this option will allow you to reduce memory footprint 465 libraries, this option will allow you to reduce memory footprint
466 when you have many different applets running at once. 466 when you have many different applets running at once.
467 467
468 If your CPU architecture allows for sharing text/rodata, 468 If your CPU architecture allows for sharing text/rodata,
469 having single binary is more optimal. 469 having single binary is more optimal.
470 470
471 Each applet will be a tiny program, dynamically linked 471 Each applet will be a tiny program, dynamically linked
472 against libbusybox.so.N.N.N. 472 against libbusybox.so.N.N.N.
473 473
474 You need to have a working dynamic linker. 474 You need to have a working dynamic linker.
475 475
476config FEATURE_SHARED_BUSYBOX 476config FEATURE_SHARED_BUSYBOX
477 bool "Produce additional busybox binary linked against libbusybox" 477 bool "Produce additional busybox binary linked against libbusybox"
478 default y 478 default y
479 depends on BUILD_LIBBUSYBOX 479 depends on BUILD_LIBBUSYBOX
480 help 480 help
481 Build busybox, dynamically linked against libbusybox.so.N.N.N. 481 Build busybox, dynamically linked against libbusybox.so.N.N.N.
482 482
483 You need to have a working dynamic linker. 483 You need to have a working dynamic linker.
484 484
485### config BUILD_AT_ONCE 485### config BUILD_AT_ONCE
486### bool "Compile all sources at once" 486### bool "Compile all sources at once"
487### default n 487### default n
488### help 488### help
489### Normally each source-file is compiled with one invocation of 489### Normally each source-file is compiled with one invocation of
490### the compiler. 490### the compiler.
491### If you set this option, all sources are compiled at once. 491### If you set this option, all sources are compiled at once.
492### This gives the compiler more opportunities to optimize which can 492### This gives the compiler more opportunities to optimize which can
493### result in smaller and/or faster binaries. 493### result in smaller and/or faster binaries.
494### 494###
495### Setting this option will consume alot of memory, e.g. if you 495### Setting this option will consume alot of memory, e.g. if you
496### enable all applets with all features, gcc uses more than 300MB 496### enable all applets with all features, gcc uses more than 300MB
497### RAM during compilation of busybox. 497### RAM during compilation of busybox.
498### 498###
499### This option is most likely only beneficial for newer compilers 499### This option is most likely only beneficial for newer compilers
500### such as gcc-4.1 and above. 500### such as gcc-4.1 and above.
501### 501###
502### Say 'N' unless you know what you are doing. 502### Say 'N' unless you know what you are doing.
503 503
504config CROSS_COMPILER_PREFIX 504config CROSS_COMPILER_PREFIX
505 string "Cross Compiler prefix" 505 string "Cross Compiler prefix"
506 default "" 506 default ""
507 help 507 help
508 If you want to build BusyBox with a cross compiler, then you 508 If you want to build BusyBox with a cross compiler, then you
509 will need to set this to the cross-compiler prefix, for example, 509 will need to set this to the cross-compiler prefix, for example,
510 "i386-uclibc-". 510 "i386-uclibc-".
511 511
512 Note that CROSS_COMPILE environment variable or 512 Note that CROSS_COMPILE environment variable or
513 "make CROSS_COMPILE=xxx ..." will override this selection. 513 "make CROSS_COMPILE=xxx ..." will override this selection.
514 514
515 Native builds leave this empty. 515 Native builds leave this empty.
516 516
517config SYSROOT 517config SYSROOT
518 string "Path to sysroot" 518 string "Path to sysroot"
519 default "" 519 default ""
520 help 520 help
521 If you want to build BusyBox with a cross compiler, then you 521 If you want to build BusyBox with a cross compiler, then you
522 might also need to specify where /usr/include and /usr/lib 522 might also need to specify where /usr/include and /usr/lib
523 will be found. 523 will be found.
524 524
525 For example, BusyBox can be built against an installed 525 For example, BusyBox can be built against an installed
526 Android NDK, platform version 9, for ARM ABI with 526 Android NDK, platform version 9, for ARM ABI with
527 527
528 CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm 528 CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
529 529
530 Native builds leave this empty. 530 Native builds leave this empty.
531 531
532config EXTRA_CFLAGS 532config EXTRA_CFLAGS
533 string "Additional CFLAGS" 533 string "Additional CFLAGS"
534 default "" 534 default ""
535 help 535 help
536 Additional CFLAGS to pass to the compiler verbatim. 536 Additional CFLAGS to pass to the compiler verbatim.
537 537
538config EXTRA_LDFLAGS 538config EXTRA_LDFLAGS
539 string "Additional LDFLAGS" 539 string "Additional LDFLAGS"
540 default "" 540 default ""
541 help 541 help
542 Additional LDFLAGS to pass to the linker verbatim. 542 Additional LDFLAGS to pass to the linker verbatim.
543 543
544config EXTRA_LDLIBS 544config EXTRA_LDLIBS
545 string "Additional LDLIBS" 545 string "Additional LDLIBS"
546 default "" 546 default ""
547 help 547 help
548 Additional LDLIBS to pass to the linker with -l. 548 Additional LDLIBS to pass to the linker with -l.
549 549
550config USE_PORTABLE_CODE 550config USE_PORTABLE_CODE
551 bool "Avoid using GCC-specific code constructs" 551 bool "Avoid using GCC-specific code constructs"
552 default n 552 default n
553 help 553 help
554 Use this option if you are trying to compile busybox with 554 Use this option if you are trying to compile busybox with
555 compiler other than gcc. 555 compiler other than gcc.
556 If you do use gcc, this option may needlessly increase code size. 556 If you do use gcc, this option may needlessly increase code size.
557 557
558comment 'Installation Options ("make install" behavior)' 558comment 'Installation Options ("make install" behavior)'
559 559
@@ -561,32 +561,32 @@ choice
561 prompt "What kind of applet links to install" 561 prompt "What kind of applet links to install"
562 default INSTALL_APPLET_SYMLINKS 562 default INSTALL_APPLET_SYMLINKS
563 help 563 help
564 Choose what kind of links to applets are created by "make install". 564 Choose what kind of links to applets are created by "make install".
565 565
566config INSTALL_APPLET_SYMLINKS 566config INSTALL_APPLET_SYMLINKS
567 bool "as soft-links" 567 bool "as soft-links"
568 help 568 help
569 Install applets as soft-links to the busybox binary. This needs some 569 Install applets as soft-links to the busybox binary. This needs some
570 free inodes on the filesystem, but might help with filesystem 570 free inodes on the filesystem, but might help with filesystem
571 generators that can't cope with hard-links. 571 generators that can't cope with hard-links.
572 572
573config INSTALL_APPLET_HARDLINKS 573config INSTALL_APPLET_HARDLINKS
574 bool "as hard-links" 574 bool "as hard-links"
575 help 575 help
576 Install applets as hard-links to the busybox binary. This might 576 Install applets as hard-links to the busybox binary. This might
577 count on a filesystem with few inodes. 577 count on a filesystem with few inodes.
578 578
579config INSTALL_APPLET_SCRIPT_WRAPPERS 579config INSTALL_APPLET_SCRIPT_WRAPPERS
580 bool "as script wrappers" 580 bool "as script wrappers"
581 help 581 help
582 Install applets as script wrappers that call the busybox binary. 582 Install applets as script wrappers that call the busybox binary.
583 583
584config INSTALL_APPLET_DONT 584config INSTALL_APPLET_DONT
585 bool "not installed" 585 bool "not installed"
586 help 586 help
587 Do not install applet links. Useful when you plan to use 587 Do not install applet links. Useful when you plan to use
588 busybox --install for installing links, or plan to use 588 busybox --install for installing links, or plan to use
589 a standalone shell and thus don't need applet links. 589 a standalone shell and thus don't need applet links.
590 590
591endchoice 591endchoice
592 592
@@ -595,23 +595,23 @@ choice
595 default INSTALL_SH_APPLET_SYMLINK 595 default INSTALL_SH_APPLET_SYMLINK
596 depends on INSTALL_APPLET_SCRIPT_WRAPPERS 596 depends on INSTALL_APPLET_SCRIPT_WRAPPERS
597 help 597 help
598 Choose how you install /bin/sh applet link. 598 Choose how you install /bin/sh applet link.
599 599
600config INSTALL_SH_APPLET_SYMLINK 600config INSTALL_SH_APPLET_SYMLINK
601 bool "as soft-link" 601 bool "as soft-link"
602 help 602 help
603 Install /bin/sh applet as soft-link to the busybox binary. 603 Install /bin/sh applet as soft-link to the busybox binary.
604 604
605config INSTALL_SH_APPLET_HARDLINK 605config INSTALL_SH_APPLET_HARDLINK
606 bool "as hard-link" 606 bool "as hard-link"
607 help 607 help
608 Install /bin/sh applet as hard-link to the busybox binary. 608 Install /bin/sh applet as hard-link to the busybox binary.
609 609
610config INSTALL_SH_APPLET_SCRIPT_WRAPPER 610config INSTALL_SH_APPLET_SCRIPT_WRAPPER
611 bool "as script wrapper" 611 bool "as script wrapper"
612 help 612 help
613 Install /bin/sh applet as script wrapper that calls 613 Install /bin/sh applet as script wrapper that calls
614 the busybox binary. 614 the busybox binary.
615 615
616endchoice 616endchoice
617 617
@@ -619,7 +619,7 @@ config PREFIX
619 string "BusyBox installation prefix" 619 string "BusyBox installation prefix"
620 default "./_install" 620 default "./_install"
621 help 621 help
622 Define your directory to install BusyBox files/subdirs in. 622 Define your directory to install BusyBox files/subdirs in.
623 623
624comment 'Debugging Options' 624comment 'Debugging Options'
625 625
@@ -627,81 +627,81 @@ config DEBUG
627 bool "Build BusyBox with extra Debugging symbols" 627 bool "Build BusyBox with extra Debugging symbols"
628 default n 628 default n
629 help 629 help
630 Say Y here if you wish to examine BusyBox internals while applets are 630 Say Y here if you wish to examine BusyBox internals while applets are
631 running. This increases the size of the binary considerably, and 631 running. This increases the size of the binary considerably, and
632 should only be used when doing development. If you are doing 632 should only be used when doing development. If you are doing
633 development and want to debug BusyBox, answer Y. 633 development and want to debug BusyBox, answer Y.
634 634
635 Most people should answer N. 635 Most people should answer N.
636 636
637config DEBUG_PESSIMIZE 637config DEBUG_PESSIMIZE
638 bool "Disable compiler optimizations" 638 bool "Disable compiler optimizations"
639 default n 639 default n
640 depends on DEBUG 640 depends on DEBUG
641 help 641 help
642 The compiler's optimization of source code can eliminate and reorder 642 The compiler's optimization of source code can eliminate and reorder
643 code, resulting in an executable that's hard to understand when 643 code, resulting in an executable that's hard to understand when
644 stepping through it with a debugger. This switches it off, resulting 644 stepping through it with a debugger. This switches it off, resulting
645 in a much bigger executable that more closely matches the source 645 in a much bigger executable that more closely matches the source
646 code. 646 code.
647 647
648config DEBUG_SANITIZE 648config DEBUG_SANITIZE
649 bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)" 649 bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
650 default n 650 default n
651 help 651 help
652 Say Y here if you want to enable runtime sanitizers. These help 652 Say Y here if you want to enable runtime sanitizers. These help
653 catch bad memory accesses (e.g. buffer overflows), but will make 653 catch bad memory accesses (e.g. buffer overflows), but will make
654 the executable larger and slow down runtime a bit. 654 the executable larger and slow down runtime a bit.
655 655
656 This adds -fsanitize=foo options to gcc command line. 656 This adds -fsanitize=foo options to gcc command line.
657 657
658 If you aren't developing/testing busybox, say N here. 658 If you aren't developing/testing busybox, say N here.
659 659
660config UNIT_TEST 660config UNIT_TEST
661 bool "Build unit tests" 661 bool "Build unit tests"
662 default n 662 default n
663 help 663 help
664 Say Y here if you want to build unit tests (both the framework and 664 Say Y here if you want to build unit tests (both the framework and
665 test cases) as a Busybox applet. This results in bigger code, so you 665 test cases) as a Busybox applet. This results in bigger code, so you
666 probably don't want this option in production builds. 666 probably don't want this option in production builds.
667 667
668config WERROR 668config WERROR
669 bool "Abort compilation on any warning" 669 bool "Abort compilation on any warning"
670 default n 670 default n
671 help 671 help
672 This adds -Werror to gcc command line. 672 This adds -Werror to gcc command line.
673 673
674 Most people should answer N. 674 Most people should answer N.
675 675
676choice 676choice
677 prompt "Additional debugging library" 677 prompt "Additional debugging library"
678 default NO_DEBUG_LIB 678 default NO_DEBUG_LIB
679 help 679 help
680 Using an additional debugging library will make BusyBox become 680 Using an additional debugging library will make BusyBox become
681 considerable larger and will cause it to run more slowly. You 681 considerable larger and will cause it to run more slowly. You
682 should always leave this option disabled for production use. 682 should always leave this option disabled for production use.
683 683
684 dmalloc support: 684 dmalloc support:
685 ---------------- 685 ----------------
686 This enables compiling with dmalloc ( http://dmalloc.com/ ) 686 This enables compiling with dmalloc ( http://dmalloc.com/ )
687 which is an excellent public domain mem leak and malloc problem 687 which is an excellent public domain mem leak and malloc problem
688 detector. To enable dmalloc, before running busybox you will 688 detector. To enable dmalloc, before running busybox you will
689 want to properly set your environment, for example: 689 want to properly set your environment, for example:
690 export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile 690 export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
691 The 'debug=' value is generated using the following command 691 The 'debug=' value is generated using the following command
692 dmalloc -p log-stats -p log-non-free -p log-bad-space \ 692 dmalloc -p log-stats -p log-non-free -p log-bad-space \
693 -p log-elapsed-time -p check-fence -p check-heap \ 693 -p log-elapsed-time -p check-fence -p check-heap \
694 -p check-lists -p check-blank -p check-funcs -p realloc-copy \ 694 -p check-lists -p check-blank -p check-funcs -p realloc-copy \
695 -p allow-free-null 695 -p allow-free-null
696 696
697 Electric-fence support: 697 Electric-fence support:
698 ----------------------- 698 -----------------------
699 This enables compiling with Electric-fence support. Electric 699 This enables compiling with Electric-fence support. Electric
700 fence is another very useful malloc debugging library which uses 700 fence is another very useful malloc debugging library which uses
701 your computer's virtual memory hardware to detect illegal memory 701 your computer's virtual memory hardware to detect illegal memory
702 accesses. This support will make BusyBox be considerable larger 702 accesses. This support will make BusyBox be considerable larger
703 and run slower, so you should leave this option disabled unless 703 and run slower, so you should leave this option disabled unless
704 you are hunting a hard to find memory problem. 704 you are hunting a hard to find memory problem.
705 705
706 706
707config NO_DEBUG_LIB 707config NO_DEBUG_LIB
diff --git a/Makefile b/Makefile
index 8f3bc7ec0..47bdaf7ad 100644
--- a/Makefile
+++ b/Makefile
@@ -178,7 +178,7 @@ endif
178# SUBARCH is subsequently ignored. 178# SUBARCH is subsequently ignored.
179 179
180ifneq ($(CROSS_COMPILE),) 180ifneq ($(CROSS_COMPILE),)
181SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1) 181SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1 | sed 's:^.*/::g')
182else 182else
183SUBARCH := $(shell uname -m) 183SUBARCH := $(shell uname -m)
184endif 184endif
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
new file mode 100644
index 000000000..0b1c56cb5
--- /dev/null
+++ b/arch/sparc/Makefile
@@ -0,0 +1,11 @@
1# When building a library, even intra-library references,
2# such as from find_applet_by_name() to applet_names[],
3# don't work with -fpic on sparc, needs -fPIC.
4# Don't know why it fails in this case but works when
5# a binary is being built.
6#
7# (if is superfluous, ARCH_FPIC is only used by library build, but it
8# demonstrates the point: non-pic binary does not need it)
9ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
10ARCH_FPIC = -fPIC
11endif
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
new file mode 100644
index 000000000..0b1c56cb5
--- /dev/null
+++ b/arch/sparc64/Makefile
@@ -0,0 +1,11 @@
1# When building a library, even intra-library references,
2# such as from find_applet_by_name() to applet_names[],
3# don't work with -fpic on sparc, needs -fPIC.
4# Don't know why it fails in this case but works when
5# a binary is being built.
6#
7# (if is superfluous, ARCH_FPIC is only used by library build, but it
8# demonstrates the point: non-pic binary does not need it)
9ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
10ARCH_FPIC = -fPIC
11endif
diff --git a/archival/Config.src b/archival/Config.src
index 0c97f3d7c..449914565 100644
--- a/archival/Config.src
+++ b/archival/Config.src
@@ -27,4 +27,12 @@ config FEATURE_SEAMLESS_Z
27 27
28INSERT 28INSERT
29 29
30config FEATURE_LZMA_FAST
31 bool "Optimize lzma for speed"
32 default n
33 depends on UNLZMA || LZCAT || LZMA || FEATURE_SEAMLESS_LZMA
34 help
35 This option reduces decompression time by about 25% at the cost of
36 a 1K bigger binary.
37
30endmenu 38endmenu
diff --git a/archival/ar.c b/archival/ar.c
index f9f712fde..ea36bda88 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -18,34 +18,32 @@
18 */ 18 */
19 19
20//config:config AR 20//config:config AR
21//config: bool "ar" 21//config: bool "ar (9.5 kb)"
22//config: default n # needs to be improved to be able to replace binutils ar 22//config: default n # needs to be improved to be able to replace binutils ar
23//config: help 23//config: help
24//config: ar is an archival utility program used to create, modify, and 24//config: ar is an archival utility program used to create, modify, and
25//config: extract contents from archives. In practice, it is used exclusively 25//config: extract contents from archives. In practice, it is used exclusively
26//config: for object module archives used by compilers. 26//config: for object module archives used by compilers.
27//config: 27//config:
28//config: On an x86 system, the ar applet adds about 1K. 28//config: Unless you have a specific application which requires ar, you should
29//config: 29//config: probably say N here: most compilers come with their own ar utility.
30//config: Unless you have a specific application which requires ar, you should
31//config: probably say N here: most compilers come with their own ar utility.
32//config: 30//config:
33//config:config FEATURE_AR_LONG_FILENAMES 31//config:config FEATURE_AR_LONG_FILENAMES
34//config: bool "Support long filenames (not needed for debs)" 32//config: bool "Support long filenames (not needed for debs)"
35//config: default y 33//config: default y
36//config: depends on AR 34//config: depends on AR
37//config: help 35//config: help
38//config: By default the ar format can only store the first 15 characters 36//config: By default the ar format can only store the first 15 characters
39//config: of the filename, this option removes that limitation. 37//config: of the filename, this option removes that limitation.
40//config: It supports the GNU ar long filename method which moves multiple long 38//config: It supports the GNU ar long filename method which moves multiple long
41//config: filenames into a the data section of a new ar entry. 39//config: filenames into a the data section of a new ar entry.
42//config: 40//config:
43//config:config FEATURE_AR_CREATE 41//config:config FEATURE_AR_CREATE
44//config: bool "Support archive creation" 42//config: bool "Support archive creation"
45//config: default y 43//config: default y
46//config: depends on AR 44//config: depends on AR
47//config: help 45//config: help
48//config: This enables archive creation (-c and -r) with busybox ar. 46//config: This enables archive creation (-c and -r) with busybox ar.
49 47
50//applet:IF_AR(APPLET(ar, BB_DIR_USR_BIN, BB_SUID_DROP)) 48//applet:IF_AR(APPLET(ar, BB_DIR_USR_BIN, BB_SUID_DROP))
51//kbuild:lib-$(CONFIG_AR) += ar.o 49//kbuild:lib-$(CONFIG_AR) += ar.o
diff --git a/archival/bbunzip.c b/archival/bbunzip.c
index 1e3d6e586..f91dd25eb 100644
--- a/archival/bbunzip.c
+++ b/archival/bbunzip.c
@@ -239,11 +239,11 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext)
239//usage: "\n -f Overwrite" 239//usage: "\n -f Overwrite"
240 240
241//config:config UNCOMPRESS 241//config:config UNCOMPRESS
242//config: bool "uncompress" 242//config: bool "uncompress (7.1 kb)"
243//config: default n # ancient 243//config: default n # ancient
244//config: help 244//config: help
245//config: uncompress is used to decompress archives created by compress. 245//config: uncompress is used to decompress archives created by compress.
246//config: Not much used anymore, replaced by gzip/gunzip. 246//config: Not much used anymore, replaced by gzip/gunzip.
247 247
248//applet:IF_UNCOMPRESS(APPLET(uncompress, BB_DIR_BIN, BB_SUID_DROP)) 248//applet:IF_UNCOMPRESS(APPLET(uncompress, BB_DIR_BIN, BB_SUID_DROP))
249//kbuild:lib-$(CONFIG_UNCOMPRESS) += bbunzip.o 249//kbuild:lib-$(CONFIG_UNCOMPRESS) += bbunzip.o
@@ -314,20 +314,20 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv)
314//usage: "Decompress to stdout" 314//usage: "Decompress to stdout"
315 315
316//config:config GUNZIP 316//config:config GUNZIP
317//config: bool "gunzip" 317//config: bool "gunzip (12 kb)"
318//config: default y 318//config: default y
319//config: select FEATURE_GZIP_DECOMPRESS 319//config: select FEATURE_GZIP_DECOMPRESS
320//config: help 320//config: help
321//config: gunzip is used to decompress archives created by gzip. 321//config: gunzip is used to decompress archives created by gzip.
322//config: You can use the `-t' option to test the integrity of 322//config: You can use the `-t' option to test the integrity of
323//config: an archive, without decompressing it. 323//config: an archive, without decompressing it.
324//config: 324//config:
325//config:config ZCAT 325//config:config ZCAT
326//config: bool "zcat" 326//config: bool "zcat (25 kb)"
327//config: default y 327//config: default y
328//config: select FEATURE_GZIP_DECOMPRESS 328//config: select FEATURE_GZIP_DECOMPRESS
329//config: help 329//config: help
330//config: Alias to "gunzip -c". 330//config: Alias to "gunzip -c".
331//config: 331//config:
332//config:config FEATURE_GUNZIP_LONG_OPTIONS 332//config:config FEATURE_GUNZIP_LONG_OPTIONS
333//config: bool "Enable long options" 333//config: bool "Enable long options"
@@ -400,7 +400,7 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv)
400 * Normally, "zcat" is just "gunzip -c". 400 * Normally, "zcat" is just "gunzip -c".
401 * But if seamless magic is enabled, then we are much more clever. 401 * But if seamless magic is enabled, then we are much more clever.
402 */ 402 */
403 if (ENABLE_ZCAT && applet_name[1] == 'c') 403 if (ENABLE_ZCAT && (!ENABLE_GUNZIP || applet_name[1] == 'c'))
404 option_mask32 |= OPT_STDOUT | SEAMLESS_MAGIC; 404 option_mask32 |= OPT_STDOUT | SEAMLESS_MAGIC;
405 405
406 return bbunpack(argv, unpack_gz_stream, make_new_name_gunzip, /*unused:*/ NULL); 406 return bbunpack(argv, unpack_gz_stream, make_new_name_gunzip, /*unused:*/ NULL);
@@ -427,25 +427,25 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv)
427//usage: "Decompress to stdout" 427//usage: "Decompress to stdout"
428 428
429//config:config BUNZIP2 429//config:config BUNZIP2
430//config: bool "bunzip2" 430//config: bool "bunzip2 (8.8 kb)"
431//config: default y 431//config: default y
432//config: select FEATURE_BZIP2_DECOMPRESS 432//config: select FEATURE_BZIP2_DECOMPRESS
433//config: help 433//config: help
434//config: bunzip2 is a compression utility using the Burrows-Wheeler block 434//config: bunzip2 is a compression utility using the Burrows-Wheeler block
435//config: sorting text compression algorithm, and Huffman coding. Compression 435//config: sorting text compression algorithm, and Huffman coding. Compression
436//config: is generally considerably better than that achieved by more 436//config: is generally considerably better than that achieved by more
437//config: conventional LZ77/LZ78-based compressors, and approaches the 437//config: conventional LZ77/LZ78-based compressors, and approaches the
438//config: performance of the PPM family of statistical compressors. 438//config: performance of the PPM family of statistical compressors.
439//config: 439//config:
440//config: Unless you have a specific application which requires bunzip2, you 440//config: Unless you have a specific application which requires bunzip2, you
441//config: should probably say N here. 441//config: should probably say N here.
442//config: 442//config:
443//config:config BZCAT 443//config:config BZCAT
444//config: bool "bzcat" 444//config: bool "bzcat (8.8 kb)"
445//config: default y 445//config: default y
446//config: select FEATURE_BZIP2_DECOMPRESS 446//config: select FEATURE_BZIP2_DECOMPRESS
447//config: help 447//config: help
448//config: Alias to "bunzip2 -c". 448//config: Alias to "bunzip2 -c".
449 449
450//applet:IF_BUNZIP2(APPLET(bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP)) 450//applet:IF_BUNZIP2(APPLET(bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP))
451// APPLET_ODDNAME:name main location suid_type help 451// APPLET_ODDNAME:name main location suid_type help
@@ -456,7 +456,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
456{ 456{
457 getopt32(argv, "cfkvqdt"); 457 getopt32(argv, "cfkvqdt");
458 argv += optind; 458 argv += optind;
459 if (ENABLE_BZCAT && applet_name[2] == 'c') /* bzcat */ 459 if (ENABLE_BZCAT && (!ENABLE_BUNZIP2 || applet_name[2] == 'c')) /* bzcat */
460 option_mask32 |= OPT_STDOUT; 460 option_mask32 |= OPT_STDOUT;
461 461
462 return bbunpack(argv, unpack_bz2_stream, make_new_name_generic, "bz2"); 462 return bbunpack(argv, unpack_bz2_stream, make_new_name_generic, "bz2");
@@ -495,43 +495,26 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
495//usage: "Decompress to stdout" 495//usage: "Decompress to stdout"
496 496
497//config:config UNLZMA 497//config:config UNLZMA
498//config: bool "unlzma" 498//config: bool "unlzma (8.6 kb)"
499//config: default y 499//config: default y
500//config: help 500//config: help
501//config: unlzma is a compression utility using the Lempel-Ziv-Markov chain 501//config: unlzma is a compression utility using the Lempel-Ziv-Markov chain
502//config: compression algorithm, and range coding. Compression 502//config: compression algorithm, and range coding. Compression
503//config: is generally considerably better than that achieved by the bzip2 503//config: is generally considerably better than that achieved by the bzip2
504//config: compressors. 504//config: compressors.
505//config:
506//config: The BusyBox unlzma applet is limited to decompression only.
507//config: On an x86 system, this applet adds about 4K.
508//config: 505//config:
509//config:config LZCAT 506//config:config LZCAT
510//config: bool "lzcat" 507//config: bool "lzcat (8.5 kb)"
511//config: default y 508//config: default y
512//config: help 509//config: help
513//config: unlzma is a compression utility using the Lempel-Ziv-Markov chain 510//config: Alias to "unlzma -c".
514//config: compression algorithm, and range coding. Compression
515//config: is generally considerably better than that achieved by the bzip2
516//config: compressors.
517//config:
518//config: The BusyBox unlzma applet is limited to decompression only.
519//config: On an x86 system, this applet adds about 4K.
520//config: 511//config:
521//config:config LZMA 512//config:config LZMA
522//config: bool "lzma -d" 513//config: bool "lzma -d"
523//config: default y 514//config: default y
524//config: help 515//config: help
525//config: Enable this option if you want commands like "lzma -d" to work. 516//config: Enable this option if you want commands like "lzma -d" to work.
526//config: IOW: you'll get lzma applet, but it will always require -d option. 517//config: IOW: you'll get lzma applet, but it will always require -d option.
527//config:
528//config:config FEATURE_LZMA_FAST
529//config: bool "Optimize for speed"
530//config: default n
531//config: depends on UNLZMA || LZCAT || LZMA
532//config: help
533//config: This option reduces decompression time by about 25% at the cost of
534//config: a 1K bigger binary.
535 518
536//applet:IF_UNLZMA(APPLET(unlzma, BB_DIR_USR_BIN, BB_SUID_DROP)) 519//applet:IF_UNLZMA(APPLET(unlzma, BB_DIR_USR_BIN, BB_SUID_DROP))
537// APPLET_ODDNAME:name main location suid_type help 520// APPLET_ODDNAME:name main location suid_type help
@@ -583,23 +566,23 @@ int unlzma_main(int argc UNUSED_PARAM, char **argv)
583//usage: "Decompress to stdout" 566//usage: "Decompress to stdout"
584 567
585//config:config UNXZ 568//config:config UNXZ
586//config: bool "unxz" 569//config: bool "unxz (13 kb)"
587//config: default y 570//config: default y
588//config: help 571//config: help
589//config: unxz is a unlzma successor. 572//config: unxz is a unlzma successor.
590//config: 573//config:
591//config:config XZCAT 574//config:config XZCAT
592//config: bool "xzcat" 575//config: bool "xzcat (13 kb)"
593//config: default y 576//config: default y
594//config: help 577//config: help
595//config: Alias to "unxz -c". 578//config: Alias to "unxz -c".
596//config: 579//config:
597//config:config XZ 580//config:config XZ
598//config: bool "xz -d" 581//config: bool "xz -d"
599//config: default y 582//config: default y
600//config: help 583//config: help
601//config: Enable this option if you want commands like "xz -d" to work. 584//config: Enable this option if you want commands like "xz -d" to work.
602//config: IOW: you'll get xz applet, but it will always require -d option. 585//config: IOW: you'll get xz applet, but it will always require -d option.
603 586
604//applet:IF_UNXZ(APPLET(unxz, BB_DIR_USR_BIN, BB_SUID_DROP)) 587//applet:IF_UNXZ(APPLET(unxz, BB_DIR_USR_BIN, BB_SUID_DROP))
605// APPLET_ODDNAME:name main location suid_type help 588// APPLET_ODDNAME:name main location suid_type help
diff --git a/archival/bzip2.c b/archival/bzip2.c
index 8afa43802..0b9c508df 100644
--- a/archival/bzip2.c
+++ b/archival/bzip2.c
@@ -8,26 +8,26 @@
8 */ 8 */
9 9
10//config:config BZIP2 10//config:config BZIP2
11//config: bool "bzip2" 11//config: bool "bzip2 (18 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: bzip2 is a compression utility using the Burrows-Wheeler block 14//config: bzip2 is a compression utility using the Burrows-Wheeler block
15//config: sorting text compression algorithm, and Huffman coding. Compression 15//config: sorting text compression algorithm, and Huffman coding. Compression
16//config: is generally considerably better than that achieved by more 16//config: is generally considerably better than that achieved by more
17//config: conventional LZ77/LZ78-based compressors, and approaches the 17//config: conventional LZ77/LZ78-based compressors, and approaches the
18//config: performance of the PPM family of statistical compressors. 18//config: performance of the PPM family of statistical compressors.
19//config: 19//config:
20//config: Unless you have a specific application which requires bzip2, you 20//config: Unless you have a specific application which requires bzip2, you
21//config: should probably say N here. 21//config: should probably say N here.
22//config: 22//config:
23//config:config FEATURE_BZIP2_DECOMPRESS 23//config:config FEATURE_BZIP2_DECOMPRESS
24//config: bool "Enable decompression" 24//config: bool "Enable decompression"
25//config: default y 25//config: default y
26//config: depends on BZIP2 || BUNZIP2 || BZCAT 26//config: depends on BZIP2 || BUNZIP2 || BZCAT
27//config: help 27//config: help
28//config: Enable -d (--decompress) and -t (--test) options for bzip2. 28//config: Enable -d (--decompress) and -t (--test) options for bzip2.
29//config: This will be automatically selected if bunzip2 or bzcat is 29//config: This will be automatically selected if bunzip2 or bzcat is
30//config: enabled. 30//config: enabled.
31 31
32//applet:IF_BZIP2(APPLET(bzip2, BB_DIR_USR_BIN, BB_SUID_DROP)) 32//applet:IF_BZIP2(APPLET(bzip2, BB_DIR_USR_BIN, BB_SUID_DROP))
33//kbuild:lib-$(CONFIG_BZIP2) += bzip2.o 33//kbuild:lib-$(CONFIG_BZIP2) += bzip2.o
diff --git a/archival/cpio.c b/archival/cpio.c
index 683f0bb1f..38bab8257 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -15,33 +15,33 @@
15#include "bb_archive.h" 15#include "bb_archive.h"
16 16
17//config:config CPIO 17//config:config CPIO
18//config: bool "cpio" 18//config: bool "cpio (14 kb)"
19//config: default y 19//config: default y
20//config: help 20//config: help
21//config: cpio is an archival utility program used to create, modify, and 21//config: cpio is an archival utility program used to create, modify, and
22//config: extract contents from archives. 22//config: extract contents from archives.
23//config: cpio has 110 bytes of overheads for every stored file. 23//config: cpio has 110 bytes of overheads for every stored file.
24//config: 24//config:
25//config: This implementation of cpio can extract cpio archives created in the 25//config: This implementation of cpio can extract cpio archives created in the
26//config: "newc" or "crc" format. 26//config: "newc" or "crc" format.
27//config: 27//config:
28//config: Unless you have a specific application which requires cpio, you 28//config: Unless you have a specific application which requires cpio, you
29//config: should probably say N here. 29//config: should probably say N here.
30//config: 30//config:
31//config:config FEATURE_CPIO_O 31//config:config FEATURE_CPIO_O
32//config: bool "Support archive creation" 32//config: bool "Support archive creation"
33//config: default y 33//config: default y
34//config: depends on CPIO 34//config: depends on CPIO
35//config: help 35//config: help
36//config: This implementation of cpio can create cpio archives in the "newc" 36//config: This implementation of cpio can create cpio archives in the "newc"
37//config: format only. 37//config: format only.
38//config: 38//config:
39//config:config FEATURE_CPIO_P 39//config:config FEATURE_CPIO_P
40//config: bool "Support passthrough mode" 40//config: bool "Support passthrough mode"
41//config: default y 41//config: default y
42//config: depends on FEATURE_CPIO_O 42//config: depends on FEATURE_CPIO_O
43//config: help 43//config: help
44//config: Passthrough mode. Rarely used. 44//config: Passthrough mode. Rarely used.
45 45
46//applet:IF_CPIO(APPLET(cpio, BB_DIR_BIN, BB_SUID_DROP)) 46//applet:IF_CPIO(APPLET(cpio, BB_DIR_BIN, BB_SUID_DROP))
47//kbuild:lib-$(CONFIG_CPIO) += cpio.o 47//kbuild:lib-$(CONFIG_CPIO) += cpio.o
diff --git a/archival/dpkg.c b/archival/dpkg.c
index da3b0864e..90ad8766c 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -27,15 +27,15 @@
27 */ 27 */
28 28
29//config:config DPKG 29//config:config DPKG
30//config: bool "dpkg" 30//config: bool "dpkg (44 kb)"
31//config: default y 31//config: default y
32//config: select FEATURE_SEAMLESS_GZ 32//config: select FEATURE_SEAMLESS_GZ
33//config: help 33//config: help
34//config: dpkg is a medium-level tool to install, build, remove and manage 34//config: dpkg is a medium-level tool to install, build, remove and manage
35//config: Debian packages. 35//config: Debian packages.
36//config: 36//config:
37//config: This implementation of dpkg has a number of limitations, 37//config: This implementation of dpkg has a number of limitations,
38//config: you should use the official dpkg if possible. 38//config: you should use the official dpkg if possible.
39 39
40//applet:IF_DPKG(APPLET(dpkg, BB_DIR_USR_BIN, BB_SUID_DROP)) 40//applet:IF_DPKG(APPLET(dpkg, BB_DIR_USR_BIN, BB_SUID_DROP))
41//kbuild:lib-$(CONFIG_DPKG) += dpkg.o 41//kbuild:lib-$(CONFIG_DPKG) += dpkg.o
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index ebbc7f035..029bc4af1 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -10,12 +10,12 @@
10//config: default y 10//config: default y
11//config: select FEATURE_SEAMLESS_GZ 11//config: select FEATURE_SEAMLESS_GZ
12//config: help 12//config: help
13//config: dpkg-deb unpacks and provides information about Debian archives. 13//config: dpkg-deb unpacks and provides information about Debian archives.
14//config: 14//config:
15//config: This implementation of dpkg-deb cannot pack archives. 15//config: This implementation of dpkg-deb cannot pack archives.
16//config: 16//config:
17//config: Unless you have a specific application which requires dpkg-deb, 17//config: Unless you have a specific application which requires dpkg-deb,
18//config: say N here. 18//config: say N here.
19 19
20//applet:IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, BB_DIR_USR_BIN, BB_SUID_DROP, dpkg_deb)) 20//applet:IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, BB_DIR_USR_BIN, BB_SUID_DROP, dpkg_deb))
21 21
diff --git a/archival/gzip.c b/archival/gzip.c
index c895de426..4cf34ac28 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -38,11 +38,11 @@ aa: 85.1% -- replaced with aa.gz
38*/ 38*/
39 39
40//config:config GZIP 40//config:config GZIP
41//config: bool "gzip" 41//config: bool "gzip (19 kb)"
42//config: default y 42//config: default y
43//config: help 43//config: help
44//config: gzip is used to compress files. 44//config: gzip is used to compress files.
45//config: It's probably the most widely used UNIX compression program. 45//config: It's probably the most widely used UNIX compression program.
46//config: 46//config:
47//config:config FEATURE_GZIP_LONG_OPTIONS 47//config:config FEATURE_GZIP_LONG_OPTIONS
48//config: bool "Enable long options" 48//config: bool "Enable long options"
@@ -55,30 +55,30 @@ aa: 85.1% -- replaced with aa.gz
55//config: range 0 2 55//config: range 0 2
56//config: depends on GZIP 56//config: depends on GZIP
57//config: help 57//config: help
58//config: Enable big memory options for gzip. 58//config: Enable big memory options for gzip.
59//config: 0: small buffers, small hash-tables 59//config: 0: small buffers, small hash-tables
60//config: 1: larger buffers, larger hash-tables 60//config: 1: larger buffers, larger hash-tables
61//config: 2: larger buffers, largest hash-tables 61//config: 2: larger buffers, largest hash-tables
62//config: Larger models may give slightly better compression 62//config: Larger models may give slightly better compression
63//config: 63//config:
64//config:config FEATURE_GZIP_LEVELS 64//config:config FEATURE_GZIP_LEVELS
65//config: bool "Enable compression levels" 65//config: bool "Enable compression levels"
66//config: default n 66//config: default n
67//config: depends on GZIP 67//config: depends on GZIP
68//config: help 68//config: help
69//config: Enable support for compression levels 4-9. The default level 69//config: Enable support for compression levels 4-9. The default level
70//config: is 6. If levels 1-3 are specified, 4 is used. 70//config: is 6. If levels 1-3 are specified, 4 is used.
71//config: If this option is not selected, -N options are ignored and -9 71//config: If this option is not selected, -N options are ignored and -9
72//config: is used. 72//config: is used.
73//config: 73//config:
74//config:config FEATURE_GZIP_DECOMPRESS 74//config:config FEATURE_GZIP_DECOMPRESS
75//config: bool "Enable decompression" 75//config: bool "Enable decompression"
76//config: default y 76//config: default y
77//config: depends on GZIP || GUNZIP || ZCAT 77//config: depends on GZIP || GUNZIP || ZCAT
78//config: help 78//config: help
79//config: Enable -d (--decompress) and -t (--test) options for gzip. 79//config: Enable -d (--decompress) and -t (--test) options for gzip.
80//config: This will be automatically selected if gunzip or zcat is 80//config: This will be automatically selected if gunzip or zcat is
81//config: enabled. 81//config: enabled.
82 82
83//applet:IF_GZIP(APPLET(gzip, BB_DIR_BIN, BB_SUID_DROP)) 83//applet:IF_GZIP(APPLET(gzip, BB_DIR_BIN, BB_SUID_DROP))
84//kbuild:lib-$(CONFIG_GZIP) += gzip.o 84//kbuild:lib-$(CONFIG_GZIP) += gzip.o
diff --git a/archival/lzop.c b/archival/lzop.c
index 6ef82b749..df18ff170 100644
--- a/archival/lzop.c
+++ b/archival/lzop.c
@@ -26,31 +26,31 @@
26*/ 26*/
27 27
28//config:config LZOP 28//config:config LZOP
29//config: bool "lzop" 29//config: bool "lzop (13 kb)"
30//config: default y 30//config: default y
31//config: help 31//config: help
32//config: Lzop compression/decompresion. 32//config: Lzop compression/decompresion.
33//config: 33//config:
34//config:config UNLZOP 34//config:config UNLZOP
35//config: bool "unlzop" 35//config: bool "unlzop (13 kb)"
36//config: default n # INCOMPAT: upstream lzop does not provide such tool 36//config: default n # INCOMPAT: upstream lzop does not provide such tool
37//config: help 37//config: help
38//config: Lzop decompresion. 38//config: Lzop decompresion.
39//config: 39//config:
40//config:config LZOPCAT 40//config:config LZOPCAT
41//config: bool "lzopcat" 41//config: bool "lzopcat (13 kb)"
42//config: default n # INCOMPAT: upstream lzop does not provide such tool 42//config: default n # INCOMPAT: upstream lzop does not provide such tool
43//config: help 43//config: help
44//config: Alias to "unlzop -c". 44//config: Alias to "lzop -dc".
45//config: 45//config:
46//config:config LZOP_COMPR_HIGH 46//config:config LZOP_COMPR_HIGH
47//config: bool "lzop compression levels 7,8,9 (not very useful)" 47//config: bool "lzop compression levels 7,8,9 (not very useful)"
48//config: default n 48//config: default n
49//config: depends on LZOP || UNLZOP || LZOPCAT 49//config: depends on LZOP || UNLZOP || LZOPCAT
50//config: help 50//config: help
51//config: High levels (7,8,9) of lzop compression. These levels 51//config: High levels (7,8,9) of lzop compression. These levels
52//config: are actually slower than gzip at equivalent compression ratios 52//config: are actually slower than gzip at equivalent compression ratios
53//config: and take up 3.2K of code. 53//config: and take up 3.2K of code.
54 54
55//applet:IF_LZOP(APPLET(lzop, BB_DIR_BIN, BB_SUID_DROP)) 55//applet:IF_LZOP(APPLET(lzop, BB_DIR_BIN, BB_SUID_DROP))
56// APPLET_ODDNAME:name main location suid_type help 56// APPLET_ODDNAME:name main location suid_type help
diff --git a/archival/rpm.c b/archival/rpm.c
index 83160f975..98039d499 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -8,10 +8,10 @@
8 */ 8 */
9 9
10//config:config RPM 10//config:config RPM
11//config: bool "rpm" 11//config: bool "rpm (33 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Mini RPM applet - queries and extracts RPM packages. 14//config: Mini RPM applet - queries and extracts RPM packages.
15 15
16//applet:IF_RPM(APPLET(rpm, BB_DIR_BIN, BB_SUID_DROP)) 16//applet:IF_RPM(APPLET(rpm, BB_DIR_BIN, BB_SUID_DROP))
17//kbuild:lib-$(CONFIG_RPM) += rpm.o 17//kbuild:lib-$(CONFIG_RPM) += rpm.o
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c
index 7057570f5..3e4a6a249 100644
--- a/archival/rpm2cpio.c
+++ b/archival/rpm2cpio.c
@@ -8,10 +8,10 @@
8 */ 8 */
9 9
10//config:config RPM2CPIO 10//config:config RPM2CPIO
11//config: bool "rpm2cpio" 11//config: bool "rpm2cpio (20 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Converts a RPM file into a CPIO archive. 14//config: Converts a RPM file into a CPIO archive.
15 15
16//applet:IF_RPM2CPIO(APPLET(rpm2cpio, BB_DIR_USR_BIN, BB_SUID_DROP)) 16//applet:IF_RPM2CPIO(APPLET(rpm2cpio, BB_DIR_USR_BIN, BB_SUID_DROP))
17//kbuild:lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o 17//kbuild:lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
diff --git a/archival/tar.c b/archival/tar.c
index c11b735d5..4d1db4934 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -42,12 +42,12 @@
42 */ 42 */
43 43
44//config:config TAR 44//config:config TAR
45//config: bool "tar" 45//config: bool "tar (40 kb)"
46//config: default y 46//config: default y
47//config: help 47//config: help
48//config: tar is an archiving program. It's commonly used with gzip to 48//config: tar is an archiving program. It's commonly used with gzip to
49//config: create compressed archives. It's probably the most widely used 49//config: create compressed archives. It's probably the most widely used
50//config: UNIX archive program. 50//config: UNIX archive program.
51//config: 51//config:
52//config:config FEATURE_TAR_LONG_OPTIONS 52//config:config FEATURE_TAR_LONG_OPTIONS
53//config: bool "Enable long options" 53//config: bool "Enable long options"
@@ -64,35 +64,35 @@
64//config: default y 64//config: default y
65//config: depends on TAR && (FEATURE_SEAMLESS_Z || FEATURE_SEAMLESS_GZ || FEATURE_SEAMLESS_BZ2 || FEATURE_SEAMLESS_LZMA || FEATURE_SEAMLESS_XZ) 65//config: depends on TAR && (FEATURE_SEAMLESS_Z || FEATURE_SEAMLESS_GZ || FEATURE_SEAMLESS_BZ2 || FEATURE_SEAMLESS_LZMA || FEATURE_SEAMLESS_XZ)
66//config: help 66//config: help
67//config: With this option tar can automatically detect compressed 67//config: With this option tar can automatically detect compressed
68//config: tarballs. Currently it works only on files (not pipes etc). 68//config: tarballs. Currently it works only on files (not pipes etc).
69//config: 69//config:
70//config:config FEATURE_TAR_FROM 70//config:config FEATURE_TAR_FROM
71//config: bool "Enable -X (exclude from) and -T (include from) options)" 71//config: bool "Enable -X (exclude from) and -T (include from) options)"
72//config: default y 72//config: default y
73//config: depends on TAR 73//config: depends on TAR
74//config: help 74//config: help
75//config: If you enable this option you'll be able to specify 75//config: If you enable this option you'll be able to specify
76//config: a list of files to include or exclude from an archive. 76//config: a list of files to include or exclude from an archive.
77//config: 77//config:
78//config:config FEATURE_TAR_OLDGNU_COMPATIBILITY 78//config:config FEATURE_TAR_OLDGNU_COMPATIBILITY
79//config: bool "Support old tar header format" 79//config: bool "Support old tar header format"
80//config: default y 80//config: default y
81//config: depends on TAR || DPKG 81//config: depends on TAR || DPKG
82//config: help 82//config: help
83//config: This option is required to unpack archives created in 83//config: This option is required to unpack archives created in
84//config: the old GNU format; help to kill this old format by 84//config: the old GNU format; help to kill this old format by
85//config: repacking your ancient archives with the new format. 85//config: repacking your ancient archives with the new format.
86//config: 86//config:
87//config:config FEATURE_TAR_OLDSUN_COMPATIBILITY 87//config:config FEATURE_TAR_OLDSUN_COMPATIBILITY
88//config: bool "Enable untarring of tarballs with checksums produced by buggy Sun tar" 88//config: bool "Enable untarring of tarballs with checksums produced by buggy Sun tar"
89//config: default y 89//config: default y
90//config: depends on TAR || DPKG 90//config: depends on TAR || DPKG
91//config: help 91//config: help
92//config: This option is required to unpack archives created by some old 92//config: This option is required to unpack archives created by some old
93//config: version of Sun's tar (it was calculating checksum using signed 93//config: version of Sun's tar (it was calculating checksum using signed
94//config: arithmetic). It is said to be fixed in newer Sun tar, but "old" 94//config: arithmetic). It is said to be fixed in newer Sun tar, but "old"
95//config: tarballs still exist. 95//config: tarballs still exist.
96//config: 96//config:
97//config:config FEATURE_TAR_GNU_EXTENSIONS 97//config:config FEATURE_TAR_GNU_EXTENSIONS
98//config: bool "Support GNU tar extensions (long filenames)" 98//config: bool "Support GNU tar extensions (long filenames)"
@@ -104,18 +104,18 @@
104//config: default y 104//config: default y
105//config: depends on TAR && FEATURE_TAR_LONG_OPTIONS 105//config: depends on TAR && FEATURE_TAR_LONG_OPTIONS
106//config: help 106//config: help
107//config: If you enable this option you'll be able to instruct tar to send 107//config: If you enable this option you'll be able to instruct tar to send
108//config: the contents of each extracted file to the standard input of an 108//config: the contents of each extracted file to the standard input of an
109//config: external program. 109//config: external program.
110//config: 110//config:
111//config:config FEATURE_TAR_UNAME_GNAME 111//config:config FEATURE_TAR_UNAME_GNAME
112//config: bool "Enable use of user and group names" 112//config: bool "Enable use of user and group names"
113//config: default y 113//config: default y
114//config: depends on TAR 114//config: depends on TAR
115//config: help 115//config: help
116//config: Enable use of user and group names in tar. This affects contents 116//config: Enable use of user and group names in tar. This affects contents
117//config: listings (-t) and preserving permissions when unpacking (-p). 117//config: listings (-t) and preserving permissions when unpacking (-p).
118//config: +200 bytes. 118//config: +200 bytes.
119//config: 119//config:
120//config:config FEATURE_TAR_NOPRESERVE_TIME 120//config:config FEATURE_TAR_NOPRESERVE_TIME
121//config: bool "Enable -m (do not preserve time) GNU option" 121//config: bool "Enable -m (do not preserve time) GNU option"
@@ -127,8 +127,8 @@
127//config: default n 127//config: default n
128//config: depends on TAR && SELINUX 128//config: depends on TAR && SELINUX
129//config: help 129//config: help
130//config: With this option busybox supports restoring SELinux labels 130//config: With this option busybox supports restoring SELinux labels
131//config: when extracting files from tar archives. 131//config: when extracting files from tar archives.
132 132
133//applet:IF_TAR(APPLET(tar, BB_DIR_BIN, BB_SUID_DROP)) 133//applet:IF_TAR(APPLET(tar, BB_DIR_BIN, BB_SUID_DROP))
134//kbuild:lib-$(CONFIG_TAR) += tar.o 134//kbuild:lib-$(CONFIG_TAR) += tar.o
diff --git a/archival/unzip.c b/archival/unzip.c
index 8dfc4e678..4c4feda82 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -17,23 +17,23 @@
17 * Zip64 + other methods 17 * Zip64 + other methods
18 */ 18 */
19//config:config UNZIP 19//config:config UNZIP
20//config: bool "unzip" 20//config: bool "unzip (24 kb)"
21//config: default y 21//config: default y
22//config: help 22//config: help
23//config: unzip will list or extract files from a ZIP archive, 23//config: unzip will list or extract files from a ZIP archive,
24//config: commonly found on DOS/WIN systems. The default behavior 24//config: commonly found on DOS/WIN systems. The default behavior
25//config: (with no options) is to extract the archive into the 25//config: (with no options) is to extract the archive into the
26//config: current directory. 26//config: current directory.
27//config: 27//config:
28//config:config FEATURE_UNZIP_CDF 28//config:config FEATURE_UNZIP_CDF
29//config: bool "Read and use Central Directory data" 29//config: bool "Read and use Central Directory data"
30//config: default y 30//config: default y
31//config: depends on UNZIP 31//config: depends on UNZIP
32//config: help 32//config: help
33//config: If you know that you only need to deal with simple 33//config: If you know that you only need to deal with simple
34//config: ZIP files without deleted/updated files, SFX archives etc, 34//config: ZIP files without deleted/updated files, SFX archives etc,
35//config: you can reduce code size by unselecting this option. 35//config: you can reduce code size by unselecting this option.
36//config: To support less trivial ZIPs, say Y. 36//config: To support less trivial ZIPs, say Y.
37//config: 37//config:
38//config:config FEATURE_UNZIP_BZIP2 38//config:config FEATURE_UNZIP_BZIP2
39//config: bool "Support compression method 12 (bzip2)" 39//config: bool "Support compression method 12 (bzip2)"
@@ -62,6 +62,7 @@
62//usage: "\n -l List contents (with -q for short form)" 62//usage: "\n -l List contents (with -q for short form)"
63//usage: "\n -n Never overwrite files (default: ask)" 63//usage: "\n -n Never overwrite files (default: ask)"
64//usage: "\n -o Overwrite" 64//usage: "\n -o Overwrite"
65//usage: "\n -j Do not restore paths"
65//usage: "\n -p Print to stdout" 66//usage: "\n -p Print to stdout"
66//usage: "\n -q Quiet" 67//usage: "\n -q Quiet"
67//usage: "\n -x FILE Exclude FILEs" 68//usage: "\n -x FILE Exclude FILEs"
@@ -320,6 +321,12 @@ static uint32_t read_next_cdf(uint32_t cdf_offset, cdf_header_t *cdf)
320}; 321};
321#endif 322#endif
322 323
324static void die_if_bad_fnamesize(unsigned sz)
325{
326 if (sz > 0xfff) /* more than 4k?! no funny business please */
327 bb_error_msg_and_die("bad archive");
328}
329
323static void unzip_skip(off_t skip) 330static void unzip_skip(off_t skip)
324{ 331{
325 if (skip != 0) 332 if (skip != 0)
@@ -337,6 +344,39 @@ static void unzip_create_leading_dirs(const char *fn)
337 free(name); 344 free(name);
338} 345}
339 346
347#if ENABLE_FEATURE_UNZIP_CDF
348static void unzip_extract_symlink(zip_header_t *zip, const char *dst_fn)
349{
350 char *target;
351
352 die_if_bad_fnamesize(zip->fmt.ucmpsize);
353
354 if (zip->fmt.method == 0) {
355 /* Method 0 - stored (not compressed) */
356 target = xzalloc(zip->fmt.ucmpsize + 1);
357 xread(zip_fd, target, zip->fmt.ucmpsize);
358 } else {
359#if 1
360 bb_error_msg_and_die("compressed symlink is not supported");
361#else
362 transformer_state_t xstate;
363 init_transformer_state(&xstate);
364 xstate.mem_output_size_max = zip->fmt.ucmpsize;
365 /* ...unpack... */
366 if (!xstate.mem_output_buf)
367 WTF();
368 target = xstate.mem_output_buf;
369 target = xrealloc(target, xstate.mem_output_size + 1);
370 target[xstate.mem_output_size] = '\0';
371#endif
372 }
373//TODO: libbb candidate
374 if (symlink(target, dst_fn))
375 bb_perror_msg_and_die("can't create symlink '%s'", dst_fn);
376 free(target);
377}
378#endif
379
340static void unzip_extract(zip_header_t *zip, int dst_fd) 380static void unzip_extract(zip_header_t *zip, int dst_fd)
341{ 381{
342 transformer_state_t xstate; 382 transformer_state_t xstate;
@@ -349,12 +389,6 @@ static void unzip_extract(zip_header_t *zip, int dst_fd)
349 return; 389 return;
350 } 390 }
351 391
352// NB: to support symlinks, need to extract symlink target. A-la:
353// xstate.mem_output_size_max = zip->fmt.ucmpsize;
354// ...unpack...
355// if (xstate.mem_output_buf) { success, xstate.mem_output_size is the size }
356// Although archives I've seen have fmt.method == 0 for symlinks.
357
358 init_transformer_state(&xstate); 392 init_transformer_state(&xstate);
359 xstate.bytes_in = zip->fmt.cmpsize; 393 xstate.bytes_in = zip->fmt.cmpsize;
360 xstate.src_fd = zip_fd; 394 xstate.src_fd = zip_fd;
@@ -414,16 +448,32 @@ static void my_fgets80(char *buf80)
414 } 448 }
415} 449}
416 450
451static int get_lstat_mode(const char *dst_fn)
452{
453 struct stat stat_buf;
454 if (lstat(dst_fn, &stat_buf) == -1) {
455 if (errno != ENOENT) {
456 bb_perror_msg_and_die("can't stat '%s'", dst_fn);
457 }
458 /* File does not exist */
459 return -1;
460 }
461 return stat_buf.st_mode;
462}
463
417int unzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 464int unzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
418int unzip_main(int argc, char **argv) 465int unzip_main(int argc, char **argv)
419{ 466{
420 enum { O_PROMPT, O_NEVER, O_ALWAYS }; 467 enum {
421 468 OPT_l = (1 << 0),
469 OPT_x = (1 << 1),
470 OPT_j = (1 << 2),
471 };
472 unsigned opts;
422 smallint quiet = 0; 473 smallint quiet = 0;
423 IF_NOT_FEATURE_UNZIP_CDF(const) smallint verbose = 0; 474 IF_NOT_FEATURE_UNZIP_CDF(const) smallint verbose = 0;
424 smallint listing = 0; 475 enum { O_PROMPT, O_NEVER, O_ALWAYS };
425 smallint overwrite = O_PROMPT; 476 smallint overwrite = O_PROMPT;
426 smallint x_opt_seen;
427 uint32_t cdf_offset; 477 uint32_t cdf_offset;
428 unsigned long total_usize; 478 unsigned long total_usize;
429 unsigned long total_size; 479 unsigned long total_size;
@@ -434,9 +484,8 @@ int unzip_main(int argc, char **argv)
434 llist_t *zaccept = NULL; 484 llist_t *zaccept = NULL;
435 llist_t *zreject = NULL; 485 llist_t *zreject = NULL;
436 char *base_dir = NULL; 486 char *base_dir = NULL;
437 int i, opt; 487 int i;
438 char key_buf[80]; /* must match size used by my_fgets80 */ 488 char key_buf[80]; /* must match size used by my_fgets80 */
439 struct stat stat_buf;
440 489
441/* -q, -l and -v: UnZip 5.52 of 28 February 2005, by Info-ZIP: 490/* -q, -l and -v: UnZip 5.52 of 28 February 2005, by Info-ZIP:
442 * 491 *
@@ -479,16 +528,16 @@ int unzip_main(int argc, char **argv)
479 * 204372 1 file 528 * 204372 1 file
480 */ 529 */
481 530
482 x_opt_seen = 0; 531 opts = 0;
483 /* '-' makes getopt return 1 for non-options */ 532 /* '-' makes getopt return 1 for non-options */
484 while ((opt = getopt(argc, argv, "-d:lnopqxv")) != -1) { 533 while ((i = getopt(argc, argv, "-d:lnopqxjv")) != -1) {
485 switch (opt) { 534 switch (i) {
486 case 'd': /* Extract to base directory */ 535 case 'd': /* Extract to base directory */
487 base_dir = optarg; 536 base_dir = optarg;
488 break; 537 break;
489 538
490 case 'l': /* List */ 539 case 'l': /* List */
491 listing = 1; 540 opts |= OPT_l;
492 break; 541 break;
493 542
494 case 'n': /* Never overwrite existing files */ 543 case 'n': /* Never overwrite existing files */
@@ -508,11 +557,15 @@ int unzip_main(int argc, char **argv)
508 557
509 case 'v': /* Verbose list */ 558 case 'v': /* Verbose list */
510 IF_FEATURE_UNZIP_CDF(verbose++;) 559 IF_FEATURE_UNZIP_CDF(verbose++;)
511 listing = 1; 560 opts |= OPT_l;
512 break; 561 break;
513 562
514 case 'x': 563 case 'x':
515 x_opt_seen = 1; 564 opts |= OPT_x;
565 break;
566
567 case 'j':
568 opts |= OPT_j;
516 break; 569 break;
517 570
518 case 1: 571 case 1:
@@ -521,7 +574,7 @@ int unzip_main(int argc, char **argv)
521 /* +5: space for ".zip" and NUL */ 574 /* +5: space for ".zip" and NUL */
522 src_fn = xmalloc(strlen(optarg) + 5); 575 src_fn = xmalloc(strlen(optarg) + 5);
523 strcpy(src_fn, optarg); 576 strcpy(src_fn, optarg);
524 } else if (!x_opt_seen) { 577 } else if (!(opts & OPT_x)) {
525 /* Include files */ 578 /* Include files */
526 llist_add_to(&zaccept, optarg); 579 llist_add_to(&zaccept, optarg);
527 } else { 580 } else {
@@ -589,7 +642,7 @@ int unzip_main(int argc, char **argv)
589 if (quiet <= 1) { /* not -qq */ 642 if (quiet <= 1) { /* not -qq */
590 if (quiet == 0) 643 if (quiet == 0)
591 printf("Archive: %s\n", src_fn); 644 printf("Archive: %s\n", src_fn);
592 if (listing) { 645 if (opts & OPT_l) {
593 puts(verbose ? 646 puts(verbose ?
594 " Length Method Size Cmpr Date Time CRC-32 Name\n" 647 " Length Method Size Cmpr Date Time CRC-32 Name\n"
595 "-------- ------ ------- ---- ---------- ----- -------- ----" 648 "-------- ------ ------- ---- ---------- ----- -------- ----"
@@ -722,7 +775,6 @@ int unzip_main(int argc, char **argv)
722 if ((cdf.fmt.version_made_by >> 8) == 3) { 775 if ((cdf.fmt.version_made_by >> 8) == 3) {
723 /* This archive is created on Unix */ 776 /* This archive is created on Unix */
724 dir_mode = file_mode = (cdf.fmt.external_attributes >> 16); 777 dir_mode = file_mode = (cdf.fmt.external_attributes >> 16);
725//TODO: if (S_ISLNK(file_mode)) this is a symlink
726 } 778 }
727 } 779 }
728#endif 780#endif
@@ -740,15 +792,22 @@ int unzip_main(int argc, char **argv)
740 792
741 /* Read filename */ 793 /* Read filename */
742 free(dst_fn); 794 free(dst_fn);
795 die_if_bad_fnamesize(zip.fmt.filename_len);
743 dst_fn = xzalloc(zip.fmt.filename_len + 1); 796 dst_fn = xzalloc(zip.fmt.filename_len + 1);
744 xread(zip_fd, dst_fn, zip.fmt.filename_len); 797 xread(zip_fd, dst_fn, zip.fmt.filename_len);
745
746 /* Skip extra header bytes */ 798 /* Skip extra header bytes */
747 unzip_skip(zip.fmt.extra_len); 799 unzip_skip(zip.fmt.extra_len);
748 800
749 /* Guard against "/abspath", "/../" and similar attacks */ 801 /* Guard against "/abspath", "/../" and similar attacks */
750 overlapping_strcpy(dst_fn, strip_unsafe_prefix(dst_fn)); 802 overlapping_strcpy(dst_fn, strip_unsafe_prefix(dst_fn));
751 803
804 if (opts & OPT_j) /* Strip paths? */
805 overlapping_strcpy(dst_fn, bb_basename(dst_fn));
806
807 /* Did this strip everything ("DIR/" case)? Then skip */
808 if (!dst_fn[0])
809 goto skip_cmpsize;
810
752 /* Filter zip entries */ 811 /* Filter zip entries */
753 if (find_list_entry(zreject, dst_fn) 812 if (find_list_entry(zreject, dst_fn)
754 || (zaccept && !find_list_entry(zaccept, dst_fn)) 813 || (zaccept && !find_list_entry(zaccept, dst_fn))
@@ -756,7 +815,7 @@ int unzip_main(int argc, char **argv)
756 goto skip_cmpsize; 815 goto skip_cmpsize;
757 } 816 }
758 817
759 if (listing) { 818 if (opts & OPT_l) {
760 /* List entry */ 819 /* List entry */
761 char dtbuf[sizeof("mm-dd-yyyy hh:mm")]; 820 char dtbuf[sizeof("mm-dd-yyyy hh:mm")];
762 sprintf(dtbuf, "%02u-%02u-%04u %02u:%02u", 821 sprintf(dtbuf, "%02u-%02u-%04u %02u:%02u",
@@ -814,11 +873,11 @@ int unzip_main(int argc, char **argv)
814 goto do_extract; 873 goto do_extract;
815 } 874 }
816 if (last_char_is(dst_fn, '/')) { 875 if (last_char_is(dst_fn, '/')) {
876 int mode;
877
817 /* Extract directory */ 878 /* Extract directory */
818 if (stat(dst_fn, &stat_buf) == -1) { 879 mode = get_lstat_mode(dst_fn);
819 if (errno != ENOENT) { 880 if (mode == -1) { /* ENOENT */
820 bb_perror_msg_and_die("can't stat '%s'", dst_fn);
821 }
822 if (!quiet) { 881 if (!quiet) {
823 printf(" creating: %s\n", dst_fn); 882 printf(" creating: %s\n", dst_fn);
824 } 883 }
@@ -827,7 +886,7 @@ int unzip_main(int argc, char **argv)
827 xfunc_die(); 886 xfunc_die();
828 } 887 }
829 } else { 888 } else {
830 if (!S_ISDIR(stat_buf.st_mode)) { 889 if (!S_ISDIR(mode)) {
831 bb_error_msg_and_die("'%s' exists but is not a %s", 890 bb_error_msg_and_die("'%s' exists but is not a %s",
832 dst_fn, "directory"); 891 dst_fn, "directory");
833 } 892 }
@@ -835,29 +894,33 @@ int unzip_main(int argc, char **argv)
835 goto skip_cmpsize; 894 goto skip_cmpsize;
836 } 895 }
837 check_file: 896 check_file:
838 /* Extract file */ 897 /* Does target file already exist? */
839 if (stat(dst_fn, &stat_buf) == -1) { 898 {
840 /* File does not exist */ 899 int mode = get_lstat_mode(dst_fn);
841 if (errno != ENOENT) { 900 if (mode == -1) {
842 bb_perror_msg_and_die("can't stat '%s'", dst_fn); 901 /* ENOENT: does not exist */
902 goto do_open_and_extract;
843 } 903 }
844 goto do_open_and_extract; 904 if (overwrite == O_NEVER) {
845 } 905 goto skip_cmpsize;
846 /* File already exists */ 906 }
847 if (overwrite == O_NEVER) { 907 if (!S_ISREG(mode)) {
848 goto skip_cmpsize; 908 fishy:
849 } 909 bb_error_msg_and_die("'%s' exists but is not a %s",
850 if (!S_ISREG(stat_buf.st_mode)) { 910 dst_fn, "regular file");
851 /* File is not regular file */ 911 }
852 bb_error_msg_and_die("'%s' exists but is not a %s", 912 if (overwrite == O_ALWAYS) {
853 dst_fn, "regular file"); 913 goto do_open_and_extract;
914 }
915 printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn);
916 my_fgets80(key_buf);
917 /* User input could take a long time. Is it still a regular file? */
918 mode = get_lstat_mode(dst_fn);
919 if (!S_ISREG(mode))
920 goto fishy;
854 } 921 }
855 /* File is regular file */
856 if (overwrite == O_ALWAYS)
857 goto do_open_and_extract;
858 printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn);
859 my_fgets80(key_buf);
860 922
923 /* Extract (or skip) it */
861 switch (key_buf[0]) { 924 switch (key_buf[0]) {
862 case 'A': 925 case 'A':
863 overwrite = O_ALWAYS; 926 overwrite = O_ALWAYS;
@@ -865,9 +928,15 @@ int unzip_main(int argc, char **argv)
865 do_open_and_extract: 928 do_open_and_extract:
866 unzip_create_leading_dirs(dst_fn); 929 unzip_create_leading_dirs(dst_fn);
867#if ENABLE_FEATURE_UNZIP_CDF 930#if ENABLE_FEATURE_UNZIP_CDF
868 dst_fd = xopen3(dst_fn, O_WRONLY | O_CREAT | O_TRUNC, file_mode); 931 dst_fd = -1;
932 if (!S_ISLNK(file_mode)) {
933 dst_fd = xopen3(dst_fn,
934 O_WRONLY | O_CREAT | O_TRUNC | O_NOFOLLOW,
935 file_mode);
936 }
869#else 937#else
870 dst_fd = xopen(dst_fn, O_WRONLY | O_CREAT | O_TRUNC); 938 /* O_NOFOLLOW defends against symlink attacks */
939 dst_fd = xopen(dst_fn, O_WRONLY | O_CREAT | O_TRUNC | O_NOFOLLOW);
871#endif 940#endif
872 do_extract: 941 do_extract:
873 if (!quiet) { 942 if (!quiet) {
@@ -875,10 +944,18 @@ int unzip_main(int argc, char **argv)
875 ? " extracting: %s\n" 944 ? " extracting: %s\n"
876 : */ " inflating: %s\n", dst_fn); 945 : */ " inflating: %s\n", dst_fn);
877 } 946 }
878 unzip_extract(&zip, dst_fd); 947#if ENABLE_FEATURE_UNZIP_CDF
879 if (dst_fd != STDOUT_FILENO) { 948 if (S_ISLNK(file_mode)) {
880 /* closing STDOUT is potentially bad for future business */ 949 if (dst_fd != STDOUT_FILENO) /* not -p? */
881 close(dst_fd); 950 unzip_extract_symlink(&zip, dst_fn);
951 } else
952#endif
953 {
954 unzip_extract(&zip, dst_fd);
955 if (dst_fd != STDOUT_FILENO) {
956 /* closing STDOUT is potentially bad for future business */
957 close(dst_fd);
958 }
882 } 959 }
883 break; 960 break;
884 961
@@ -906,7 +983,7 @@ int unzip_main(int argc, char **argv)
906 total_entries++; 983 total_entries++;
907 } 984 }
908 985
909 if (listing && quiet <= 1) { 986 if ((opts & OPT_l) && quiet <= 1) {
910 if (!verbose) { 987 if (!verbose) {
911 // " Length Date Time Name\n" 988 // " Length Date Time Name\n"
912 // "--------- ---------- ----- ----" 989 // "--------- ---------- ----- ----"
diff --git a/console-tools/chvt.c b/console-tools/chvt.c
index 2b993eb62..d8152de6b 100644
--- a/console-tools/chvt.c
+++ b/console-tools/chvt.c
@@ -7,12 +7,12 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config CHVT 9//config:config CHVT
10//config: bool "chvt" 10//config: bool "chvt (2 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: This program is used to change to another terminal. 14//config: This program is used to change to another terminal.
15//config: Example: chvt 4 (change to terminal /dev/tty4) 15//config: Example: chvt 4 (change to terminal /dev/tty4)
16 16
17//applet:IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP)) 17//applet:IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP))
18 18
diff --git a/console-tools/clear.c b/console-tools/clear.c
index b360d34d9..13eec498b 100644
--- a/console-tools/clear.c
+++ b/console-tools/clear.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config CLEAR 9//config:config CLEAR
10//config: bool "clear" 10//config: bool "clear (tiny)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: This program clears the terminal screen. 13//config: This program clears the terminal screen.
14 14
15//applet:IF_CLEAR(APPLET(clear, BB_DIR_USR_BIN, BB_SUID_DROP)) 15//applet:IF_CLEAR(APPLET(clear, BB_DIR_USR_BIN, BB_SUID_DROP))
16 16
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index 37c966af3..6ffb1471e 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -8,11 +8,11 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config DEALLOCVT 10//config:config DEALLOCVT
11//config: bool "deallocvt" 11//config: bool "deallocvt (1.9 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: This program deallocates unused virtual consoles. 15//config: This program deallocates unused virtual consoles.
16 16
17//applet:IF_DEALLOCVT(APPLET(deallocvt, BB_DIR_USR_BIN, BB_SUID_DROP)) 17//applet:IF_DEALLOCVT(APPLET(deallocvt, BB_DIR_USR_BIN, BB_SUID_DROP))
18 18
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c
index 4a249868a..d4e2cf281 100644
--- a/console-tools/dumpkmap.c
+++ b/console-tools/dumpkmap.c
@@ -8,12 +8,12 @@
8 * 8 *
9 */ 9 */
10//config:config DUMPKMAP 10//config:config DUMPKMAP
11//config: bool "dumpkmap" 11//config: bool "dumpkmap (1.3 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: This program dumps the kernel's keyboard translation table to 15//config: This program dumps the kernel's keyboard translation table to
16//config: stdout, in binary format. You can then use loadkmap to load it. 16//config: stdout, in binary format. You can then use loadkmap to load it.
17 17
18//applet:IF_DUMPKMAP(APPLET(dumpkmap, BB_DIR_BIN, BB_SUID_DROP)) 18//applet:IF_DUMPKMAP(APPLET(dumpkmap, BB_DIR_BIN, BB_SUID_DROP))
19 19
diff --git a/console-tools/fgconsole.c b/console-tools/fgconsole.c
index 019761726..64311f6ea 100644
--- a/console-tools/fgconsole.c
+++ b/console-tools/fgconsole.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config FGCONSOLE 9//config:config FGCONSOLE
10//config: bool "fgconsole" 10//config: bool "fgconsole (1.6 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: This program prints active (foreground) console number. 14//config: This program prints active (foreground) console number.
15 15
16//applet:IF_FGCONSOLE(APPLET(fgconsole, BB_DIR_USR_BIN, BB_SUID_DROP)) 16//applet:IF_FGCONSOLE(APPLET(fgconsole, BB_DIR_USR_BIN, BB_SUID_DROP))
17 17
diff --git a/console-tools/kbd_mode.c b/console-tools/kbd_mode.c
index f1238c6b4..d81c56e92 100644
--- a/console-tools/kbd_mode.c
+++ b/console-tools/kbd_mode.c
@@ -9,11 +9,11 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 10 */
11//config:config KBD_MODE 11//config:config KBD_MODE
12//config: bool "kbd_mode" 12//config: bool "kbd_mode (4 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: This program reports and sets keyboard mode. 16//config: This program reports and sets keyboard mode.
17 17
18//applet:IF_KBD_MODE(APPLET(kbd_mode, BB_DIR_BIN, BB_SUID_DROP)) 18//applet:IF_KBD_MODE(APPLET(kbd_mode, BB_DIR_BIN, BB_SUID_DROP))
19 19
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c
index 29f723ec0..6dc8fa831 100644
--- a/console-tools/loadfont.c
+++ b/console-tools/loadfont.c
@@ -10,33 +10,33 @@
10 * Licensed under GPLv2, see file LICENSE in this source tree. 10 * Licensed under GPLv2, see file LICENSE in this source tree.
11 */ 11 */
12//config:config LOADFONT 12//config:config LOADFONT
13//config: bool "loadfont" 13//config: bool "loadfont (5.4 kb)"
14//config: default y 14//config: default y
15//config: select PLATFORM_LINUX 15//config: select PLATFORM_LINUX
16//config: help 16//config: help
17//config: This program loads a console font from standard input. 17//config: This program loads a console font from standard input.
18//config: 18//config:
19//config:config SETFONT 19//config:config SETFONT
20//config: bool "setfont" 20//config: bool "setfont (26 kb)"
21//config: default y 21//config: default y
22//config: select PLATFORM_LINUX 22//config: select PLATFORM_LINUX
23//config: help 23//config: help
24//config: Allows to load console screen map. Useful for i18n. 24//config: Allows to load console screen map. Useful for i18n.
25//config: 25//config:
26//config:config FEATURE_SETFONT_TEXTUAL_MAP 26//config:config FEATURE_SETFONT_TEXTUAL_MAP
27//config: bool "Support reading textual screen maps" 27//config: bool "Support reading textual screen maps"
28//config: default y 28//config: default y
29//config: depends on SETFONT 29//config: depends on SETFONT
30//config: help 30//config: help
31//config: Support reading textual screen maps. 31//config: Support reading textual screen maps.
32//config: 32//config:
33//config:config DEFAULT_SETFONT_DIR 33//config:config DEFAULT_SETFONT_DIR
34//config: string "Default directory for console-tools files" 34//config: string "Default directory for console-tools files"
35//config: default "" 35//config: default ""
36//config: depends on SETFONT 36//config: depends on SETFONT
37//config: help 37//config: help
38//config: Directory to use if setfont's params are simple filenames 38//config: Directory to use if setfont's params are simple filenames
39//config: (not /path/to/file or ./file). Default is "" (no default directory). 39//config: (not /path/to/file or ./file). Default is "" (no default directory).
40//config: 40//config:
41//config:comment "Common options for loadfont and setfont" 41//config:comment "Common options for loadfont and setfont"
42//config: depends on LOADFONT || SETFONT 42//config: depends on LOADFONT || SETFONT
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c
index 70ab55a8e..839dc2083 100644
--- a/console-tools/loadkmap.c
+++ b/console-tools/loadkmap.c
@@ -7,12 +7,12 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config LOADKMAP 9//config:config LOADKMAP
10//config: bool "loadkmap" 10//config: bool "loadkmap (1.5 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: This program loads a keyboard translation table from 14//config: This program loads a keyboard translation table from
15//config: standard input. 15//config: standard input.
16 16
17//applet:IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP)) 17//applet:IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP))
18 18
diff --git a/console-tools/openvt.c b/console-tools/openvt.c
index 5cbc717ec..f3db28367 100644
--- a/console-tools/openvt.c
+++ b/console-tools/openvt.c
@@ -8,12 +8,12 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config OPENVT 10//config:config OPENVT
11//config: bool "openvt" 11//config: bool "openvt (7 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: This program is used to start a command on an unused 15//config: This program is used to start a command on an unused
16//config: virtual terminal. 16//config: virtual terminal.
17 17
18//applet:IF_OPENVT(APPLET(openvt, BB_DIR_USR_BIN, BB_SUID_DROP)) 18//applet:IF_OPENVT(APPLET(openvt, BB_DIR_USR_BIN, BB_SUID_DROP))
19 19
diff --git a/console-tools/reset.c b/console-tools/reset.c
index 587c0d11a..04e5b0ca1 100644
--- a/console-tools/reset.c
+++ b/console-tools/reset.c
@@ -10,11 +10,11 @@
10/* "Standard" version of this tool is in ncurses package */ 10/* "Standard" version of this tool is in ncurses package */
11 11
12//config:config RESET 12//config:config RESET
13//config: bool "reset" 13//config: bool "reset (275 bytes)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: This program is used to reset the terminal screen, if it 16//config: This program is used to reset the terminal screen, if it
17//config: gets messed up. 17//config: gets messed up.
18 18
19//applet:IF_RESET(APPLET(reset, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_RESET(APPLET(reset, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/console-tools/resize.c b/console-tools/resize.c
index 567086f09..62928a01e 100644
--- a/console-tools/resize.c
+++ b/console-tools/resize.c
@@ -7,21 +7,21 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config RESIZE 9//config:config RESIZE
10//config: bool "resize" 10//config: bool "resize (756 bytes)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: This program is used to (re)set the width and height of your current 13//config: This program is used to (re)set the width and height of your current
14//config: terminal. 14//config: terminal.
15//config: 15//config:
16//config:config FEATURE_RESIZE_PRINT 16//config:config FEATURE_RESIZE_PRINT
17//config: bool "Print environment variables" 17//config: bool "Print environment variables"
18//config: default y 18//config: default y
19//config: depends on RESIZE 19//config: depends on RESIZE
20//config: help 20//config: help
21//config: Prints the newly set size (number of columns and rows) of 21//config: Prints the newly set size (number of columns and rows) of
22//config: the terminal. 22//config: the terminal.
23//config: E.g.: 23//config: E.g.:
24//config: COLUMNS=80;LINES=44;export COLUMNS LINES; 24//config: COLUMNS=80;LINES=44;export COLUMNS LINES;
25 25
26//applet:IF_RESIZE(APPLET(resize, BB_DIR_USR_BIN, BB_SUID_DROP)) 26//applet:IF_RESIZE(APPLET(resize, BB_DIR_USR_BIN, BB_SUID_DROP))
27 27
diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c
index d47a33d59..ad0f756ca 100644
--- a/console-tools/setconsole.c
+++ b/console-tools/setconsole.c
@@ -8,12 +8,12 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config SETCONSOLE 10//config:config SETCONSOLE
11//config: bool "setconsole" 11//config: bool "setconsole (3.7 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: This program redirects the system console to another device, 15//config: This program redirects the system console to another device,
16//config: like the current tty while logged in via telnet. 16//config: like the current tty while logged in via telnet.
17//config: 17//config:
18//config:config FEATURE_SETCONSOLE_LONG_OPTIONS 18//config:config FEATURE_SETCONSOLE_LONG_OPTIONS
19//config: bool "Enable long options" 19//config: bool "Enable long options"
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c
index 11fc37ae9..543fbe3e0 100644
--- a/console-tools/setkeycodes.c
+++ b/console-tools/setkeycodes.c
@@ -9,12 +9,12 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 10 */
11//config:config SETKEYCODES 11//config:config SETKEYCODES
12//config: bool "setkeycodes" 12//config: bool "setkeycodes (1.7 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: This program loads entries into the kernel's scancode-to-keycode 16//config: This program loads entries into the kernel's scancode-to-keycode
17//config: map, allowing unusual keyboards to generate usable keycodes. 17//config: map, allowing unusual keyboards to generate usable keycodes.
18 18
19//applet:IF_SETKEYCODES(APPLET(setkeycodes, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_SETKEYCODES(APPLET(setkeycodes, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/console-tools/setlogcons.c b/console-tools/setlogcons.c
index 2ea36f039..1b5814eee 100644
--- a/console-tools/setlogcons.c
+++ b/console-tools/setlogcons.c
@@ -9,11 +9,11 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 10 */
11//config:config SETLOGCONS 11//config:config SETLOGCONS
12//config: bool "setlogcons" 12//config: bool "setlogcons (1.8 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: This program redirects the output console of kernel messages. 16//config: This program redirects the output console of kernel messages.
17 17
18//applet:IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) 18//applet:IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP))
19 19
diff --git a/console-tools/showkey.c b/console-tools/showkey.c
index c2447b887..c322ce99d 100644
--- a/console-tools/showkey.c
+++ b/console-tools/showkey.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config SHOWKEY 9//config:config SHOWKEY
10//config: bool "showkey" 10//config: bool "showkey (4.7 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: Shows keys pressed. 14//config: Shows keys pressed.
15 15
16//applet:IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP)) 16//applet:IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP))
17 17
diff --git a/coreutils/Config.src b/coreutils/Config.src
index 1d2fea1fb..7a8a3a634 100644
--- a/coreutils/Config.src
+++ b/coreutils/Config.src
@@ -13,9 +13,9 @@ config FEATURE_VERBOSE
13 bool "Support verbose options (usually -v) for various applets" 13 bool "Support verbose options (usually -v) for various applets"
14 default y 14 default y
15 help 15 help
16 Enable cp -v, rm -v and similar messages. 16 Enable cp -v, rm -v and similar messages.
17 Also enables long option (--verbose) if it exists. 17 Also enables long option (--verbose) if it exists.
18 Without this option, -v is accepted but ignored. 18 Without this option, -v is accepted but ignored.
19 19
20comment "Common options for cp and mv" 20comment "Common options for cp and mv"
21 depends on CP || MV 21 depends on CP || MV
@@ -25,7 +25,7 @@ config FEATURE_PRESERVE_HARDLINKS
25 default y 25 default y
26 depends on CP || MV 26 depends on CP || MV
27 help 27 help
28 Allow cp and mv to preserve hard links. 28 Allow cp and mv to preserve hard links.
29 29
30comment "Common options for df, du, ls" 30comment "Common options for df, du, ls"
31 depends on DF || DU || LS 31 depends on DF || DU || LS
@@ -35,6 +35,6 @@ config FEATURE_HUMAN_READABLE
35 default y 35 default y
36 depends on DF || DU || LS 36 depends on DF || DU || LS
37 help 37 help
38 Allow df, du, and ls to have human readable output. 38 Allow df, du, and ls to have human readable output.
39 39
40endmenu 40endmenu
diff --git a/coreutils/basename.c b/coreutils/basename.c
index ace0148c0..566aeebda 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -15,12 +15,12 @@
15 * 3) Save some space by using strcmp(). Calling strncmp() here was silly. 15 * 3) Save some space by using strcmp(). Calling strncmp() here was silly.
16 */ 16 */
17//config:config BASENAME 17//config:config BASENAME
18//config: bool "basename" 18//config: bool "basename (371 bytes)"
19//config: default y 19//config: default y
20//config: help 20//config: help
21//config: basename is used to strip the directory and suffix from filenames, 21//config: basename is used to strip the directory and suffix from filenames,
22//config: leaving just the filename itself. Enable this option if you wish 22//config: leaving just the filename itself. Enable this option if you wish
23//config: to enable the 'basename' utility. 23//config: to enable the 'basename' utility.
24 24
25//applet:IF_BASENAME(APPLET_NOFORK(basename, basename, BB_DIR_USR_BIN, BB_SUID_DROP, basename)) 25//applet:IF_BASENAME(APPLET_NOFORK(basename, basename, BB_DIR_USR_BIN, BB_SUID_DROP, basename))
26 26
@@ -47,25 +47,24 @@
47/* This is a NOFORK applet. Be very careful! */ 47/* This is a NOFORK applet. Be very careful! */
48 48
49int basename_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 49int basename_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
50int basename_main(int argc, char **argv) 50int basename_main(int argc UNUSED_PARAM, char **argv)
51{ 51{
52 size_t m, n; 52 size_t m, n;
53 char *s; 53 char *s;
54 54
55 if (argv[1] && strcmp(argv[1], "--") == 0) { 55 if (argv[1] && strcmp(argv[1], "--") == 0) {
56 argv++; 56 argv++;
57 argc--;
58 } 57 }
59 58 if (!argv[1])
60 if ((unsigned)(argc-2) >= 2) {
61 bb_show_usage(); 59 bb_show_usage();
62 }
63 60
64 /* It should strip slash: /abc/def/ -> def */ 61 /* It should strip slash: /abc/def/ -> def */
65 s = bb_get_last_path_component_strip(*++argv); 62 s = bb_get_last_path_component_strip(*++argv);
66 63
67 m = strlen(s); 64 m = strlen(s);
68 if (*++argv) { 65 if (*++argv) {
66 if (argv[1])
67 bb_show_usage();
69 n = strlen(*argv); 68 n = strlen(*argv);
70 if ((m > n) && (strcmp(s+m-n, *argv) == 0)) { 69 if ((m > n) && (strcmp(s+m-n, *argv) == 0)) {
71 m -= n; 70 m -= n;
diff --git a/coreutils/cat.c b/coreutils/cat.c
index a9ba68d6b..390254512 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -7,25 +7,25 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config CAT 9//config:config CAT
10//config: bool "cat" 10//config: bool "cat (5.6 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: cat is used to concatenate files and print them to the standard 13//config: cat is used to concatenate files and print them to the standard
14//config: output. Enable this option if you wish to enable the 'cat' utility. 14//config: output. Enable this option if you wish to enable the 'cat' utility.
15//config: 15//config:
16//config:config FEATURE_CATN 16//config:config FEATURE_CATN
17//config: bool "Enable -n and -b options" 17//config: bool "Enable -n and -b options"
18//config: default y 18//config: default y
19//config: depends on CAT 19//config: depends on CAT
20//config: help 20//config: help
21//config: -n numbers all output lines while -b numbers nonempty output lines. 21//config: -n numbers all output lines while -b numbers nonempty output lines.
22//config: 22//config:
23//config:config FEATURE_CATV 23//config:config FEATURE_CATV
24//config: bool "cat -v[etA]" 24//config: bool "cat -v[etA]"
25//config: default y 25//config: default y
26//config: depends on CAT 26//config: depends on CAT
27//config: help 27//config: help
28//config: Display nonprinting characters as escape sequences 28//config: Display nonprinting characters as escape sequences
29 29
30//applet:IF_CAT(APPLET(cat, BB_DIR_BIN, BB_SUID_DROP)) 30//applet:IF_CAT(APPLET(cat, BB_DIR_BIN, BB_SUID_DROP))
31 31
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c
index 8dca63cf7..27a0edf0d 100644
--- a/coreutils/chgrp.c
+++ b/coreutils/chgrp.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config CHGRP 9//config:config CHGRP
10//config: bool "chgrp" 10//config: bool "chgrp (7.2 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: chgrp is used to change the group ownership of files. 13//config: chgrp is used to change the group ownership of files.
14 14
15//applet:IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, BB_DIR_BIN, BB_SUID_DROP, chgrp)) 15//applet:IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, BB_DIR_BIN, BB_SUID_DROP, chgrp))
16 16
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index 80913f542..2174334d1 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -10,10 +10,10 @@
10 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 10 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
11 */ 11 */
12//config:config CHMOD 12//config:config CHMOD
13//config: bool "chmod" 13//config: bool "chmod (5.1 kb)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: chmod is used to change the access permission of files. 16//config: chmod is used to change the access permission of files.
17 17
18//applet:IF_CHMOD(APPLET_NOEXEC(chmod, chmod, BB_DIR_BIN, BB_SUID_DROP, chmod)) 18//applet:IF_CHMOD(APPLET_NOEXEC(chmod, chmod, BB_DIR_BIN, BB_SUID_DROP, chmod))
19 19
diff --git a/coreutils/chown.c b/coreutils/chown.c
index 12cd0eacc..1bfc725cc 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config CHOWN 9//config:config CHOWN
10//config: bool "chown" 10//config: bool "chown (7.2 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: chown is used to change the user and/or group ownership 13//config: chown is used to change the user and/or group ownership
14//config: of files. 14//config: of files.
15//config: 15//config:
16//config:config FEATURE_CHOWN_LONG_OPTIONS 16//config:config FEATURE_CHOWN_LONG_OPTIONS
17//config: bool "Enable long options" 17//config: bool "Enable long options"
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 5c067c1bd..44a587fe0 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config CHROOT 9//config:config CHROOT
10//config: bool "chroot" 10//config: bool "chroot (3.7 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: chroot is used to change the root directory and run a command. 13//config: chroot is used to change the root directory and run a command.
14//config: The default command is `/bin/sh'. 14//config: The default command is `/bin/sh'.
15 15
16//applet:IF_CHROOT(APPLET(chroot, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_CHROOT(APPLET(chroot, BB_DIR_USR_SBIN, BB_SUID_DROP))
17 17
diff --git a/coreutils/cksum.c b/coreutils/cksum.c
index 9034fc19a..c0cf65d2a 100644
--- a/coreutils/cksum.c
+++ b/coreutils/cksum.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config CKSUM 9//config:config CKSUM
10//config: bool "cksum" 10//config: bool "cksum (4.2 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: cksum is used to calculate the CRC32 checksum of a file. 13//config: cksum is used to calculate the CRC32 checksum of a file.
14 14
15//applet:IF_CKSUM(APPLET_NOEXEC(cksum, cksum, BB_DIR_USR_BIN, BB_SUID_DROP, cksum)) 15//applet:IF_CKSUM(APPLET_NOEXEC(cksum, cksum, BB_DIR_USR_BIN, BB_SUID_DROP, cksum))
16 16
diff --git a/coreutils/comm.c b/coreutils/comm.c
index b6a127809..5be11468c 100644
--- a/coreutils/comm.c
+++ b/coreutils/comm.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config COMM 9//config:config COMM
10//config: bool "comm" 10//config: bool "comm (3.9 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: comm is used to compare two files line by line and return 13//config: comm is used to compare two files line by line and return
14//config: a three-column output. 14//config: a three-column output.
15 15
16//applet:IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP)) 16//applet:IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP))
17 17
diff --git a/coreutils/cp.c b/coreutils/cp.c
index 1e5f36d10..092e39583 100644
--- a/coreutils/cp.c
+++ b/coreutils/cp.c
@@ -12,18 +12,18 @@
12 * Size reduction. 12 * Size reduction.
13 */ 13 */
14//config:config CP 14//config:config CP
15//config: bool "cp" 15//config: bool "cp (9.7 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: cp is used to copy files and directories. 18//config: cp is used to copy files and directories.
19//config: 19//config:
20//config:config FEATURE_CP_LONG_OPTIONS 20//config:config FEATURE_CP_LONG_OPTIONS
21//config: bool "Enable long options" 21//config: bool "Enable long options"
22//config: default y 22//config: default y
23//config: depends on CP && LONG_OPTS 23//config: depends on CP && LONG_OPTS
24//config: help 24//config: help
25//config: Enable long options. 25//config: Enable long options.
26//config: Also add support for --parents option. 26//config: Also add support for --parents option.
27 27
28//applet:IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp)) 28//applet:IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp))
29 29
diff --git a/coreutils/cut.c b/coreutils/cut.c
index a33a825f8..6578ce8ce 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -9,11 +9,11 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 10 */
11//config:config CUT 11//config:config CUT
12//config: bool "cut" 12//config: bool "cut (5.3 kb)"
13//config: default y 13//config: default y
14//config: help 14//config: help
15//config: cut is used to print selected parts of lines from 15//config: cut is used to print selected parts of lines from
16//config: each file to stdout. 16//config: each file to stdout.
17 17
18//applet:IF_CUT(APPLET_NOEXEC(cut, cut, BB_DIR_USR_BIN, BB_SUID_DROP, cut)) 18//applet:IF_CUT(APPLET_NOEXEC(cut, cut, BB_DIR_USR_BIN, BB_SUID_DROP, cut))
19 19
diff --git a/coreutils/date.c b/coreutils/date.c
index 9d4a7dfea..0fb9f1f00 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -19,19 +19,19 @@
19 much as possible, missed out a lot of bounds checking */ 19 much as possible, missed out a lot of bounds checking */
20 20
21//config:config DATE 21//config:config DATE
22//config: bool "date" 22//config: bool "date (7.1 kb)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: date is used to set the system date or display the 25//config: date is used to set the system date or display the
26//config: current time in the given format. 26//config: current time in the given format.
27//config: 27//config:
28//config:config FEATURE_DATE_ISOFMT 28//config:config FEATURE_DATE_ISOFMT
29//config: bool "Enable ISO date format output (-I)" 29//config: bool "Enable ISO date format output (-I)"
30//config: default y 30//config: default y
31//config: depends on DATE 31//config: depends on DATE
32//config: help 32//config: help
33//config: Enable option (-I) to output an ISO-8601 compliant 33//config: Enable option (-I) to output an ISO-8601 compliant
34//config: date/time string. 34//config: date/time string.
35//config: 35//config:
36//config:# defaults to "no": stat's nanosecond field is a bit non-portable 36//config:# defaults to "no": stat's nanosecond field is a bit non-portable
37//config:config FEATURE_DATE_NANO 37//config:config FEATURE_DATE_NANO
@@ -40,23 +40,23 @@
40//config: depends on DATE # syscall(__NR_clock_gettime) 40//config: depends on DATE # syscall(__NR_clock_gettime)
41//config: select PLATFORM_LINUX 41//config: select PLATFORM_LINUX
42//config: help 42//config: help
43//config: Support %[num]N format specifier. Adds ~250 bytes of code. 43//config: Support %[num]N format specifier. Adds ~250 bytes of code.
44//config: 44//config:
45//config:config FEATURE_DATE_COMPAT 45//config:config FEATURE_DATE_COMPAT
46//config: bool "Support weird 'date MMDDhhmm[[YY]YY][.ss]' format" 46//config: bool "Support weird 'date MMDDhhmm[[YY]YY][.ss]' format"
47//config: default y 47//config: default y
48//config: depends on DATE 48//config: depends on DATE
49//config: help 49//config: help
50//config: System time can be set by 'date -s DATE' and simply 'date DATE', 50//config: System time can be set by 'date -s DATE' and simply 'date DATE',
51//config: but formats of DATE string are different. 'date DATE' accepts 51//config: but formats of DATE string are different. 'date DATE' accepts
52//config: a rather weird MMDDhhmm[[YY]YY][.ss] format with completely 52//config: a rather weird MMDDhhmm[[YY]YY][.ss] format with completely
53//config: unnatural placement of year between minutes and seconds. 53//config: unnatural placement of year between minutes and seconds.
54//config: date -s (and other commands like touch -d) use more sensible 54//config: date -s (and other commands like touch -d) use more sensible
55//config: formats (for one, ISO format YYYY-MM-DD hh:mm:ss.ssssss). 55//config: formats (for one, ISO format YYYY-MM-DD hh:mm:ss.ssssss).
56//config: 56//config:
57//config: With this option off, 'date DATE' is 'date -s DATE' support 57//config: With this option off, 'date DATE' is 'date -s DATE' support
58//config: the same format. With it on, 'date DATE' additionally supports 58//config: the same format. With it on, 'date DATE' additionally supports
59//config: MMDDhhmm[[YY]YY][.ss] format. 59//config: MMDDhhmm[[YY]YY][.ss] format.
60 60
61//applet:IF_DATE(APPLET(date, BB_DIR_BIN, BB_SUID_DROP)) 61//applet:IF_DATE(APPLET(date, BB_DIR_BIN, BB_SUID_DROP))
62 62
diff --git a/coreutils/dd.c b/coreutils/dd.c
index b37615313..f7f1c9564 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -7,49 +7,49 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config DD 9//config:config DD
10//config: bool "dd" 10//config: bool "dd (7.1 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: dd copies a file (from standard input to standard output, 13//config: dd copies a file (from standard input to standard output,
14//config: by default) using specific input and output blocksizes, 14//config: by default) using specific input and output blocksizes,
15//config: while optionally performing conversions on it. 15//config: while optionally performing conversions on it.
16//config: 16//config:
17//config:config FEATURE_DD_SIGNAL_HANDLING 17//config:config FEATURE_DD_SIGNAL_HANDLING
18//config: bool "Enable signal handling for status reporting" 18//config: bool "Enable signal handling for status reporting"
19//config: default y 19//config: default y
20//config: depends on DD 20//config: depends on DD
21//config: help 21//config: help
22//config: Sending a SIGUSR1 signal to a running `dd' process makes it 22//config: Sending a SIGUSR1 signal to a running `dd' process makes it
23//config: print to standard error the number of records read and written 23//config: print to standard error the number of records read and written
24//config: so far, then to resume copying. 24//config: so far, then to resume copying.
25//config: 25//config:
26//config: $ dd if=/dev/zero of=/dev/null & 26//config: $ dd if=/dev/zero of=/dev/null &
27//config: $ pid=$!; kill -USR1 $pid; sleep 1; kill $pid 27//config: $ pid=$!; kill -USR1 $pid; sleep 1; kill $pid
28//config: 10899206+0 records in 28//config: 10899206+0 records in
29//config: 10899206+0 records out 29//config: 10899206+0 records out
30//config: 30//config:
31//config:config FEATURE_DD_THIRD_STATUS_LINE 31//config:config FEATURE_DD_THIRD_STATUS_LINE
32//config: bool "Enable the third status line upon signal" 32//config: bool "Enable the third status line upon signal"
33//config: default y 33//config: default y
34//config: depends on DD && FEATURE_DD_SIGNAL_HANDLING 34//config: depends on DD && FEATURE_DD_SIGNAL_HANDLING
35//config: help 35//config: help
36//config: Displays a coreutils-like third status line with transferred bytes, 36//config: Displays a coreutils-like third status line with transferred bytes,
37//config: elapsed time and speed. 37//config: elapsed time and speed.
38//config: 38//config:
39//config:config FEATURE_DD_IBS_OBS 39//config:config FEATURE_DD_IBS_OBS
40//config: bool "Enable ibs, obs and conv options" 40//config: bool "Enable ibs, obs and conv options"
41//config: default y 41//config: default y
42//config: depends on DD 42//config: depends on DD
43//config: help 43//config: help
44//config: Enable support for writing a certain number of bytes in and out, 44//config: Enable support for writing a certain number of bytes in and out,
45//config: at a time, and performing conversions on the data stream. 45//config: at a time, and performing conversions on the data stream.
46//config: 46//config:
47//config:config FEATURE_DD_STATUS 47//config:config FEATURE_DD_STATUS
48//config: bool "Enable status display options" 48//config: bool "Enable status display options"
49//config: default y 49//config: default y
50//config: depends on DD 50//config: depends on DD
51//config: help 51//config: help
52//config: Enable support for status=noxfer/none option. 52//config: Enable support for status=noxfer/none option.
53 53
54//applet:IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd)) 54//applet:IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd))
55 55
diff --git a/coreutils/df.c b/coreutils/df.c
index cf367161a..27dd2b5a8 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -18,20 +18,20 @@
18 * Implement -P and -B; better coreutils compat; cleanup 18 * Implement -P and -B; better coreutils compat; cleanup
19 */ 19 */
20//config:config DF 20//config:config DF
21//config: bool "df" 21//config: bool "df (7.5 kb)"
22//config: default y 22//config: default y
23//config: help 23//config: help
24//config: df reports the amount of disk space used and available 24//config: df reports the amount of disk space used and available
25//config: on filesystems. 25//config: on filesystems.
26//config: 26//config:
27//config:config FEATURE_DF_FANCY 27//config:config FEATURE_DF_FANCY
28//config: bool "Enable -a, -i, -B" 28//config: bool "Enable -a, -i, -B"
29//config: default y 29//config: default y
30//config: depends on DF 30//config: depends on DF
31//config: help 31//config: help
32//config: -a Show all filesystems 32//config: -a Show all filesystems
33//config: -i Inodes 33//config: -i Inodes
34//config: -B <SIZE> Blocksize 34//config: -B <SIZE> Blocksize
35 35
36//applet:IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP)) 36//applet:IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP))
37 37
diff --git a/coreutils/dirname.c b/coreutils/dirname.c
index 659381886..511267b78 100644
--- a/coreutils/dirname.c
+++ b/coreutils/dirname.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config DIRNAME 9//config:config DIRNAME
10//config: bool "dirname" 10//config: bool "dirname (289 bytes)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: dirname is used to strip a non-directory suffix from 13//config: dirname is used to strip a non-directory suffix from
14//config: a file name. 14//config: a file name.
15 15
16//applet:IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname)) 16//applet:IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname))
17 17
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 9d81ccca6..a3d008051 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -12,18 +12,18 @@
12 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 12 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
13 */ 13 */
14//config:config DOS2UNIX 14//config:config DOS2UNIX
15//config: bool "dos2unix" 15//config: bool "dos2unix (5.1 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: dos2unix is used to convert a text file from DOS format to 18//config: dos2unix is used to convert a text file from DOS format to
19//config: UNIX format, and vice versa. 19//config: UNIX format, and vice versa.
20//config: 20//config:
21//config:config UNIX2DOS 21//config:config UNIX2DOS
22//config: bool "unix2dos" 22//config: bool "unix2dos (5.1 kb)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: unix2dos is used to convert a text file from UNIX format to 25//config: unix2dos is used to convert a text file from UNIX format to
26//config: DOS format, and vice versa. 26//config: DOS format, and vice versa.
27 27
28//applet:IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, dos2unix)) 28//applet:IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, dos2unix))
29//applet:IF_UNIX2DOS(APPLET_NOEXEC(unix2dos, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, unix2dos)) 29//applet:IF_UNIX2DOS(APPLET_NOEXEC(unix2dos, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, unix2dos))
diff --git a/coreutils/du.c b/coreutils/du.c
index 03e31a0e4..947c46e74 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -22,15 +22,15 @@
22//config: bool "du (default blocksize of 512 bytes)" 22//config: bool "du (default blocksize of 512 bytes)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: du is used to report the amount of disk space used 25//config: du is used to report the amount of disk space used
26//config: for specified files. 26//config: for specified files.
27//config: 27//config:
28//config:config FEATURE_DU_DEFAULT_BLOCKSIZE_1K 28//config:config FEATURE_DU_DEFAULT_BLOCKSIZE_1K
29//config: bool "Use a default blocksize of 1024 bytes (1K)" 29//config: bool "Use a default blocksize of 1024 bytes (1K)"
30//config: default y 30//config: default y
31//config: depends on DU 31//config: depends on DU
32//config: help 32//config: help
33//config: Use a blocksize of (1K) instead of the default 512b. 33//config: Use a blocksize of (1K) instead of the default 512b.
34 34
35//applet:IF_DU(APPLET(du, BB_DIR_USR_BIN, BB_SUID_DROP)) 35//applet:IF_DU(APPLET(du, BB_DIR_USR_BIN, BB_SUID_DROP))
36 36
diff --git a/coreutils/echo.c b/coreutils/echo.c
index a7e4ca9ac..af33319a1 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -22,7 +22,7 @@
22//config: bool "echo (basic SuSv3 version taking no options)" 22//config: bool "echo (basic SuSv3 version taking no options)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: echo is used to print a specified string to stdout. 25//config: echo is used to print a specified string to stdout.
26//config: 26//config:
27//config:# this entry also appears in shell/Config.in, next to the echo builtin 27//config:# this entry also appears in shell/Config.in, next to the echo builtin
28//config:config FEATURE_FANCY_ECHO 28//config:config FEATURE_FANCY_ECHO
diff --git a/coreutils/env.c b/coreutils/env.c
index 2bd5f41d0..8def9c2da 100644
--- a/coreutils/env.c
+++ b/coreutils/env.c
@@ -24,12 +24,12 @@
24 * - use xfunc_error_retval 24 * - use xfunc_error_retval
25 */ 25 */
26//config:config ENV 26//config:config ENV
27//config: bool "env" 27//config: bool "env (3.8 kb)"
28//config: default y 28//config: default y
29//config: help 29//config: help
30//config: env is used to set an environment variable and run 30//config: env is used to set an environment variable and run
31//config: a command; without options it displays the current 31//config: a command; without options it displays the current
32//config: environment. 32//config: environment.
33//config: 33//config:
34//config:config FEATURE_ENV_LONG_OPTIONS 34//config:config FEATURE_ENV_LONG_OPTIONS
35//config: bool "Enable long options" 35//config: bool "Enable long options"
diff --git a/coreutils/expand.c b/coreutils/expand.c
index 9ce86ebff..64f2a539d 100644
--- a/coreutils/expand.c
+++ b/coreutils/expand.c
@@ -21,10 +21,10 @@
21 * Caveat: this versions of expand and unexpand don't accept tab lists. 21 * Caveat: this versions of expand and unexpand don't accept tab lists.
22 */ 22 */
23//config:config EXPAND 23//config:config EXPAND
24//config: bool "expand" 24//config: bool "expand (5.8 kb)"
25//config: default y 25//config: default y
26//config: help 26//config: help
27//config: By default, convert all tabs to spaces. 27//config: By default, convert all tabs to spaces.
28//config: 28//config:
29//config:config FEATURE_EXPAND_LONG_OPTIONS 29//config:config FEATURE_EXPAND_LONG_OPTIONS
30//config: bool "Enable long options" 30//config: bool "Enable long options"
@@ -32,10 +32,10 @@
32//config: depends on EXPAND && LONG_OPTS 32//config: depends on EXPAND && LONG_OPTS
33//config: 33//config:
34//config:config UNEXPAND 34//config:config UNEXPAND
35//config: bool "unexpand" 35//config: bool "unexpand (6 kb)"
36//config: default y 36//config: default y
37//config: help 37//config: help
38//config: By default, convert only leading sequences of blanks to tabs. 38//config: By default, convert only leading sequences of blanks to tabs.
39//config: 39//config:
40//config:config FEATURE_UNEXPAND_LONG_OPTIONS 40//config:config FEATURE_UNEXPAND_LONG_OPTIONS
41//config: bool "Enable long options" 41//config: bool "Enable long options"
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 639d29a55..0cf2b9bd9 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -23,20 +23,20 @@
23 * provided they all associate ((x op x) op x). 23 * provided they all associate ((x op x) op x).
24 */ 24 */
25//config:config EXPR 25//config:config EXPR
26//config: bool "expr" 26//config: bool "expr (6.1 kb)"
27//config: default y 27//config: default y
28//config: help 28//config: help
29//config: expr is used to calculate numbers and print the result 29//config: expr is used to calculate numbers and print the result
30//config: to standard output. 30//config: to standard output.
31//config: 31//config:
32//config:config EXPR_MATH_SUPPORT_64 32//config:config EXPR_MATH_SUPPORT_64
33//config: bool "Extend Posix numbers support to 64 bit" 33//config: bool "Extend Posix numbers support to 64 bit"
34//config: default y 34//config: default y
35//config: depends on EXPR 35//config: depends on EXPR
36//config: help 36//config: help
37//config: Enable 64-bit math support in the expr applet. This will make 37//config: Enable 64-bit math support in the expr applet. This will make
38//config: the applet slightly larger, but will allow computation with very 38//config: the applet slightly larger, but will allow computation with very
39//config: large numbers. 39//config: large numbers.
40 40
41//applet:IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP)) 41//applet:IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP))
42 42
diff --git a/coreutils/factor.c b/coreutils/factor.c
index 8782d3d1e..ee3943a4a 100644
--- a/coreutils/factor.c
+++ b/coreutils/factor.c
@@ -4,10 +4,10 @@
4 * Licensed under GPLv2, see file LICENSE in this source tree. 4 * Licensed under GPLv2, see file LICENSE in this source tree.
5 */ 5 */
6//config:config FACTOR 6//config:config FACTOR
7//config: bool "factor" 7//config: bool "factor (2.6 kb)"
8//config: default y 8//config: default y
9//config: help 9//config: help
10//config: factor factorizes integers 10//config: factor factorizes integers
11 11
12//applet:IF_FACTOR(APPLET(factor, BB_DIR_USR_BIN, BB_SUID_DROP)) 12//applet:IF_FACTOR(APPLET(factor, BB_DIR_USR_BIN, BB_SUID_DROP))
13 13
diff --git a/coreutils/false.c b/coreutils/false.c
index b8f17c6a6..e3903efd0 100644
--- a/coreutils/false.c
+++ b/coreutils/false.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config FALSE 9//config:config FALSE
10//config: bool "false" 10//config: bool "false (tiny)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: false returns an exit code of FALSE (1). 13//config: false returns an exit code of FALSE (1).
14 14
15//applet:IF_FALSE(APPLET_NOFORK(false, false, BB_DIR_BIN, BB_SUID_DROP, false)) 15//applet:IF_FALSE(APPLET_NOFORK(false, false, BB_DIR_BIN, BB_SUID_DROP, false))
16 16
diff --git a/coreutils/fold.c b/coreutils/fold.c
index 01f9bce74..286db228d 100644
--- a/coreutils/fold.c
+++ b/coreutils/fold.c
@@ -10,10 +10,10 @@
10 Licensed under GPLv2 or later, see file LICENSE in this source tree. 10 Licensed under GPLv2 or later, see file LICENSE in this source tree.
11*/ 11*/
12//config:config FOLD 12//config:config FOLD
13//config: bool "fold" 13//config: bool "fold (4.6 kb)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: Wrap text to fit a specific width. 16//config: Wrap text to fit a specific width.
17 17
18//applet:IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold)) 18//applet:IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold))
19 19
diff --git a/coreutils/fsync.c b/coreutils/fsync.c
index 596a2bcaf..5e77e2c16 100644
--- a/coreutils/fsync.c
+++ b/coreutils/fsync.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config FSYNC 9//config:config FSYNC
10//config: bool "fsync" 10//config: bool "fsync (3.7 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: fsync is used to flush file-related cached blocks to disk. 13//config: fsync is used to flush file-related cached blocks to disk.
14 14
15//applet:IF_FSYNC(APPLET_NOFORK(fsync, fsync, BB_DIR_BIN, BB_SUID_DROP, fsync)) 15//applet:IF_FSYNC(APPLET_NOFORK(fsync, fsync, BB_DIR_BIN, BB_SUID_DROP, fsync))
16 16
diff --git a/coreutils/head.c b/coreutils/head.c
index d49113e7f..fc3a48d5b 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config HEAD 9//config:config HEAD
10//config: bool "head" 10//config: bool "head (3.7 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: head is used to print the first specified number of lines 13//config: head is used to print the first specified number of lines
14//config: from files. 14//config: from files.
15//config: 15//config:
16//config:config FEATURE_FANCY_HEAD 16//config:config FEATURE_FANCY_HEAD
17//config: bool "Enable -c, -q, and -v" 17//config: bool "Enable -c, -q, and -v"
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index 5b47de1bc..d21e6d6ac 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config HOSTID 9//config:config HOSTID
10//config: bool "hostid" 10//config: bool "hostid (247 bytes)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: hostid prints the numeric identifier (in hexadecimal) for 13//config: hostid prints the numeric identifier (in hexadecimal) for
14//config: the current host. 14//config: the current host.
15 15
16//applet:IF_HOSTID(APPLET_NOFORK(hostid, hostid, BB_DIR_USR_BIN, BB_SUID_DROP, hostid)) 16//applet:IF_HOSTID(APPLET_NOFORK(hostid, hostid, BB_DIR_USR_BIN, BB_SUID_DROP, hostid))
17 17
diff --git a/coreutils/id.c b/coreutils/id.c
index ab7ac1e55..6043bca61 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -13,16 +13,16 @@
13 * Added -G option Tito Ragusa (C) 2008 for SUSv3. 13 * Added -G option Tito Ragusa (C) 2008 for SUSv3.
14 */ 14 */
15//config:config ID 15//config:config ID
16//config: bool "id" 16//config: bool "id (6.7 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: id displays the current user and group ID names. 19//config: id displays the current user and group ID names.
20//config: 20//config:
21//config:config GROUPS 21//config:config GROUPS
22//config: bool "groups" 22//config: bool "groups (6.5 kb)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: Print the group names associated with current user id. 25//config: Print the group names associated with current user id.
26 26
27//applet:IF_GROUPS(APPLET_NOEXEC(groups, id, BB_DIR_USR_BIN, BB_SUID_DROP, groups)) 27//applet:IF_GROUPS(APPLET_NOEXEC(groups, id, BB_DIR_USR_BIN, BB_SUID_DROP, groups))
28//applet:IF_ID( APPLET_NOEXEC(id, id, BB_DIR_USR_BIN, BB_SUID_DROP, id )) 28//applet:IF_ID( APPLET_NOEXEC(id, id, BB_DIR_USR_BIN, BB_SUID_DROP, id ))
diff --git a/coreutils/install.c b/coreutils/install.c
index 2a642bdb6..a1342bb13 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -6,10 +6,10 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config INSTALL 8//config:config INSTALL
9//config: bool "install" 9//config: bool "install (12 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: Copy files and set attributes. 12//config: Copy files and set attributes.
13//config: 13//config:
14//config:config FEATURE_INSTALL_LONG_OPTIONS 14//config:config FEATURE_INSTALL_LONG_OPTIONS
15//config: bool "Enable long options" 15//config: bool "Enable long options"
diff --git a/coreutils/link.c b/coreutils/link.c
index ac3ef85d9..56832fdf6 100644
--- a/coreutils/link.c
+++ b/coreutils/link.c
@@ -6,10 +6,10 @@
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8//config:config LINK 8//config:config LINK
9//config: bool "link" 9//config: bool "link (3.1 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: link creates hard links between files. 12//config: link creates hard links between files.
13 13
14//applet:IF_LINK(APPLET_NOFORK(link, link, BB_DIR_BIN, BB_SUID_DROP, link)) 14//applet:IF_LINK(APPLET_NOFORK(link, link, BB_DIR_BIN, BB_SUID_DROP, link))
15 15
diff --git a/coreutils/ln.c b/coreutils/ln.c
index 0e2abace4..fed96af42 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config LN 9//config:config LN
10//config: bool "ln" 10//config: bool "ln (4.5 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: ln is used to create hard or soft links between files. 13//config: ln is used to create hard or soft links between files.
14 14
15//applet:IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, BB_SUID_DROP, ln)) 15//applet:IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, BB_SUID_DROP, ln))
16 16
diff --git a/coreutils/logname.c b/coreutils/logname.c
index a9b1c956d..e614ca7cf 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -16,10 +16,10 @@
16 * a diagnostic message and an error return. 16 * a diagnostic message and an error return.
17 */ 17 */
18//config:config LOGNAME 18//config:config LOGNAME
19//config: bool "logname" 19//config: bool "logname (894 bytes)"
20//config: default y 20//config: default y
21//config: help 21//config: help
22//config: logname is used to print the current user's login name. 22//config: logname is used to print the current user's login name.
23 23
24//applet:IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) 24//applet:IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname))
25 25
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 61b4409a7..4c0944bb0 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -28,10 +28,10 @@
28 * ls sorts listing now, and supports almost all options. 28 * ls sorts listing now, and supports almost all options.
29 */ 29 */
30//config:config LS 30//config:config LS
31//config: bool "ls" 31//config: bool "ls (14 kb)"
32//config: default y 32//config: default y
33//config: help 33//config: help
34//config: ls is used to list the contents of directories. 34//config: ls is used to list the contents of directories.
35//config: 35//config:
36//config:config FEATURE_LS_FILETYPES 36//config:config FEATURE_LS_FILETYPES
37//config: bool "Enable filetyping options (-p and -F)" 37//config: bool "Enable filetyping options (-p and -F)"
@@ -58,39 +58,39 @@
58//config: default y 58//config: default y
59//config: depends on LS 59//config: depends on LS
60//config: help 60//config: help
61//config: Allow ls to sort file names alphabetically. 61//config: Allow ls to sort file names alphabetically.
62//config: 62//config:
63//config:config FEATURE_LS_TIMESTAMPS 63//config:config FEATURE_LS_TIMESTAMPS
64//config: bool "Show file timestamps" 64//config: bool "Show file timestamps"
65//config: default y 65//config: default y
66//config: depends on LS 66//config: depends on LS
67//config: help 67//config: help
68//config: Allow ls to display timestamps for files. 68//config: Allow ls to display timestamps for files.
69//config: 69//config:
70//config:config FEATURE_LS_USERNAME 70//config:config FEATURE_LS_USERNAME
71//config: bool "Show username/groupnames" 71//config: bool "Show username/groupnames"
72//config: default y 72//config: default y
73//config: depends on LS 73//config: depends on LS
74//config: help 74//config: help
75//config: Allow ls to display username/groupname for files. 75//config: Allow ls to display username/groupname for files.
76//config: 76//config:
77//config:config FEATURE_LS_COLOR 77//config:config FEATURE_LS_COLOR
78//config: bool "Allow use of color to identify file types" 78//config: bool "Allow use of color to identify file types"
79//config: default y 79//config: default y
80//config: depends on LS && LONG_OPTS 80//config: depends on LS && LONG_OPTS
81//config: help 81//config: help
82//config: This enables the --color option to ls. 82//config: This enables the --color option to ls.
83//config: 83//config:
84//config:config FEATURE_LS_COLOR_IS_DEFAULT 84//config:config FEATURE_LS_COLOR_IS_DEFAULT
85//config: bool "Produce colored ls output by default" 85//config: bool "Produce colored ls output by default"
86//config: default y 86//config: default y
87//config: depends on FEATURE_LS_COLOR 87//config: depends on FEATURE_LS_COLOR
88//config: help 88//config: help
89//config: Saying yes here will turn coloring on by default, 89//config: Saying yes here will turn coloring on by default,
90//config: even if no "--color" option is given to the ls command. 90//config: even if no "--color" option is given to the ls command.
91//config: This is not recommended, since the colors are not 91//config: This is not recommended, since the colors are not
92//config: configurable, and the output may not be legible on 92//config: configurable, and the output may not be legible on
93//config: many output screens. 93//config: many output screens.
94 94
95//applet:IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) 95//applet:IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls))
96 96
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 50111bd26..bcccdd64f 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -6,34 +6,34 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config MD5SUM 8//config:config MD5SUM
9//config: bool "md5sum" 9//config: bool "md5sum (6.8 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: md5sum is used to print or check MD5 checksums. 12//config: md5sum is used to print or check MD5 checksums.
13//config: 13//config:
14//config:config SHA1SUM 14//config:config SHA1SUM
15//config: bool "sha1sum" 15//config: bool "sha1sum (6 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: Compute and check SHA1 message digest 18//config: Compute and check SHA1 message digest
19//config: 19//config:
20//config:config SHA256SUM 20//config:config SHA256SUM
21//config: bool "sha256sum" 21//config: bool "sha256sum (7.1 kb)"
22//config: default y 22//config: default y
23//config: help 23//config: help
24//config: Compute and check SHA256 message digest 24//config: Compute and check SHA256 message digest
25//config: 25//config:
26//config:config SHA512SUM 26//config:config SHA512SUM
27//config: bool "sha512sum" 27//config: bool "sha512sum (7.6 kb)"
28//config: default y 28//config: default y
29//config: help 29//config: help
30//config: Compute and check SHA512 message digest 30//config: Compute and check SHA512 message digest
31//config: 31//config:
32//config:config SHA3SUM 32//config:config SHA3SUM
33//config: bool "sha3sum" 33//config: bool "sha3sum (6.3 kb)"
34//config: default y 34//config: default y
35//config: help 35//config: help
36//config: Compute and check SHA3 message digest 36//config: Compute and check SHA3 message digest
37//config: 37//config:
38//config:comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum" 38//config:comment "Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum"
39//config: depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM || SHA3SUM 39//config: depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM || SHA3SUM
@@ -43,9 +43,9 @@
43//config: default y 43//config: default y
44//config: depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM || SHA3SUM 44//config: depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM || SHA3SUM
45//config: help 45//config: help
46//config: Enabling the -c options allows files to be checked 46//config: Enabling the -c options allows files to be checked
47//config: against pre-calculated hash values. 47//config: against pre-calculated hash values.
48//config: -s and -w are useful options when verifying checksums. 48//config: -s and -w are useful options when verifying checksums.
49 49
50//applet:IF_MD5SUM(APPLET_NOEXEC(md5sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, md5sum)) 50//applet:IF_MD5SUM(APPLET_NOEXEC(md5sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, md5sum))
51//applet:IF_SHA1SUM(APPLET_NOEXEC(sha1sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha1sum)) 51//applet:IF_SHA1SUM(APPLET_NOEXEC(sha1sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha1sum))
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index fcc34f1ad..22851187c 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -14,10 +14,10 @@
14/* Nov 28, 2006 Yoshinori Sato <ysato@users.sourceforge.jp>: Add SELinux Support. 14/* Nov 28, 2006 Yoshinori Sato <ysato@users.sourceforge.jp>: Add SELinux Support.
15 */ 15 */
16//config:config MKDIR 16//config:config MKDIR
17//config: bool "mkdir" 17//config: bool "mkdir (4.4 kb)"
18//config: default y 18//config: default y
19//config: help 19//config: help
20//config: mkdir is used to create directories with the specified names. 20//config: mkdir is used to create directories with the specified names.
21//config: 21//config:
22//config:config FEATURE_MKDIR_LONG_OPTIONS 22//config:config FEATURE_MKDIR_LONG_OPTIONS
23//config: bool "Enable long options" 23//config: bool "Enable long options"
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c
index 66509a9c0..0f614017e 100644
--- a/coreutils/mkfifo.c
+++ b/coreutils/mkfifo.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config MKFIFO 9//config:config MKFIFO
10//config: bool "mkfifo" 10//config: bool "mkfifo (3.7 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: mkfifo is used to create FIFOs (named pipes). 13//config: mkfifo is used to create FIFOs (named pipes).
14//config: The 'mknod' program can also create FIFOs. 14//config: The 'mknod' program can also create FIFOs.
15 15
16//applet:IF_MKFIFO(APPLET_NOEXEC(mkfifo, mkfifo, BB_DIR_USR_BIN, BB_SUID_DROP, mkfifo)) 16//applet:IF_MKFIFO(APPLET_NOEXEC(mkfifo, mkfifo, BB_DIR_USR_BIN, BB_SUID_DROP, mkfifo))
17 17
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index 466ef5c06..565b33d20 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config MKNOD 9//config:config MKNOD
10//config: bool "mknod" 10//config: bool "mknod (4 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: mknod is used to create FIFOs or block/character special 13//config: mknod is used to create FIFOs or block/character special
14//config: files with the specified names. 14//config: files with the specified names.
15 15
16//applet:IF_MKNOD(APPLET_NOEXEC(mknod, mknod, BB_DIR_BIN, BB_SUID_DROP, mknod)) 16//applet:IF_MKNOD(APPLET_NOEXEC(mknod, mknod, BB_DIR_BIN, BB_SUID_DROP, mknod))
17 17
diff --git a/coreutils/mktemp.c b/coreutils/mktemp.c
index 65353697a..bfef0b4a6 100644
--- a/coreutils/mktemp.c
+++ b/coreutils/mktemp.c
@@ -31,10 +31,10 @@
31 * -p; else /tmp [deprecated] 31 * -p; else /tmp [deprecated]
32 */ 32 */
33//config:config MKTEMP 33//config:config MKTEMP
34//config: bool "mktemp" 34//config: bool "mktemp (4 kb)"
35//config: default y 35//config: default y
36//config: help 36//config: help
37//config: mktemp is used to create unique temporary files 37//config: mktemp is used to create unique temporary files
38 38
39//applet:IF_MKTEMP(APPLET(mktemp, BB_DIR_BIN, BB_SUID_DROP)) 39//applet:IF_MKTEMP(APPLET(mktemp, BB_DIR_BIN, BB_SUID_DROP))
40 40
diff --git a/coreutils/mv.c b/coreutils/mv.c
index df2ef0a52..147dd3bb2 100644
--- a/coreutils/mv.c
+++ b/coreutils/mv.c
@@ -12,10 +12,10 @@
12 * Size reduction and improved error checking. 12 * Size reduction and improved error checking.
13 */ 13 */
14//config:config MV 14//config:config MV
15//config: bool "mv" 15//config: bool "mv (9.8 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: mv is used to move or rename files or directories. 18//config: mv is used to move or rename files or directories.
19//config: 19//config:
20//config:config FEATURE_MV_LONG_OPTIONS 20//config:config FEATURE_MV_LONG_OPTIONS
21//config: bool "Enable long options" 21//config: bool "Enable long options"
diff --git a/coreutils/nice.c b/coreutils/nice.c
index 3676ee663..0bf055299 100644
--- a/coreutils/nice.c
+++ b/coreutils/nice.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config NICE 9//config:config NICE
10//config: bool "nice" 10//config: bool "nice (1.8 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: nice runs a program with modified scheduling priority. 13//config: nice runs a program with modified scheduling priority.
14 14
15//applet:IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP)) 15//applet:IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP))
16 16
diff --git a/coreutils/nl.c b/coreutils/nl.c
index dc468a90b..93e78c490 100644
--- a/coreutils/nl.c
+++ b/coreutils/nl.c
@@ -5,10 +5,10 @@
5 * Licensed under GPLv2, see file LICENSE in this source tree. 5 * Licensed under GPLv2, see file LICENSE in this source tree.
6 */ 6 */
7//config:config NL 7//config:config NL
8//config: bool "nl" 8//config: bool "nl (4.3 kb)"
9//config: default y 9//config: default y
10//config: help 10//config: help
11//config: nl is used to number lines of files. 11//config: nl is used to number lines of files.
12 12
13//applet:IF_NL(APPLET(nl, BB_DIR_USR_BIN, BB_SUID_DROP)) 13//applet:IF_NL(APPLET(nl, BB_DIR_USR_BIN, BB_SUID_DROP))
14 14
diff --git a/coreutils/nohup.c b/coreutils/nohup.c
index d8489686d..8e28f9029 100644
--- a/coreutils/nohup.c
+++ b/coreutils/nohup.c
@@ -10,10 +10,10 @@
10 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 10 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
11 */ 11 */
12//config:config NOHUP 12//config:config NOHUP
13//config: bool "nohup" 13//config: bool "nohup (2 kb)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: run a command immune to hangups, with output to a non-tty. 16//config: run a command immune to hangups, with output to a non-tty.
17 17
18//applet:IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP)) 18//applet:IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
19 19
diff --git a/coreutils/nproc.c b/coreutils/nproc.c
index d7c6a4ba1..68a831865 100644
--- a/coreutils/nproc.c
+++ b/coreutils/nproc.c
@@ -4,10 +4,10 @@
4 * Licensed under GPLv2, see LICENSE in this source tree 4 * Licensed under GPLv2, see LICENSE in this source tree
5 */ 5 */
6//config:config NPROC 6//config:config NPROC
7//config: bool "nproc" 7//config: bool "nproc (248 bytes)"
8//config: default y 8//config: default y
9//config: help 9//config: help
10//config: Print number of CPUs 10//config: Print number of CPUs
11 11
12//applet:IF_NPROC(APPLET(nproc, BB_DIR_USR_BIN, BB_SUID_DROP)) 12//applet:IF_NPROC(APPLET(nproc, BB_DIR_USR_BIN, BB_SUID_DROP))
13 13
diff --git a/coreutils/od.c b/coreutils/od.c
index 4b05ee77c..e3a68435b 100644
--- a/coreutils/od.c
+++ b/coreutils/od.c
@@ -11,10 +11,10 @@
11 * Original copyright notice is retained at the end of this file. 11 * Original copyright notice is retained at the end of this file.
12 */ 12 */
13//config:config OD 13//config:config OD
14//config: bool "od" 14//config: bool "od (11 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: od is used to dump binary files in octal and other formats. 17//config: od is used to dump binary files in octal and other formats.
18 18
19//applet:IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index b02fb09bd..513c8ef37 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -672,7 +672,7 @@ decode_one_format(const char *s_orig, const char *s, struct tspec *tspec)
672 fmt = FLOATING_POINT; 672 fmt = FLOATING_POINT;
673 ++s; 673 ++s;
674 p = strchr(FDL, *s); 674 p = strchr(FDL, *s);
675 if (!p) { 675 if (!p || *p == '\0') {
676 size = sizeof(double); 676 size = sizeof(double);
677 if (isdigit(s[0])) { 677 if (isdigit(s[0])) {
678 size = bb_strtou(s, &end, 0); 678 size = bb_strtou(s, &end, 0);
@@ -693,6 +693,7 @@ decode_one_format(const char *s_orig, const char *s, struct tspec *tspec)
693 }; 693 };
694 694
695 size = FDL_sizeof[p - FDL]; 695 size = FDL_sizeof[p - FDL];
696 s++; /* skip F/D/L */
696 } 697 }
697 698
698 size_spec = fp_type_size[size]; 699 size_spec = fp_type_size[size];
diff --git a/coreutils/paste.c b/coreutils/paste.c
index 3920859d6..52f67f951 100644
--- a/coreutils/paste.c
+++ b/coreutils/paste.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config PASTE 9//config:config PASTE
10//config: bool "paste" 10//config: bool "paste (4.5 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: paste is used to paste lines of different files together 13//config: paste is used to paste lines of different files together
14//config: and write the result to stdout 14//config: and write the result to stdout
15 15
16//applet:IF_PASTE(APPLET_NOEXEC(paste, paste, BB_DIR_USR_BIN, BB_SUID_DROP, paste)) 16//applet:IF_PASTE(APPLET_NOEXEC(paste, paste, BB_DIR_USR_BIN, BB_SUID_DROP, paste))
17 17
diff --git a/coreutils/printenv.c b/coreutils/printenv.c
index fbd64945d..b0468b3f7 100644
--- a/coreutils/printenv.c
+++ b/coreutils/printenv.c
@@ -8,10 +8,10 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config PRINTENV 10//config:config PRINTENV
11//config: bool "printenv" 11//config: bool "printenv (1 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: printenv is used to print all or part of environment. 14//config: printenv is used to print all or part of environment.
15 15
16//applet:IF_PRINTENV(APPLET_NOFORK(printenv, printenv, BB_DIR_BIN, BB_SUID_DROP, printenv)) 16//applet:IF_PRINTENV(APPLET_NOFORK(printenv, printenv, BB_DIR_BIN, BB_SUID_DROP, printenv))
17 17
diff --git a/coreutils/printf.c b/coreutils/printf.c
index 65bb5a935..d3fc72adb 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -39,11 +39,11 @@
39/* 19990508 Busy Boxed! Dave Cinege */ 39/* 19990508 Busy Boxed! Dave Cinege */
40 40
41//config:config PRINTF 41//config:config PRINTF
42//config: bool "printf" 42//config: bool "printf (3.3 kb)"
43//config: default y 43//config: default y
44//config: help 44//config: help
45//config: printf is used to format and print specified strings. 45//config: printf is used to format and print specified strings.
46//config: It's similar to `echo' except it has more options. 46//config: It's similar to `echo' except it has more options.
47 47
48//applet:IF_PRINTF(APPLET_NOFORK(printf, printf, BB_DIR_USR_BIN, BB_SUID_DROP, printf)) 48//applet:IF_PRINTF(APPLET_NOFORK(printf, printf, BB_DIR_USR_BIN, BB_SUID_DROP, printf))
49 49
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index 05dee497b..345d85100 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config PWD 9//config:config PWD
10//config: bool "pwd" 10//config: bool "pwd (3.4 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: pwd is used to print the current directory. 13//config: pwd is used to print the current directory.
14 14
15//applet:IF_PWD(APPLET_NOFORK(pwd, pwd, BB_DIR_BIN, BB_SUID_DROP, pwd)) 15//applet:IF_PWD(APPLET_NOFORK(pwd, pwd, BB_DIR_BIN, BB_SUID_DROP, pwd))
16 16
diff --git a/coreutils/readlink.c b/coreutils/readlink.c
index 1b223b3c5..9690290e3 100644
--- a/coreutils/readlink.c
+++ b/coreutils/readlink.c
@@ -7,18 +7,18 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config READLINK 9//config:config READLINK
10//config: bool "readlink" 10//config: bool "readlink (3.6 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: This program reads a symbolic link and returns the name 13//config: This program reads a symbolic link and returns the name
14//config: of the file it points to 14//config: of the file it points to
15//config: 15//config:
16//config:config FEATURE_READLINK_FOLLOW 16//config:config FEATURE_READLINK_FOLLOW
17//config: bool "Enable canonicalization by following all symlinks (-f)" 17//config: bool "Enable canonicalization by following all symlinks (-f)"
18//config: default y 18//config: default y
19//config: depends on READLINK 19//config: depends on READLINK
20//config: help 20//config: help
21//config: Enable the readlink option (-f). 21//config: Enable the readlink option (-f).
22 22
23//applet:IF_READLINK(APPLET(readlink, BB_DIR_USR_BIN, BB_SUID_DROP)) 23//applet:IF_READLINK(APPLET(readlink, BB_DIR_USR_BIN, BB_SUID_DROP))
24 24
diff --git a/coreutils/realpath.c b/coreutils/realpath.c
index 0c2d544e4..6a61c3dc8 100644
--- a/coreutils/realpath.c
+++ b/coreutils/realpath.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config REALPATH 9//config:config REALPATH
10//config: bool "realpath" 10//config: bool "realpath (1.1 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: Return the canonicalized absolute pathname. 13//config: Return the canonicalized absolute pathname.
14//config: This isn't provided by GNU shellutils, but where else does it belong. 14//config: This isn't provided by GNU shellutils, but where else does it belong.
15 15
16//applet:IF_REALPATH(APPLET(realpath, BB_DIR_USR_BIN, BB_SUID_DROP)) 16//applet:IF_REALPATH(APPLET(realpath, BB_DIR_USR_BIN, BB_SUID_DROP))
17 17
diff --git a/coreutils/rm.c b/coreutils/rm.c
index cec34cb9d..f91c94570 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -11,10 +11,10 @@
11 * Size reduction. 11 * Size reduction.
12 */ 12 */
13//config:config RM 13//config:config RM
14//config: bool "rm" 14//config: bool "rm (4.9 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: rm is used to remove files or directories. 17//config: rm is used to remove files or directories.
18 18
19//applet:IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm)) 19//applet:IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm))
20 20
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index 8979941ce..c04ce78f8 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -7,18 +7,18 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config RMDIR 9//config:config RMDIR
10//config: bool "rmdir" 10//config: bool "rmdir (3.4 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: rmdir is used to remove empty directories. 13//config: rmdir is used to remove empty directories.
14//config: 14//config:
15//config:config FEATURE_RMDIR_LONG_OPTIONS 15//config:config FEATURE_RMDIR_LONG_OPTIONS
16//config: bool "Enable long options" 16//config: bool "Enable long options"
17//config: default y 17//config: default y
18//config: depends on RMDIR && LONG_OPTS 18//config: depends on RMDIR && LONG_OPTS
19//config: help 19//config: help
20//config: Support long options for the rmdir applet, including 20//config: Support long options for the rmdir applet, including
21//config: --ignore-fail-on-non-empty for compatibility with GNU rmdir. 21//config: --ignore-fail-on-non-empty for compatibility with GNU rmdir.
22 22
23//applet:IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir)) 23//applet:IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir))
24 24
diff --git a/coreutils/seq.c b/coreutils/seq.c
index ed4946b05..f36dbb4ec 100644
--- a/coreutils/seq.c
+++ b/coreutils/seq.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config SEQ 9//config:config SEQ
10//config: bool "seq" 10//config: bool "seq (3.6 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: print a sequence of numbers 13//config: print a sequence of numbers
14 14
15//applet:IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq)) 15//applet:IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq))
16 16
diff --git a/coreutils/shred.c b/coreutils/shred.c
index b3c009539..3ceb58d19 100644
--- a/coreutils/shred.c
+++ b/coreutils/shred.c
@@ -5,10 +5,10 @@
5 * Licensed under GPLv2, see file LICENSE in this source tree. 5 * Licensed under GPLv2, see file LICENSE in this source tree.
6 */ 6 */
7//config:config SHRED 7//config:config SHRED
8//config: bool "shred" 8//config: bool "shred (5 kb)"
9//config: default y 9//config: default y
10//config: help 10//config: help
11//config: Overwrite a file to hide its contents, and optionally delete it 11//config: Overwrite a file to hide its contents, and optionally delete it
12 12
13//applet:IF_SHRED(APPLET(shred, BB_DIR_USR_BIN, BB_SUID_DROP)) 13//applet:IF_SHRED(APPLET(shred, BB_DIR_USR_BIN, BB_SUID_DROP))
14 14
diff --git a/coreutils/shuf.c b/coreutils/shuf.c
index 217f15c97..403041534 100644
--- a/coreutils/shuf.c
+++ b/coreutils/shuf.c
@@ -8,10 +8,10 @@
8 */ 8 */
9 9
10//config:config SHUF 10//config:config SHUF
11//config: bool "shuf" 11//config: bool "shuf (5.4 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Generate random permutations 14//config: Generate random permutations
15 15
16//kbuild:lib-$(CONFIG_SHUF) += shuf.o 16//kbuild:lib-$(CONFIG_SHUF) += shuf.o
17//applet:IF_SHUF(APPLET_NOEXEC(shuf, shuf, BB_DIR_USR_BIN, BB_SUID_DROP, shuf)) 17//applet:IF_SHUF(APPLET_NOEXEC(shuf, shuf, BB_DIR_USR_BIN, BB_SUID_DROP, shuf))
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index ad2d6b526..9b9581ca9 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -13,32 +13,32 @@
13 * time suffixes for seconds, minutes, hours, and days. 13 * time suffixes for seconds, minutes, hours, and days.
14 */ 14 */
15//config:config SLEEP 15//config:config SLEEP
16//config: bool "sleep" 16//config: bool "sleep (1.7 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: sleep is used to pause for a specified number of seconds. 19//config: sleep is used to pause for a specified number of seconds.
20//config: It comes in 3 versions: 20//config: It comes in 3 versions:
21//config: - small: takes one integer parameter 21//config: - small: takes one integer parameter
22//config: - fancy: takes multiple integer arguments with suffixes: 22//config: - fancy: takes multiple integer arguments with suffixes:
23//config: sleep 1d 2h 3m 15s 23//config: sleep 1d 2h 3m 15s
24//config: - fancy with fractional numbers: 24//config: - fancy with fractional numbers:
25//config: sleep 2.3s 4.5h sleeps for 16202.3 seconds 25//config: sleep 2.3s 4.5h sleeps for 16202.3 seconds
26//config: Last one is "the most compatible" with coreutils sleep, 26//config: Last one is "the most compatible" with coreutils sleep,
27//config: but it adds around 1k of code. 27//config: but it adds around 1k of code.
28//config: 28//config:
29//config:config FEATURE_FANCY_SLEEP 29//config:config FEATURE_FANCY_SLEEP
30//config: bool "Enable multiple arguments and s/m/h/d suffixes" 30//config: bool "Enable multiple arguments and s/m/h/d suffixes"
31//config: default y 31//config: default y
32//config: depends on SLEEP 32//config: depends on SLEEP
33//config: help 33//config: help
34//config: Allow sleep to pause for specified minutes, hours, and days. 34//config: Allow sleep to pause for specified minutes, hours, and days.
35//config: 35//config:
36//config:config FEATURE_FLOAT_SLEEP 36//config:config FEATURE_FLOAT_SLEEP
37//config: bool "Enable fractional arguments" 37//config: bool "Enable fractional arguments"
38//config: default y 38//config: default y
39//config: depends on FEATURE_FANCY_SLEEP 39//config: depends on FEATURE_FANCY_SLEEP
40//config: help 40//config: help
41//config: Allow for fractional numeric parameters. 41//config: Allow for fractional numeric parameters.
42 42
43/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells */ 43/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells */
44//applet:IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP)) 44//applet:IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP))
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 1ccce93c5..9860dca64 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -12,22 +12,22 @@
12 * http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html 12 * http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
13 */ 13 */
14//config:config SORT 14//config:config SORT
15//config: bool "sort" 15//config: bool "sort (7.4 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: sort is used to sort lines of text in specified files. 18//config: sort is used to sort lines of text in specified files.
19//config: 19//config:
20//config:config FEATURE_SORT_BIG 20//config:config FEATURE_SORT_BIG
21//config: bool "Full SuSv3 compliant sort (support -ktcsbdfiozgM)" 21//config: bool "Full SuSv3 compliant sort (support -ktcsbdfiozgM)"
22//config: default y 22//config: default y
23//config: depends on SORT 23//config: depends on SORT
24//config: help 24//config: help
25//config: Without this, sort only supports -r, -u, and an integer version 25//config: Without this, sort only supports -r, -u, and an integer version
26//config: of -n. Selecting this adds sort keys, floating point support, and 26//config: of -n. Selecting this adds sort keys, floating point support, and
27//config: more. This adds a little over 3k to a nonstatic build on x86. 27//config: more. This adds a little over 3k to a nonstatic build on x86.
28//config: 28//config:
29//config: The SuSv3 sort standard is available at: 29//config: The SuSv3 sort standard is available at:
30//config: http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html 30//config: http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
31 31
32//applet:IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort)) 32//applet:IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort))
33 33
diff --git a/coreutils/split.c b/coreutils/split.c
index 7af359d0e..d0c63573a 100644
--- a/coreutils/split.c
+++ b/coreutils/split.c
@@ -6,19 +6,19 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config SPLIT 8//config:config SPLIT
9//config: bool "split" 9//config: bool "split (5.4 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: Split a file into pieces. 12//config: Split a file into pieces.
13//config: 13//config:
14//config:config FEATURE_SPLIT_FANCY 14//config:config FEATURE_SPLIT_FANCY
15//config: bool "Fancy extensions" 15//config: bool "Fancy extensions"
16//config: default y 16//config: default y
17//config: depends on SPLIT 17//config: depends on SPLIT
18//config: help 18//config: help
19//config: Add support for features not required by SUSv3. 19//config: Add support for features not required by SUSv3.
20//config: Supports additional suffixes 'b' for 512 bytes, 20//config: Supports additional suffixes 'b' for 512 bytes,
21//config: 'g' for 1GiB for the -b option. 21//config: 'g' for 1GiB for the -b option.
22 22
23//applet:IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP)) 23//applet:IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP))
24 24
diff --git a/coreutils/stat.c b/coreutils/stat.c
index 109b5258c..96efa1d5d 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -13,27 +13,27 @@
13 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 13 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
14 */ 14 */
15//config:config STAT 15//config:config STAT
16//config: bool "stat" 16//config: bool "stat (10 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: display file or filesystem status. 19//config: display file or filesystem status.
20//config: 20//config:
21//config:config FEATURE_STAT_FORMAT 21//config:config FEATURE_STAT_FORMAT
22//config: bool "Enable custom formats (-c)" 22//config: bool "Enable custom formats (-c)"
23//config: default y 23//config: default y
24//config: depends on STAT 24//config: depends on STAT
25//config: help 25//config: help
26//config: Without this, stat will not support the '-c format' option where 26//config: Without this, stat will not support the '-c format' option where
27//config: users can pass a custom format string for output. This adds about 27//config: users can pass a custom format string for output. This adds about
28//config: 7k to a nonstatic build on amd64. 28//config: 7k to a nonstatic build on amd64.
29//config: 29//config:
30//config:config FEATURE_STAT_FILESYSTEM 30//config:config FEATURE_STAT_FILESYSTEM
31//config: bool "Enable display of filesystem status (-f)" 31//config: bool "Enable display of filesystem status (-f)"
32//config: default y 32//config: default y
33//config: depends on STAT 33//config: depends on STAT
34//config: help 34//config: help
35//config: Without this, stat will not support the '-f' option to display 35//config: Without this, stat will not support the '-f' option to display
36//config: information about filesystem status. 36//config: information about filesystem status.
37 37
38//applet:IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP)) 38//applet:IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP))
39 39
diff --git a/coreutils/stty.c b/coreutils/stty.c
index e818d579c..f987fbbcf 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -20,10 +20,10 @@
20 Special for busybox ported by Vladimir Oleynik <dzo@simtreas.ru> 2001 20 Special for busybox ported by Vladimir Oleynik <dzo@simtreas.ru> 2001
21*/ 21*/
22//config:config STTY 22//config:config STTY
23//config: bool "stty" 23//config: bool "stty (8.6 kb)"
24//config: default y 24//config: default y
25//config: help 25//config: help
26//config: stty is used to change and print terminal line settings. 26//config: stty is used to change and print terminal line settings.
27 27
28//applet:IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP)) 28//applet:IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP))
29 29
diff --git a/coreutils/sum.c b/coreutils/sum.c
index 2a91f963c..ee758877f 100644
--- a/coreutils/sum.c
+++ b/coreutils/sum.c
@@ -13,10 +13,10 @@
13 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 13 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
14 */ 14 */
15//config:config SUM 15//config:config SUM
16//config: bool "sum" 16//config: bool "sum (4.3 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: checksum and count the blocks in a file 19//config: checksum and count the blocks in a file
20 20
21//applet:IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP)) 21//applet:IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP))
22 22
diff --git a/coreutils/sync.c b/coreutils/sync.c
index 5e189f6f4..66445281a 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -8,17 +8,17 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config SYNC 10//config:config SYNC
11//config: bool "sync" 11//config: bool "sync (769 bytes)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: sync is used to flush filesystem buffers. 14//config: sync is used to flush filesystem buffers.
15//config:config FEATURE_SYNC_FANCY 15//config:config FEATURE_SYNC_FANCY
16//config: bool "Enable -d and -f flags (requires syncfs(2) in libc)" 16//config: bool "Enable -d and -f flags (requires syncfs(2) in libc)"
17//config: default y 17//config: default y
18//config: depends on SYNC 18//config: depends on SYNC
19//config: help 19//config: help
20//config: sync -d FILE... executes fdatasync() on each FILE. 20//config: sync -d FILE... executes fdatasync() on each FILE.
21//config: sync -f FILE... executes syncfs() on each FILE. 21//config: sync -f FILE... executes syncfs() on each FILE.
22 22
23//applet:IF_SYNC(APPLET_NOFORK(sync, sync, BB_DIR_BIN, BB_SUID_DROP, sync)) 23//applet:IF_SYNC(APPLET_NOFORK(sync, sync, BB_DIR_BIN, BB_SUID_DROP, sync))
24 24
diff --git a/coreutils/tac.c b/coreutils/tac.c
index ca5617c83..6d3ea9c19 100644
--- a/coreutils/tac.c
+++ b/coreutils/tac.c
@@ -13,10 +13,10 @@
13 * http://www.uclibc.org/lists/busybox/2003-July/008813.html 13 * http://www.uclibc.org/lists/busybox/2003-July/008813.html
14 */ 14 */
15//config:config TAC 15//config:config TAC
16//config: bool "tac" 16//config: bool "tac (4.1 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: tac is used to concatenate and print files in reverse. 19//config: tac is used to concatenate and print files in reverse.
20 20
21//applet:IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac)) 21//applet:IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac))
22 22
diff --git a/coreutils/tail.c b/coreutils/tail.c
index e7a24a7a8..fd310f422 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -19,23 +19,23 @@
19 * 7) lseek attempted when count==0 even if arg was +0 (from top) 19 * 7) lseek attempted when count==0 even if arg was +0 (from top)
20 */ 20 */
21//config:config TAIL 21//config:config TAIL
22//config: bool "tail" 22//config: bool "tail (7.1 kb)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: tail is used to print the last specified number of lines 25//config: tail is used to print the last specified number of lines
26//config: from files. 26//config: from files.
27//config: 27//config:
28//config:config FEATURE_FANCY_TAIL 28//config:config FEATURE_FANCY_TAIL
29//config: bool "Enable -q, -s, -v, and -F options" 29//config: bool "Enable -q, -s, -v, and -F options"
30//config: default y 30//config: default y
31//config: depends on TAIL 31//config: depends on TAIL
32//config: help 32//config: help
33//config: These options are provided by GNU tail, but 33//config: These options are provided by GNU tail, but
34//config: are not specific in the SUSv3 standard: 34//config: are not specified in the SUSv3 standard:
35//config: -q Never output headers giving file names 35//config: -q Never output headers giving file names
36//config: -s SEC Wait SEC seconds between reads with -f 36//config: -s SEC Wait SEC seconds between reads with -f
37//config: -v Always output headers giving file names 37//config: -v Always output headers giving file names
38//config: -F Same as -f, but keep retrying 38//config: -F Same as -f, but keep retrying
39 39
40//applet:IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP)) 40//applet:IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP))
41 41
diff --git a/coreutils/tee.c b/coreutils/tee.c
index 602d06737..f0ec791bb 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -7,18 +7,18 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config TEE 9//config:config TEE
10//config: bool "tee" 10//config: bool "tee (4.3 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: tee is used to read from standard input and write 13//config: tee is used to read from standard input and write
14//config: to standard output and files. 14//config: to standard output and files.
15//config: 15//config:
16//config:config FEATURE_TEE_USE_BLOCK_IO 16//config:config FEATURE_TEE_USE_BLOCK_IO
17//config: bool "Enable block I/O (larger/faster) instead of byte I/O" 17//config: bool "Enable block I/O (larger/faster) instead of byte I/O"
18//config: default y 18//config: default y
19//config: depends on TEE 19//config: depends on TEE
20//config: help 20//config: help
21//config: Enable this option for a faster tee, at expense of size. 21//config: Enable this option for a faster tee, at expense of size.
22 22
23//applet:IF_TEE(APPLET(tee, BB_DIR_USR_BIN, BB_SUID_DROP)) 23//applet:IF_TEE(APPLET(tee, BB_DIR_USR_BIN, BB_SUID_DROP))
24 24
diff --git a/coreutils/test.c b/coreutils/test.c
index d4f93312a..fca55551e 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -20,31 +20,31 @@
20 * "This program is in the Public Domain." 20 * "This program is in the Public Domain."
21 */ 21 */
22//config:config TEST 22//config:config TEST
23//config: bool "test" 23//config: bool "test (3.6 kb)"
24//config: default y 24//config: default y
25//config: help 25//config: help
26//config: test is used to check file types and compare values, 26//config: test is used to check file types and compare values,
27//config: returning an appropriate exit code. The bash shell 27//config: returning an appropriate exit code. The bash shell
28//config: has test built in, ash can build it in optionally. 28//config: has test built in, ash can build it in optionally.
29//config: 29//config:
30//config:config TEST1 30//config:config TEST1
31//config: bool "test as [" 31//config: bool "test as ["
32//config: default y 32//config: default y
33//config: help 33//config: help
34//config: Provide test command in the "[ EXPR ]" form 34//config: Provide test command in the "[ EXPR ]" form
35//config: 35//config:
36//config:config TEST2 36//config:config TEST2
37//config: bool "test as [[" 37//config: bool "test as [["
38//config: default y 38//config: default y
39//config: help 39//config: help
40//config: Provide test command in the "[[ EXPR ]]" form 40//config: Provide test command in the "[[ EXPR ]]" form
41//config: 41//config:
42//config:config FEATURE_TEST_64 42//config:config FEATURE_TEST_64
43//config: bool "Extend test to 64 bit" 43//config: bool "Extend test to 64 bit"
44//config: default y 44//config: default y
45//config: depends on TEST || TEST1 || TEST2 || ASH_TEST || HUSH_TEST 45//config: depends on TEST || TEST1 || TEST2 || ASH_TEST || HUSH_TEST
46//config: help 46//config: help
47//config: Enable 64-bit support in test. 47//config: Enable 64-bit support in test.
48 48
49//applet:IF_TEST(APPLET_NOFORK(test, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) 49//applet:IF_TEST(APPLET_NOFORK(test, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
50//applet:IF_TEST1(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) 50//applet:IF_TEST1(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
diff --git a/coreutils/timeout.c b/coreutils/timeout.c
index f29dc8a9c..4a6117f59 100644
--- a/coreutils/timeout.c
+++ b/coreutils/timeout.c
@@ -28,11 +28,11 @@
28 * rewrite 14-11-2008 vda 28 * rewrite 14-11-2008 vda
29 */ 29 */
30//config:config TIMEOUT 30//config:config TIMEOUT
31//config: bool "timeout" 31//config: bool "timeout (5.5 kb)"
32//config: default y 32//config: default y
33//config: help 33//config: help
34//config: Runs a program and watches it. If it does not terminate in 34//config: Runs a program and watches it. If it does not terminate in
35//config: specified number of seconds, it is sent a signal. 35//config: specified number of seconds, it is sent a signal.
36 36
37//applet:IF_TIMEOUT(APPLET(timeout, BB_DIR_USR_BIN, BB_SUID_DROP)) 37//applet:IF_TIMEOUT(APPLET(timeout, BB_DIR_USR_BIN, BB_SUID_DROP))
38 38
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 92d5a718a..11b40d427 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -13,26 +13,26 @@
13 * Also, exiting on a failure was a bug. All args should be processed. 13 * Also, exiting on a failure was a bug. All args should be processed.
14 */ 14 */
15//config:config TOUCH 15//config:config TOUCH
16//config: bool "touch" 16//config: bool "touch (5.8 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: touch is used to create or change the access and/or 19//config: touch is used to create or change the access and/or
20//config: modification timestamp of specified files. 20//config: modification timestamp of specified files.
21//config: 21//config:
22//config:config FEATURE_TOUCH_NODEREF 22//config:config FEATURE_TOUCH_NODEREF
23//config: bool "Add support for -h" 23//config: bool "Add support for -h"
24//config: default y 24//config: default y
25//config: depends on TOUCH 25//config: depends on TOUCH
26//config: help 26//config: help
27//config: Enable touch to have the -h option. 27//config: Enable touch to have the -h option.
28//config: This requires libc support for lutimes() function. 28//config: This requires libc support for lutimes() function.
29//config: 29//config:
30//config:config FEATURE_TOUCH_SUSV3 30//config:config FEATURE_TOUCH_SUSV3
31//config: bool "Add support for SUSV3 features (-d -t -r)" 31//config: bool "Add support for SUSV3 features (-d -t -r)"
32//config: default y 32//config: default y
33//config: depends on TOUCH 33//config: depends on TOUCH
34//config: help 34//config: help
35//config: Enable touch to use a reference file or a given date/time argument. 35//config: Enable touch to use a reference file or a given date/time argument.
36 36
37//applet:IF_TOUCH(APPLET_NOFORK(touch, touch, BB_DIR_BIN, BB_SUID_DROP, touch)) 37//applet:IF_TOUCH(APPLET_NOFORK(touch, touch, BB_DIR_BIN, BB_SUID_DROP, touch))
38 38
diff --git a/coreutils/tr.c b/coreutils/tr.c
index f552096f3..64e4efc91 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -19,30 +19,30 @@
19 * TODO: graph, print 19 * TODO: graph, print
20 */ 20 */
21//config:config TR 21//config:config TR
22//config: bool "tr" 22//config: bool "tr (5.5 kb)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: tr is used to squeeze, and/or delete characters from standard 25//config: tr is used to squeeze, and/or delete characters from standard
26//config: input, writing to standard output. 26//config: input, writing to standard output.
27//config: 27//config:
28//config:config FEATURE_TR_CLASSES 28//config:config FEATURE_TR_CLASSES
29//config: bool "Enable character classes (such as [:upper:])" 29//config: bool "Enable character classes (such as [:upper:])"
30//config: default y 30//config: default y
31//config: depends on TR 31//config: depends on TR
32//config: help 32//config: help
33//config: Enable character classes, enabling commands such as: 33//config: Enable character classes, enabling commands such as:
34//config: tr [:upper:] [:lower:] to convert input into lowercase. 34//config: tr [:upper:] [:lower:] to convert input into lowercase.
35//config: 35//config:
36//config:config FEATURE_TR_EQUIV 36//config:config FEATURE_TR_EQUIV
37//config: bool "Enable equivalence classes" 37//config: bool "Enable equivalence classes"
38//config: default y 38//config: default y
39//config: depends on TR 39//config: depends on TR
40//config: help 40//config: help
41//config: Enable equivalence classes, which essentially add the enclosed 41//config: Enable equivalence classes, which essentially add the enclosed
42//config: character to the current set. For instance, tr [=a=] xyz would 42//config: character to the current set. For instance, tr [=a=] xyz would
43//config: replace all instances of 'a' with 'xyz'. This option is mainly 43//config: replace all instances of 'a' with 'xyz'. This option is mainly
44//config: useful for cases when no other way of expressing a character 44//config: useful for cases when no other way of expressing a character
45//config: is possible. 45//config: is possible.
46 46
47//applet:IF_TR(APPLET(tr, BB_DIR_USR_BIN, BB_SUID_DROP)) 47//applet:IF_TR(APPLET(tr, BB_DIR_USR_BIN, BB_SUID_DROP))
48 48
diff --git a/coreutils/true.c b/coreutils/true.c
index 6a9493f9d..400388c34 100644
--- a/coreutils/true.c
+++ b/coreutils/true.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config TRUE 9//config:config TRUE
10//config: bool "true" 10//config: bool "true (tiny)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: true returns an exit code of TRUE (0). 13//config: true returns an exit code of TRUE (0).
14 14
15//applet:IF_TRUE(APPLET_NOFORK(true, true, BB_DIR_BIN, BB_SUID_DROP, true)) 15//applet:IF_TRUE(APPLET_NOFORK(true, true, BB_DIR_BIN, BB_SUID_DROP, true))
16 16
diff --git a/coreutils/truncate.c b/coreutils/truncate.c
index 253fe0015..f67abaf40 100644
--- a/coreutils/truncate.c
+++ b/coreutils/truncate.c
@@ -6,11 +6,11 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config TRUNCATE 8//config:config TRUNCATE
9//config: bool "truncate" 9//config: bool "truncate (4.7 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: truncate truncates files to a given size. If a file does 12//config: truncate truncates files to a given size. If a file does
13//config: not exist, it is created unless told otherwise. 13//config: not exist, it is created unless told otherwise.
14 14
15//applet:IF_TRUNCATE(APPLET_NOFORK(truncate, truncate, BB_DIR_USR_BIN, BB_SUID_DROP, truncate)) 15//applet:IF_TRUNCATE(APPLET_NOFORK(truncate, truncate, BB_DIR_USR_BIN, BB_SUID_DROP, truncate))
16 16
diff --git a/coreutils/tty.c b/coreutils/tty.c
index 359e5bc93..331941a01 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config TTY 9//config:config TTY
10//config: bool "tty" 10//config: bool "tty (3.3 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: tty is used to print the name of the current terminal to 13//config: tty is used to print the name of the current terminal to
14//config: standard output. 14//config: standard output.
15 15
16//applet:IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP)) 16//applet:IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP))
17 17
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 9c6a06ebb..aad58cab0 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -43,32 +43,32 @@
43 * Fix handling of -a to not print "unknown", add -o and -i support. 43 * Fix handling of -a to not print "unknown", add -o and -i support.
44 */ 44 */
45//config:config UNAME 45//config:config UNAME
46//config: bool "uname" 46//config: bool "uname (3.7 kb)"
47//config: default y 47//config: default y
48//config: help 48//config: help
49//config: uname is used to print system information. 49//config: uname is used to print system information.
50//config: 50//config:
51//config:config UNAME_OSNAME 51//config:config UNAME_OSNAME
52//config: string "Operating system name" 52//config: string "Operating system name"
53//config: default "GNU/Linux" 53//config: default "GNU/Linux"
54//config: depends on UNAME 54//config: depends on UNAME
55//config: help 55//config: help
56//config: Sets the operating system name reported by uname -o. The 56//config: Sets the operating system name reported by uname -o. The
57//config: default is "GNU/Linux". 57//config: default is "GNU/Linux".
58//config: 58//config:
59//can't use "ARCH" for this applet, all hell breaks loose in build system :) 59//can't use "ARCH" for this applet, all hell breaks loose in build system :)
60//config:config BBARCH 60//config:config BB_ARCH
61//config: bool "arch" 61//config: bool "arch (1.6 kb)"
62//config: default y 62//config: default y
63//config: help 63//config: help
64//config: Same as uname -m. 64//config: Same as uname -m.
65 65
66//applet:IF_UNAME(APPLET(uname, BB_DIR_BIN, BB_SUID_DROP)) 66//applet:IF_UNAME(APPLET(uname, BB_DIR_BIN, BB_SUID_DROP))
67// APPLET_ODDNAME:name main location suid_type help 67// APPLET_ODDNAME:name main location suid_type help
68//applet:IF_BBARCH(APPLET_ODDNAME(arch, uname, BB_DIR_BIN, BB_SUID_DROP, arch)) 68//applet:IF_BB_ARCH(APPLET_ODDNAME(arch, uname, BB_DIR_BIN, BB_SUID_DROP, arch))
69 69
70//kbuild:lib-$(CONFIG_UNAME) += uname.o 70//kbuild:lib-$(CONFIG_UNAME) += uname.o
71//kbuild:lib-$(CONFIG_BBARCH) += uname.o 71//kbuild:lib-$(CONFIG_BB_ARCH) += uname.o
72 72
73/* BB_AUDIT SUSv3 compliant */ 73/* BB_AUDIT SUSv3 compliant */
74/* http://www.opengroup.org/onlinepubs/007904975/utilities/uname.html */ 74/* http://www.opengroup.org/onlinepubs/007904975/utilities/uname.html */
@@ -131,7 +131,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
131 toprint = (1 << 4); /* "arch" = "uname -m" */ 131 toprint = (1 << 4); /* "arch" = "uname -m" */
132 132
133#if ENABLE_UNAME 133#if ENABLE_UNAME
134 if (!ENABLE_BBARCH || applet_name[0] == 'u') { 134 if (!ENABLE_BB_ARCH || applet_name[0] == 'u') {
135# if ENABLE_LONG_OPTS 135# if ENABLE_LONG_OPTS
136 static const char uname_longopts[] ALIGN1 = 136 static const char uname_longopts[] ALIGN1 =
137 /* name, has_arg, val */ 137 /* name, has_arg, val */
@@ -172,7 +172,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
172 } 172 }
173 } 173 }
174#endif 174#endif
175 if (ENABLE_BBARCH && (!ENABLE_UNAME || applet_name[0] == 'a')) { 175 if (ENABLE_BB_ARCH && (!ENABLE_UNAME || applet_name[0] == 'a')) {
176 puts(uname_info.name.machine); 176 puts(uname_info.name.machine);
177 } else { 177 } else {
178#if ENABLE_UNAME 178#if ENABLE_UNAME
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 2b62ad3ae..f71557b67 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config UNIQ 9//config:config UNIQ
10//config: bool "uniq" 10//config: bool "uniq (4.8 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: uniq is used to remove duplicate lines from a sorted file. 13//config: uniq is used to remove duplicate lines from a sorted file.
14 14
15//applet:IF_UNIQ(APPLET(uniq, BB_DIR_USR_BIN, BB_SUID_DROP)) 15//applet:IF_UNIQ(APPLET(uniq, BB_DIR_USR_BIN, BB_SUID_DROP))
16 16
diff --git a/coreutils/unlink.c b/coreutils/unlink.c
index 2879638d3..3322d5b47 100644
--- a/coreutils/unlink.c
+++ b/coreutils/unlink.c
@@ -6,10 +6,10 @@
6 * Licensed under GPLv2, see LICENSE in this source tree 6 * Licensed under GPLv2, see LICENSE in this source tree
7 */ 7 */
8//config:config UNLINK 8//config:config UNLINK
9//config: bool "unlink" 9//config: bool "unlink (3.5 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: unlink deletes a file by calling unlink() 12//config: unlink deletes a file by calling unlink()
13 13
14//applet:IF_UNLINK(APPLET(unlink, BB_DIR_USR_BIN, BB_SUID_DROP)) 14//applet:IF_UNLINK(APPLET(unlink, BB_DIR_USR_BIN, BB_SUID_DROP))
15 15
diff --git a/coreutils/usleep.c b/coreutils/usleep.c
index 7bc30c2a2..7c25aada1 100644
--- a/coreutils/usleep.c
+++ b/coreutils/usleep.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config USLEEP 9//config:config USLEEP
10//config: bool "usleep" 10//config: bool "usleep (1.1 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: usleep is used to pause for a specified number of microseconds. 13//config: usleep is used to pause for a specified number of microseconds.
14 14
15//applet:IF_USLEEP(APPLET_NOFORK(usleep, usleep, BB_DIR_BIN, BB_SUID_DROP, usleep)) 15//applet:IF_USLEEP(APPLET_NOFORK(usleep, usleep, BB_DIR_BIN, BB_SUID_DROP, usleep))
16 16
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 2fe771f69..4e72e86ee 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -11,10 +11,10 @@
11 * "end" line 11 * "end" line
12 */ 12 */
13//config:config UUDECODE 13//config:config UUDECODE
14//config: bool "uudecode" 14//config: bool "uudecode (5.9 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: uudecode is used to decode a uuencoded file. 17//config: uudecode is used to decode a uuencoded file.
18 18
19//applet:IF_UUDECODE(APPLET(uudecode, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_UUDECODE(APPLET(uudecode, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
@@ -176,10 +176,10 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv)
176//kbuild:lib-$(CONFIG_BASE64) += uudecode.o 176//kbuild:lib-$(CONFIG_BASE64) += uudecode.o
177 177
178//config:config BASE64 178//config:config BASE64
179//config: bool "base64" 179//config: bool "base64 (5 kb)"
180//config: default y 180//config: default y
181//config: help 181//config: help
182//config: Base64 encode and decode 182//config: Base64 encode and decode
183 183
184//usage:#define base64_trivial_usage 184//usage:#define base64_trivial_usage
185//usage: "[-d] [FILE]" 185//usage: "[-d] [FILE]"
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 917cdaea5..7164f838a 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -8,10 +8,10 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config UUENCODE 10//config:config UUENCODE
11//config: bool "uuencode" 11//config: bool "uuencode (4.6 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: uuencode is used to uuencode a file. 14//config: uuencode is used to uuencode a file.
15 15
16//applet:IF_UUENCODE(APPLET(uuencode, BB_DIR_USR_BIN, BB_SUID_DROP)) 16//applet:IF_UUENCODE(APPLET(uuencode, BB_DIR_USR_BIN, BB_SUID_DROP))
17 17
diff --git a/coreutils/wc.c b/coreutils/wc.c
index 4c53049b0..c74b7a65f 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -33,18 +33,18 @@
33 * for which 'wc -c' should output '0'. 33 * for which 'wc -c' should output '0'.
34 */ 34 */
35//config:config WC 35//config:config WC
36//config: bool "wc" 36//config: bool "wc (4.4 kb)"
37//config: default y 37//config: default y
38//config: help 38//config: help
39//config: wc is used to print the number of bytes, words, and lines, 39//config: wc is used to print the number of bytes, words, and lines,
40//config: in specified files. 40//config: in specified files.
41//config: 41//config:
42//config:config FEATURE_WC_LARGE 42//config:config FEATURE_WC_LARGE
43//config: bool "Support very large counts" 43//config: bool "Support very large counts"
44//config: default y 44//config: default y
45//config: depends on WC 45//config: depends on WC
46//config: help 46//config: help
47//config: Use "unsigned long long" for counter variables. 47//config: Use "unsigned long long" for counter variables.
48 48
49//applet:IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP)) 49//applet:IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP))
50 50
diff --git a/coreutils/who.c b/coreutils/who.c
index 4adead77e..91f99138c 100644
--- a/coreutils/who.c
+++ b/coreutils/who.c
@@ -17,26 +17,26 @@
17 *---------------------------------------------------------------------- 17 *----------------------------------------------------------------------
18 */ 18 */
19//config:config WHO 19//config:config WHO
20//config: bool "who" 20//config: bool "who (3.7 kb)"
21//config: default y 21//config: default y
22//config: depends on FEATURE_UTMP 22//config: depends on FEATURE_UTMP
23//config: help 23//config: help
24//config: who is used to show who is logged on. 24//config: Print users currently logged on.
25//config: 25//config:
26// procps-ng has this variation of "who": 26// procps-ng has this variation of "who":
27//config:config W 27//config:config W
28//config: bool "w" 28//config: bool "w (3.7 kb)"
29//config: default y 29//config: default y
30//config: depends on FEATURE_UTMP 30//config: depends on FEATURE_UTMP
31//config: help 31//config: help
32//config: w is used to show who is logged on. 32//config: Print users currently logged on.
33//config: 33//config:
34//config:config USERS 34//config:config USERS
35//config: bool "users" 35//config: bool "users (3.2 kb)"
36//config: default y 36//config: default y
37//config: depends on FEATURE_UTMP 37//config: depends on FEATURE_UTMP
38//config: help 38//config: help
39//config: Print users currently logged on. 39//config: Print users currently logged on.
40 40
41// APPLET_ODDNAME:name main location suid_type help 41// APPLET_ODDNAME:name main location suid_type help
42//applet:IF_USERS(APPLET_ODDNAME(users, who, BB_DIR_USR_BIN, BB_SUID_DROP, users)) 42//applet:IF_USERS(APPLET_ODDNAME(users, who, BB_DIR_USR_BIN, BB_SUID_DROP, users))
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index 635712829..9dab15817 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config WHOAMI 9//config:config WHOAMI
10//config: bool "whoami" 10//config: bool "whoami (2.9 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: whoami is used to print the username of the current 13//config: whoami is used to print the username of the current
14//config: user id (same as id -un). 14//config: user id (same as id -un).
15 15
16//applet:IF_WHOAMI(APPLET_NOFORK(whoami, whoami, BB_DIR_USR_BIN, BB_SUID_DROP, whoami)) 16//applet:IF_WHOAMI(APPLET_NOFORK(whoami, whoami, BB_DIR_USR_BIN, BB_SUID_DROP, whoami))
17 17
diff --git a/coreutils/yes.c b/coreutils/yes.c
index ce6a90fc0..a5a444249 100644
--- a/coreutils/yes.c
+++ b/coreutils/yes.c
@@ -11,11 +11,11 @@
11 * Size reductions and removed redundant applet name prefix from error messages. 11 * Size reductions and removed redundant applet name prefix from error messages.
12 */ 12 */
13//config:config YES 13//config:config YES
14//config: bool "yes" 14//config: bool "yes (956 bytes)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: yes is used to repeatedly output a specific string, or 17//config: yes is used to repeatedly output a specific string, or
18//config: the default string `y'. 18//config: the default string `y'.
19 19
20//applet:IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes)) 20//applet:IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes))
21 21
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c
index 21d330b59..e6b7601fa 100644
--- a/debianutils/pipe_progress.c
+++ b/debianutils/pipe_progress.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config PIPE_PROGRESS 9//config:config PIPE_PROGRESS
10//config: bool "pipe_progress" 10//config: bool "pipe_progress (225 bytes)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: Display a dot to indicate pipe activity. 13//config: Display a dot to indicate pipe activity.
14 14
15//applet:IF_PIPE_PROGRESS(APPLET(pipe_progress, BB_DIR_BIN, BB_SUID_DROP)) 15//applet:IF_PIPE_PROGRESS(APPLET(pipe_progress, BB_DIR_BIN, BB_SUID_DROP))
16 16
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c
index 3ef28f1d4..c6a90a486 100644
--- a/debianutils/run_parts.c
+++ b/debianutils/run_parts.c
@@ -23,19 +23,19 @@
23 * broken compatibility because the BusyBox policy doesn't allow them. 23 * broken compatibility because the BusyBox policy doesn't allow them.
24 */ 24 */
25//config:config RUN_PARTS 25//config:config RUN_PARTS
26//config: bool "run-parts" 26//config: bool "run-parts (5.6 kb)"
27//config: default y 27//config: default y
28//config: help 28//config: help
29//config: run-parts is a utility designed to run all the scripts in a directory. 29//config: run-parts is a utility designed to run all the scripts in a directory.
30//config: 30//config:
31//config: It is useful to set up a directory like cron.daily, where you need to 31//config: It is useful to set up a directory like cron.daily, where you need to
32//config: execute all the scripts in that directory. 32//config: execute all the scripts in that directory.
33//config: 33//config:
34//config: In this implementation of run-parts some features (such as report 34//config: In this implementation of run-parts some features (such as report
35//config: mode) are not implemented. 35//config: mode) are not implemented.
36//config: 36//config:
37//config: Unless you know that run-parts is used in some of your scripts 37//config: Unless you know that run-parts is used in some of your scripts
38//config: you can safely say N here. 38//config: you can safely say N here.
39//config: 39//config:
40//config:config FEATURE_RUN_PARTS_LONG_OPTIONS 40//config:config FEATURE_RUN_PARTS_LONG_OPTIONS
41//config: bool "Enable long options" 41//config: bool "Enable long options"
@@ -47,9 +47,9 @@
47//config: default y 47//config: default y
48//config: depends on RUN_PARTS 48//config: depends on RUN_PARTS
49//config: help 49//config: help
50//config: Support additional options: 50//config: Support additional options:
51//config: -l --list print the names of the all matching files (not 51//config: -l --list print the names of the all matching files (not
52//config: limited to executables), but don't actually run them. 52//config: limited to executables), but don't actually run them.
53 53
54//applet:IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, BB_DIR_BIN, BB_SUID_DROP, run_parts)) 54//applet:IF_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, BB_DIR_BIN, BB_SUID_DROP, run_parts))
55 55
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index 4a9e0653e..9d60b2c7f 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -57,12 +57,12 @@ Misc options:
57 -v,--verbose Verbose 57 -v,--verbose Verbose
58*/ 58*/
59//config:config START_STOP_DAEMON 59//config:config START_STOP_DAEMON
60//config: bool "start-stop-daemon" 60//config: bool "start-stop-daemon (12 kb)"
61//config: default y 61//config: default y
62//config: help 62//config: help
63//config: start-stop-daemon is used to control the creation and 63//config: start-stop-daemon is used to control the creation and
64//config: termination of system-level processes, usually the ones 64//config: termination of system-level processes, usually the ones
65//config: started during the startup of the system. 65//config: started during the startup of the system.
66//config: 66//config:
67//config:config FEATURE_START_STOP_DAEMON_LONG_OPTIONS 67//config:config FEATURE_START_STOP_DAEMON_LONG_OPTIONS
68//config: bool "Enable long options" 68//config: bool "Enable long options"
@@ -74,9 +74,9 @@ Misc options:
74//config: default y 74//config: default y
75//config: depends on START_STOP_DAEMON 75//config: depends on START_STOP_DAEMON
76//config: help 76//config: help
77//config: -o|--oknodo ignored since we exit with 0 anyway 77//config: -o|--oknodo ignored since we exit with 0 anyway
78//config: -v|--verbose 78//config: -v|--verbose
79//config: -N|--nicelevel N 79//config: -N|--nicelevel N
80 80
81//applet:IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, BB_DIR_SBIN, BB_SUID_DROP, start_stop_daemon)) 81//applet:IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, BB_DIR_SBIN, BB_SUID_DROP, start_stop_daemon))
82 82
diff --git a/debianutils/which.c b/debianutils/which.c
index af33ba72e..491557167 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -6,11 +6,11 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config WHICH 8//config:config WHICH
9//config: bool "which" 9//config: bool "which (3.7 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: which is used to find programs in your PATH and 12//config: which is used to find programs in your PATH and
13//config: print out their pathnames. 13//config: print out their pathnames.
14 14
15//applet:IF_WHICH(APPLET(which, BB_DIR_USR_BIN, BB_SUID_DROP)) 15//applet:IF_WHICH(APPLET(which, BB_DIR_USR_BIN, BB_SUID_DROP))
16 16
diff --git a/e2fsprogs/chattr.c b/e2fsprogs/chattr.c
index 043f39591..72327d728 100644
--- a/e2fsprogs/chattr.c
+++ b/e2fsprogs/chattr.c
@@ -10,10 +10,10 @@
10 * Public License 10 * Public License
11 */ 11 */
12//config:config CHATTR 12//config:config CHATTR
13//config: bool "chattr" 13//config: bool "chattr (3.2 kb)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: chattr changes the file attributes on a second extended file system. 16//config: chattr changes the file attributes on a second extended file system.
17 17
18//applet:IF_CHATTR(APPLET(chattr, BB_DIR_BIN, BB_SUID_DROP)) 18//applet:IF_CHATTR(APPLET(chattr, BB_DIR_BIN, BB_SUID_DROP))
19 19
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index eb53002b1..1c285bb92 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -34,12 +34,12 @@
34 * It doesn't guess filesystem types from on-disk format. 34 * It doesn't guess filesystem types from on-disk format.
35 */ 35 */
36//config:config FSCK 36//config:config FSCK
37//config: bool "fsck" 37//config: bool "fsck (6.7 kb)"
38//config: default y 38//config: default y
39//config: help 39//config: help
40//config: fsck is used to check and optionally repair one or more filesystems. 40//config: fsck is used to check and optionally repair one or more filesystems.
41//config: In actuality, fsck is simply a front-end for the various file system 41//config: In actuality, fsck is simply a front-end for the various file system
42//config: checkers (fsck.fstype) available under Linux. 42//config: checkers (fsck.fstype) available under Linux.
43 43
44//applet:IF_FSCK(APPLET(fsck, BB_DIR_SBIN, BB_SUID_DROP)) 44//applet:IF_FSCK(APPLET(fsck, BB_DIR_SBIN, BB_SUID_DROP))
45 45
diff --git a/e2fsprogs/lsattr.c b/e2fsprogs/lsattr.c
index d2348b5f7..756d26832 100644
--- a/e2fsprogs/lsattr.c
+++ b/e2fsprogs/lsattr.c
@@ -10,11 +10,11 @@
10 * Public License 10 * Public License
11 */ 11 */
12//config:config LSATTR 12//config:config LSATTR
13//config: bool "lsattr" 13//config: bool "lsattr (5 kb)"
14//config: default y 14//config: default y
15//config: select PLATFORM_LINUX 15//config: select PLATFORM_LINUX
16//config: help 16//config: help
17//config: lsattr lists the file attributes on a second extended file system. 17//config: lsattr lists the file attributes on a second extended file system.
18 18
19//applet:IF_LSATTR(APPLET(lsattr, BB_DIR_BIN, BB_SUID_DROP)) 19//applet:IF_LSATTR(APPLET(lsattr, BB_DIR_BIN, BB_SUID_DROP))
20 20
diff --git a/e2fsprogs/tune2fs.c b/e2fsprogs/tune2fs.c
index e9bad66ad..95411db5f 100644
--- a/e2fsprogs/tune2fs.c
+++ b/e2fsprogs/tune2fs.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config TUNE2FS 9//config:config TUNE2FS
10//config: bool "tune2fs" 10//config: bool "tune2fs (4.4 kb)"
11//config: default n # off: it is too limited compared to upstream version 11//config: default n # off: it is too limited compared to upstream version
12//config: help 12//config: help
13//config: tune2fs allows the system administrator to adjust various tunable 13//config: tune2fs allows the system administrator to adjust various tunable
14//config: filesystem parameters on Linux ext2/ext3 filesystems. 14//config: filesystem parameters on Linux ext2/ext3 filesystems.
15 15
16//applet:IF_TUNE2FS(APPLET(tune2fs, BB_DIR_SBIN, BB_SUID_DROP)) 16//applet:IF_TUNE2FS(APPLET(tune2fs, BB_DIR_SBIN, BB_SUID_DROP))
17 17
diff --git a/editors/Config.src b/editors/Config.src
index 8f2b265bd..0920bc494 100644
--- a/editors/Config.src
+++ b/editors/Config.src
@@ -12,7 +12,7 @@ config FEATURE_ALLOW_EXEC
12 default y 12 default y
13 depends on VI || AWK 13 depends on VI || AWK
14 help 14 help
15 Enables vi and awk features which allow user to execute 15 Enables vi and awk features which allow user to execute
16 shell commands (using system() C call). 16 shell commands (using system() C call).
17 17
18endmenu 18endmenu
diff --git a/editors/awk.c b/editors/awk.c
index e8e2c96f8..602a1d5e7 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -8,30 +8,30 @@
8 */ 8 */
9 9
10//config:config AWK 10//config:config AWK
11//config: bool "awk" 11//config: bool "awk (22 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Awk is used as a pattern scanning and processing language. This is 14//config: Awk is used as a pattern scanning and processing language. This is
15//config: the BusyBox implementation of that programming language. 15//config: the BusyBox implementation of that programming language.
16//config: 16//config:
17//config:config FEATURE_AWK_LIBM 17//config:config FEATURE_AWK_LIBM
18//config: bool "Enable math functions (requires libm)" 18//config: bool "Enable math functions (requires libm)"
19//config: default y 19//config: default y
20//config: depends on AWK 20//config: depends on AWK
21//config: help 21//config: help
22//config: Enable math functions of the Awk programming language. 22//config: Enable math functions of the Awk programming language.
23//config: NOTE: This will require libm to be present for linking. 23//config: NOTE: This requires libm to be present for linking.
24//config: 24//config:
25//config:config FEATURE_AWK_GNU_EXTENSIONS 25//config:config FEATURE_AWK_GNU_EXTENSIONS
26//config: bool "Enable a few GNU extensions" 26//config: bool "Enable a few GNU extensions"
27//config: default y 27//config: default y
28//config: depends on AWK 28//config: depends on AWK
29//config: help 29//config: help
30//config: Enable a few features from gawk: 30//config: Enable a few features from gawk:
31//config: * command line option -e AWK_PROGRAM 31//config: * command line option -e AWK_PROGRAM
32//config: * simultaneous use of -f and -e on the command line. 32//config: * simultaneous use of -f and -e on the command line.
33//config: This enables the use of awk library files. 33//config: This enables the use of awk library files.
34//config: Ex: awk -f mylib.awk -e '{print myfunction($1);}' ... 34//config: Example: awk -f mylib.awk -e '{print myfunction($1);}' ...
35 35
36//applet:IF_AWK(APPLET_NOEXEC(awk, awk, BB_DIR_USR_BIN, BB_SUID_DROP, awk)) 36//applet:IF_AWK(APPLET_NOEXEC(awk, awk, BB_DIR_USR_BIN, BB_SUID_DROP, awk))
37 37
diff --git a/editors/cmp.c b/editors/cmp.c
index a4af6f480..f53d9603c 100644
--- a/editors/cmp.c
+++ b/editors/cmp.c
@@ -11,11 +11,11 @@
11/* http://www.opengroup.org/onlinepubs/007904975/utilities/cmp.html */ 11/* http://www.opengroup.org/onlinepubs/007904975/utilities/cmp.html */
12 12
13//config:config CMP 13//config:config CMP
14//config: bool "cmp" 14//config: bool "cmp (5.4 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: cmp is used to compare two files and returns the result 17//config: cmp is used to compare two files and returns the result
18//config: to standard output. 18//config: to standard output.
19 19
20//kbuild:lib-$(CONFIG_CMP) += cmp.o 20//kbuild:lib-$(CONFIG_CMP) += cmp.o
21 21
diff --git a/editors/diff.c b/editors/diff.c
index 975bc4603..62f558944 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -77,12 +77,12 @@
77 */ 77 */
78 78
79//config:config DIFF 79//config:config DIFF
80//config: bool "diff" 80//config: bool "diff (13 kb)"
81//config: default y 81//config: default y
82//config: help 82//config: help
83//config: diff compares two files or directories and outputs the 83//config: diff compares two files or directories and outputs the
84//config: differences between them in a form that can be given to 84//config: differences between them in a form that can be given to
85//config: the patch command. 85//config: the patch command.
86//config: 86//config:
87//config:config FEATURE_DIFF_LONG_OPTIONS 87//config:config FEATURE_DIFF_LONG_OPTIONS
88//config: bool "Enable long options" 88//config: bool "Enable long options"
@@ -94,8 +94,8 @@
94//config: default y 94//config: default y
95//config: depends on DIFF 95//config: depends on DIFF
96//config: help 96//config: help
97//config: This option enables support for directory and subdirectory 97//config: This option enables support for directory and subdirectory
98//config: comparison. 98//config: comparison.
99 99
100//kbuild:lib-$(CONFIG_DIFF) += diff.o 100//kbuild:lib-$(CONFIG_DIFF) += diff.o
101 101
diff --git a/editors/ed.c b/editors/ed.c
index c028b78cb..c594d3da1 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -8,12 +8,12 @@
8 */ 8 */
9 9
10//config:config ED 10//config:config ED
11//config: bool "ed" 11//config: bool "ed (25 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: The original 1970's Unix text editor, from the days of teletypes. 14//config: The original 1970's Unix text editor, from the days of teletypes.
15//config: Small, simple, evil. Part of SUSv3. If you're not already using 15//config: Small, simple, evil. Part of SUSv3. If you're not already using
16//config: this, you don't need it. 16//config: this, you don't need it.
17 17
18//kbuild:lib-$(CONFIG_ED) += ed.o 18//kbuild:lib-$(CONFIG_ED) += ed.o
19 19
diff --git a/editors/patch.c b/editors/patch.c
index 731a8c58a..81316fae3 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -23,10 +23,10 @@
23 */ 23 */
24 24
25//config:config PATCH 25//config:config PATCH
26//config: bool "patch" 26//config: bool "patch (9.1 kb)"
27//config: default y 27//config: default y
28//config: help 28//config: help
29//config: Apply a unified diff formatted patch. 29//config: Apply a unified diff formatted patch.
30 30
31//applet:IF_PATCH(APPLET(patch, BB_DIR_USR_BIN, BB_SUID_DROP)) 31//applet:IF_PATCH(APPLET(patch, BB_DIR_USR_BIN, BB_SUID_DROP))
32 32
diff --git a/editors/patch_toybox.c b/editors/patch_toybox.c
index 5174acd6a..2c958d287 100644
--- a/editors/patch_toybox.c
+++ b/editors/patch_toybox.c
@@ -26,7 +26,7 @@
26USE_PATCH(NEWTOY(patch, USE_TOYBOX_DEBUG("x")"up#i:R", TOYFLAG_USR|TOYFLAG_BIN)) 26USE_PATCH(NEWTOY(patch, USE_TOYBOX_DEBUG("x")"up#i:R", TOYFLAG_USR|TOYFLAG_BIN))
27 27
28config PATCH 28config PATCH
29 bool "patch" 29 bool "patch (9.1 kb)"
30 default y 30 default y
31 help 31 help
32 usage: patch [-i file] [-p depth] [-Ru] 32 usage: patch [-i file] [-p depth] [-Ru]
diff --git a/editors/sed.c b/editors/sed.c
index b2c7ba829..e10078b7c 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -57,11 +57,11 @@
57 */ 57 */
58 58
59//config:config SED 59//config:config SED
60//config: bool "sed" 60//config: bool "sed (12 kb)"
61//config: default y 61//config: default y
62//config: help 62//config: help
63//config: sed is used to perform text transformations on a file 63//config: sed is used to perform text transformations on a file
64//config: or input from a pipeline. 64//config: or input from a pipeline.
65 65
66//kbuild:lib-$(CONFIG_SED) += sed.o 66//kbuild:lib-$(CONFIG_SED) += sed.o
67 67
diff --git a/editors/vi.c b/editors/vi.c
index 900b41cb5..91e954a87 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -21,13 +21,13 @@
21 */ 21 */
22 22
23//config:config VI 23//config:config VI
24//config: bool "vi" 24//config: bool "vi (22 kb)"
25//config: default y 25//config: default y
26//config: help 26//config: help
27//config: 'vi' is a text editor. More specifically, it is the One True 27//config: 'vi' is a text editor. More specifically, it is the One True
28//config: text editor <grin>. It does, however, have a rather steep 28//config: text editor <grin>. It does, however, have a rather steep
29//config: learning curve. If you are not already comfortable with 'vi' 29//config: learning curve. If you are not already comfortable with 'vi'
30//config: you may wish to use something else. 30//config: you may wish to use something else.
31//config: 31//config:
32//config:config FEATURE_VI_MAX_LEN 32//config:config FEATURE_VI_MAX_LEN
33//config: int "Maximum screen width" 33//config: int "Maximum screen width"
@@ -35,77 +35,77 @@
35//config: default 4096 35//config: default 4096
36//config: depends on VI 36//config: depends on VI
37//config: help 37//config: help
38//config: Contrary to what you may think, this is not eating much. 38//config: Contrary to what you may think, this is not eating much.
39//config: Make it smaller than 4k only if you are very limited on memory. 39//config: Make it smaller than 4k only if you are very limited on memory.
40//config: 40//config:
41//config:config FEATURE_VI_8BIT 41//config:config FEATURE_VI_8BIT
42//config: bool "Allow to display 8-bit chars (otherwise shows dots)" 42//config: bool "Allow to display 8-bit chars (otherwise shows dots)"
43//config: default n 43//config: default n
44//config: depends on VI 44//config: depends on VI
45//config: help 45//config: help
46//config: If your terminal can display characters with high bit set, 46//config: If your terminal can display characters with high bit set,
47//config: you may want to enable this. Note: vi is not Unicode-capable. 47//config: you may want to enable this. Note: vi is not Unicode-capable.
48//config: If your terminal combines several 8-bit bytes into one character 48//config: If your terminal combines several 8-bit bytes into one character
49//config: (as in Unicode mode), this will not work properly. 49//config: (as in Unicode mode), this will not work properly.
50//config: 50//config:
51//config:config FEATURE_VI_COLON 51//config:config FEATURE_VI_COLON
52//config: bool "Enable \":\" colon commands (no \"ex\" mode)" 52//config: bool "Enable \":\" colon commands (no \"ex\" mode)"
53//config: default y 53//config: default y
54//config: depends on VI 54//config: depends on VI
55//config: help 55//config: help
56//config: Enable a limited set of colon commands. This does not 56//config: Enable a limited set of colon commands. This does not
57//config: provide an "ex" mode. 57//config: provide an "ex" mode.
58//config: 58//config:
59//config:config FEATURE_VI_YANKMARK 59//config:config FEATURE_VI_YANKMARK
60//config: bool "Enable yank/put commands and mark cmds" 60//config: bool "Enable yank/put commands and mark cmds"
61//config: default y 61//config: default y
62//config: depends on VI 62//config: depends on VI
63//config: help 63//config: help
64//config: This will enable you to use yank and put, as well as mark. 64//config: This enables you to use yank and put, as well as mark.
65//config: 65//config:
66//config:config FEATURE_VI_SEARCH 66//config:config FEATURE_VI_SEARCH
67//config: bool "Enable search and replace cmds" 67//config: bool "Enable search and replace cmds"
68//config: default y 68//config: default y
69//config: depends on VI 69//config: depends on VI
70//config: help 70//config: help
71//config: Select this if you wish to be able to do search and replace. 71//config: Select this if you wish to be able to do search and replace.
72//config: 72//config:
73//config:config FEATURE_VI_REGEX_SEARCH 73//config:config FEATURE_VI_REGEX_SEARCH
74//config: bool "Enable regex in search and replace" 74//config: bool "Enable regex in search and replace"
75//config: default n # Uses GNU regex, which may be unavailable. FIXME 75//config: default n # Uses GNU regex, which may be unavailable. FIXME
76//config: depends on FEATURE_VI_SEARCH 76//config: depends on FEATURE_VI_SEARCH
77//config: help 77//config: help
78//config: Use extended regex search. 78//config: Use extended regex search.
79//config: 79//config:
80//config:config FEATURE_VI_USE_SIGNALS 80//config:config FEATURE_VI_USE_SIGNALS
81//config: bool "Catch signals" 81//config: bool "Catch signals"
82//config: default y 82//config: default y
83//config: depends on VI 83//config: depends on VI
84//config: help 84//config: help
85//config: Selecting this option will make vi signal aware. This will support 85//config: Selecting this option will make vi signal aware. This will support
86//config: SIGWINCH to deal with Window Changes, catch ^Z and ^C and alarms. 86//config: SIGWINCH to deal with Window Changes, catch ^Z and ^C and alarms.
87//config: 87//config:
88//config:config FEATURE_VI_DOT_CMD 88//config:config FEATURE_VI_DOT_CMD
89//config: bool "Remember previous cmd and \".\" cmd" 89//config: bool "Remember previous cmd and \".\" cmd"
90//config: default y 90//config: default y
91//config: depends on VI 91//config: depends on VI
92//config: help 92//config: help
93//config: Make vi remember the last command and be able to repeat it. 93//config: Make vi remember the last command and be able to repeat it.
94//config: 94//config:
95//config:config FEATURE_VI_READONLY 95//config:config FEATURE_VI_READONLY
96//config: bool "Enable -R option and \"view\" mode" 96//config: bool "Enable -R option and \"view\" mode"
97//config: default y 97//config: default y
98//config: depends on VI 98//config: depends on VI
99//config: help 99//config: help
100//config: Enable the read-only command line option, which allows the user to 100//config: Enable the read-only command line option, which allows the user to
101//config: open a file in read-only mode. 101//config: open a file in read-only mode.
102//config: 102//config:
103//config:config FEATURE_VI_SETOPTS 103//config:config FEATURE_VI_SETOPTS
104//config: bool "Enable settable options, ai ic showmatch" 104//config: bool "Enable settable options, ai ic showmatch"
105//config: default y 105//config: default y
106//config: depends on VI 106//config: depends on VI
107//config: help 107//config: help
108//config: Enable the editor to set some (ai, ic, showmatch) options. 108//config: Enable the editor to set some (ai, ic, showmatch) options.
109//config: 109//config:
110//config:config FEATURE_VI_SET 110//config:config FEATURE_VI_SET
111//config: bool "Support :set" 111//config: bool "Support :set"
@@ -117,37 +117,37 @@
117//config: default y 117//config: default y
118//config: depends on VI 118//config: depends on VI
119//config: help 119//config: help
120//config: Behave nicely with terminals that get resized. 120//config: Behave nicely with terminals that get resized.
121//config: 121//config:
122//config:config FEATURE_VI_ASK_TERMINAL 122//config:config FEATURE_VI_ASK_TERMINAL
123//config: bool "Use 'tell me cursor position' ESC sequence to measure window" 123//config: bool "Use 'tell me cursor position' ESC sequence to measure window"
124//config: default y 124//config: default y
125//config: depends on VI 125//config: depends on VI
126//config: help 126//config: help
127//config: If terminal size can't be retrieved and $LINES/$COLUMNS are not set, 127//config: If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
128//config: this option makes vi perform a last-ditch effort to find it: 128//config: this option makes vi perform a last-ditch effort to find it:
129//config: position cursor to 999,999 and ask terminal to report real 129//config: position cursor to 999,999 and ask terminal to report real
130//config: cursor position using "ESC [ 6 n" escape sequence, then read stdin. 130//config: cursor position using "ESC [ 6 n" escape sequence, then read stdin.
131//config: This is not clean but helps a lot on serial lines and such. 131//config: This is not clean but helps a lot on serial lines and such.
132//config: 132//config:
133//config:config FEATURE_VI_UNDO 133//config:config FEATURE_VI_UNDO
134//config: bool "Support undo command \"u\"" 134//config: bool "Support undo command \"u\""
135//config: default y 135//config: default y
136//config: depends on VI 136//config: depends on VI
137//config: help 137//config: help
138//config: Support the 'u' command to undo insertion, deletion, and replacement 138//config: Support the 'u' command to undo insertion, deletion, and replacement
139//config: of text. 139//config: of text.
140//config: 140//config:
141//config:config FEATURE_VI_UNDO_QUEUE 141//config:config FEATURE_VI_UNDO_QUEUE
142//config: bool "Enable undo operation queuing" 142//config: bool "Enable undo operation queuing"
143//config: default y 143//config: default y
144//config: depends on FEATURE_VI_UNDO 144//config: depends on FEATURE_VI_UNDO
145//config: help 145//config: help
146//config: The vi undo functions can use an intermediate queue to greatly lower 146//config: The vi undo functions can use an intermediate queue to greatly lower
147//config: malloc() calls and overhead. When the maximum size of this queue is 147//config: malloc() calls and overhead. When the maximum size of this queue is
148//config: reached, the contents of the queue are committed to the undo stack. 148//config: reached, the contents of the queue are committed to the undo stack.
149//config: This increases the size of the undo code and allows some undo 149//config: This increases the size of the undo code and allows some undo
150//config: operations (especially un-typing/backspacing) to be far more useful. 150//config: operations (especially un-typing/backspacing) to be far more useful.
151//config: 151//config:
152//config:config FEATURE_VI_UNDO_QUEUE_MAX 152//config:config FEATURE_VI_UNDO_QUEUE_MAX
153//config: int "Maximum undo character queue size" 153//config: int "Maximum undo character queue size"
@@ -155,13 +155,13 @@
155//config: range 32 65536 155//config: range 32 65536
156//config: depends on FEATURE_VI_UNDO_QUEUE 156//config: depends on FEATURE_VI_UNDO_QUEUE
157//config: help 157//config: help
158//config: This option sets the number of bytes used at runtime for the queue. 158//config: This option sets the number of bytes used at runtime for the queue.
159//config: Smaller values will create more undo objects and reduce the amount 159//config: Smaller values will create more undo objects and reduce the amount
160//config: of typed or backspaced characters that are grouped into one undo 160//config: of typed or backspaced characters that are grouped into one undo
161//config: operation; larger values increase the potential size of each undo 161//config: operation; larger values increase the potential size of each undo
162//config: and will generally malloc() larger objects and less frequently. 162//config: and will generally malloc() larger objects and less frequently.
163//config: Unless you want more (or less) frequent "undo points" while typing, 163//config: Unless you want more (or less) frequent "undo points" while typing,
164//config: you should probably leave this unchanged. 164//config: you should probably leave this unchanged.
165 165
166//applet:IF_VI(APPLET(vi, BB_DIR_BIN, BB_SUID_DROP)) 166//applet:IF_VI(APPLET(vi, BB_DIR_BIN, BB_SUID_DROP))
167 167
diff --git a/findutils/find.c b/findutils/find.c
index 0596c0059..69baf065d 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -54,36 +54,36 @@
54 */ 54 */
55 55
56//config:config FIND 56//config:config FIND
57//config: bool "find" 57//config: bool "find (14 kb)"
58//config: default y 58//config: default y
59//config: help 59//config: help
60//config: find is used to search your system to find specified files. 60//config: find is used to search your system to find specified files.
61//config: 61//config:
62//config:config FEATURE_FIND_PRINT0 62//config:config FEATURE_FIND_PRINT0
63//config: bool "Enable -print0: NUL-terminated output" 63//config: bool "Enable -print0: NUL-terminated output"
64//config: default y 64//config: default y
65//config: depends on FIND 65//config: depends on FIND
66//config: help 66//config: help
67//config: Causes output names to be separated by a NUL character 67//config: Causes output names to be separated by a NUL character
68//config: rather than a newline. This allows names that contain 68//config: rather than a newline. This allows names that contain
69//config: newlines and other whitespace to be more easily 69//config: newlines and other whitespace to be more easily
70//config: interpreted by other programs. 70//config: interpreted by other programs.
71//config: 71//config:
72//config:config FEATURE_FIND_MTIME 72//config:config FEATURE_FIND_MTIME
73//config: bool "Enable -mtime: modified time matching" 73//config: bool "Enable -mtime: modified time matching"
74//config: default y 74//config: default y
75//config: depends on FIND 75//config: depends on FIND
76//config: help 76//config: help
77//config: Allow searching based on the modification time of 77//config: Allow searching based on the modification time of
78//config: files, in days. 78//config: files, in days.
79//config: 79//config:
80//config:config FEATURE_FIND_MMIN 80//config:config FEATURE_FIND_MMIN
81//config: bool "Enable -mmin: modified time matching by minutes" 81//config: bool "Enable -mmin: modified time matching by minutes"
82//config: default y 82//config: default y
83//config: depends on FIND 83//config: depends on FIND
84//config: help 84//config: help
85//config: Allow searching based on the modification time of 85//config: Allow searching based on the modification time of
86//config: files, in minutes. 86//config: files, in minutes.
87//config: 87//config:
88//config:config FEATURE_FIND_PERM 88//config:config FEATURE_FIND_PERM
89//config: bool "Enable -perm: permissions matching" 89//config: bool "Enable -perm: permissions matching"
@@ -95,8 +95,8 @@
95//config: default y 95//config: default y
96//config: depends on FIND 96//config: depends on FIND
97//config: help 97//config: help
98//config: Enable searching based on file type (file, 98//config: Enable searching based on file type (file,
99//config: directory, socket, device, etc.). 99//config: directory, socket, device, etc.).
100//config: 100//config:
101//config:config FEATURE_FIND_XDEV 101//config:config FEATURE_FIND_XDEV
102//config: bool "Enable -xdev: 'stay in filesystem'" 102//config: bool "Enable -xdev: 'stay in filesystem'"
@@ -113,8 +113,8 @@
113//config: default y 113//config: default y
114//config: depends on FIND 114//config: depends on FIND
115//config: help 115//config: help
116//config: Support the 'find -newer' option for finding any files which have 116//config: Support the 'find -newer' option for finding any files which have
117//config: modification time that is more recent than the specified FILE. 117//config: modification time that is more recent than the specified FILE.
118//config: 118//config:
119//config:config FEATURE_FIND_INUM 119//config:config FEATURE_FIND_INUM
120//config: bool "Enable -inum: inode number matching" 120//config: bool "Enable -inum: inode number matching"
@@ -126,18 +126,18 @@
126//config: default y 126//config: default y
127//config: depends on FIND 127//config: depends on FIND
128//config: help 128//config: help
129//config: Support the 'find -exec' option for executing commands based upon 129//config: Support the 'find -exec' option for executing commands based upon
130//config: the files matched. 130//config: the files matched.
131//config: 131//config:
132//config:config FEATURE_FIND_EXEC_PLUS 132//config:config FEATURE_FIND_EXEC_PLUS
133//config: bool "Enable -exec ... {} +" 133//config: bool "Enable -exec ... {} +"
134//config: default y 134//config: default y
135//config: depends on FEATURE_FIND_EXEC 135//config: depends on FEATURE_FIND_EXEC
136//config: help 136//config: help
137//config: Support the 'find -exec ... {} +' option for executing commands 137//config: Support the 'find -exec ... {} +' option for executing commands
138//config: for all matched files at once. 138//config: for all matched files at once.
139//config: Without this option, -exec + is a synonym for -exec ; 139//config: Without this option, -exec + is a synonym for -exec ;
140//config: (IOW: it works correctly, but without expected speedup) 140//config: (IOW: it works correctly, but without expected speedup)
141//config: 141//config:
142//config:config FEATURE_FIND_USER 142//config:config FEATURE_FIND_USER
143//config: bool "Enable -user: username/uid matching" 143//config: bool "Enable -user: username/uid matching"
@@ -154,23 +154,23 @@
154//config: default y 154//config: default y
155//config: depends on FIND 155//config: depends on FIND
156//config: help 156//config: help
157//config: Support the '!' operator to invert the test results. 157//config: Support the '!' operator to invert the test results.
158//config: If 'Enable full-blown desktop' is enabled, then will also support 158//config: If 'Enable full-blown desktop' is enabled, then will also support
159//config: the non-POSIX notation '-not'. 159//config: the non-POSIX notation '-not'.
160//config: 160//config:
161//config:config FEATURE_FIND_DEPTH 161//config:config FEATURE_FIND_DEPTH
162//config: bool "Enable -depth" 162//config: bool "Enable -depth"
163//config: default y 163//config: default y
164//config: depends on FIND 164//config: depends on FIND
165//config: help 165//config: help
166//config: Process each directory's contents before the directory itself. 166//config: Process each directory's contents before the directory itself.
167//config: 167//config:
168//config:config FEATURE_FIND_PAREN 168//config:config FEATURE_FIND_PAREN
169//config: bool "Enable parens in options" 169//config: bool "Enable parens in options"
170//config: default y 170//config: default y
171//config: depends on FIND 171//config: depends on FIND
172//config: help 172//config: help
173//config: Enable usage of parens '(' to specify logical order of arguments. 173//config: Enable usage of parens '(' to specify logical order of arguments.
174//config: 174//config:
175//config:config FEATURE_FIND_SIZE 175//config:config FEATURE_FIND_SIZE
176//config: bool "Enable -size: file size matching" 176//config: bool "Enable -size: file size matching"
@@ -182,45 +182,45 @@
182//config: default y 182//config: default y
183//config: depends on FIND 183//config: depends on FIND
184//config: help 184//config: help
185//config: If the file is a directory, don't descend into it. Useful for 185//config: If the file is a directory, don't descend into it. Useful for
186//config: exclusion .svn and CVS directories. 186//config: exclusion .svn and CVS directories.
187//config: 187//config:
188//config:config FEATURE_FIND_DELETE 188//config:config FEATURE_FIND_DELETE
189//config: bool "Enable -delete: delete files/dirs" 189//config: bool "Enable -delete: delete files/dirs"
190//config: default y 190//config: default y
191//config: depends on FIND && FEATURE_FIND_DEPTH 191//config: depends on FIND && FEATURE_FIND_DEPTH
192//config: help 192//config: help
193//config: Support the 'find -delete' option for deleting files and directories. 193//config: Support the 'find -delete' option for deleting files and directories.
194//config: WARNING: This option can do much harm if used wrong. Busybox will not 194//config: WARNING: This option can do much harm if used wrong. Busybox will not
195//config: try to protect the user from doing stupid things. Use with care. 195//config: try to protect the user from doing stupid things. Use with care.
196//config: 196//config:
197//config:config FEATURE_FIND_PATH 197//config:config FEATURE_FIND_PATH
198//config: bool "Enable -path: match pathname with shell pattern" 198//config: bool "Enable -path: match pathname with shell pattern"
199//config: default y 199//config: default y
200//config: depends on FIND 200//config: depends on FIND
201//config: help 201//config: help
202//config: The -path option matches whole pathname instead of just filename. 202//config: The -path option matches whole pathname instead of just filename.
203//config: 203//config:
204//config:config FEATURE_FIND_REGEX 204//config:config FEATURE_FIND_REGEX
205//config: bool "Enable -regex: match pathname with regex" 205//config: bool "Enable -regex: match pathname with regex"
206//config: default y 206//config: default y
207//config: depends on FIND 207//config: depends on FIND
208//config: help 208//config: help
209//config: The -regex option matches whole pathname against regular expression. 209//config: The -regex option matches whole pathname against regular expression.
210//config: 210//config:
211//config:config FEATURE_FIND_CONTEXT 211//config:config FEATURE_FIND_CONTEXT
212//config: bool "Enable -context: security context matching" 212//config: bool "Enable -context: security context matching"
213//config: default n 213//config: default n
214//config: depends on FIND && SELINUX 214//config: depends on FIND && SELINUX
215//config: help 215//config: help
216//config: Support the 'find -context' option for matching security context. 216//config: Support the 'find -context' option for matching security context.
217//config: 217//config:
218//config:config FEATURE_FIND_LINKS 218//config:config FEATURE_FIND_LINKS
219//config: bool "Enable -links: link count matching" 219//config: bool "Enable -links: link count matching"
220//config: default y 220//config: default y
221//config: depends on FIND 221//config: depends on FIND
222//config: help 222//config: help
223//config: Support the 'find -links' option for matching number of links. 223//config: Support the 'find -links' option for matching number of links.
224 224
225//applet:IF_FIND(APPLET_NOEXEC(find, find, BB_DIR_USR_BIN, BB_SUID_DROP, find)) 225//applet:IF_FIND(APPLET_NOEXEC(find, find, BB_DIR_USR_BIN, BB_SUID_DROP, find))
226 226
diff --git a/findutils/grep.c b/findutils/grep.c
index d66d85a53..568ab12c2 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -19,31 +19,31 @@
19 */ 19 */
20 20
21//config:config GREP 21//config:config GREP
22//config: bool "grep" 22//config: bool "grep (8.5 kb)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: grep is used to search files for a specified pattern. 25//config: grep is used to search files for a specified pattern.
26//config: 26//config:
27//config:config EGREP 27//config:config EGREP
28//config: bool "egrep" 28//config: bool "egrep (7.6 kb)"
29//config: default y 29//config: default y
30//config: help 30//config: help
31//config: Alias to "grep -E" 31//config: Alias to "grep -E".
32//config: 32//config:
33//config:config FGREP 33//config:config FGREP
34//config: bool "fgrep" 34//config: bool "fgrep (7.6 kb)"
35//config: default y 35//config: default y
36//config: help 36//config: help
37//config: Alias to "grep -F" 37//config: Alias to "grep -F".
38//config: 38//config:
39//config:config FEATURE_GREP_CONTEXT 39//config:config FEATURE_GREP_CONTEXT
40//config: bool "Enable before and after context flags (-A, -B and -C)" 40//config: bool "Enable before and after context flags (-A, -B and -C)"
41//config: default y 41//config: default y
42//config: depends on GREP || EGREP || FGREP 42//config: depends on GREP || EGREP || FGREP
43//config: help 43//config: help
44//config: Print the specified number of leading (-B) and/or trailing (-A) 44//config: Print the specified number of leading (-B) and/or trailing (-A)
45//config: context surrounding our matching lines. 45//config: context surrounding our matching lines.
46//config: Print the specified number of context lines (-C). 46//config: Print the specified number of context lines (-C).
47 47
48//applet:IF_GREP(APPLET(grep, BB_DIR_BIN, BB_SUID_DROP)) 48//applet:IF_GREP(APPLET(grep, BB_DIR_BIN, BB_SUID_DROP))
49// APPLET_ODDNAME:name main location suid_type help 49// APPLET_ODDNAME:name main location suid_type help
diff --git a/findutils/xargs.c b/findutils/xargs.c
index eca1185ec..e5384d14c 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -16,50 +16,50 @@
16 */ 16 */
17 17
18//config:config XARGS 18//config:config XARGS
19//config: bool "xargs" 19//config: bool "xargs (6.7 kb)"
20//config: default y 20//config: default y
21//config: help 21//config: help
22//config: xargs is used to execute a specified command for 22//config: xargs is used to execute a specified command for
23//config: every item from standard input. 23//config: every item from standard input.
24//config: 24//config:
25//config:config FEATURE_XARGS_SUPPORT_CONFIRMATION 25//config:config FEATURE_XARGS_SUPPORT_CONFIRMATION
26//config: bool "Enable -p: prompt and confirmation" 26//config: bool "Enable -p: prompt and confirmation"
27//config: default y 27//config: default y
28//config: depends on XARGS 28//config: depends on XARGS
29//config: help 29//config: help
30//config: Support -p: prompt the user whether to run each command 30//config: Support -p: prompt the user whether to run each command
31//config: line and read a line from the terminal. 31//config: line and read a line from the terminal.
32//config: 32//config:
33//config:config FEATURE_XARGS_SUPPORT_QUOTES 33//config:config FEATURE_XARGS_SUPPORT_QUOTES
34//config: bool "Enable single and double quotes and backslash" 34//config: bool "Enable single and double quotes and backslash"
35//config: default y 35//config: default y
36//config: depends on XARGS 36//config: depends on XARGS
37//config: help 37//config: help
38//config: Support quoting in the input. 38//config: Support quoting in the input.
39//config: 39//config:
40//config:config FEATURE_XARGS_SUPPORT_TERMOPT 40//config:config FEATURE_XARGS_SUPPORT_TERMOPT
41//config: bool "Enable -x: exit if -s or -n is exceeded" 41//config: bool "Enable -x: exit if -s or -n is exceeded"
42//config: default y 42//config: default y
43//config: depends on XARGS 43//config: depends on XARGS
44//config: help 44//config: help
45//config: Support -x: exit if the command size (see the -s or -n option) 45//config: Support -x: exit if the command size (see the -s or -n option)
46//config: is exceeded. 46//config: is exceeded.
47//config: 47//config:
48//config:config FEATURE_XARGS_SUPPORT_ZERO_TERM 48//config:config FEATURE_XARGS_SUPPORT_ZERO_TERM
49//config: bool "Enable -0: NUL-terminated input" 49//config: bool "Enable -0: NUL-terminated input"
50//config: default y 50//config: default y
51//config: depends on XARGS 51//config: depends on XARGS
52//config: help 52//config: help
53//config: Support -0: input items are terminated by a NUL character 53//config: Support -0: input items are terminated by a NUL character
54//config: instead of whitespace, and the quotes and backslash 54//config: instead of whitespace, and the quotes and backslash
55//config: are not special. 55//config: are not special.
56//config: 56//config:
57//config:config FEATURE_XARGS_SUPPORT_REPL_STR 57//config:config FEATURE_XARGS_SUPPORT_REPL_STR
58//config: bool "Enable -I STR: string to replace" 58//config: bool "Enable -I STR: string to replace"
59//config: default y 59//config: default y
60//config: depends on XARGS 60//config: depends on XARGS
61//config: help 61//config: help
62//config: Support -I STR and -i[STR] options. 62//config: Support -I STR and -i[STR] options.
63 63
64//applet:IF_XARGS(APPLET_NOEXEC(xargs, xargs, BB_DIR_USR_BIN, BB_SUID_DROP, xargs)) 64//applet:IF_XARGS(APPLET_NOEXEC(xargs, xargs, BB_DIR_USR_BIN, BB_SUID_DROP, xargs))
65 65
diff --git a/include/libbb.h b/include/libbb.h
index c58cbc250..105a0b988 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1511,6 +1511,9 @@ extern void selinux_or_die(void) FAST_FUNC;
1511 * HOME=pw->pw_dir 1511 * HOME=pw->pw_dir
1512 * SHELL=shell 1512 * SHELL=shell
1513 * else does nothing 1513 * else does nothing
1514 *
1515 * NB: CHANGEENV and CLEARENV use setenv() - this leaks memory!
1516 * If setup_environment() is used is vforked child, this leaks memory _in parent too_!
1514 */ 1517 */
1515#define SETUP_ENV_CHANGEENV (1 << 0) 1518#define SETUP_ENV_CHANGEENV (1 << 0)
1516#define SETUP_ENV_CLEARENV (1 << 1) 1519#define SETUP_ENV_CLEARENV (1 << 1)
diff --git a/init/bootchartd.c b/init/bootchartd.c
index 92aaade0f..b5dd17439 100644
--- a/init/bootchartd.c
+++ b/init/bootchartd.c
@@ -8,43 +8,43 @@
8//kbuild:lib-$(CONFIG_BOOTCHARTD) += bootchartd.o 8//kbuild:lib-$(CONFIG_BOOTCHARTD) += bootchartd.o
9 9
10//config:config BOOTCHARTD 10//config:config BOOTCHARTD
11//config: bool "bootchartd" 11//config: bool "bootchartd (10 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: bootchartd is commonly used to profile the boot process 14//config: bootchartd is commonly used to profile the boot process
15//config: for the purpose of speeding it up. In this case, it is started 15//config: for the purpose of speeding it up. In this case, it is started
16//config: by the kernel as the init process. This is configured by adding 16//config: by the kernel as the init process. This is configured by adding
17//config: the init=/sbin/bootchartd option to the kernel command line. 17//config: the init=/sbin/bootchartd option to the kernel command line.
18//config: 18//config:
19//config: It can also be used to monitor the resource usage of a specific 19//config: It can also be used to monitor the resource usage of a specific
20//config: application or the running system in general. In this case, 20//config: application or the running system in general. In this case,
21//config: bootchartd is started interactively by running bootchartd start 21//config: bootchartd is started interactively by running bootchartd start
22//config: and stopped using bootchartd stop. 22//config: and stopped using bootchartd stop.
23//config: 23//config:
24//config:config FEATURE_BOOTCHARTD_BLOATED_HEADER 24//config:config FEATURE_BOOTCHARTD_BLOATED_HEADER
25//config: bool "Compatible, bloated header" 25//config: bool "Compatible, bloated header"
26//config: default y 26//config: default y
27//config: depends on BOOTCHARTD 27//config: depends on BOOTCHARTD
28//config: help 28//config: help
29//config: Create extended header file compatible with "big" bootchartd. 29//config: Create extended header file compatible with "big" bootchartd.
30//config: "Big" bootchartd is a shell script and it dumps some 30//config: "Big" bootchartd is a shell script and it dumps some
31//config: "convenient" info int the header, such as: 31//config: "convenient" info int the header, such as:
32//config: title = Boot chart for `hostname` (`date`) 32//config: title = Boot chart for `hostname` (`date`)
33//config: system.uname = `uname -srvm` 33//config: system.uname = `uname -srvm`
34//config: system.release = `cat /etc/DISTRO-release` 34//config: system.release = `cat /etc/DISTRO-release`
35//config: system.cpu = `grep '^model name' /proc/cpuinfo | head -1` ($cpucount) 35//config: system.cpu = `grep '^model name' /proc/cpuinfo | head -1` ($cpucount)
36//config: system.kernel.options = `cat /proc/cmdline` 36//config: system.kernel.options = `cat /proc/cmdline`
37//config: This data is not mandatory for bootchart graph generation, 37//config: This data is not mandatory for bootchart graph generation,
38//config: and is considered bloat. Nevertheless, this option 38//config: and is considered bloat. Nevertheless, this option
39//config: makes bootchartd applet to dump a subset of it. 39//config: makes bootchartd applet to dump a subset of it.
40//config: 40//config:
41//config:config FEATURE_BOOTCHARTD_CONFIG_FILE 41//config:config FEATURE_BOOTCHARTD_CONFIG_FILE
42//config: bool "Support bootchartd.conf" 42//config: bool "Support bootchartd.conf"
43//config: default y 43//config: default y
44//config: depends on BOOTCHARTD 44//config: depends on BOOTCHARTD
45//config: help 45//config: help
46//config: Enable reading and parsing of $PWD/bootchartd.conf 46//config: Enable reading and parsing of $PWD/bootchartd.conf
47//config: and /etc/bootchartd.conf files. 47//config: and /etc/bootchartd.conf files.
48 48
49#include "libbb.h" 49#include "libbb.h"
50#include "common_bufsiz.h" 50#include "common_bufsiz.h"
@@ -171,7 +171,9 @@ static int dump_procs(FILE *fp, int look_for_login_process)
171 p++; 171 p++;
172 strchrnul(p, ')')[0] = '\0'; 172 strchrnul(p, ')')[0] = '\0';
173 /* Is it gdm, kdm or a getty? */ 173 /* Is it gdm, kdm or a getty? */
174 if (((p[0] == 'g' || p[0] == 'k' || p[0] == 'x') && p[1] == 'd' && p[2] == 'm') 174 if (((p[0] == 'g' || p[0] == 'k' || p[0] == 'x')
175 && p[1] == 'd' && p[2] == 'm' && p[3] == '\0'
176 )
175 || strstr(p, "getty") 177 || strstr(p, "getty")
176 ) { 178 ) {
177 found_login_process = 1; 179 found_login_process = 1;
@@ -190,7 +192,7 @@ static char *make_tempdir(void)
190 if (!tempdir) { 192 if (!tempdir) {
191#ifdef __linux__ 193#ifdef __linux__
192 /* /tmp is not writable (happens when we are used as init). 194 /* /tmp is not writable (happens when we are used as init).
193 * Try to mount a tmpfs, them cd and lazily unmount it. 195 * Try to mount a tmpfs, then cd and lazily unmount it.
194 * Since we unmount it at once, we can mount it anywhere. 196 * Since we unmount it at once, we can mount it anywhere.
195 * Try a few locations which are likely ti exist. 197 * Try a few locations which are likely ti exist.
196 */ 198 */
diff --git a/init/halt.c b/init/halt.c
index f69b89772..632c6cc56 100644
--- a/init/halt.c
+++ b/init/halt.c
@@ -8,42 +8,42 @@
8 */ 8 */
9 9
10//config:config HALT 10//config:config HALT
11//config: bool "halt" 11//config: bool "halt (3.7 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Stop all processes and halt the system. 14//config: Stop all processes and halt the system.
15//config: 15//config:
16//config:config POWEROFF 16//config:config POWEROFF
17//config: bool "poweroff" 17//config: bool "poweroff (3.7 kb)"
18//config: default y 18//config: default y
19//config: help 19//config: help
20//config: Stop all processes and power off the system. 20//config: Stop all processes and power off the system.
21//config: 21//config:
22//config:config REBOOT 22//config:config REBOOT
23//config: bool "reboot" 23//config: bool "reboot (3.7 kb)"
24//config: default y 24//config: default y
25//config: help 25//config: help
26//config: Stop all processes and reboot the system. 26//config: Stop all processes and reboot the system.
27//config: 27//config:
28//config:config FEATURE_CALL_TELINIT 28//config:config FEATURE_CALL_TELINIT
29//config: bool "Call telinit on shutdown and reboot" 29//config: bool "Call telinit on shutdown and reboot"
30//config: default y 30//config: default y
31//config: depends on (HALT || POWEROFF || REBOOT) && !INIT 31//config: depends on (HALT || POWEROFF || REBOOT) && !INIT
32//config: help 32//config: help
33//config: Call an external program (normally telinit) to facilitate 33//config: Call an external program (normally telinit) to facilitate
34//config: a switch to a proper runlevel. 34//config: a switch to a proper runlevel.
35//config: 35//config:
36//config: This option is only available if you selected halt and friends, 36//config: This option is only available if you selected halt and friends,
37//config: but did not select init. 37//config: but did not select init.
38//config: 38//config:
39//config:config TELINIT_PATH 39//config:config TELINIT_PATH
40//config: string "Path to telinit executable" 40//config: string "Path to telinit executable"
41//config: default "/sbin/telinit" 41//config: default "/sbin/telinit"
42//config: depends on FEATURE_CALL_TELINIT 42//config: depends on FEATURE_CALL_TELINIT
43//config: help 43//config: help
44//config: When busybox halt and friends have to call external telinit 44//config: When busybox halt and friends have to call external telinit
45//config: to facilitate proper shutdown, this path is to be used when 45//config: to facilitate proper shutdown, this path is to be used when
46//config: locating telinit executable. 46//config: locating telinit executable.
47 47
48//applet:IF_HALT(APPLET(halt, BB_DIR_SBIN, BB_SUID_DROP)) 48//applet:IF_HALT(APPLET(halt, BB_DIR_SBIN, BB_SUID_DROP))
49// APPLET_ODDNAME:name main location suid_type help 49// APPLET_ODDNAME:name main location suid_type help
diff --git a/init/init.c b/init/init.c
index 4d6355167..ab137a981 100644
--- a/init/init.c
+++ b/init/init.c
@@ -10,38 +10,38 @@
10 */ 10 */
11 11
12//config:config INIT 12//config:config INIT
13//config: bool "init" 13//config: bool "init (9.3 kb)"
14//config: default y 14//config: default y
15//config: select FEATURE_SYSLOG 15//config: select FEATURE_SYSLOG
16//config: help 16//config: help
17//config: init is the first program run when the system boots. 17//config: init is the first program run when the system boots.
18//config: 18//config:
19//config:config LINUXRC 19//config:config LINUXRC
20//config: bool "linuxrc: support running init from initrd (not initramfs)" 20//config: bool "linuxrc: support running init from initrd (not initramfs)"
21//config: default y 21//config: default y
22//config: select FEATURE_SYSLOG 22//config: select FEATURE_SYSLOG
23//config: help 23//config: help
24//config: Legacy support for running init under the old-style initrd. Allows 24//config: Legacy support for running init under the old-style initrd. Allows
25//config: the name linuxrc to act as init, and it doesn't assume init is PID 1. 25//config: the name linuxrc to act as init, and it doesn't assume init is PID 1.
26//config: 26//config:
27//config: This does not apply to initramfs, which runs /init as PID 1 and 27//config: This does not apply to initramfs, which runs /init as PID 1 and
28//config: requires no special support. 28//config: requires no special support.
29//config: 29//config:
30//config:config FEATURE_USE_INITTAB 30//config:config FEATURE_USE_INITTAB
31//config: bool "Support reading an inittab file" 31//config: bool "Support reading an inittab file"
32//config: default y 32//config: default y
33//config: depends on INIT || LINUXRC 33//config: depends on INIT || LINUXRC
34//config: help 34//config: help
35//config: Allow init to read an inittab file when the system boot. 35//config: Allow init to read an inittab file when the system boot.
36//config: 36//config:
37//config:config FEATURE_KILL_REMOVED 37//config:config FEATURE_KILL_REMOVED
38//config: bool "Support killing processes that have been removed from inittab" 38//config: bool "Support killing processes that have been removed from inittab"
39//config: default n 39//config: default n
40//config: depends on FEATURE_USE_INITTAB 40//config: depends on FEATURE_USE_INITTAB
41//config: help 41//config: help
42//config: When respawn entries are removed from inittab and a SIGHUP is 42//config: When respawn entries are removed from inittab and a SIGHUP is
43//config: sent to init, this option will make init kill the processes 43//config: sent to init, this option will make init kill the processes
44//config: that have been removed. 44//config: that have been removed.
45//config: 45//config:
46//config:config FEATURE_KILL_DELAY 46//config:config FEATURE_KILL_DELAY
47//config: int "How long to wait between TERM and KILL (0 - send TERM only)" if FEATURE_KILL_REMOVED 47//config: int "How long to wait between TERM and KILL (0 - send TERM only)" if FEATURE_KILL_REMOVED
@@ -49,34 +49,34 @@
49//config: default 0 49//config: default 0
50//config: depends on FEATURE_KILL_REMOVED 50//config: depends on FEATURE_KILL_REMOVED
51//config: help 51//config: help
52//config: With nonzero setting, init sends TERM, forks, child waits N 52//config: With nonzero setting, init sends TERM, forks, child waits N
53//config: seconds, sends KILL and exits. Setting it too high is unwise 53//config: seconds, sends KILL and exits. Setting it too high is unwise
54//config: (child will hang around for too long and could actually kill 54//config: (child will hang around for too long and could actually kill
55//config: the wrong process!) 55//config: the wrong process!)
56//config: 56//config:
57//config:config FEATURE_INIT_SCTTY 57//config:config FEATURE_INIT_SCTTY
58//config: bool "Run commands with leading dash with controlling tty" 58//config: bool "Run commands with leading dash with controlling tty"
59//config: default y 59//config: default y
60//config: depends on INIT || LINUXRC 60//config: depends on INIT || LINUXRC
61//config: help 61//config: help
62//config: If this option is enabled, init will try to give a controlling 62//config: If this option is enabled, init will try to give a controlling
63//config: tty to any command which has leading hyphen (often it's "-/bin/sh"). 63//config: tty to any command which has leading hyphen (often it's "-/bin/sh").
64//config: More precisely, init will do "ioctl(STDIN_FILENO, TIOCSCTTY, 0)". 64//config: More precisely, init will do "ioctl(STDIN_FILENO, TIOCSCTTY, 0)".
65//config: If device attached to STDIN_FILENO can be a ctty but is not yet 65//config: If device attached to STDIN_FILENO can be a ctty but is not yet
66//config: a ctty for other session, it will become this process' ctty. 66//config: a ctty for other session, it will become this process' ctty.
67//config: This is not the traditional init behavour, but is often what you want 67//config: This is not the traditional init behavour, but is often what you want
68//config: in an embedded system where the console is only accessed during 68//config: in an embedded system where the console is only accessed during
69//config: development or for maintenance. 69//config: development or for maintenance.
70//config: NB: using cttyhack applet may work better. 70//config: NB: using cttyhack applet may work better.
71//config: 71//config:
72//config:config FEATURE_INIT_SYSLOG 72//config:config FEATURE_INIT_SYSLOG
73//config: bool "Enable init to write to syslog" 73//config: bool "Enable init to write to syslog"
74//config: default y 74//config: default y
75//config: depends on INIT || LINUXRC 75//config: depends on INIT || LINUXRC
76//config: help 76//config: help
77//config: If selected, some init messages are sent to syslog. 77//config: If selected, some init messages are sent to syslog.
78//config: Otherwise, they are sent to VT #5 if linux virtual tty is detected 78//config: Otherwise, they are sent to VT #5 if linux virtual tty is detected
79//config: (if not, no separate logging is done). 79//config: (if not, no separate logging is done).
80//config: 80//config:
81//config:config FEATURE_INIT_QUIET 81//config:config FEATURE_INIT_QUIET
82//config: bool "Be quiet on boot (no 'init started:' message)" 82//config: bool "Be quiet on boot (no 'init started:' message)"
@@ -88,37 +88,37 @@
88//config: default n # not Y because this is a debug option 88//config: default n # not Y because this is a debug option
89//config: depends on INIT || LINUXRC 89//config: depends on INIT || LINUXRC
90//config: help 90//config: help
91//config: If this option is enabled and the file /.init_enable_core 91//config: If this option is enabled and the file /.init_enable_core
92//config: exists, then init will call setrlimit() to allow unlimited 92//config: exists, then init will call setrlimit() to allow unlimited
93//config: core file sizes. If this option is disabled, processes 93//config: core file sizes. If this option is disabled, processes
94//config: will not generate any core files. 94//config: will not generate any core files.
95//config: 95//config:
96//config:config INIT_TERMINAL_TYPE 96//config:config INIT_TERMINAL_TYPE
97//config: string "Initial terminal type" 97//config: string "Initial terminal type"
98//config: default "linux" 98//config: default "linux"
99//config: depends on INIT || LINUXRC 99//config: depends on INIT || LINUXRC
100//config: help 100//config: help
101//config: This is the initial value set by init for the TERM environment 101//config: This is the initial value set by init for the TERM environment
102//config: variable. This variable is used by programs which make use of 102//config: variable. This variable is used by programs which make use of
103//config: extended terminal capabilities. 103//config: extended terminal capabilities.
104//config: 104//config:
105//config: Note that on Linux, init attempts to detect serial terminal and 105//config: Note that on Linux, init attempts to detect serial terminal and
106//config: sets TERM to "vt102" if one is found. 106//config: sets TERM to "vt102" if one is found.
107//config: 107//config:
108//config:config FEATURE_INIT_MODIFY_CMDLINE 108//config:config FEATURE_INIT_MODIFY_CMDLINE
109//config: bool "Clear init's command line" 109//config: bool "Clear init's command line"
110//config: default y 110//config: default y
111//config: depends on INIT || LINUXRC 111//config: depends on INIT || LINUXRC
112//config: help 112//config: help
113//config: When launched as PID 1 and after parsing its arguments, init 113//config: When launched as PID 1 and after parsing its arguments, init
114//config: wipes all the arguments but argv[0] and rewrites argv[0] to 114//config: wipes all the arguments but argv[0] and rewrites argv[0] to
115//config: contain only "init", so that its command line appears solely as 115//config: contain only "init", so that its command line appears solely as
116//config: "init" in tools such as ps. 116//config: "init" in tools such as ps.
117//config: If this option is set to Y, init will keep its original behavior, 117//config: If this option is set to Y, init will keep its original behavior,
118//config: otherwise, all the arguments including argv[0] will be preserved, 118//config: otherwise, all the arguments including argv[0] will be preserved,
119//config: be they parsed or ignored by init. 119//config: be they parsed or ignored by init.
120//config: The original command-line used to launch init can then be 120//config: The original command-line used to launch init can then be
121//config: retrieved in /proc/1/cmdline on Linux, for example. 121//config: retrieved in /proc/1/cmdline on Linux, for example.
122 122
123//applet:IF_INIT(APPLET(init, BB_DIR_SBIN, BB_SUID_DROP)) 123//applet:IF_INIT(APPLET(init, BB_DIR_SBIN, BB_SUID_DROP))
124//applet:IF_LINUXRC(APPLET_ODDNAME(linuxrc, init, BB_DIR_ROOT, BB_SUID_DROP, linuxrc)) 124//applet:IF_LINUXRC(APPLET_ODDNAME(linuxrc, init, BB_DIR_ROOT, BB_SUID_DROP, linuxrc))
diff --git a/libbb/Config.src b/libbb/Config.src
index 16c79dbf0..9da8b65ee 100644
--- a/libbb/Config.src
+++ b/libbb/Config.src
@@ -11,14 +11,14 @@ choice
11 prompt "Buffer allocation policy" 11 prompt "Buffer allocation policy"
12 default FEATURE_BUFFERS_USE_MALLOC 12 default FEATURE_BUFFERS_USE_MALLOC
13 help 13 help
14 There are 3 ways BusyBox can handle buffer allocations: 14 There are 3 ways BusyBox can handle buffer allocations:
15 - Use malloc. This costs code size for the call to xmalloc. 15 - Use malloc. This costs code size for the call to xmalloc.
16 - Put them on stack. For some very small machines with limited stack 16 - Put them on stack. For some very small machines with limited stack
17 space, this can be deadly. For most folks, this works just fine. 17 space, this can be deadly. For most folks, this works just fine.
18 - Put them in BSS. This works beautifully for computers with a real 18 - Put them in BSS. This works beautifully for computers with a real
19 MMU (and OS support), but wastes runtime RAM for uCLinux. This 19 MMU (and OS support), but wastes runtime RAM for uCLinux. This
20 behavior was the only one available for BusyBox versions 0.48 and 20 behavior was the only one available for BusyBox versions 0.48 and
21 earlier. 21 earlier.
22 22
23config FEATURE_BUFFERS_USE_MALLOC 23config FEATURE_BUFFERS_USE_MALLOC
24 bool "Allocate with Malloc" 24 bool "Allocate with Malloc"
@@ -36,52 +36,52 @@ config PASSWORD_MINLEN
36 default 6 36 default 6
37 range 5 32 37 range 5 32
38 help 38 help
39 Minimum allowable password length. 39 Minimum allowable password length.
40 40
41config MD5_SMALL 41config MD5_SMALL
42 int "MD5: Trade bytes for speed (0:fast, 3:slow)" 42 int "MD5: Trade bytes for speed (0:fast, 3:slow)"
43 default 1 # all "fast or small" options default to small 43 default 1 # all "fast or small" options default to small
44 range 0 3 44 range 0 3
45 help 45 help
46 Trade binary size versus speed for the md5sum algorithm. 46 Trade binary size versus speed for the md5sum algorithm.
47 Approximate values running uClibc and hashing 47 Approximate values running uClibc and hashing
48 linux-2.4.4.tar.bz2 were: 48 linux-2.4.4.tar.bz2 were:
49 user times (sec) text size (386) 49 value user times (sec) text size (386)
50 0 (fastest) 1.1 6144 50 0 (fastest) 1.1 6144
51 1 1.4 5392 51 1 1.4 5392
52 2 3.0 5088 52 2 3.0 5088
53 3 (smallest) 5.1 4912 53 3 (smallest) 5.1 4912
54 54
55config SHA3_SMALL 55config SHA3_SMALL
56 int "SHA3: Trade bytes for speed (0:fast, 1:slow)" 56 int "SHA3: Trade bytes for speed (0:fast, 1:slow)"
57 default 1 # all "fast or small" options default to small 57 default 1 # all "fast or small" options default to small
58 range 0 1 58 range 0 1
59 help 59 help
60 Trade binary size versus speed for the sha3sum algorithm. 60 Trade binary size versus speed for the sha3sum algorithm.
61 SHA3_SMALL=0 compared to SHA3_SMALL=1 (approximate): 61 SHA3_SMALL=0 compared to SHA3_SMALL=1 (approximate):
62 64-bit x86: +270 bytes of code, 45% faster 62 64-bit x86: +270 bytes of code, 45% faster
63 32-bit x86: +450 bytes of code, 75% faster 63 32-bit x86: +450 bytes of code, 75% faster
64 64
65config FEATURE_FAST_TOP 65config FEATURE_FAST_TOP
66 bool "Faster /proc scanning code (+100 bytes)" 66 bool "Faster /proc scanning code (+100 bytes)"
67 default n # all "fast or small" options default to small 67 default n # all "fast or small" options default to small
68 help 68 help
69 This option makes top and ps ~20% faster (or 20% less CPU hungry), 69 This option makes top and ps ~20% faster (or 20% less CPU hungry),
70 but code size is slightly bigger. 70 but code size is slightly bigger.
71 71
72config FEATURE_ETC_NETWORKS 72config FEATURE_ETC_NETWORKS
73 bool "Support /etc/networks" 73 bool "Support /etc/networks"
74 default n 74 default n
75 help 75 help
76 Enable support for network names in /etc/networks. This is 76 Enable support for network names in /etc/networks. This is
77 a rarely used feature which allows you to use names 77 a rarely used feature which allows you to use names
78 instead of IP/mask pairs in route command. 78 instead of IP/mask pairs in route command.
79 79
80config FEATURE_EDITING 80config FEATURE_EDITING
81 bool "Command line editing" 81 bool "Command line editing"
82 default y 82 default y
83 help 83 help
84 Enable line editing (mainly for shell command line). 84 Enable line editing (mainly for shell command line).
85 85
86config FEATURE_EDITING_MAX_LEN 86config FEATURE_EDITING_MAX_LEN
87 int "Maximum length of input" 87 int "Maximum length of input"
@@ -89,17 +89,17 @@ config FEATURE_EDITING_MAX_LEN
89 default 1024 89 default 1024
90 depends on FEATURE_EDITING 90 depends on FEATURE_EDITING
91 help 91 help
92 Line editing code uses on-stack buffers for storage. 92 Line editing code uses on-stack buffers for storage.
93 You may want to decrease this parameter if your target machine 93 You may want to decrease this parameter if your target machine
94 benefits from smaller stack usage. 94 benefits from smaller stack usage.
95 95
96config FEATURE_EDITING_VI 96config FEATURE_EDITING_VI
97 bool "vi-style line editing commands" 97 bool "vi-style line editing commands"
98 default n 98 default n
99 depends on FEATURE_EDITING 99 depends on FEATURE_EDITING
100 help 100 help
101 Enable vi-style line editing. In shells, this mode can be 101 Enable vi-style line editing. In shells, this mode can be
102 turned on and off with "set -o vi" and "set +o vi". 102 turned on and off with "set -o vi" and "set +o vi".
103 103
104config FEATURE_EDITING_HISTORY 104config FEATURE_EDITING_HISTORY
105 int "History size" 105 int "History size"
@@ -108,29 +108,29 @@ config FEATURE_EDITING_HISTORY
108 default 255 108 default 255
109 depends on FEATURE_EDITING 109 depends on FEATURE_EDITING
110 help 110 help
111 Specify command history size (0 - disable). 111 Specify command history size (0 - disable).
112 112
113config FEATURE_EDITING_SAVEHISTORY 113config FEATURE_EDITING_SAVEHISTORY
114 bool "History saving" 114 bool "History saving"
115 default y 115 default y
116 depends on FEATURE_EDITING 116 depends on FEATURE_EDITING
117 help 117 help
118 Enable history saving in shells. 118 Enable history saving in shells.
119 119
120config FEATURE_EDITING_SAVE_ON_EXIT 120config FEATURE_EDITING_SAVE_ON_EXIT
121 bool "Save history on shell exit, not after every command" 121 bool "Save history on shell exit, not after every command"
122 default n 122 default n
123 depends on FEATURE_EDITING_SAVEHISTORY 123 depends on FEATURE_EDITING_SAVEHISTORY
124 help 124 help
125 Save history on shell exit, not after every command. 125 Save history on shell exit, not after every command.
126 126
127config FEATURE_REVERSE_SEARCH 127config FEATURE_REVERSE_SEARCH
128 bool "Reverse history search" 128 bool "Reverse history search"
129 default y 129 default y
130 depends on FEATURE_EDITING 130 depends on FEATURE_EDITING
131 help 131 help
132 Enable readline-like Ctrl-R combination for reverse history search. 132 Enable readline-like Ctrl-R combination for reverse history search.
133 Increases code by about 0.5k. 133 Increases code by about 0.5k.
134 134
135config FEATURE_TAB_COMPLETION 135config FEATURE_TAB_COMPLETION
136 bool "Tab completion" 136 bool "Tab completion"
@@ -147,237 +147,237 @@ config FEATURE_EDITING_FANCY_PROMPT
147 default y 147 default y
148 depends on FEATURE_EDITING 148 depends on FEATURE_EDITING
149 help 149 help
150 Setting this option allows for prompts to use things like \w and 150 Setting this option allows for prompts to use things like \w and
151 \$ and escape codes. 151 \$ and escape codes.
152 152
153config FEATURE_EDITING_ASK_TERMINAL 153config FEATURE_EDITING_ASK_TERMINAL
154 bool "Query cursor position from terminal" 154 bool "Query cursor position from terminal"
155 default n 155 default n
156 depends on FEATURE_EDITING 156 depends on FEATURE_EDITING
157 help 157 help
158 Allow usage of "ESC [ 6 n" sequence. Terminal answers back with 158 Allow usage of "ESC [ 6 n" sequence. Terminal answers back with
159 current cursor position. This information is used to make line 159 current cursor position. This information is used to make line
160 editing more robust in some cases. 160 editing more robust in some cases.
161 If you are not sure whether your terminals respond to this code 161 If you are not sure whether your terminals respond to this code
162 correctly, or want to save on code size (about 400 bytes), 162 correctly, or want to save on code size (about 400 bytes),
163 then do not turn this option on. 163 then do not turn this option on.
164 164
165config LOCALE_SUPPORT 165config LOCALE_SUPPORT
166 bool "Enable locale support (system needs locale for this to work)" 166 bool "Enable locale support (system needs locale for this to work)"
167 default n 167 default n
168 help 168 help
169 Enable this if your system has locale support and you would like 169 Enable this if your system has locale support and you would like
170 busybox to support locale settings. 170 busybox to support locale settings.
171 171
172config UNICODE_SUPPORT 172config UNICODE_SUPPORT
173 bool "Support Unicode" 173 bool "Support Unicode"
174 default y 174 default y
175 help 175 help
176 This makes various applets aware that one byte is not 176 This makes various applets aware that one byte is not
177 one character on screen. 177 one character on screen.
178 178
179 Busybox aims to eventually work correctly with Unicode displays. 179 Busybox aims to eventually work correctly with Unicode displays.
180 Any older encodings are not guaranteed to work. 180 Any older encodings are not guaranteed to work.
181 Probably by the time when busybox will be fully Unicode-clean, 181 Probably by the time when busybox will be fully Unicode-clean,
182 other encodings will be mainly of historic interest. 182 other encodings will be mainly of historic interest.
183 183
184config UNICODE_USING_LOCALE 184config UNICODE_USING_LOCALE
185 bool "Use libc routines for Unicode (else uses internal ones)" 185 bool "Use libc routines for Unicode (else uses internal ones)"
186 default n 186 default n
187 depends on UNICODE_SUPPORT && LOCALE_SUPPORT 187 depends on UNICODE_SUPPORT && LOCALE_SUPPORT
188 help 188 help
189 With this option on, Unicode support is implemented using libc 189 With this option on, Unicode support is implemented using libc
190 routines. Otherwise, internal implementation is used. 190 routines. Otherwise, internal implementation is used.
191 Internal implementation is smaller. 191 Internal implementation is smaller.
192 192
193config FEATURE_CHECK_UNICODE_IN_ENV 193config FEATURE_CHECK_UNICODE_IN_ENV
194 bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables" 194 bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
195 default n 195 default n
196 depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE 196 depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE
197 help 197 help
198 With this option on, Unicode support is activated 198 With this option on, Unicode support is activated
199 only if locale-related variables have the value of the form 199 only if locale-related variables have the value of the form
200 "xxxx.utf8" 200 "xxxx.utf8"
201 201
202 Otherwise, Unicode support will be always enabled and active. 202 Otherwise, Unicode support will be always enabled and active.
203 203
204config SUBST_WCHAR 204config SUBST_WCHAR
205 int "Character code to substitute unprintable characters with" 205 int "Character code to substitute unprintable characters with"
206 depends on UNICODE_SUPPORT 206 depends on UNICODE_SUPPORT
207 default 63 207 default 63
208 help 208 help
209 Typical values are 63 for '?' (works with any output device), 209 Typical values are 63 for '?' (works with any output device),
210 30 for ASCII substitute control code, 210 30 for ASCII substitute control code,
211 65533 (0xfffd) for Unicode replacement character. 211 65533 (0xfffd) for Unicode replacement character.
212 212
213config LAST_SUPPORTED_WCHAR 213config LAST_SUPPORTED_WCHAR
214 int "Range of supported Unicode characters" 214 int "Range of supported Unicode characters"
215 depends on UNICODE_SUPPORT 215 depends on UNICODE_SUPPORT
216 default 767 216 default 767
217 help 217 help
218 Any character with Unicode value bigger than this is assumed 218 Any character with Unicode value bigger than this is assumed
219 to be non-printable on output device. Many applets replace 219 to be non-printable on output device. Many applets replace
220 such characters with substitution character. 220 such characters with substitution character.
221 221
222 The idea is that many valid printable Unicode chars 222 The idea is that many valid printable Unicode chars
223 nevertheless are not displayed correctly. Think about 223 nevertheless are not displayed correctly. Think about
224 combining charachers, double-wide hieroglyphs, obscure 224 combining charachers, double-wide hieroglyphs, obscure
225 characters in dozens of ancient scripts... 225 characters in dozens of ancient scripts...
226 Many terminals, terminal emulators, xterms etc will fail 226 Many terminals, terminal emulators, xterms etc will fail
227 to handle them correctly. Choose the smallest value 227 to handle them correctly. Choose the smallest value
228 which suits your needs. 228 which suits your needs.
229 229
230 Typical values are: 230 Typical values are:
231 126 - ASCII only 231 126 - ASCII only
232 767 (0x2ff) - there are no combining chars in [0..767] range 232 767 (0x2ff) - there are no combining chars in [0..767] range
233 (the range includes Latin 1, Latin Ext. A and B), 233 (the range includes Latin 1, Latin Ext. A and B),
234 code is ~700 bytes smaller for this case. 234 code is ~700 bytes smaller for this case.
235 4351 (0x10ff) - there are no double-wide chars in [0..4351] range, 235 4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
236 code is ~300 bytes smaller for this case. 236 code is ~300 bytes smaller for this case.
237 12799 (0x31ff) - nearly all non-ideographic characters are 237 12799 (0x31ff) - nearly all non-ideographic characters are
238 available in [0..12799] range, including 238 available in [0..12799] range, including
239 East Asian scripts like katakana, hiragana, hangul, 239 East Asian scripts like katakana, hiragana, hangul,
240 bopomofo... 240 bopomofo...
241 0 - off, any valid printable Unicode character will be printed. 241 0 - off, any valid printable Unicode character will be printed.
242 242
243config UNICODE_COMBINING_WCHARS 243config UNICODE_COMBINING_WCHARS
244 bool "Allow zero-width Unicode characters on output" 244 bool "Allow zero-width Unicode characters on output"
245 default n 245 default n
246 depends on UNICODE_SUPPORT 246 depends on UNICODE_SUPPORT
247 help 247 help
248 With this option off, any Unicode char with width of 0 248 With this option off, any Unicode char with width of 0
249 is substituted on output. 249 is substituted on output.
250 250
251config UNICODE_WIDE_WCHARS 251config UNICODE_WIDE_WCHARS
252 bool "Allow wide Unicode characters on output" 252 bool "Allow wide Unicode characters on output"
253 default n 253 default n
254 depends on UNICODE_SUPPORT 254 depends on UNICODE_SUPPORT
255 help 255 help
256 With this option off, any Unicode char with width > 1 256 With this option off, any Unicode char with width > 1
257 is substituted on output. 257 is substituted on output.
258 258
259config UNICODE_BIDI_SUPPORT 259config UNICODE_BIDI_SUPPORT
260 bool "Bidirectional character-aware line input" 260 bool "Bidirectional character-aware line input"
261 default n 261 default n
262 depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE 262 depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE
263 help 263 help
264 With this option on, right-to-left Unicode characters 264 With this option on, right-to-left Unicode characters
265 are treated differently on input (e.g. cursor movement). 265 are treated differently on input (e.g. cursor movement).
266 266
267config UNICODE_NEUTRAL_TABLE 267config UNICODE_NEUTRAL_TABLE
268 bool "In bidi input, support non-ASCII neutral chars too" 268 bool "In bidi input, support non-ASCII neutral chars too"
269 default n 269 default n
270 depends on UNICODE_BIDI_SUPPORT 270 depends on UNICODE_BIDI_SUPPORT
271 help 271 help
272 In most cases it's enough to treat only ASCII non-letters 272 In most cases it's enough to treat only ASCII non-letters
273 (i.e. punctuation, numbers and space) as characters 273 (i.e. punctuation, numbers and space) as characters
274 with neutral directionality. 274 with neutral directionality.
275 With this option on, more extensive (and bigger) table 275 With this option on, more extensive (and bigger) table
276 of neutral chars will be used. 276 of neutral chars will be used.
277 277
278config UNICODE_PRESERVE_BROKEN 278config UNICODE_PRESERVE_BROKEN
279 bool "Make it possible to enter sequences of chars which are not Unicode" 279 bool "Make it possible to enter sequences of chars which are not Unicode"
280 default n 280 default n
281 depends on UNICODE_SUPPORT 281 depends on UNICODE_SUPPORT
282 help 282 help
283 With this option on, on line-editing input (such as used by shells) 283 With this option on, on line-editing input (such as used by shells)
284 invalid UTF-8 bytes are not substituted with the selected 284 invalid UTF-8 bytes are not substituted with the selected
285 substitution character. 285 substitution character.
286 For example, this means that entering 'l', 's', ' ', 0xff, [Enter] 286 For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
287 at shell prompt will list file named 0xff (single char name 287 at shell prompt will list file named 0xff (single char name
288 with char value 255), not file named '?'. 288 with char value 255), not file named '?'.
289 289
290config FEATURE_NON_POSIX_CP 290config FEATURE_NON_POSIX_CP
291 bool "Non-POSIX, but safer, copying to special nodes" 291 bool "Non-POSIX, but safer, copying to special nodes"
292 default y 292 default y
293 help 293 help
294 With this option, "cp file symlink" will delete symlink 294 With this option, "cp file symlink" will delete symlink
295 and create a regular file. This does not conform to POSIX, 295 and create a regular file. This does not conform to POSIX,
296 but prevents a symlink attack. 296 but prevents a symlink attack.
297 Similarly, "cp file device" will not send file's data 297 Similarly, "cp file device" will not send file's data
298 to the device. (To do that, use "cat file >device") 298 to the device. (To do that, use "cat file >device")
299 299
300config FEATURE_VERBOSE_CP_MESSAGE 300config FEATURE_VERBOSE_CP_MESSAGE
301 bool "Give more precise messages when copy fails (cp, mv etc)" 301 bool "Give more precise messages when copy fails (cp, mv etc)"
302 default n 302 default n
303 help 303 help
304 Error messages with this feature enabled: 304 Error messages with this feature enabled:
305 305
306 $ cp file /does_not_exist/file 306 $ cp file /does_not_exist/file
307 cp: cannot create '/does_not_exist/file': Path does not exist 307 cp: cannot create '/does_not_exist/file': Path does not exist
308 $ cp file /vmlinuz/file 308 $ cp file /vmlinuz/file
309 cp: cannot stat '/vmlinuz/file': Path has non-directory component 309 cp: cannot stat '/vmlinuz/file': Path has non-directory component
310 310
311 If this feature is not enabled, they will be, respectively: 311 If this feature is not enabled, they will be, respectively:
312 312
313 cp: cannot create '/does_not_exist/file': No such file or directory 313 cp: cannot create '/does_not_exist/file': No such file or directory
314 cp: cannot stat '/vmlinuz/file': Not a directory 314 cp: cannot stat '/vmlinuz/file': Not a directory
315 315
316 This will cost you ~60 bytes. 316 This will cost you ~60 bytes.
317 317
318config FEATURE_USE_SENDFILE 318config FEATURE_USE_SENDFILE
319 bool "Use sendfile system call" 319 bool "Use sendfile system call"
320 default y 320 default y
321 select PLATFORM_LINUX 321 select PLATFORM_LINUX
322 help 322 help
323 When enabled, busybox will use the kernel sendfile() function 323 When enabled, busybox will use the kernel sendfile() function
324 instead of read/write loops to copy data between file descriptors 324 instead of read/write loops to copy data between file descriptors
325 (for example, cp command does this a lot). 325 (for example, cp command does this a lot).
326 If sendfile() doesn't work, copying code falls back to read/write 326 If sendfile() doesn't work, copying code falls back to read/write
327 loop. sendfile() was originally implemented for faster I/O 327 loop. sendfile() was originally implemented for faster I/O
328 from files to sockets, but since Linux 2.6.33 it was extended 328 from files to sockets, but since Linux 2.6.33 it was extended
329 to work for many more file types. 329 to work for many more file types.
330 330
331config FEATURE_COPYBUF_KB 331config FEATURE_COPYBUF_KB
332 int "Copy buffer size, in kilobytes" 332 int "Copy buffer size, in kilobytes"
333 range 1 1024 333 range 1 1024
334 default 4 334 default 4
335 help 335 help
336 Size of buffer used by cp, mv, install, wget etc. 336 Size of buffer used by cp, mv, install, wget etc.
337 Buffers which are 4 kb or less will be allocated on stack. 337 Buffers which are 4 kb or less will be allocated on stack.
338 Bigger buffers will be allocated with mmap, with fallback to 4 kb 338 Bigger buffers will be allocated with mmap, with fallback to 4 kb
339 stack buffer if mmap fails. 339 stack buffer if mmap fails.
340 340
341config FEATURE_SKIP_ROOTFS 341config FEATURE_SKIP_ROOTFS
342 bool "Skip rootfs in mount table" 342 bool "Skip rootfs in mount table"
343 default y 343 default y
344 help 344 help
345 Ignore rootfs entry in mount table. 345 Ignore rootfs entry in mount table.
346 346
347 In Linux, kernel has a special filesystem, rootfs, which is initially 347 In Linux, kernel has a special filesystem, rootfs, which is initially
348 mounted on /. It contains initramfs data, if kernel is configured 348 mounted on /. It contains initramfs data, if kernel is configured
349 to have one. Usually, another file system is mounted over / early 349 to have one. Usually, another file system is mounted over / early
350 in boot process, and therefore most tools which manipulate 350 in boot process, and therefore most tools which manipulate
351 mount table, such as df, will skip rootfs entry. 351 mount table, such as df, will skip rootfs entry.
352 352
353 However, some systems do not mount anything on /. 353 However, some systems do not mount anything on /.
354 If you need to configure busybox for one of these systems, 354 If you need to configure busybox for one of these systems,
355 you may find it useful to turn this option off to make df show 355 you may find it useful to turn this option off to make df show
356 initramfs statistics. 356 initramfs statistics.
357 357
358 Otherwise, choose Y. 358 Otherwise, choose Y.
359 359
360config MONOTONIC_SYSCALL 360config MONOTONIC_SYSCALL
361 bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" 361 bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
362 default y 362 default y
363 select PLATFORM_LINUX 363 select PLATFORM_LINUX
364 help 364 help
365 Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring 365 Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
366 time intervals (time, ping, traceroute etc need this). 366 time intervals (time, ping, traceroute etc need this).
367 Probably requires Linux 2.6+. If not selected, gettimeofday 367 Probably requires Linux 2.6+. If not selected, gettimeofday
368 will be used instead (which gives wrong results if date/time 368 will be used instead (which gives wrong results if date/time
369 is reset). 369 is reset).
370 370
371config IOCTL_HEX2STR_ERROR 371config IOCTL_HEX2STR_ERROR
372 bool "Use ioctl names rather than hex values in error messages" 372 bool "Use ioctl names rather than hex values in error messages"
373 default y 373 default y
374 help 374 help
375 Use ioctl names rather than hex values in error messages 375 Use ioctl names rather than hex values in error messages
376 (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this 376 (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
377 saves about 1400 bytes. 377 saves about 1400 bytes.
378 378
379config FEATURE_HWIB 379config FEATURE_HWIB
380 bool "Support infiniband HW" 380 bool "Support infiniband HW"
381 default y 381 default y
382 help 382 help
383 Support for printing infiniband addresses in network applets. 383 Support for printing infiniband addresses in network applets.
diff --git a/libbb/common_bufsiz.c b/libbb/common_bufsiz.c
index f1124ba0e..6bc6d7bc9 100644
--- a/libbb/common_bufsiz.c
+++ b/libbb/common_bufsiz.c
@@ -10,35 +10,35 @@
10//config: bool "Use the end of BSS page" 10//config: bool "Use the end of BSS page"
11//config: default n 11//config: default n
12//config: help 12//config: help
13//config: Attempt to reclaim a small unused part of BSS. 13//config: Attempt to reclaim a small unused part of BSS.
14//config: 14//config:
15//config: Executables have the following parts: 15//config: Executables have the following parts:
16//config: = read-only executable code and constants, also known as "text" 16//config: = read-only executable code and constants, also known as "text"
17//config: = read-write data 17//config: = read-write data
18//config: = non-initialized (zeroed on demand) data, also known as "bss" 18//config: = non-initialized (zeroed on demand) data, also known as "bss"
19//config: 19//config:
20//config: At link time, "text" is padded to a full page. At runtime, all "text" 20//config: At link time, "text" is padded to a full page. At runtime, all "text"
21//config: pages are mapped RO and executable. 21//config: pages are mapped RO and executable.
22//config: 22//config:
23//config: "Data" starts on the next page boundary, but is not padded 23//config: "Data" starts on the next page boundary, but is not padded
24//config: to a full page at the end. "Bss" starts wherever "data" ends. 24//config: to a full page at the end. "Bss" starts wherever "data" ends.
25//config: At runtime, "data" pages are mapped RW and they are file-backed 25//config: At runtime, "data" pages are mapped RW and they are file-backed
26//config: (this includes a small portion of "bss" which may live in the last 26//config: (this includes a small portion of "bss" which may live in the last
27//config: partial page of "data"). 27//config: partial page of "data").
28//config: Pages which are fully in "bss" are mapped to anonymous memory. 28//config: Pages which are fully in "bss" are mapped to anonymous memory.
29//config: 29//config:
30//config: "Bss" end is usually not page-aligned. There is an unused space 30//config: "Bss" end is usually not page-aligned. There is an unused space
31//config: in the last page. Linker marks its start with the "_end" symbol. 31//config: in the last page. Linker marks its start with the "_end" symbol.
32//config: 32//config:
33//config: This option will attempt to use that space for bb_common_bufsiz1[] 33//config: This option will attempt to use that space for bb_common_bufsiz1[]
34//config: array. If it fits after _end, it will be used, and COMMON_BUFSIZE 34//config: array. If it fits after _end, it will be used, and COMMON_BUFSIZE
35//config: will be enlarged from its guaranteed minimum size of 1 kbyte. 35//config: will be enlarged from its guaranteed minimum size of 1 kbyte.
36//config: This may require recompilation a second time, since value of _end 36//config: This may require recompilation a second time, since value of _end
37//config: is known only after final link. 37//config: is known only after final link.
38//config: 38//config:
39//config: If you are getting a build error like this: 39//config: If you are getting a build error like this:
40//config: appletlib.c:(.text.main+0xd): undefined reference to '_end' 40//config: appletlib.c:(.text.main+0xd): undefined reference to '_end'
41//config: disable this option. 41//config: disable this option.
42 42
43//kbuild:lib-y += common_bufsiz.o 43//kbuild:lib-y += common_bufsiz.o
44 44
diff --git a/libbb/parse_config.c b/libbb/parse_config.c
index 408439766..307ae2cd2 100644
--- a/libbb/parse_config.c
+++ b/libbb/parse_config.c
@@ -13,7 +13,7 @@
13////config: bool "Uniform config file parser debugging applet: parse" 13////config: bool "Uniform config file parser debugging applet: parse"
14////config: default n 14////config: default n
15////config: help 15////config: help
16////config: Typical usage of parse API: 16////config: Typical usage of parse API:
17////config: char *t[3]; 17////config: char *t[3];
18////config: parser_t *p = config_open(filename); 18////config: parser_t *p = config_open(filename);
19////config: while (config_read(p, t, 3, 0, delimiters, flags)) { // 1..3 tokens 19////config: while (config_read(p, t, 3, 0, delimiters, flags)) { // 1..3 tokens
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c
index b49714f2a..bf984a44e 100644
--- a/libbb/u_signal_names.c
+++ b/libbb/u_signal_names.c
@@ -11,8 +11,8 @@
11//config: bool "Support RTMIN[+n] and RTMAX[-n] signal names" 11//config: bool "Support RTMIN[+n] and RTMAX[-n] signal names"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Support RTMIN[+n] and RTMAX[-n] signal names 14//config: Support RTMIN[+n] and RTMAX[-n] signal names
15//config: in kill, killall etc. This costs ~250 bytes. 15//config: in kill, killall etc. This costs ~250 bytes.
16 16
17#include "libbb.h" 17#include "libbb.h"
18 18
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index 1b11caf6b..f569b0263 100644
--- a/libbb/xfuncs_printf.c
+++ b/libbb/xfuncs_printf.c
@@ -344,20 +344,28 @@ void FAST_FUNC xsetenv(const char *key, const char *value)
344 */ 344 */
345void FAST_FUNC bb_unsetenv(const char *var) 345void FAST_FUNC bb_unsetenv(const char *var)
346{ 346{
347 char *tp = strchr(var, '='); 347 char onstack[128 - 16]; /* smaller stack setup code on x86 */
348 348 char *tp;
349 if (!tp) { 349
350 unsetenv(var); 350 tp = strchr(var, '=');
351 return; 351 if (tp) {
352 /* In case var was putenv'ed, we can't replace '='
353 * with NUL and unsetenv(var) - it won't work,
354 * env is modified by the replacement, unsetenv
355 * sees "VAR" instead of "VAR=VAL" and does not remove it!
356 * Horror :(
357 */
358 unsigned sz = tp - var;
359 if (sz < sizeof(onstack)) {
360 ((char*)mempcpy(onstack, var, sz))[0] = '\0';
361 tp = NULL;
362 var = onstack;
363 } else {
364 /* unlikely: very long var name */
365 var = tp = xstrndup(var, sz);
366 }
352 } 367 }
353 368 unsetenv(var);
354 /* In case var was putenv'ed, we can't replace '='
355 * with NUL and unsetenv(var) - it won't work,
356 * env is modified by the replacement, unsetenv
357 * sees "VAR" instead of "VAR=VAL" and does not remove it!
358 * horror :( */
359 tp = xstrndup(var, tp - var);
360 unsetenv(tp);
361 free(tp); 369 free(tp);
362} 370}
363 371
diff --git a/loginutils/Config.src b/loginutils/Config.src
index beb4eb855..680f42118 100644
--- a/loginutils/Config.src
+++ b/loginutils/Config.src
@@ -9,87 +9,87 @@ config FEATURE_SHADOWPASSWDS
9 bool "Support shadow passwords" 9 bool "Support shadow passwords"
10 default y 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
14 publicly readable. 14 publicly readable.
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 y 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
22 (glibc), you will then need to install the /etc/nsswitch.conf 22 (glibc), you will then need to install the /etc/nsswitch.conf
23 configuration file and the required /lib/libnss_* libraries in 23 configuration file and the required /lib/libnss_* libraries in
24 order for the password and group functions to work. This generally 24 order for the password and group functions to work. This generally
25 makes your embedded system quite a bit larger. 25 makes your embedded system quite a bit larger.
26 26
27 Enabling this option will cause busybox to directly access the 27 Enabling this option will cause busybox to directly access the
28 system's /etc/password, /etc/group files (and your system will be 28 system's /etc/password, /etc/group files (and your system will be
29 smaller, and I will get fewer emails asking about how glibc NSS 29 smaller, and I will get fewer emails asking about how glibc NSS
30 works). When this option is enabled, you will not be able to use 30 works). When this option is enabled, you will not be able to use
31 PAM to access remote LDAP password servers and whatnot. And if you 31 PAM to access remote LDAP password servers and whatnot. And if you
32 want hostname resolution to work with glibc, you still need the 32 want hostname resolution to work with glibc, you still need the
33 /lib/libnss_* libraries. 33 /lib/libnss_* libraries.
34 34
35 If you need to use glibc's nsswitch.conf mechanism 35 If you need to use glibc's nsswitch.conf mechanism
36 (e.g. if user/group database is NOT stored in /etc/passwd etc), 36 (e.g. if user/group database is NOT stored in /etc/passwd etc),
37 you must NOT use this option. 37 you must NOT use this option.
38 38
39 If you enable this option, it will add about 1.5k. 39 If you enable this option, it will add about 1.5k.
40 40
41config USE_BB_SHADOW 41config USE_BB_SHADOW
42 bool "Use internal shadow password functions" 42 bool "Use internal shadow password functions"
43 default y 43 default y
44 depends on USE_BB_PWD_GRP && FEATURE_SHADOWPASSWDS 44 depends on USE_BB_PWD_GRP && FEATURE_SHADOWPASSWDS
45 help 45 help
46 If you leave this disabled, busybox will use the system's shadow 46 If you leave this disabled, busybox will use the system's shadow
47 password handling functions. And if you are using the GNU C library 47 password handling functions. And if you are using the GNU C library
48 (glibc), you will then need to install the /etc/nsswitch.conf 48 (glibc), you will then need to install the /etc/nsswitch.conf
49 configuration file and the required /lib/libnss_* libraries in 49 configuration file and the required /lib/libnss_* libraries in
50 order for the shadow password functions to work. This generally 50 order for the shadow password functions to work. This generally
51 makes your embedded system quite a bit larger. 51 makes your embedded system quite a bit larger.
52 52
53 Enabling this option will cause busybox to directly access the 53 Enabling this option will cause busybox to directly access the
54 system's /etc/shadow file when handling shadow passwords. This 54 system's /etc/shadow file when handling shadow passwords. This
55 makes your system smaller (and I will get fewer emails asking about 55 makes your system smaller (and I will get fewer emails asking about
56 how glibc NSS works). When this option is enabled, you will not be 56 how glibc NSS works). When this option is enabled, you will not be
57 able to use PAM to access shadow passwords from remote LDAP 57 able to use PAM to access shadow passwords from remote LDAP
58 password servers and whatnot. 58 password servers and whatnot.
59 59
60config USE_BB_CRYPT 60config USE_BB_CRYPT
61 bool "Use internal crypt functions" 61 bool "Use internal crypt functions"
62 default y 62 default y
63 help 63 help
64 Busybox has internal DES and MD5 crypt functions. 64 Busybox has internal DES and MD5 crypt functions.
65 They produce results which are identical to corresponding 65 They produce results which are identical to corresponding
66 standard C library functions. 66 standard C library functions.
67 67
68 If you leave this disabled, busybox will use the system's 68 If you leave this disabled, busybox will use the system's
69 crypt functions. Most C libraries use large (~70k) 69 crypt functions. Most C libraries use large (~70k)
70 static buffers there, and also combine them with more general 70 static buffers there, and also combine them with more general
71 DES encryption/decryption. 71 DES encryption/decryption.
72 72
73 For busybox, having large static buffers is undesirable, 73 For busybox, having large static buffers is undesirable,
74 especially on NOMMU machines. Busybox also doesn't need 74 especially on NOMMU machines. Busybox also doesn't need
75 DES encryption/decryption and can do with smaller code. 75 DES encryption/decryption and can do with smaller code.
76 76
77 If you enable this option, it will add about 4.8k of code 77 If you enable this option, it will add about 4.8k of code
78 if you are building dynamically linked executable. 78 if you are building dynamically linked executable.
79 In static build, it makes code _smaller_ by about 1.2k, 79 In static build, it makes code _smaller_ by about 1.2k,
80 and likely many kilobytes less of bss. 80 and likely many kilobytes less of bss.
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 y 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$"
88 in your /etc/passwd or /etc/shadow files. These passwords 88 in your /etc/passwd or /etc/shadow files. These passwords
89 are hashed using SHA256 and SHA512 algorithms. Support for them 89 are hashed using SHA256 and SHA512 algorithms. Support for them
90 was added to glibc in 2008. 90 was added to glibc in 2008.
91 With this option off, login will fail password check for any 91 With this option off, login will fail password check for any
92 user which has password encrypted with these algorithms. 92 user which has password encrypted with these algorithms.
93 93
94INSERT 94INSERT
95 95
diff --git a/loginutils/add-remove-shell.c b/loginutils/add-remove-shell.c
index 54b62c773..750b44bd6 100644
--- a/loginutils/add-remove-shell.c
+++ b/loginutils/add-remove-shell.c
@@ -8,16 +8,16 @@
8 * for details. 8 * for details.
9 */ 9 */
10//config:config ADD_SHELL 10//config:config ADD_SHELL
11//config: bool "add-shell" 11//config: bool "add-shell (2.8 kb)"
12//config: default y if DESKTOP 12//config: default y if DESKTOP
13//config: help 13//config: help
14//config: Add shells to /etc/shells. 14//config: Add shells to /etc/shells.
15//config: 15//config:
16//config:config REMOVE_SHELL 16//config:config REMOVE_SHELL
17//config: bool "remove-shell" 17//config: bool "remove-shell (2.7 kb)"
18//config: default y if DESKTOP 18//config: default y if DESKTOP
19//config: help 19//config: help
20//config: Remove shells from /etc/shells. 20//config: Remove shells from /etc/shells.
21 21
22// APPLET_ODDNAME:name main location suid_type help 22// APPLET_ODDNAME:name main location suid_type help
23//applet:IF_ADD_SHELL( APPLET_ODDNAME(add-shell , add_remove_shell, BB_DIR_USR_SBIN, BB_SUID_DROP, add_shell )) 23//applet:IF_ADD_SHELL( APPLET_ODDNAME(add-shell , add_remove_shell, BB_DIR_USR_SBIN, BB_SUID_DROP, add_shell ))
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c
index 94da4efbb..b197fc149 100644
--- a/loginutils/addgroup.c
+++ b/loginutils/addgroup.c
@@ -10,10 +10,10 @@
10 * 10 *
11 */ 11 */
12//config:config ADDGROUP 12//config:config ADDGROUP
13//config: bool "addgroup" 13//config: bool "addgroup (8.2 kb)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: Utility for creating a new group account. 16//config: Utility for creating a new group account.
17//config: 17//config:
18//config:config FEATURE_ADDGROUP_LONG_OPTIONS 18//config:config FEATURE_ADDGROUP_LONG_OPTIONS
19//config: bool "Enable long options" 19//config: bool "Enable long options"
@@ -25,9 +25,9 @@
25//config: default y 25//config: default y
26//config: depends on ADDGROUP 26//config: depends on ADDGROUP
27//config: help 27//config: help
28//config: If called with two non-option arguments, 28//config: If called with two non-option arguments,
29//config: addgroup will add an existing user to an 29//config: addgroup will add an existing user to an
30//config: existing group. 30//config: existing group.
31 31
32//applet:IF_ADDGROUP(APPLET(addgroup, BB_DIR_USR_SBIN, BB_SUID_DROP)) 32//applet:IF_ADDGROUP(APPLET(addgroup, BB_DIR_USR_SBIN, BB_SUID_DROP))
33 33
diff --git a/loginutils/adduser.c b/loginutils/adduser.c
index 40bc816a1..ef18278ac 100644
--- a/loginutils/adduser.c
+++ b/loginutils/adduser.c
@@ -8,10 +8,10 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config ADDUSER 10//config:config ADDUSER
11//config: bool "adduser" 11//config: bool "adduser (15 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Utility for creating a new user account. 14//config: Utility for creating a new user account.
15//config: 15//config:
16//config:config FEATURE_ADDUSER_LONG_OPTIONS 16//config:config FEATURE_ADDUSER_LONG_OPTIONS
17//config: bool "Enable long options" 17//config: bool "Enable long options"
@@ -23,19 +23,19 @@
23//config: default n 23//config: default n
24//config: depends on ADDUSER || ADDGROUP 24//config: depends on ADDUSER || ADDGROUP
25//config: help 25//config: help
26//config: Enable sanity check on user and group names in adduser and addgroup. 26//config: Enable sanity check on user and group names in adduser and addgroup.
27//config: To avoid problems, the user or group name should consist only of 27//config: To avoid problems, the user or group name should consist only of
28//config: letters, digits, underscores, periods, at signs and dashes, 28//config: letters, digits, underscores, periods, at signs and dashes,
29//config: and not start with a dash (as defined by IEEE Std 1003.1-2001). 29//config: and not start with a dash (as defined by IEEE Std 1003.1-2001).
30//config: For compatibility with Samba machine accounts "$" is also supported 30//config: For compatibility with Samba machine accounts "$" is also supported
31//config: at the end of the user or group name. 31//config: at the end of the user or group name.
32//config: 32//config:
33//config:config LAST_ID 33//config:config LAST_ID
34//config: int "Last valid uid or gid for adduser and addgroup" 34//config: int "Last valid uid or gid for adduser and addgroup"
35//config: depends on ADDUSER || ADDGROUP 35//config: depends on ADDUSER || ADDGROUP
36//config: default 60000 36//config: default 60000
37//config: help 37//config: help
38//config: Last valid uid or gid for adduser and addgroup 38//config: Last valid uid or gid for adduser and addgroup
39//config: 39//config:
40//config:config FIRST_SYSTEM_ID 40//config:config FIRST_SYSTEM_ID
41//config: int "First valid system uid or gid for adduser and addgroup" 41//config: int "First valid system uid or gid for adduser and addgroup"
@@ -43,7 +43,7 @@
43//config: range 0 LAST_ID 43//config: range 0 LAST_ID
44//config: default 100 44//config: default 100
45//config: help 45//config: help
46//config: First valid system uid or gid for adduser and addgroup 46//config: First valid system uid or gid for adduser and addgroup
47//config: 47//config:
48//config:config LAST_SYSTEM_ID 48//config:config LAST_SYSTEM_ID
49//config: int "Last valid system uid or gid for adduser and addgroup" 49//config: int "Last valid system uid or gid for adduser and addgroup"
@@ -51,7 +51,7 @@
51//config: range FIRST_SYSTEM_ID LAST_ID 51//config: range FIRST_SYSTEM_ID LAST_ID
52//config: default 999 52//config: default 999
53//config: help 53//config: help
54//config: Last valid system uid or gid for adduser and addgroup 54//config: Last valid system uid or gid for adduser and addgroup
55 55
56//applet:IF_ADDUSER(APPLET(adduser, BB_DIR_USR_SBIN, BB_SUID_DROP)) 56//applet:IF_ADDUSER(APPLET(adduser, BB_DIR_USR_SBIN, BB_SUID_DROP))
57 57
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index baafd35c8..e390da647 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -6,18 +6,18 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config CHPASSWD 8//config:config CHPASSWD
9//config: bool "chpasswd" 9//config: bool "chpasswd (18 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: Reads a file of user name and password pairs from standard input 12//config: Reads a file of user name and password pairs from standard input
13//config: and uses this information to update a group of existing users. 13//config: and uses this information to update a group of existing users.
14//config: 14//config:
15//config:config FEATURE_DEFAULT_PASSWD_ALGO 15//config:config FEATURE_DEFAULT_PASSWD_ALGO
16//config: string "Default encryption method (passwd -a, cryptpw -m, chpasswd -c ALG)" 16//config: string "Default encryption method (passwd -a, cryptpw -m, chpasswd -c ALG)"
17//config: default "des" 17//config: default "des"
18//config: depends on PASSWD || CRYPTPW || CHPASSWD 18//config: depends on PASSWD || CRYPTPW || CHPASSWD
19//config: help 19//config: help
20//config: Possible choices are "d[es]", "m[d5]", "s[ha256]" or "sha512". 20//config: Possible choices are "d[es]", "m[d5]", "s[ha256]" or "sha512".
21 21
22//applet:IF_CHPASSWD(APPLET(chpasswd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 22//applet:IF_CHPASSWD(APPLET(chpasswd, BB_DIR_USR_SBIN, BB_SUID_DROP))
23 23
diff --git a/loginutils/cryptpw.c b/loginutils/cryptpw.c
index 3dc8232e0..f8906c59a 100644
--- a/loginutils/cryptpw.c
+++ b/loginutils/cryptpw.c
@@ -10,19 +10,19 @@
10 * Licensed under GPLv2, see file LICENSE in this source tree. 10 * Licensed under GPLv2, see file LICENSE in this source tree.
11 */ 11 */
12//config:config CRYPTPW 12//config:config CRYPTPW
13//config: bool "cryptpw" 13//config: bool "cryptpw (14 kb)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: Encrypts the given password with the crypt(3) libc function 16//config: Encrypts the given password with the crypt(3) libc function
17//config: using the given salt. 17//config: using the given salt.
18//config: 18//config:
19//config:config MKPASSWD 19//config:config MKPASSWD
20//config: bool "mkpasswd" 20//config: bool "mkpasswd (15 kb)"
21//config: default y 21//config: default y
22//config: help 22//config: help
23//config: Encrypts the given password with the crypt(3) libc function 23//config: Encrypts the given password with the crypt(3) libc function
24//config: using the given salt. Debian has this utility under mkpasswd 24//config: using the given salt. Debian has this utility under mkpasswd
25//config: name. Busybox provides mkpasswd as an alias for cryptpw. 25//config: name. Busybox provides mkpasswd as an alias for cryptpw.
26 26
27//applet:IF_CRYPTPW(APPLET(cryptpw, BB_DIR_USR_BIN, BB_SUID_DROP)) 27//applet:IF_CRYPTPW(APPLET(cryptpw, BB_DIR_USR_BIN, BB_SUID_DROP))
28// APPLET_ODDNAME:name main location suid_type help 28// APPLET_ODDNAME:name main location suid_type help
diff --git a/loginutils/deluser.c b/loginutils/deluser.c
index fbb1614fb..3b6bd952d 100644
--- a/loginutils/deluser.c
+++ b/loginutils/deluser.c
@@ -9,24 +9,24 @@
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 */ 10 */
11//config:config DELUSER 11//config:config DELUSER
12//config: bool "deluser" 12//config: bool "deluser (8.4 kb)"
13//config: default y 13//config: default y
14//config: help 14//config: help
15//config: Utility for deleting a user account. 15//config: Utility for deleting a user account.
16//config: 16//config:
17//config:config DELGROUP 17//config:config DELGROUP
18//config: bool "delgroup" 18//config: bool "delgroup (5.6 kb)"
19//config: default y 19//config: default y
20//config: help 20//config: help
21//config: Utility for deleting a group account. 21//config: Utility for deleting a group account.
22//config: 22//config:
23//config:config FEATURE_DEL_USER_FROM_GROUP 23//config:config FEATURE_DEL_USER_FROM_GROUP
24//config: bool "Support removing users from groups" 24//config: bool "Support removing users from groups"
25//config: default y 25//config: default y
26//config: depends on DELGROUP 26//config: depends on DELGROUP
27//config: help 27//config: help
28//config: If called with two non-option arguments, deluser 28//config: If called with two non-option arguments, deluser
29//config: or delgroup will remove an user from a specified group. 29//config: or delgroup will remove an user from a specified group.
30 30
31//applet:IF_DELUSER(APPLET(deluser, BB_DIR_USR_SBIN, BB_SUID_DROP)) 31//applet:IF_DELUSER(APPLET(deluser, BB_DIR_USR_SBIN, BB_SUID_DROP))
32//applet:IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, BB_DIR_USR_SBIN, BB_SUID_DROP, delgroup)) 32//applet:IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, BB_DIR_USR_SBIN, BB_SUID_DROP, delgroup))
diff --git a/loginutils/getty.c b/loginutils/getty.c
index ba6c784a3..fd5116d08 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -22,23 +22,23 @@
22 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 22 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
23 */ 23 */
24//config:config GETTY 24//config:config GETTY
25//config: bool "getty" 25//config: bool "getty (10 kb)"
26//config: default y 26//config: default y
27//config: select FEATURE_SYSLOG 27//config: select FEATURE_SYSLOG
28//config: help 28//config: help
29//config: getty lets you log in on a tty. It is normally invoked by init. 29//config: getty lets you log in on a tty. It is normally invoked by init.
30//config: 30//config:
31//config: Note that you can save a few bytes by disabling it and 31//config: Note that you can save a few bytes by disabling it and
32//config: using login applet directly. 32//config: using login applet directly.
33//config: If you need to reset tty attributes before calling login, 33//config: If you need to reset tty attributes before calling login,
34//config: this script approximates getty: 34//config: this script approximates getty:
35//config: 35//config:
36//config: exec </dev/$1 >/dev/$1 2>&1 || exit 1 36//config: exec </dev/$1 >/dev/$1 2>&1 || exit 1
37//config: reset 37//config: reset
38//config: stty sane; stty ispeed 38400; stty ospeed 38400 38//config: stty sane; stty ispeed 38400; stty ospeed 38400
39//config: printf "%s login: " "`hostname`" 39//config: printf "%s login: " "`hostname`"
40//config: read -r login 40//config: read -r login
41//config: exec /bin/login "$login" 41//config: exec /bin/login "$login"
42 42
43//applet:IF_GETTY(APPLET(getty, BB_DIR_SBIN, BB_SUID_DROP)) 43//applet:IF_GETTY(APPLET(getty, BB_DIR_SBIN, BB_SUID_DROP))
44 44
diff --git a/loginutils/login.c b/loginutils/login.c
index be05def09..39f703f07 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -3,50 +3,50 @@
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */ 4 */
5//config:config LOGIN 5//config:config LOGIN
6//config: bool "login" 6//config: bool "login (24 kb)"
7//config: default y 7//config: default y
8//config: select FEATURE_SYSLOG 8//config: select FEATURE_SYSLOG
9//config: help 9//config: help
10//config: login is used when signing onto a system. 10//config: login is used when signing onto a system.
11//config: 11//config:
12//config: Note that Busybox binary must be setuid root for this applet to 12//config: Note that Busybox binary must be setuid root for this applet to
13//config: work properly. 13//config: work properly.
14//config: 14//config:
15//config:config LOGIN_SESSION_AS_CHILD 15//config:config LOGIN_SESSION_AS_CHILD
16//config: bool "Run logged in session in a child process" 16//config: bool "Run logged in session in a child process"
17//config: default y if PAM 17//config: default y if PAM
18//config: depends on LOGIN 18//config: depends on LOGIN
19//config: help 19//config: help
20//config: Run the logged in session in a child process. This allows 20//config: Run the logged in session in a child process. This allows
21//config: login to clean up things such as utmp entries or PAM sessions 21//config: login to clean up things such as utmp entries or PAM sessions
22//config: when the login session is complete. If you use PAM, you 22//config: when the login session is complete. If you use PAM, you
23//config: almost always would want this to be set to Y, else PAM session 23//config: almost always would want this to be set to Y, else PAM session
24//config: will not be cleaned up. 24//config: will not be cleaned up.
25//config: 25//config:
26//config:config LOGIN_SCRIPTS 26//config:config LOGIN_SCRIPTS
27//config: bool "Support login scripts" 27//config: bool "Support login scripts"
28//config: depends on LOGIN 28//config: depends on LOGIN
29//config: default y 29//config: default y
30//config: help 30//config: help
31//config: Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT 31//config: Enable this if you want login to execute $LOGIN_PRE_SUID_SCRIPT
32//config: just prior to switching from root to logged-in user. 32//config: just prior to switching from root to logged-in user.
33//config: 33//config:
34//config:config FEATURE_NOLOGIN 34//config:config FEATURE_NOLOGIN
35//config: bool "Support /etc/nologin" 35//config: bool "Support /etc/nologin"
36//config: default y 36//config: default y
37//config: depends on LOGIN 37//config: depends on LOGIN
38//config: help 38//config: help
39//config: The file /etc/nologin is used by (some versions of) login(1). 39//config: The file /etc/nologin is used by (some versions of) login(1).
40//config: If it exists, non-root logins are prohibited. 40//config: If it exists, non-root logins are prohibited.
41//config: 41//config:
42//config:config FEATURE_SECURETTY 42//config:config FEATURE_SECURETTY
43//config: bool "Support /etc/securetty" 43//config: bool "Support /etc/securetty"
44//config: default y 44//config: default y
45//config: depends on LOGIN 45//config: depends on LOGIN
46//config: help 46//config: help
47//config: The file /etc/securetty is used by (some versions of) login(1). 47//config: The file /etc/securetty is used by (some versions of) login(1).
48//config: The file contains the device names of tty lines (one per line, 48//config: The file contains the device names of tty lines (one per line,
49//config: without leading /dev/) on which root is allowed to login. 49//config: without leading /dev/) on which root is allowed to login.
50 50
51//applet:/* Needs to be run by root or be suid root - needs to change uid and gid: */ 51//applet:/* Needs to be run by root or be suid root - needs to change uid and gid: */
52//applet:IF_LOGIN(APPLET(login, BB_DIR_BIN, BB_SUID_REQUIRE)) 52//applet:IF_LOGIN(APPLET(login, BB_DIR_BIN, BB_SUID_REQUIRE))
diff --git a/loginutils/passwd.c b/loginutils/passwd.c
index b7b7423fd..03f8ad0a4 100644
--- a/loginutils/passwd.c
+++ b/loginutils/passwd.c
@@ -3,24 +3,24 @@
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */ 4 */
5//config:config PASSWD 5//config:config PASSWD
6//config: bool "passwd" 6//config: bool "passwd (21 kb)"
7//config: default y 7//config: default y
8//config: select FEATURE_SYSLOG 8//config: select FEATURE_SYSLOG
9//config: help 9//config: help
10//config: passwd changes passwords for user and group accounts. A normal user 10//config: passwd changes passwords for user and group accounts. A normal user
11//config: may only change the password for his/her own account, the super user 11//config: may only change the password for his/her own account, the super user
12//config: may change the password for any account. The administrator of a group 12//config: may change the password for any account. The administrator of a group
13//config: may change the password for the group. 13//config: may change the password for the group.
14//config: 14//config:
15//config: Note that Busybox binary must be setuid root for this applet to 15//config: Note that Busybox binary must be setuid root for this applet to
16//config: work properly. 16//config: work properly.
17//config: 17//config:
18//config:config FEATURE_PASSWD_WEAK_CHECK 18//config:config FEATURE_PASSWD_WEAK_CHECK
19//config: bool "Check new passwords for weakness" 19//config: bool "Check new passwords for weakness"
20//config: default y 20//config: default y
21//config: depends on PASSWD 21//config: depends on PASSWD
22//config: help 22//config: help
23//config: With this option passwd will refuse new passwords which are "weak". 23//config: With this option passwd will refuse new passwords which are "weak".
24 24
25//applet:/* Needs to be run by root or be suid root - needs to change /etc/{passwd,shadow}: */ 25//applet:/* Needs to be run by root or be suid root - needs to change /etc/{passwd,shadow}: */
26//applet:IF_PASSWD(APPLET(passwd, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) 26//applet:IF_PASSWD(APPLET(passwd, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
diff --git a/loginutils/su.c b/loginutils/su.c
index 4cce82405..41291ea8f 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -5,14 +5,14 @@
5 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 5 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
6 */ 6 */
7//config:config SU 7//config:config SU
8//config: bool "su" 8//config: bool "su (19 kb)"
9//config: default y 9//config: default y
10//config: select FEATURE_SYSLOG 10//config: select FEATURE_SYSLOG
11//config: help 11//config: help
12//config: su is used to become another user during a login session. 12//config: su is used to become another user during a login session.
13//config: Invoked without a username, su defaults to becoming the super user. 13//config: Invoked without a username, su defaults to becoming the super user.
14//config: Note that busybox binary must be setuid root for this applet to 14//config: Note that busybox binary must be setuid root for this applet to
15//config: work properly. 15//config: work properly.
16//config: 16//config:
17//config:config FEATURE_SU_SYSLOG 17//config:config FEATURE_SU_SYSLOG
18//config: bool "Log to syslog all attempts to use su" 18//config: bool "Log to syslog all attempts to use su"
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index 2e32e2bbd..d5a463cac 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -5,12 +5,12 @@
5 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 5 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
6 */ 6 */
7//config:config SULOGIN 7//config:config SULOGIN
8//config: bool "sulogin" 8//config: bool "sulogin (17 kb)"
9//config: default y 9//config: default y
10//config: select FEATURE_SYSLOG 10//config: select FEATURE_SYSLOG
11//config: help 11//config: help
12//config: sulogin is invoked when the system goes into single user 12//config: sulogin is invoked when the system goes into single user
13//config: mode (this is done through an entry in inittab). 13//config: mode (this is done through an entry in inittab).
14 14
15//applet:IF_SULOGIN(APPLET(sulogin, BB_DIR_SBIN, BB_SUID_DROP)) 15//applet:IF_SULOGIN(APPLET(sulogin, BB_DIR_SBIN, BB_SUID_DROP))
16 16
diff --git a/loginutils/vlock.c b/loginutils/vlock.c
index 5ba6a8780..f22abd3aa 100644
--- a/loginutils/vlock.c
+++ b/loginutils/vlock.c
@@ -16,13 +16,13 @@
16 * It now works with md5, sha1, etc passwords. 16 * It now works with md5, sha1, etc passwords.
17 */ 17 */
18//config:config VLOCK 18//config:config VLOCK
19//config: bool "vlock" 19//config: bool "vlock (17 kb)"
20//config: default y 20//config: default y
21//config: help 21//config: help
22//config: Build the "vlock" applet which allows you to lock (virtual) terminals. 22//config: Build the "vlock" applet which allows you to lock (virtual) terminals.
23//config: 23//config:
24//config: Note that Busybox binary must be setuid root for this applet to 24//config: Note that Busybox binary must be setuid root for this applet to
25//config: work properly. 25//config: work properly.
26 26
27//applet:/* Needs to be run by root or be suid root - needs to change uid and gid: */ 27//applet:/* Needs to be run by root or be suid root - needs to change uid and gid: */
28//applet:IF_VLOCK(APPLET(vlock, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) 28//applet:IF_VLOCK(APPLET(vlock, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
diff --git a/mailutils/Config.src b/mailutils/Config.src
index e45a0f8fb..6d47163e4 100644
--- a/mailutils/Config.src
+++ b/mailutils/Config.src
@@ -7,6 +7,6 @@ config FEATURE_MIME_CHARSET
7 default "us-ascii" 7 default "us-ascii"
8 depends on MAKEMIME || REFORMIME || SENDMAIL 8 depends on MAKEMIME || REFORMIME || SENDMAIL
9 help 9 help
10 Default charset of the message. 10 Default charset of the message.
11 11
12endmenu 12endmenu
diff --git a/mailutils/makemime.c b/mailutils/makemime.c
index 78f78bbcc..577bcde39 100644
--- a/mailutils/makemime.c
+++ b/mailutils/makemime.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config MAKEMIME 9//config:config MAKEMIME
10//config: bool "makemime" 10//config: bool "makemime (5.9 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: Create MIME-formatted messages. 13//config: Create MIME-formatted messages.
14 14
15//applet:IF_MAKEMIME(APPLET(makemime, BB_DIR_BIN, BB_SUID_DROP)) 15//applet:IF_MAKEMIME(APPLET(makemime, BB_DIR_BIN, BB_SUID_DROP))
16 16
diff --git a/mailutils/popmaildir.c b/mailutils/popmaildir.c
index ffe373865..1695a9bb8 100644
--- a/mailutils/popmaildir.c
+++ b/mailutils/popmaildir.c
@@ -10,21 +10,21 @@
10 * Licensed under GPLv2, see file LICENSE in this source tree. 10 * Licensed under GPLv2, see file LICENSE in this source tree.
11 */ 11 */
12//config:config POPMAILDIR 12//config:config POPMAILDIR
13//config: bool "popmaildir" 13//config: bool "popmaildir (10 kb)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: Simple yet powerful POP3 mail popper. Delivers content 16//config: Simple yet powerful POP3 mail popper. Delivers content
17//config: of remote mailboxes to local Maildir. 17//config: of remote mailboxes to local Maildir.
18//config: 18//config:
19//config:config FEATURE_POPMAILDIR_DELIVERY 19//config:config FEATURE_POPMAILDIR_DELIVERY
20//config: bool "Allow message filters and custom delivery program" 20//config: bool "Allow message filters and custom delivery program"
21//config: default y 21//config: default y
22//config: depends on POPMAILDIR 22//config: depends on POPMAILDIR
23//config: help 23//config: help
24//config: Allow to use a custom program to filter the content 24//config: Allow to use a custom program to filter the content
25//config: of the message before actual delivery (-F "prog [args...]"). 25//config: of the message before actual delivery (-F "prog [args...]").
26//config: Allow to use a custom program for message actual delivery 26//config: Allow to use a custom program for message actual delivery
27//config: (-M "prog [args...]"). 27//config: (-M "prog [args...]").
28 28
29//applet:IF_POPMAILDIR(APPLET(popmaildir, BB_DIR_USR_SBIN, BB_SUID_DROP)) 29//applet:IF_POPMAILDIR(APPLET(popmaildir, BB_DIR_USR_SBIN, BB_SUID_DROP))
30 30
diff --git a/mailutils/reformime.c b/mailutils/reformime.c
index e97bc0130..6a0254803 100644
--- a/mailutils/reformime.c
+++ b/mailutils/reformime.c
@@ -7,18 +7,18 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config REFORMIME 9//config:config REFORMIME
10//config: bool "reformime" 10//config: bool "reformime (7.5 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: Parse MIME-formatted messages. 13//config: Parse MIME-formatted messages.
14//config: 14//config:
15//config:config FEATURE_REFORMIME_COMPAT 15//config:config FEATURE_REFORMIME_COMPAT
16//config: bool "Accept and ignore options other than -x and -X" 16//config: bool "Accept and ignore options other than -x and -X"
17//config: default y 17//config: default y
18//config: depends on REFORMIME 18//config: depends on REFORMIME
19//config: help 19//config: help
20//config: Accept (for compatibility only) and ignore options 20//config: Accept (for compatibility only) and ignore options
21//config: other than -x and -X. 21//config: other than -x and -X.
22 22
23//applet:IF_REFORMIME(APPLET(reformime, BB_DIR_BIN, BB_SUID_DROP)) 23//applet:IF_REFORMIME(APPLET(reformime, BB_DIR_BIN, BB_SUID_DROP))
24 24
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index b542099fd..346de2712 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -7,10 +7,10 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config SENDMAIL 9//config:config SENDMAIL
10//config: bool "sendmail" 10//config: bool "sendmail (14 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: Barebones sendmail. 13//config: Barebones sendmail.
14 14
15//applet:IF_SENDMAIL(APPLET(sendmail, BB_DIR_USR_SBIN, BB_SUID_DROP)) 15//applet:IF_SENDMAIL(APPLET(sendmail, BB_DIR_USR_SBIN, BB_SUID_DROP))
16 16
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c
index 6355cc1ef..04ba5636f 100644
--- a/miscutils/adjtimex.c
+++ b/miscutils/adjtimex.c
@@ -11,12 +11,12 @@
11 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 11 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
12 */ 12 */
13//config:config ADJTIMEX 13//config:config ADJTIMEX
14//config: bool "adjtimex" 14//config: bool "adjtimex (4.5 kb)"
15//config: default y 15//config: default y
16//config: select PLATFORM_LINUX 16//config: select PLATFORM_LINUX
17//config: help 17//config: help
18//config: Adjtimex reads and optionally sets adjustment parameters for 18//config: Adjtimex reads and optionally sets adjustment parameters for
19//config: the Linux clock adjustment algorithm. 19//config: the Linux clock adjustment algorithm.
20 20
21//applet:IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP)) 21//applet:IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP))
22 22
diff --git a/miscutils/bbconfig.c b/miscutils/bbconfig.c
index 5320c6966..bcc9caa7c 100644
--- a/miscutils/bbconfig.c
+++ b/miscutils/bbconfig.c
@@ -2,25 +2,25 @@
2/* This file was released into the public domain by Paul Fox. 2/* This file was released into the public domain by Paul Fox.
3 */ 3 */
4//config:config BBCONFIG 4//config:config BBCONFIG
5//config: bool "bbconfig" 5//config: bool "bbconfig (9.7 kb)"
6//config: default n 6//config: default n
7//config: help 7//config: help
8//config: The bbconfig applet will print the config file with which 8//config: The bbconfig applet will print the config file with which
9//config: busybox was built. 9//config: busybox was built.
10//config: 10//config:
11//config:config FEATURE_COMPRESS_BBCONFIG 11//config:config FEATURE_COMPRESS_BBCONFIG
12//config: bool "Compress bbconfig data" 12//config: bool "Compress bbconfig data"
13//config: default y 13//config: default y
14//config: depends on BBCONFIG 14//config: depends on BBCONFIG
15//config: help 15//config: help
16//config: Store bbconfig data in compressed form, uncompress them on-the-fly 16//config: Store bbconfig data in compressed form, uncompress them on-the-fly
17//config: before output. 17//config: before output.
18//config: 18//config:
19//config: If you have a really tiny busybox with few applets enabled (and 19//config: If you have a really tiny busybox with few applets enabled (and
20//config: bunzip2 isn't one of them), the overhead of the decompressor might 20//config: bunzip2 isn't one of them), the overhead of the decompressor might
21//config: be noticeable. Also, if you run executables directly from ROM 21//config: be noticeable. Also, if you run executables directly from ROM
22//config: and have very little memory, this might not be a win. Otherwise, 22//config: and have very little memory, this might not be a win. Otherwise,
23//config: you probably want this. 23//config: you probably want this.
24 24
25//applet:IF_BBCONFIG(APPLET(bbconfig, BB_DIR_BIN, BB_SUID_DROP)) 25//applet:IF_BBCONFIG(APPLET(bbconfig, BB_DIR_BIN, BB_SUID_DROP))
26 26
diff --git a/miscutils/beep.c b/miscutils/beep.c
index 216f69400..b9b62f79b 100644
--- a/miscutils/beep.c
+++ b/miscutils/beep.c
@@ -8,11 +8,11 @@
8 * 8 *
9 */ 9 */
10//config:config BEEP 10//config:config BEEP
11//config: bool "beep" 11//config: bool "beep (3 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: The beep applets beeps in a given freq/Hz. 15//config: The beep applets beeps in a given freq/Hz.
16//config: 16//config:
17//config:config FEATURE_BEEP_FREQ 17//config:config FEATURE_BEEP_FREQ
18//config: int "default frequency" 18//config: int "default frequency"
@@ -20,7 +20,7 @@
20//config: default 4000 20//config: default 4000
21//config: depends on BEEP 21//config: depends on BEEP
22//config: help 22//config: help
23//config: Frequency for default beep. 23//config: Frequency for default beep.
24//config: 24//config:
25//config:config FEATURE_BEEP_LENGTH_MS 25//config:config FEATURE_BEEP_LENGTH_MS
26//config: int "default length" 26//config: int "default length"
@@ -28,7 +28,7 @@
28//config: default 30 28//config: default 30
29//config: depends on BEEP 29//config: depends on BEEP
30//config: help 30//config: help
31//config: Length in ms for default beep. 31//config: Length in ms for default beep.
32 32
33//applet:IF_BEEP(APPLET(beep, BB_DIR_USR_BIN, BB_SUID_DROP)) 33//applet:IF_BEEP(APPLET(beep, BB_DIR_USR_BIN, BB_SUID_DROP))
34 34
diff --git a/miscutils/chat.c b/miscutils/chat.c
index 8df194534..216a899a0 100644
--- a/miscutils/chat.c
+++ b/miscutils/chat.c
@@ -8,71 +8,71 @@
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10//config:config CHAT 10//config:config CHAT
11//config: bool "chat" 11//config: bool "chat (6.6 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Simple chat utility. 14//config: Simple chat utility.
15//config: 15//config:
16//config:config FEATURE_CHAT_NOFAIL 16//config:config FEATURE_CHAT_NOFAIL
17//config: bool "Enable NOFAIL expect strings" 17//config: bool "Enable NOFAIL expect strings"
18//config: depends on CHAT 18//config: depends on CHAT
19//config: default y 19//config: default y
20//config: help 20//config: help
21//config: When enabled expect strings which are started with a dash trigger 21//config: When enabled expect strings which are started with a dash trigger
22//config: no-fail mode. That is when expectation is not met within timeout 22//config: no-fail mode. That is when expectation is not met within timeout
23//config: the script is not terminated but sends next SEND string and waits 23//config: the script is not terminated but sends next SEND string and waits
24//config: for next EXPECT string. This allows to compose far more flexible 24//config: for next EXPECT string. This allows to compose far more flexible
25//config: scripts. 25//config: scripts.
26//config: 26//config:
27//config:config FEATURE_CHAT_TTY_HIFI 27//config:config FEATURE_CHAT_TTY_HIFI
28//config: bool "Force STDIN to be a TTY" 28//config: bool "Force STDIN to be a TTY"
29//config: depends on CHAT 29//config: depends on CHAT
30//config: default n 30//config: default n
31//config: help 31//config: help
32//config: Original chat always treats STDIN as a TTY device and sets for it 32//config: Original chat always treats STDIN as a TTY device and sets for it
33//config: so-called raw mode. This option turns on such behaviour. 33//config: so-called raw mode. This option turns on such behaviour.
34//config: 34//config:
35//config:config FEATURE_CHAT_IMPLICIT_CR 35//config:config FEATURE_CHAT_IMPLICIT_CR
36//config: bool "Enable implicit Carriage Return" 36//config: bool "Enable implicit Carriage Return"
37//config: depends on CHAT 37//config: depends on CHAT
38//config: default y 38//config: default y
39//config: help 39//config: help
40//config: When enabled make chat to terminate all SEND strings with a "\r" 40//config: When enabled make chat to terminate all SEND strings with a "\r"
41//config: unless "\c" is met anywhere in the string. 41//config: unless "\c" is met anywhere in the string.
42//config: 42//config:
43//config:config FEATURE_CHAT_SWALLOW_OPTS 43//config:config FEATURE_CHAT_SWALLOW_OPTS
44//config: bool "Swallow options" 44//config: bool "Swallow options"
45//config: depends on CHAT 45//config: depends on CHAT
46//config: default y 46//config: default y
47//config: help 47//config: help
48//config: Busybox chat require no options. To make it not fail when used 48//config: Busybox chat require no options. To make it not fail when used
49//config: in place of original chat (which has a bunch of options) turn 49//config: in place of original chat (which has a bunch of options) turn
50//config: this on. 50//config: this on.
51//config: 51//config:
52//config:config FEATURE_CHAT_SEND_ESCAPES 52//config:config FEATURE_CHAT_SEND_ESCAPES
53//config: bool "Support weird SEND escapes" 53//config: bool "Support weird SEND escapes"
54//config: depends on CHAT 54//config: depends on CHAT
55//config: default y 55//config: default y
56//config: help 56//config: help
57//config: Original chat uses some escape sequences in SEND arguments which 57//config: Original chat uses some escape sequences in SEND arguments which
58//config: are not sent to device but rather performs special actions. 58//config: are not sent to device but rather performs special actions.
59//config: E.g. "\K" means to send a break sequence to device. 59//config: E.g. "\K" means to send a break sequence to device.
60//config: "\d" delays execution for a second, "\p" -- for a 1/100 of second. 60//config: "\d" delays execution for a second, "\p" -- for a 1/100 of second.
61//config: Before turning this option on think twice: do you really need them? 61//config: Before turning this option on think twice: do you really need them?
62//config: 62//config:
63//config:config FEATURE_CHAT_VAR_ABORT_LEN 63//config:config FEATURE_CHAT_VAR_ABORT_LEN
64//config: bool "Support variable-length ABORT conditions" 64//config: bool "Support variable-length ABORT conditions"
65//config: depends on CHAT 65//config: depends on CHAT
66//config: default y 66//config: default y
67//config: help 67//config: help
68//config: Original chat uses fixed 50-bytes length ABORT conditions. Say N here. 68//config: Original chat uses fixed 50-bytes length ABORT conditions. Say N here.
69//config: 69//config:
70//config:config FEATURE_CHAT_CLR_ABORT 70//config:config FEATURE_CHAT_CLR_ABORT
71//config: bool "Support revoking of ABORT conditions" 71//config: bool "Support revoking of ABORT conditions"
72//config: depends on CHAT 72//config: depends on CHAT
73//config: default y 73//config: default y
74//config: help 74//config: help
75//config: Support CLR_ABORT directive. 75//config: Support CLR_ABORT directive.
76 76
77//applet:IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP)) 77//applet:IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP))
78 78
diff --git a/miscutils/conspy.c b/miscutils/conspy.c
index 1f0278b47..47b9e7207 100644
--- a/miscutils/conspy.c
+++ b/miscutils/conspy.c
@@ -10,14 +10,14 @@
10 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 10 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
11 */ 11 */
12//config:config CONSPY 12//config:config CONSPY
13//config: bool "conspy" 13//config: bool "conspy (10 kb)"
14//config: default y 14//config: default y
15//config: select PLATFORM_LINUX 15//config: select PLATFORM_LINUX
16//config: help 16//config: help
17//config: A text-mode VNC like program for Linux virtual terminals. 17//config: A text-mode VNC like program for Linux virtual terminals.
18//config: example: conspy NUM shared access to console num 18//config: example: conspy NUM shared access to console num
19//config: or conspy -nd NUM screenshot of console num 19//config: or conspy -nd NUM screenshot of console num
20//config: or conspy -cs NUM poor man's GNU screen like 20//config: or conspy -cs NUM poor man's GNU screen like
21 21
22//applet:IF_CONSPY(APPLET(conspy, BB_DIR_BIN, BB_SUID_DROP)) 22//applet:IF_CONSPY(APPLET(conspy, BB_DIR_BIN, BB_SUID_DROP))
23 23
diff --git a/miscutils/crond.c b/miscutils/crond.c
index c0c8bef11..5ae0ff084 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -9,54 +9,54 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 10 */
11//config:config CROND 11//config:config CROND
12//config: bool "crond" 12//config: bool "crond (13 kb)"
13//config: default y 13//config: default y
14//config: select FEATURE_SYSLOG 14//config: select FEATURE_SYSLOG
15//config: help 15//config: help
16//config: Crond is a background daemon that parses individual crontab 16//config: Crond is a background daemon that parses individual crontab
17//config: files and executes commands on behalf of the users in question. 17//config: files and executes commands on behalf of the users in question.
18//config: This is a port of dcron from slackware. It uses files of the 18//config: This is a port of dcron from slackware. It uses files of the
19//config: format /var/spool/cron/crontabs/<username> files, for example: 19//config: format /var/spool/cron/crontabs/<username> files, for example:
20//config: $ cat /var/spool/cron/crontabs/root 20//config: $ cat /var/spool/cron/crontabs/root
21//config: # Run daily cron jobs at 4:40 every day: 21//config: # Run daily cron jobs at 4:40 every day:
22//config: 40 4 * * * /etc/cron/daily > /dev/null 2>&1 22//config: 40 4 * * * /etc/cron/daily > /dev/null 2>&1
23//config: 23//config:
24//config:config FEATURE_CROND_D 24//config:config FEATURE_CROND_D
25//config: bool "Support option -d to redirect output to stderr" 25//config: bool "Support option -d to redirect output to stderr"
26//config: depends on CROND 26//config: depends on CROND
27//config: default y 27//config: default y
28//config: help 28//config: help
29//config: -d N sets loglevel (0:most verbose) and directs all output to stderr. 29//config: -d N sets loglevel (0:most verbose) and directs all output to stderr.
30//config: 30//config:
31//config:config FEATURE_CROND_CALL_SENDMAIL 31//config:config FEATURE_CROND_CALL_SENDMAIL
32//config: bool "Report command output via email (using sendmail)" 32//config: bool "Report command output via email (using sendmail)"
33//config: default y 33//config: default y
34//config: depends on CROND 34//config: depends on CROND
35//config: help 35//config: help
36//config: Command output will be sent to corresponding user via email. 36//config: Command output will be sent to corresponding user via email.
37//config: 37//config:
38//config:config FEATURE_CROND_SPECIAL_TIMES 38//config:config FEATURE_CROND_SPECIAL_TIMES
39//config: bool "Support special times (@reboot, @daily, etc) in crontabs" 39//config: bool "Support special times (@reboot, @daily, etc) in crontabs"
40//config: default y 40//config: default y
41//config: depends on CROND 41//config: depends on CROND
42//config: help 42//config: help
43//config: string meaning 43//config: string meaning
44//config: ------ ------- 44//config: ------ -------
45//config: @reboot Run once, at startup 45//config: @reboot Run once, at startup
46//config: @yearly Run once a year: "0 0 1 1 *" 46//config: @yearly Run once a year: "0 0 1 1 *"
47//config: @annually Same as @yearly: "0 0 1 1 *" 47//config: @annually Same as @yearly: "0 0 1 1 *"
48//config: @monthly Run once a month: "0 0 1 * *" 48//config: @monthly Run once a month: "0 0 1 * *"
49//config: @weekly Run once a week: "0 0 * * 0" 49//config: @weekly Run once a week: "0 0 * * 0"
50//config: @daily Run once a day: "0 0 * * *" 50//config: @daily Run once a day: "0 0 * * *"
51//config: @midnight Same as @daily: "0 0 * * *" 51//config: @midnight Same as @daily: "0 0 * * *"
52//config: @hourly Run once an hour: "0 * * * *" 52//config: @hourly Run once an hour: "0 * * * *"
53//config: 53//config:
54//config:config FEATURE_CROND_DIR 54//config:config FEATURE_CROND_DIR
55//config: string "crond spool directory" 55//config: string "crond spool directory"
56//config: default "/var/spool/cron" 56//config: default "/var/spool/cron"
57//config: depends on CROND || CRONTAB 57//config: depends on CROND || CRONTAB
58//config: help 58//config: help
59//config: Location of crond spool. 59//config: Location of crond spool.
60 60
61//applet:IF_CROND(APPLET(crond, BB_DIR_USR_SBIN, BB_SUID_DROP)) 61//applet:IF_CROND(APPLET(crond, BB_DIR_USR_SBIN, BB_SUID_DROP))
62 62
@@ -79,9 +79,9 @@
79#include "common_bufsiz.h" 79#include "common_bufsiz.h"
80#include <syslog.h> 80#include <syslog.h>
81 81
82/* glibc frees previous setenv'ed value when we do next setenv() 82#if 0
83 * of the same variable. uclibc does not do this! */ 83/* If libc tracks and reuses setenv()-allocated memory, ok to set this to 0 */
84#if (defined(__GLIBC__) && !defined(__UCLIBC__)) /* || OTHER_SAFE_LIBC... */ 84/* Neither glibc nor uclibc do that! */
85# define SETENV_LEAKS 0 85# define SETENV_LEAKS 0
86#else 86#else
87# define SETENV_LEAKS 1 87# define SETENV_LEAKS 1
@@ -153,6 +153,7 @@ struct globals {
153 const char *log_filename; 153 const char *log_filename;
154 const char *crontab_dir_name; /* = CRONTABS; */ 154 const char *crontab_dir_name; /* = CRONTABS; */
155 CronFile *cron_files; 155 CronFile *cron_files;
156 char *default_shell;
156#if SETENV_LEAKS 157#if SETENV_LEAKS
157 char *env_var_user; 158 char *env_var_user;
158 char *env_var_home; 159 char *env_var_home;
@@ -700,7 +701,7 @@ fork_job(const char *user, int mailFd, CronLine *line, bool run_sendmail)
700 goto err; 701 goto err;
701 } 702 }
702 703
703 shell = line->cl_shell ? line->cl_shell : DEFAULT_SHELL; 704 shell = line->cl_shell ? line->cl_shell : G.default_shell;
704 prog = run_sendmail ? SENDMAIL : shell; 705 prog = run_sendmail ? SENDMAIL : shell;
705 706
706 set_env_vars(pas, shell); 707 set_env_vars(pas, shell);
@@ -846,7 +847,7 @@ static pid_t start_one_job(const char *user, CronLine *line)
846 } 847 }
847 848
848 /* Prepare things before vfork */ 849 /* Prepare things before vfork */
849 shell = line->cl_shell ? line->cl_shell : DEFAULT_SHELL; 850 shell = line->cl_shell ? line->cl_shell : G.default_shell;
850 set_env_vars(pas, shell); 851 set_env_vars(pas, shell);
851 852
852 /* Fork as the user in question and run program */ 853 /* Fork as the user in question and run program */
@@ -1045,6 +1046,10 @@ int crond_main(int argc UNUSED_PARAM, char **argv)
1045 1046
1046 reopen_logfile_to_stderr(); 1047 reopen_logfile_to_stderr();
1047 xchdir(G.crontab_dir_name); 1048 xchdir(G.crontab_dir_name);
1049 /* $SHELL, or current UID's shell, or DEFAULT_SHELL */
1050 /* Useful on Android where DEFAULT_SHELL /bin/sh may not exist */
1051 G.default_shell = xstrdup(get_shell_name());
1052
1048 log8("crond (busybox "BB_VER") started, log level %d", G.log_level); 1053 log8("crond (busybox "BB_VER") started, log level %d", G.log_level);
1049 rescan_crontab_dir(); 1054 rescan_crontab_dir();
1050 write_pidfile(CONFIG_PID_FILE_PATH "/crond.pid"); 1055 write_pidfile(CONFIG_PID_FILE_PATH "/crond.pid");
diff --git a/miscutils/crontab.c b/miscutils/crontab.c
index bcd424578..23cb54887 100644
--- a/miscutils/crontab.c
+++ b/miscutils/crontab.c
@@ -10,13 +10,13 @@
10 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 10 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
11 */ 11 */
12//config:config CRONTAB 12//config:config CRONTAB
13//config: bool "crontab" 13//config: bool "crontab (9.7 kb)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: Crontab manipulates the crontab for a particular user. Only 16//config: Crontab manipulates the crontab for a particular user. Only
17//config: the superuser may specify a different user and/or crontab directory. 17//config: the superuser may specify a different user and/or crontab directory.
18//config: Note that Busybox binary must be setuid root for this applet to 18//config: Note that Busybox binary must be setuid root for this applet to
19//config: work properly. 19//config: work properly.
20 20
21/* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */ 21/* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */
22//applet:IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) 22//applet:IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
diff --git a/miscutils/dc.c b/miscutils/dc.c
index 6b8364dd9..f752a1377 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -3,19 +3,19 @@
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */ 4 */
5//config:config DC 5//config:config DC
6//config: bool "dc" 6//config: bool "dc (4.2 kb)"
7//config: default y 7//config: default y
8//config: help 8//config: help
9//config: Dc is a reverse-polish desk calculator which supports unlimited 9//config: Dc is a reverse-polish desk calculator which supports unlimited
10//config: precision arithmetic. 10//config: precision arithmetic.
11//config: 11//config:
12//config:config FEATURE_DC_LIBM 12//config:config FEATURE_DC_LIBM
13//config: bool "Enable power and exp functions (requires libm)" 13//config: bool "Enable power and exp functions (requires libm)"
14//config: default y 14//config: default y
15//config: depends on DC 15//config: depends on DC
16//config: help 16//config: help
17//config: Enable power and exp functions. 17//config: Enable power and exp functions.
18//config: NOTE: This will require libm to be present for linking. 18//config: NOTE: This will require libm to be present for linking.
19 19
20//applet:IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP)) 20//applet:IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP))
21 21
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index 334f1071b..814714f53 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -59,56 +59,55 @@
59//config: select PLATFORM_LINUX 59//config: select PLATFORM_LINUX
60//config: select FEATURE_SYSLOG 60//config: select FEATURE_SYSLOG
61//config: help 61//config: help
62//config: This is deprecated and should NOT be used anymore. 62//config: This is deprecated and should NOT be used anymore.
63//config: Use linux >= 2.6 (optionally with hotplug) and mdev instead! 63//config: Use linux >= 2.6 (optionally with hotplug) and mdev instead!
64//config: See docs/mdev.txt for detailed instructions on how to use mdev 64//config: See docs/mdev.txt for detailed instructions on how to use mdev
65//config: instead. 65//config: instead.
66//config: 66//config:
67//config: Provides compatibility with old device names on a devfs systems. 67//config: Provides compatibility with old device names on a devfs systems.
68//config: You should set it to true if you have devfs enabled. 68//config: You should set it to true if you have devfs enabled.
69//config: The following keywords in devsfd.conf are supported: 69//config: The following keywords in devsfd.conf are supported:
70//config: "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE", 70//config: "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE",
71//config: "PERMISSIONS", "EXECUTE", "COPY", "IGNORE", 71//config: "PERMISSIONS", "EXECUTE", "COPY", "IGNORE",
72//config: "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT". 72//config: "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT".
73//config: 73//config:
74//config: But only if they are written UPPERCASE!!!!!!!! 74//config: But only if they are written UPPERCASE!!!!!!!!
75//config: 75//config:
76//config:config DEVFSD_MODLOAD 76//config:config DEVFSD_MODLOAD
77//config: bool "Adds support for MODLOAD keyword in devsfd.conf" 77//config: bool "Adds support for MODLOAD keyword in devsfd.conf"
78//config: default y 78//config: default y
79//config: depends on DEVFSD 79//config: depends on DEVFSD
80//config: help 80//config: help
81//config: This actually doesn't work with busybox modutils but needs 81//config: This actually doesn't work with busybox modutils but needs
82//config: the external modutils. 82//config: the external modutils.
83//config: 83//config:
84//config:config DEVFSD_FG_NP 84//config:config DEVFSD_FG_NP
85//config: bool "Enable the -fg and -np options" 85//config: bool "Enable the -fg and -np options"
86//config: default y 86//config: default y
87//config: depends on DEVFSD 87//config: depends on DEVFSD
88//config: help 88//config: help
89//config: -fg Run the daemon in the foreground. 89//config: -fg Run the daemon in the foreground.
90//config: -np Exit after parsing the configuration file. 90//config: -np Exit after parsing config. Do not poll for events.
91//config: Do not poll for events.
92//config: 91//config:
93//config:config DEVFSD_VERBOSE 92//config:config DEVFSD_VERBOSE
94//config: bool "Increases logging (and size)" 93//config: bool "Increases logging (and size)"
95//config: default y 94//config: default y
96//config: depends on DEVFSD 95//config: depends on DEVFSD
97//config: help 96//config: help
98//config: Increases logging to stderr or syslog. 97//config: Increases logging to stderr or syslog.
99//config: 98//config:
100//config:config FEATURE_DEVFS 99//config:config FEATURE_DEVFS
101//config: bool "Use devfs names for all devices (obsolete)" 100//config: bool "Use devfs names for all devices (obsolete)"
102//config: default n 101//config: default n
103//config: select PLATFORM_LINUX 102//config: select PLATFORM_LINUX
104//config: help 103//config: help
105//config: This is obsolete and should NOT be used anymore. 104//config: This is obsolete and should NOT be used anymore.
106//config: Use linux >= 2.6 (optionally with hotplug) and mdev instead! 105//config: Use linux >= 2.6 (optionally with hotplug) and mdev instead!
107//config: 106//config:
108//config: For legacy systems -- if there is no way around devfsd -- this 107//config: For legacy systems -- if there is no way around devfsd -- this
109//config: tells busybox to look for names like /dev/loop/0 instead of 108//config: tells busybox to look for names like /dev/loop/0 instead of
110//config: /dev/loop0. If your /dev directory has normal names instead of 109//config: /dev/loop0. If your /dev directory has normal names instead of
111//config: devfs names, you don't want this. 110//config: devfs names, you don't want this.
112 111
113//applet:IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP)) 112//applet:IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP))
114 113
diff --git a/miscutils/devmem.c b/miscutils/devmem.c
index aeb32b13a..624054770 100644
--- a/miscutils/devmem.c
+++ b/miscutils/devmem.c
@@ -4,11 +4,11 @@
4 * Copyright (C) 2008, BusyBox Team. -solar 4/26/08 4 * Copyright (C) 2008, BusyBox Team. -solar 4/26/08
5 */ 5 */
6//config:config DEVMEM 6//config:config DEVMEM
7//config: bool "devmem" 7//config: bool "devmem (2.5 kb)"
8//config: default y 8//config: default y
9//config: help 9//config: help
10//config: devmem is a small program that reads and writes from physical 10//config: devmem is a small program that reads and writes from physical
11//config: memory using /dev/mem. 11//config: memory using /dev/mem.
12 12
13//applet:IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP)) 13//applet:IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP))
14 14
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index fc6c9b953..9ac91e01e 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -21,24 +21,24 @@
21 * "exit" (or just close fifo) - well you guessed it. 21 * "exit" (or just close fifo) - well you guessed it.
22 */ 22 */
23//config:config FBSPLASH 23//config:config FBSPLASH
24//config: bool "fbsplash" 24//config: bool "fbsplash (27 kb)"
25//config: default y 25//config: default y
26//config: select PLATFORM_LINUX 26//config: select PLATFORM_LINUX
27//config: help 27//config: help
28//config: Shows splash image and progress bar on framebuffer device. 28//config: Shows splash image and progress bar on framebuffer device.
29//config: Can be used during boot phase of an embedded device. ~2kb. 29//config: Can be used during boot phase of an embedded device.
30//config: Usage: 30//config: Usage:
31//config: - use kernel option 'vga=xxx' or otherwise enable fb device. 31//config: - use kernel option 'vga=xxx' or otherwise enable fb device.
32//config: - put somewhere fbsplash.cfg file and an image in .ppm format. 32//config: - put somewhere fbsplash.cfg file and an image in .ppm format.
33//config: - $ setsid fbsplash [params] & 33//config: - $ setsid fbsplash [params] &
34//config: -c: hide cursor 34//config: -c: hide cursor
35//config: -d /dev/fbN: framebuffer device (if not /dev/fb0) 35//config: -d /dev/fbN: framebuffer device (if not /dev/fb0)
36//config: -s path_to_image_file (can be "-" for stdin) 36//config: -s path_to_image_file (can be "-" for stdin)
37//config: -i path_to_cfg_file (can be "-" for stdin) 37//config: -i path_to_cfg_file (can be "-" for stdin)
38//config: -f path_to_fifo (can be "-" for stdin) 38//config: -f path_to_fifo (can be "-" for stdin)
39//config: - if you want to run it only in presence of kernel parameter: 39//config: - if you want to run it only in presence of kernel parameter:
40//config: grep -q "fbsplash=on" </proc/cmdline && setsid fbsplash [params] & 40//config: grep -q "fbsplash=on" </proc/cmdline && setsid fbsplash [params] &
41//config: - commands for fifo: 41//config: - commands for fifo:
42//config: "NN" (ASCII decimal number) - percentage to show on progress bar 42//config: "NN" (ASCII decimal number) - percentage to show on progress bar
43//config: "exit" - well you guessed it 43//config: "exit" - well you guessed it
44 44
diff --git a/miscutils/flash_eraseall.c b/miscutils/flash_eraseall.c
index 2a9bd6cfe..af9ebea24 100644
--- a/miscutils/flash_eraseall.c
+++ b/miscutils/flash_eraseall.c
@@ -10,11 +10,11 @@
10 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 10 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
11 */ 11 */
12//config:config FLASH_ERASEALL 12//config:config FLASH_ERASEALL
13//config: bool "flash_eraseall" 13//config: bool "flash_eraseall (5.5 kb)"
14//config: default n # doesn't build on Ubuntu 8.04 14//config: default n # doesn't build on Ubuntu 8.04
15//config: help 15//config: help
16//config: The flash_eraseall binary from mtd-utils as of git head c4c6a59eb. 16//config: The flash_eraseall binary from mtd-utils as of git head c4c6a59eb.
17//config: This utility is used to erase the whole MTD device. 17//config: This utility is used to erase the whole MTD device.
18 18
19//applet:IF_FLASH_ERASEALL(APPLET(flash_eraseall, BB_DIR_USR_SBIN, BB_SUID_DROP)) 19//applet:IF_FLASH_ERASEALL(APPLET(flash_eraseall, BB_DIR_USR_SBIN, BB_SUID_DROP))
20 20
diff --git a/miscutils/flash_lock_unlock.c b/miscutils/flash_lock_unlock.c
index 003496d5b..374eed5f6 100644
--- a/miscutils/flash_lock_unlock.c
+++ b/miscutils/flash_lock_unlock.c
@@ -4,18 +4,18 @@
4 * Licensed under GPLv2, see file LICENSE in this source tree. 4 * Licensed under GPLv2, see file LICENSE in this source tree.
5 */ 5 */
6//config:config FLASH_LOCK 6//config:config FLASH_LOCK
7//config: bool "flash_lock" 7//config: bool "flash_lock (2.1 kb)"
8//config: default n # doesn't build on Ubuntu 8.04 8//config: default n # doesn't build on Ubuntu 8.04
9//config: help 9//config: help
10//config: The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This 10//config: The flash_lock binary from mtd-utils as of git head 5ec0c10d0. This
11//config: utility locks part or all of the flash device. 11//config: utility locks part or all of the flash device.
12//config: 12//config:
13//config:config FLASH_UNLOCK 13//config:config FLASH_UNLOCK
14//config: bool "flash_unlock" 14//config: bool "flash_unlock (1.3 kb)"
15//config: default n # doesn't build on Ubuntu 8.04 15//config: default n # doesn't build on Ubuntu 8.04
16//config: help 16//config: help
17//config: The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This 17//config: The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This
18//config: utility unlocks part or all of the flash device. 18//config: utility unlocks part or all of the flash device.
19 19
20// APPLET_ODDNAME:name main location suid_type help 20// APPLET_ODDNAME:name main location suid_type help
21//applet:IF_FLASH_LOCK( APPLET_ODDNAME(flash_lock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_lock)) 21//applet:IF_FLASH_LOCK( APPLET_ODDNAME(flash_lock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_lock))
diff --git a/miscutils/flashcp.c b/miscutils/flashcp.c
index 4bbc67727..d4ac62df4 100644
--- a/miscutils/flashcp.c
+++ b/miscutils/flashcp.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config FLASHCP 9//config:config FLASHCP
10//config: bool "flashcp" 10//config: bool "flashcp (5.4 kb)"
11//config: default n # doesn't build on Ubuntu 8.04 11//config: default n # doesn't build on Ubuntu 8.04
12//config: help 12//config: help
13//config: The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7. 13//config: The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7.
14//config: This utility is used to copy images into a MTD device. 14//config: This utility is used to copy images into a MTD device.
15 15
16//applet:IF_FLASHCP(APPLET(flashcp, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_FLASHCP(APPLET(flashcp, BB_DIR_USR_SBIN, BB_SUID_DROP))
17 17
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 84675285a..0bbe6ca10 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -12,63 +12,62 @@
12 * - by Mark Lord (C) 1994-2002 -- freely distributable 12 * - by Mark Lord (C) 1994-2002 -- freely distributable
13 */ 13 */
14//config:config HDPARM 14//config:config HDPARM
15//config: bool "hdparm" 15//config: bool "hdparm (23 kb)"
16//config: default y 16//config: default y
17//config: select PLATFORM_LINUX 17//config: select PLATFORM_LINUX
18//config: help 18//config: help
19//config: Get/Set hard drive parameters. Primarily intended for ATA 19//config: Get/Set hard drive parameters. Primarily intended for ATA
20//config: drives. Adds about 13k (or around 30k if you enable the 20//config: drives.
21//config: FEATURE_HDPARM_GET_IDENTITY option)....
22//config: 21//config:
23//config:config FEATURE_HDPARM_GET_IDENTITY 22//config:config FEATURE_HDPARM_GET_IDENTITY
24//config: bool "Support obtaining detailed information directly from drives" 23//config: bool "Support obtaining detailed information directly from drives"
25//config: default y 24//config: default y
26//config: depends on HDPARM 25//config: depends on HDPARM
27//config: help 26//config: help
28//config: Enable the -I and -i options to obtain detailed information 27//config: Enable the -I and -i options to obtain detailed information
29//config: directly from drives about their capabilities and supported ATA 28//config: directly from drives about their capabilities and supported ATA
30//config: feature set. If no device name is specified, hdparm will read 29//config: feature set. If no device name is specified, hdparm will read
31//config: identify data from stdin. Enabling this option will add about 16k... 30//config: identify data from stdin. Enabling this option will add about 16k...
32//config: 31//config:
33//config:config FEATURE_HDPARM_HDIO_SCAN_HWIF 32//config:config FEATURE_HDPARM_HDIO_SCAN_HWIF
34//config: bool "Register an IDE interface (DANGEROUS)" 33//config: bool "Register an IDE interface (DANGEROUS)"
35//config: default y 34//config: default y
36//config: depends on HDPARM 35//config: depends on HDPARM
37//config: help 36//config: help
38//config: Enable the 'hdparm -R' option to register an IDE interface. 37//config: Enable the 'hdparm -R' option to register an IDE interface.
39//config: This is dangerous stuff, so you should probably say N. 38//config: This is dangerous stuff, so you should probably say N.
40//config: 39//config:
41//config:config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF 40//config:config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
42//config: bool "Un-register an IDE interface (DANGEROUS)" 41//config: bool "Un-register an IDE interface (DANGEROUS)"
43//config: default y 42//config: default y
44//config: depends on HDPARM 43//config: depends on HDPARM
45//config: help 44//config: help
46//config: Enable the 'hdparm -U' option to un-register an IDE interface. 45//config: Enable the 'hdparm -U' option to un-register an IDE interface.
47//config: This is dangerous stuff, so you should probably say N. 46//config: This is dangerous stuff, so you should probably say N.
48//config: 47//config:
49//config:config FEATURE_HDPARM_HDIO_DRIVE_RESET 48//config:config FEATURE_HDPARM_HDIO_DRIVE_RESET
50//config: bool "Perform device reset (DANGEROUS)" 49//config: bool "Perform device reset (DANGEROUS)"
51//config: default y 50//config: default y
52//config: depends on HDPARM 51//config: depends on HDPARM
53//config: help 52//config: help
54//config: Enable the 'hdparm -w' option to perform a device reset. 53//config: Enable the 'hdparm -w' option to perform a device reset.
55//config: This is dangerous stuff, so you should probably say N. 54//config: This is dangerous stuff, so you should probably say N.
56//config: 55//config:
57//config:config FEATURE_HDPARM_HDIO_TRISTATE_HWIF 56//config:config FEATURE_HDPARM_HDIO_TRISTATE_HWIF
58//config: bool "Tristate device for hotswap (DANGEROUS)" 57//config: bool "Tristate device for hotswap (DANGEROUS)"
59//config: default y 58//config: default y
60//config: depends on HDPARM 59//config: depends on HDPARM
61//config: help 60//config: help
62//config: Enable the 'hdparm -x' option to tristate device for hotswap, 61//config: Enable the 'hdparm -x' option to tristate device for hotswap,
63//config: and the '-b' option to get/set bus state. This is dangerous 62//config: and the '-b' option to get/set bus state. This is dangerous
64//config: stuff, so you should probably say N. 63//config: stuff, so you should probably say N.
65//config: 64//config:
66//config:config FEATURE_HDPARM_HDIO_GETSET_DMA 65//config:config FEATURE_HDPARM_HDIO_GETSET_DMA
67//config: bool "Get/set using_dma flag" 66//config: bool "Get/set using_dma flag"
68//config: default y 67//config: default y
69//config: depends on HDPARM 68//config: depends on HDPARM
70//config: help 69//config: help
71//config: Enable the 'hdparm -d' option to get/set using_dma flag. 70//config: Enable the 'hdparm -d' option to get/set using_dma flag.
72 71
73//applet:IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP)) 72//applet:IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP))
74 73
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 7731466f7..ca2580e92 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -10,32 +10,32 @@
10 */ 10 */
11 11
12//config:config I2CGET 12//config:config I2CGET
13//config: bool "i2cget" 13//config: bool "i2cget (5.6 kb)"
14//config: default y 14//config: default y
15//config: select PLATFORM_LINUX 15//config: select PLATFORM_LINUX
16//config: help 16//config: help
17//config: Read from I2C/SMBus chip registers. 17//config: Read from I2C/SMBus chip registers.
18//config: 18//config:
19//config:config I2CSET 19//config:config I2CSET
20//config: bool "i2cset" 20//config: bool "i2cset (6.9 kb)"
21//config: default y 21//config: default y
22//config: select PLATFORM_LINUX 22//config: select PLATFORM_LINUX
23//config: help 23//config: help
24//config: Set I2C registers. 24//config: Set I2C registers.
25//config: 25//config:
26//config:config I2CDUMP 26//config:config I2CDUMP
27//config: bool "i2cdump" 27//config: bool "i2cdump (7.2 kb)"
28//config: default y 28//config: default y
29//config: select PLATFORM_LINUX 29//config: select PLATFORM_LINUX
30//config: help 30//config: help
31//config: Examine I2C registers. 31//config: Examine I2C registers.
32//config: 32//config:
33//config:config I2CDETECT 33//config:config I2CDETECT
34//config: bool "i2cdetect" 34//config: bool "i2cdetect (7.2 kb)"
35//config: default y 35//config: default y
36//config: select PLATFORM_LINUX 36//config: select PLATFORM_LINUX
37//config: help 37//config: help
38//config: Detect I2C chips. 38//config: Detect I2C chips.
39//config: 39//config:
40 40
41//applet:IF_I2CGET(APPLET(i2cget, BB_DIR_USR_SBIN, BB_SUID_DROP)) 41//applet:IF_I2CGET(APPLET(i2cget, BB_DIR_USR_SBIN, BB_SUID_DROP))
diff --git a/miscutils/inotifyd.c b/miscutils/inotifyd.c
index db8ddce92..0060797ed 100644
--- a/miscutils/inotifyd.c
+++ b/miscutils/inotifyd.c
@@ -27,11 +27,11 @@
27 * See below for mask names explanation. 27 * See below for mask names explanation.
28 */ 28 */
29//config:config INOTIFYD 29//config:config INOTIFYD
30//config: bool "inotifyd" 30//config: bool "inotifyd (3.5 kb)"
31//config: default n # doesn't build on Knoppix 5 31//config: default n # doesn't build on Knoppix 5
32//config: help 32//config: help
33//config: Simple inotify daemon. Reports filesystem changes. Requires 33//config: Simple inotify daemon. Reports filesystem changes. Requires
34//config: kernel >= 2.6.13 34//config: kernel >= 2.6.13
35 35
36//applet:IF_INOTIFYD(APPLET(inotifyd, BB_DIR_SBIN, BB_SUID_DROP)) 36//applet:IF_INOTIFYD(APPLET(inotifyd, BB_DIR_SBIN, BB_SUID_DROP))
37 37
diff --git a/miscutils/less.c b/miscutils/less.c
index 16be1447e..75ded97cf 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -22,11 +22,11 @@
22 */ 22 */
23 23
24//config:config LESS 24//config:config LESS
25//config: bool "less" 25//config: bool "less (15 kb)"
26//config: default y 26//config: default y
27//config: help 27//config: help
28//config: 'less' is a pager, meaning that it displays text files. It possesses 28//config: 'less' is a pager, meaning that it displays text files. It possesses
29//config: a wide array of features, and is an improvement over 'more'. 29//config: a wide array of features, and is an improvement over 'more'.
30//config: 30//config:
31//config:config FEATURE_LESS_MAXLINES 31//config:config FEATURE_LESS_MAXLINES
32//config: int "Max number of input lines less will try to eat" 32//config: int "Max number of input lines less will try to eat"
@@ -38,64 +38,64 @@
38//config: default y 38//config: default y
39//config: depends on LESS 39//config: depends on LESS
40//config: help 40//config: help
41//config: This option adds the capability to search for matching left and right 41//config: This option adds the capability to search for matching left and right
42//config: brackets, facilitating programming. 42//config: brackets, facilitating programming.
43//config: 43//config:
44//config:config FEATURE_LESS_FLAGS 44//config:config FEATURE_LESS_FLAGS
45//config: bool "Enable -m/-M" 45//config: bool "Enable -m/-M"
46//config: default y 46//config: default y
47//config: depends on LESS 47//config: depends on LESS
48//config: help 48//config: help
49//config: The -M/-m flag enables a more sophisticated status line. 49//config: The -M/-m flag enables a more sophisticated status line.
50//config: 50//config:
51//config:config FEATURE_LESS_TRUNCATE 51//config:config FEATURE_LESS_TRUNCATE
52//config: bool "Enable -S" 52//config: bool "Enable -S"
53//config: default y 53//config: default y
54//config: depends on LESS 54//config: depends on LESS
55//config: help 55//config: help
56//config: The -S flag causes long lines to be truncated rather than 56//config: The -S flag causes long lines to be truncated rather than
57//config: wrapped. 57//config: wrapped.
58//config: 58//config:
59//config:config FEATURE_LESS_MARKS 59//config:config FEATURE_LESS_MARKS
60//config: bool "Enable marks" 60//config: bool "Enable marks"
61//config: default y 61//config: default y
62//config: depends on LESS 62//config: depends on LESS
63//config: help 63//config: help
64//config: Marks enable positions in a file to be stored for easy reference. 64//config: Marks enable positions in a file to be stored for easy reference.
65//config: 65//config:
66//config:config FEATURE_LESS_REGEXP 66//config:config FEATURE_LESS_REGEXP
67//config: bool "Enable regular expressions" 67//config: bool "Enable regular expressions"
68//config: default y 68//config: default y
69//config: depends on LESS 69//config: depends on LESS
70//config: help 70//config: help
71//config: Enable regular expressions, allowing complex file searches. 71//config: Enable regular expressions, allowing complex file searches.
72//config: 72//config:
73//config:config FEATURE_LESS_WINCH 73//config:config FEATURE_LESS_WINCH
74//config: bool "Enable automatic resizing on window size changes" 74//config: bool "Enable automatic resizing on window size changes"
75//config: default y 75//config: default y
76//config: depends on LESS 76//config: depends on LESS
77//config: help 77//config: help
78//config: Makes less track window size changes. 78//config: Makes less track window size changes.
79//config: 79//config:
80//config:config FEATURE_LESS_ASK_TERMINAL 80//config:config FEATURE_LESS_ASK_TERMINAL
81//config: bool "Use 'tell me cursor position' ESC sequence to measure window" 81//config: bool "Use 'tell me cursor position' ESC sequence to measure window"
82//config: default y 82//config: default y
83//config: depends on FEATURE_LESS_WINCH 83//config: depends on FEATURE_LESS_WINCH
84//config: help 84//config: help
85//config: Makes less track window size changes. 85//config: Makes less track window size changes.
86//config: If terminal size can't be retrieved and $LINES/$COLUMNS are not set, 86//config: If terminal size can't be retrieved and $LINES/$COLUMNS are not set,
87//config: this option makes less perform a last-ditch effort to find it: 87//config: this option makes less perform a last-ditch effort to find it:
88//config: position cursor to 999,999 and ask terminal to report real 88//config: position cursor to 999,999 and ask terminal to report real
89//config: cursor position using "ESC [ 6 n" escape sequence, then read stdin. 89//config: cursor position using "ESC [ 6 n" escape sequence, then read stdin.
90//config: This is not clean but helps a lot on serial lines and such. 90//config: This is not clean but helps a lot on serial lines and such.
91//config: 91//config:
92//config:config FEATURE_LESS_DASHCMD 92//config:config FEATURE_LESS_DASHCMD
93//config: bool "Enable flag changes ('-' command)" 93//config: bool "Enable flag changes ('-' command)"
94//config: default y 94//config: default y
95//config: depends on LESS 95//config: depends on LESS
96//config: help 96//config: help
97//config: This enables the ability to change command-line flags within 97//config: This enables the ability to change command-line flags within
98//config: less itself ('-' keyboard command). 98//config: less itself ('-' keyboard command).
99//config: 99//config:
100//config:config FEATURE_LESS_LINENUMS 100//config:config FEATURE_LESS_LINENUMS
101//config: bool "Enable -N (dynamic switching of line numbers)" 101//config: bool "Enable -N (dynamic switching of line numbers)"
diff --git a/miscutils/lsscsi.c b/miscutils/lsscsi.c
index 1521680ac..b69ff1eef 100644
--- a/miscutils/lsscsi.c
+++ b/miscutils/lsscsi.c
@@ -7,14 +7,14 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config LSSCSI 9//config:config LSSCSI
10//config: bool "lsscsi" 10//config: bool "lsscsi (2.4 kb)"
11//config: default y 11//config: default y
12//config: #select PLATFORM_LINUX 12//config: #select PLATFORM_LINUX
13//config: help 13//config: help
14//config: lsscsi is a utility for displaying information about SCSI buses in the 14//config: lsscsi is a utility for displaying information about SCSI buses in the
15//config: system and devices connected to them. 15//config: system and devices connected to them.
16//config: 16//config:
17//config: This version uses sysfs (/sys/bus/scsi/devices) only. 17//config: This version uses sysfs (/sys/bus/scsi/devices) only.
18 18
19//applet:IF_LSSCSI(APPLET(lsscsi, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_LSSCSI(APPLET(lsscsi, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c
index f436b08f8..c2f86df01 100644
--- a/miscutils/makedevs.c
+++ b/miscutils/makedevs.c
@@ -7,23 +7,23 @@
7 * known bugs: can't deal with alpha ranges 7 * known bugs: can't deal with alpha ranges
8 */ 8 */
9//config:config MAKEDEVS 9//config:config MAKEDEVS
10//config: bool "makedevs" 10//config: bool "makedevs (9.3 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: 'makedevs' is a utility used to create a batch of devices with 13//config: 'makedevs' is a utility used to create a batch of devices with
14//config: one command. 14//config: one command.
15//config: 15//config:
16//config: There are two choices for command line behaviour, the interface 16//config: There are two choices for command line behaviour, the interface
17//config: as used by LEAF/Linux Router Project, or a device table file. 17//config: as used by LEAF/Linux Router Project, or a device table file.
18//config: 18//config:
19//config: 'leaf' is traditionally what busybox follows, it allows multiple 19//config: 'leaf' is traditionally what busybox follows, it allows multiple
20//config: devices of a particluar type to be created per command. 20//config: devices of a particluar type to be created per command.
21//config: e.g. /dev/hda[0-9] 21//config: e.g. /dev/hda[0-9]
22//config: Device properties are passed as command line arguments. 22//config: Device properties are passed as command line arguments.
23//config: 23//config:
24//config: 'table' reads device properties from a file or stdin, allowing 24//config: 'table' reads device properties from a file or stdin, allowing
25//config: a batch of unrelated devices to be made with one command. 25//config: a batch of unrelated devices to be made with one command.
26//config: User/group names are allowed as an alternative to uid/gid. 26//config: User/group names are allowed as an alternative to uid/gid.
27//config: 27//config:
28//config:choice 28//config:choice
29//config: prompt "Choose makedevs behaviour" 29//config: prompt "Choose makedevs behaviour"
diff --git a/miscutils/man.c b/miscutils/man.c
index 741980961..f68784767 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -3,10 +3,10 @@
3 * Licensed under GPLv2, see file LICENSE in this source tree. 3 * Licensed under GPLv2, see file LICENSE in this source tree.
4 */ 4 */
5//config:config MAN 5//config:config MAN
6//config: bool "man" 6//config: bool "man (27 kb)"
7//config: default y 7//config: default y
8//config: help 8//config: help
9//config: Format and display manual pages. 9//config: Format and display manual pages.
10 10
11//applet:IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP)) 11//applet:IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP))
12 12
diff --git a/miscutils/microcom.c b/miscutils/microcom.c
index 5a4bbefa9..14b9f3baf 100644
--- a/miscutils/microcom.c
+++ b/miscutils/microcom.c
@@ -8,10 +8,10 @@
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10//config:config MICROCOM 10//config:config MICROCOM
11//config: bool "microcom" 11//config: bool "microcom (5.6 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: The poor man's minicom utility for chatting with serial port devices. 14//config: The poor man's minicom utility for chatting with serial port devices.
15 15
16//applet:IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP)) 16//applet:IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP))
17 17
diff --git a/miscutils/mt.c b/miscutils/mt.c
index 6b3169675..fad656e95 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -3,12 +3,12 @@
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */ 4 */
5//config:config MT 5//config:config MT
6//config: bool "mt" 6//config: bool "mt (2.6 kb)"
7//config: default y 7//config: default y
8//config: help 8//config: help
9//config: mt is used to control tape devices. You can use the mt utility 9//config: mt is used to control tape devices. You can use the mt utility
10//config: to advance or rewind a tape past a specified number of archive 10//config: to advance or rewind a tape past a specified number of archive
11//config: files on the tape. 11//config: files on the tape.
12 12
13//applet:IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DROP)) 13//applet:IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DROP))
14 14
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c
index dbe9043f4..14b1ed056 100644
--- a/miscutils/nandwrite.c
+++ b/miscutils/nandwrite.c
@@ -9,18 +9,18 @@
9 */ 9 */
10 10
11//config:config NANDWRITE 11//config:config NANDWRITE
12//config: bool "nandwrite" 12//config: bool "nandwrite (5.9 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: Write to the specified MTD device, with bad blocks awareness 16//config: Write to the specified MTD device, with bad blocks awareness
17//config: 17//config:
18//config:config NANDDUMP 18//config:config NANDDUMP
19//config: bool "nanddump" 19//config: bool "nanddump (6.3 kb)"
20//config: default y 20//config: default y
21//config: select PLATFORM_LINUX 21//config: select PLATFORM_LINUX
22//config: help 22//config: help
23//config: Dump the content of raw NAND chip 23//config: Dump the content of raw NAND chip
24 24
25//applet:IF_NANDWRITE(APPLET(nandwrite, BB_DIR_USR_SBIN, BB_SUID_DROP)) 25//applet:IF_NANDWRITE(APPLET(nandwrite, BB_DIR_USR_SBIN, BB_SUID_DROP))
26//applet:IF_NANDDUMP(APPLET_ODDNAME(nanddump, nandwrite, BB_DIR_USR_SBIN, BB_SUID_DROP, nanddump)) 26//applet:IF_NANDDUMP(APPLET_ODDNAME(nanddump, nandwrite, BB_DIR_USR_SBIN, BB_SUID_DROP, nanddump))
diff --git a/miscutils/partprobe.c b/miscutils/partprobe.c
index 38831598d..2c12a7d20 100644
--- a/miscutils/partprobe.c
+++ b/miscutils/partprobe.c
@@ -5,11 +5,11 @@
5 * Licensed under GPLv2, see file LICENSE in this source tree. 5 * Licensed under GPLv2, see file LICENSE in this source tree.
6 */ 6 */
7//config:config PARTPROBE 7//config:config PARTPROBE
8//config: bool "partprobe" 8//config: bool "partprobe (3.6 kb)"
9//config: default y 9//config: default y
10//config: select PLATFORM_LINUX 10//config: select PLATFORM_LINUX
11//config: help 11//config: help
12//config: Ask kernel to rescan partition table. 12//config: Ask kernel to rescan partition table.
13 13
14//applet:IF_PARTPROBE(APPLET(partprobe, BB_DIR_USR_SBIN, BB_SUID_DROP)) 14//applet:IF_PARTPROBE(APPLET(partprobe, BB_DIR_USR_SBIN, BB_SUID_DROP))
15 15
diff --git a/miscutils/raidautorun.c b/miscutils/raidautorun.c
index c6d8e6235..ecedf9ce2 100644
--- a/miscutils/raidautorun.c
+++ b/miscutils/raidautorun.c
@@ -8,12 +8,12 @@
8 * 8 *
9 */ 9 */
10//config:config RAIDAUTORUN 10//config:config RAIDAUTORUN
11//config: bool "raidautorun" 11//config: bool "raidautorun (1.4 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: raidautorun tells the kernel md driver to 15//config: raidautorun tells the kernel md driver to
16//config: search and start RAID arrays. 16//config: search and start RAID arrays.
17 17
18//applet:IF_RAIDAUTORUN(APPLET(raidautorun, BB_DIR_SBIN, BB_SUID_DROP)) 18//applet:IF_RAIDAUTORUN(APPLET(raidautorun, BB_DIR_SBIN, BB_SUID_DROP))
19 19
diff --git a/miscutils/readahead.c b/miscutils/readahead.c
index b8e9b257f..972302a18 100644
--- a/miscutils/readahead.c
+++ b/miscutils/readahead.c
@@ -10,22 +10,22 @@
10 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 10 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
11 */ 11 */
12//config:config READAHEAD 12//config:config READAHEAD
13//config: bool "readahead" 13//config: bool "readahead (2 kb)"
14//config: default y 14//config: default y
15//config: depends on LFS 15//config: depends on LFS
16//config: select PLATFORM_LINUX 16//config: select PLATFORM_LINUX
17//config: help 17//config: help
18//config: Preload the files listed on the command line into RAM cache so that 18//config: Preload the files listed on the command line into RAM cache so that
19//config: subsequent reads on these files will not block on disk I/O. 19//config: subsequent reads on these files will not block on disk I/O.
20//config: 20//config:
21//config: This applet just calls the readahead(2) system call on each file. 21//config: This applet just calls the readahead(2) system call on each file.
22//config: It is mainly useful in system startup scripts to preload files 22//config: It is mainly useful in system startup scripts to preload files
23//config: or executables before they are used. When used at the right time 23//config: or executables before they are used. When used at the right time
24//config: (in particular when a CPU bound process is running) it can 24//config: (in particular when a CPU bound process is running) it can
25//config: significantly speed up system startup. 25//config: significantly speed up system startup.
26//config: 26//config:
27//config: As readahead(2) blocks until each file has been read, it is best to 27//config: As readahead(2) blocks until each file has been read, it is best to
28//config: run this applet as a background job. 28//config: run this applet as a background job.
29 29
30//applet:IF_READAHEAD(APPLET(readahead, BB_DIR_USR_SBIN, BB_SUID_DROP)) 30//applet:IF_READAHEAD(APPLET(readahead, BB_DIR_USR_SBIN, BB_SUID_DROP))
31 31
diff --git a/miscutils/rfkill.c b/miscutils/rfkill.c
index 7411b6fc3..546928402 100644
--- a/miscutils/rfkill.c
+++ b/miscutils/rfkill.c
@@ -8,16 +8,16 @@
8*/ 8*/
9 9
10//config:config RFKILL 10//config:config RFKILL
11//config: bool "rfkill" 11//config: bool "rfkill (5.3 kb)"
12//config: default n # doesn't build on Ubuntu 9.04 12//config: default n # doesn't build on Ubuntu 9.04
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: Enable/disable wireless devices. 15//config: Enable/disable wireless devices.
16//config: 16//config:
17//config: rfkill list : list all wireless devices 17//config: rfkill list : list all wireless devices
18//config: rfkill list bluetooth : list all bluetooth devices 18//config: rfkill list bluetooth : list all bluetooth devices
19//config: rfkill list 1 : list device corresponding to the given index 19//config: rfkill list 1 : list device corresponding to the given index
20//config: rfkill block|unblock wlan : block/unblock all wlan(wifi) devices 20//config: rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
21//config: 21//config:
22 22
23//applet:IF_RFKILL(APPLET(rfkill, BB_DIR_USR_SBIN, BB_SUID_DROP)) 23//applet:IF_RFKILL(APPLET(rfkill, BB_DIR_USR_SBIN, BB_SUID_DROP))
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c
index b6412a6ea..6b4742255 100644
--- a/miscutils/runlevel.c
+++ b/miscutils/runlevel.c
@@ -12,14 +12,14 @@
12 * initially busyboxified by Bernhard Reutner-Fischer 12 * initially busyboxified by Bernhard Reutner-Fischer
13 */ 13 */
14//config:config RUNLEVEL 14//config:config RUNLEVEL
15//config: bool "runlevel" 15//config: bool "runlevel (518 bytes)"
16//config: default y 16//config: default y
17//config: depends on FEATURE_UTMP 17//config: depends on FEATURE_UTMP
18//config: help 18//config: help
19//config: find the current and previous system runlevel. 19//config: find the current and previous system runlevel.
20//config: 20//config:
21//config: This applet uses utmp but does not rely on busybox supporing 21//config: This applet uses utmp but does not rely on busybox supporing
22//config: utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. 22//config: utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc.
23 23
24//applet:IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP)) 24//applet:IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP))
25 25
diff --git a/miscutils/rx.c b/miscutils/rx.c
index 1f6f2825c..874a3f0a3 100644
--- a/miscutils/rx.c
+++ b/miscutils/rx.c
@@ -15,11 +15,11 @@
15 * This was originally written for blob and then adapted for busybox. 15 * This was originally written for blob and then adapted for busybox.
16 */ 16 */
17//config:config RX 17//config:config RX
18//config: bool "rx" 18//config: bool "rx (2.9 kb)"
19//config: default y 19//config: default y
20//config: select PLATFORM_LINUX 20//config: select PLATFORM_LINUX
21//config: help 21//config: help
22//config: Receive files using the Xmodem protocol. 22//config: Receive files using the Xmodem protocol.
23 23
24//applet:IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP)) 24//applet:IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP))
25 25
diff --git a/miscutils/setserial.c b/miscutils/setserial.c
index 8b5c4a9c7..28a1bef18 100644
--- a/miscutils/setserial.c
+++ b/miscutils/setserial.c
@@ -9,11 +9,11 @@
9 */ 9 */
10 10
11//config:config SETSERIAL 11//config:config SETSERIAL
12//config: bool "setserial" 12//config: bool "setserial (6.6 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: Retrieve or set Linux serial port. 16//config: Retrieve or set Linux serial port.
17 17
18//applet:IF_SETSERIAL(APPLET(setserial, BB_DIR_BIN, BB_SUID_DROP)) 18//applet:IF_SETSERIAL(APPLET(setserial, BB_DIR_BIN, BB_SUID_DROP))
19 19
diff --git a/miscutils/strings.c b/miscutils/strings.c
index 4d9bfe690..ccb05f6d4 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config STRINGS 9//config:config STRINGS
10//config: bool "strings" 10//config: bool "strings (4.3 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: strings prints the printable character sequences for each file 13//config: strings prints the printable character sequences for each file
14//config: specified. 14//config: specified.
15 15
16//applet:IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP)) 16//applet:IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP))
17 17
diff --git a/miscutils/time.c b/miscutils/time.c
index e377bb6b7..60fc11f6e 100644
--- a/miscutils/time.c
+++ b/miscutils/time.c
@@ -9,12 +9,12 @@
9 Heavily modified for busybox by Erik Andersen <andersen@codepoet.org> 9 Heavily modified for busybox by Erik Andersen <andersen@codepoet.org>
10*/ 10*/
11//config:config TIME 11//config:config TIME
12//config: bool "time" 12//config: bool "time (7 kb)"
13//config: default y 13//config: default y
14//config: help 14//config: help
15//config: The time command runs the specified program with the given arguments. 15//config: The time command runs the specified program with the given arguments.
16//config: When the command finishes, time writes a message to standard output 16//config: When the command finishes, time writes a message to standard output
17//config: giving timing statistics about this program run. 17//config: giving timing statistics about this program run.
18 18
19//applet:IF_TIME(APPLET(time, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_TIME(APPLET(time, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/miscutils/ttysize.c b/miscutils/ttysize.c
index cba65b148..7f6a84308 100644
--- a/miscutils/ttysize.c
+++ b/miscutils/ttysize.c
@@ -10,13 +10,13 @@
10 * Licensed under GPLv2, see file LICENSE in this source tree. 10 * Licensed under GPLv2, see file LICENSE in this source tree.
11 */ 11 */
12//config:config TTYSIZE 12//config:config TTYSIZE
13//config: bool "ttysize" 13//config: bool "ttysize (372 bytes)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: A replacement for "stty size". Unlike stty, can report only width, 16//config: A replacement for "stty size". Unlike stty, can report only width,
17//config: only height, or both, in any order. It also does not complain on 17//config: only height, or both, in any order. It also does not complain on
18//config: error, but returns default 80x24. 18//config: error, but returns default 80x24.
19//config: Usage in shell scripts: width=`ttysize w`. 19//config: Usage in shell scripts: width=`ttysize w`.
20 20
21//applet:IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP)) 21//applet:IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP))
22 22
diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c
index 982e3e52a..c6ba22adf 100644
--- a/miscutils/ubi_tools.c
+++ b/miscutils/ubi_tools.c
@@ -4,46 +4,46 @@
4 */ 4 */
5 5
6//config:config UBIATTACH 6//config:config UBIATTACH
7//config: bool "ubiattach" 7//config: bool "ubiattach (4.7 kb)"
8//config: default y 8//config: default y
9//config: select PLATFORM_LINUX 9//config: select PLATFORM_LINUX
10//config: help 10//config: help
11//config: Attach MTD device to an UBI device. 11//config: Attach MTD device to an UBI device.
12//config: 12//config:
13//config:config UBIDETACH 13//config:config UBIDETACH
14//config: bool "ubidetach" 14//config: bool "ubidetach (4.6 kb)"
15//config: default y 15//config: default y
16//config: select PLATFORM_LINUX 16//config: select PLATFORM_LINUX
17//config: help 17//config: help
18//config: Detach MTD device from an UBI device. 18//config: Detach MTD device from an UBI device.
19//config: 19//config:
20//config:config UBIMKVOL 20//config:config UBIMKVOL
21//config: bool "ubimkvol" 21//config: bool "ubimkvol (5.8 kb)"
22//config: default y 22//config: default y
23//config: select PLATFORM_LINUX 23//config: select PLATFORM_LINUX
24//config: help 24//config: help
25//config: Create a UBI volume. 25//config: Create a UBI volume.
26//config: 26//config:
27//config:config UBIRMVOL 27//config:config UBIRMVOL
28//config: bool "ubirmvol" 28//config: bool "ubirmvol (5.2 kb)"
29//config: default y 29//config: default y
30//config: select PLATFORM_LINUX 30//config: select PLATFORM_LINUX
31//config: help 31//config: help
32//config: Delete a UBI volume. 32//config: Delete a UBI volume.
33//config: 33//config:
34//config:config UBIRSVOL 34//config:config UBIRSVOL
35//config: bool "ubirsvol" 35//config: bool "ubirsvol (4.6 kb)"
36//config: default y 36//config: default y
37//config: select PLATFORM_LINUX 37//config: select PLATFORM_LINUX
38//config: help 38//config: help
39//config: Resize a UBI volume. 39//config: Resize a UBI volume.
40//config: 40//config:
41//config:config UBIUPDATEVOL 41//config:config UBIUPDATEVOL
42//config: bool "ubiupdatevol" 42//config: bool "ubiupdatevol (5.6 kb)"
43//config: default y 43//config: default y
44//config: select PLATFORM_LINUX 44//config: select PLATFORM_LINUX
45//config: help 45//config: help
46//config: Update a UBI volume. 46//config: Update a UBI volume.
47 47
48// APPLET_ODDNAME:name main location suid_type help 48// APPLET_ODDNAME:name main location suid_type help
49//applet:IF_UBIATTACH( APPLET_ODDNAME(ubiattach, ubi_tools, BB_DIR_USR_SBIN, BB_SUID_DROP, ubiattach)) 49//applet:IF_UBIATTACH( APPLET_ODDNAME(ubiattach, ubi_tools, BB_DIR_USR_SBIN, BB_SUID_DROP, ubiattach))
diff --git a/miscutils/ubirename.c b/miscutils/ubirename.c
index 8b1c3785a..786c4b9fa 100644
--- a/miscutils/ubirename.c
+++ b/miscutils/ubirename.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config UBIRENAME 9//config:config UBIRENAME
10//config: bool "ubirename" 10//config: bool "ubirename (2.2 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: Utility to rename UBI volumes 14//config: Utility to rename UBI volumes
15 15
16//applet:IF_UBIRENAME(APPLET(ubirename, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_UBIRENAME(APPLET(ubirename, BB_DIR_USR_SBIN, BB_SUID_DROP))
17 17
diff --git a/miscutils/volname.c b/miscutils/volname.c
index 6d1addbb5..6e6bbaa44 100644
--- a/miscutils/volname.c
+++ b/miscutils/volname.c
@@ -28,10 +28,10 @@
28 * Matthew Stoltenberg <d3matt@gmail.com> 28 * Matthew Stoltenberg <d3matt@gmail.com>
29 */ 29 */
30//config:config VOLNAME 30//config:config VOLNAME
31//config: bool "volname" 31//config: bool "volname (1.7 kb)"
32//config: default y 32//config: default y
33//config: help 33//config: help
34//config: Prints a CD-ROM volume name. 34//config: Prints a CD-ROM volume name.
35 35
36//applet:IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP)) 36//applet:IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP))
37 37
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index d379a97f4..ec06bcb51 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -9,16 +9,16 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 10 */
11//config:config WATCHDOG 11//config:config WATCHDOG
12//config: bool "watchdog" 12//config: bool "watchdog (5.1 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: The watchdog utility is used with hardware or software watchdog 16//config: The watchdog utility is used with hardware or software watchdog
17//config: device drivers. It opens the specified watchdog device special file 17//config: device drivers. It opens the specified watchdog device special file
18//config: and periodically writes a magic character to the device. If the 18//config: and periodically writes a magic character to the device. If the
19//config: watchdog applet ever fails to write the magic character within a 19//config: watchdog applet ever fails to write the magic character within a
20//config: certain amount of time, the watchdog device assumes the system has 20//config: certain amount of time, the watchdog device assumes the system has
21//config: hung, and will cause the hardware to reboot. 21//config: hung, and will cause the hardware to reboot.
22 22
23//applet:IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP)) 23//applet:IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP))
24 24
diff --git a/modutils/Config.src b/modutils/Config.src
index 9b76c83d2..e413702bb 100644
--- a/modutils/Config.src
+++ b/modutils/Config.src
@@ -9,29 +9,29 @@ config MODPROBE_SMALL
9 bool "Simplified modutils" 9 bool "Simplified modutils"
10 default y 10 default y
11 help 11 help
12 Build smaller (~1.5 kbytes), simplified module tools. 12 Build smaller (~1.5 kbytes), simplified module tools.
13 13
14 This option by itself does not enable any applets - 14 This option by itself does not enable any applets -
15 you need to select applets individually below. 15 you need to select applets individually below.
16 16
17 With this option modprobe does not require modules.dep file 17 With this option modprobe does not require modules.dep file
18 and does not use /etc/modules.conf file. 18 and does not use /etc/modules.conf file.
19 It scans module files in /lib/modules/`uname -r` and 19 It scans module files in /lib/modules/`uname -r` and
20 determines dependencies and module alias names on the fly. 20 determines dependencies and module alias names on the fly.
21 This may make module loading slower, most notably 21 This may make module loading slower, most notably
22 when one needs to load module by alias (this requires 22 when one needs to load module by alias (this requires
23 scanning through module _bodies_). 23 scanning through module _bodies_).
24 24
25 At the first attempt to load a module by alias modprobe 25 At the first attempt to load a module by alias modprobe
26 will try to generate modules.dep.bb file in order to speed up 26 will try to generate modules.dep.bb file in order to speed up
27 future loads by alias. Failure to do so (read-only /lib/modules, 27 future loads by alias. Failure to do so (read-only /lib/modules,
28 etc) is not reported, and future modprobes will be slow too. 28 etc) is not reported, and future modprobes will be slow too.
29 29
30 NB: modules.dep.bb file format is not compatible 30 NB: modules.dep.bb file format is not compatible
31 with modules.dep file as created/used by standard module tools. 31 with modules.dep file as created/used by standard module tools.
32 32
33 Additional module parameters can be stored in 33 Additional module parameters can be stored in
34 /etc/modules/$module_name files. 34 /etc/modules/$module_name files.
35 35
36INSERT 36INSERT
37 37
@@ -42,145 +42,145 @@ config FEATURE_CMDLINE_MODULE_OPTIONS
42 default y 42 default y
43 depends on INSMOD || MODPROBE 43 depends on INSMOD || MODPROBE
44 help 44 help
45 Allow insmod and modprobe take module options from the applets' 45 Allow insmod and modprobe take module options from the applets'
46 command line. 46 command line.
47 47
48config FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED 48config FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED
49 bool "Skip loading of already loaded modules" 49 bool "Skip loading of already loaded modules"
50 default y 50 default y
51 depends on MODPROBE_SMALL && (DEPMOD || INSMOD || MODPROBE) 51 depends on MODPROBE_SMALL && (DEPMOD || INSMOD || MODPROBE)
52 help 52 help
53 Check if the module is already loaded. 53 Check if the module is already loaded.
54 54
55config FEATURE_2_4_MODULES 55config FEATURE_2_4_MODULES
56 bool "Support version 2.2/2.4 Linux kernels" 56 bool "Support version 2.2/2.4 Linux kernels"
57 default n 57 default n
58 depends on (INSMOD || LSMOD || MODPROBE || RMMOD) && !MODPROBE_SMALL 58 depends on (INSMOD || LSMOD || MODPROBE || RMMOD) && !MODPROBE_SMALL
59 help 59 help
60 Support module loading for 2.2.x and 2.4.x Linux kernels. 60 Support module loading for 2.2.x and 2.4.x Linux kernels.
61 This increases size considerably. Say N unless you plan 61 This increases size considerably. Say N unless you plan
62 to run ancient kernels. 62 to run ancient kernels.
63 63
64config FEATURE_INSMOD_VERSION_CHECKING 64config FEATURE_INSMOD_VERSION_CHECKING
65 bool "Enable module version checking" 65 bool "Enable module version checking"
66 default n 66 default n
67 depends on FEATURE_2_4_MODULES && (INSMOD || MODPROBE) 67 depends on FEATURE_2_4_MODULES && (INSMOD || MODPROBE)
68 help 68 help
69 Support checking of versions for modules. This is used to 69 Support checking of versions for modules. This is used to
70 ensure that the kernel and module are made for each other. 70 ensure that the kernel and module are made for each other.
71 71
72config FEATURE_INSMOD_KSYMOOPS_SYMBOLS 72config FEATURE_INSMOD_KSYMOOPS_SYMBOLS
73 bool "Add module symbols to kernel symbol table" 73 bool "Add module symbols to kernel symbol table"
74 default n 74 default n
75 depends on FEATURE_2_4_MODULES && (INSMOD || MODPROBE) 75 depends on FEATURE_2_4_MODULES && (INSMOD || MODPROBE)
76 help 76 help
77 By adding module symbols to the kernel symbol table, Oops messages 77 By adding module symbols to the kernel symbol table, Oops messages
78 occurring within kernel modules can be properly debugged. By enabling 78 occurring within kernel modules can be properly debugged. By enabling
79 this feature, module symbols will always be added to the kernel symbol 79 this feature, module symbols will always be added to the kernel symbol
80 table for proper debugging support. If you are not interested in 80 table for proper debugging support. If you are not interested in
81 Oops messages from kernel modules, say N. 81 Oops messages from kernel modules, say N.
82 82
83config FEATURE_INSMOD_LOADINKMEM 83config FEATURE_INSMOD_LOADINKMEM
84 bool "In kernel memory optimization (uClinux only)" 84 bool "In kernel memory optimization (uClinux only)"
85 default n 85 default n
86 depends on FEATURE_2_4_MODULES && (INSMOD || MODPROBE) 86 depends on FEATURE_2_4_MODULES && (INSMOD || MODPROBE)
87 help 87 help
88 This is a special uClinux only memory optimization that lets insmod 88 This is a special uClinux only memory optimization that lets insmod
89 load the specified kernel module directly into kernel space, reducing 89 load the specified kernel module directly into kernel space, reducing
90 memory usage by preventing the need for two copies of the module 90 memory usage by preventing the need for two copies of the module
91 being loaded into memory. 91 being loaded into memory.
92 92
93config FEATURE_INSMOD_LOAD_MAP 93config FEATURE_INSMOD_LOAD_MAP
94 bool "Enable insmod load map (-m) option" 94 bool "Enable insmod load map (-m) option"
95 default n 95 default n
96 depends on FEATURE_2_4_MODULES && INSMOD 96 depends on FEATURE_2_4_MODULES && INSMOD
97 help 97 help
98 Enabling this, one would be able to get a load map 98 Enabling this, one would be able to get a load map
99 output on stdout. This makes kernel module debugging 99 output on stdout. This makes kernel module debugging
100 easier. 100 easier.
101 If you don't plan to debug kernel modules, you 101 If you don't plan to debug kernel modules, you
102 don't need this option. 102 don't need this option.
103 103
104config FEATURE_INSMOD_LOAD_MAP_FULL 104config FEATURE_INSMOD_LOAD_MAP_FULL
105 bool "Symbols in load map" 105 bool "Symbols in load map"
106 default y 106 default y
107 depends on FEATURE_INSMOD_LOAD_MAP 107 depends on FEATURE_INSMOD_LOAD_MAP
108 help 108 help
109 Without this option, -m will only output section 109 Without this option, -m will only output section
110 load map. With this option, -m will also output 110 load map. With this option, -m will also output
111 symbols load map. 111 symbols load map.
112 112
113config FEATURE_CHECK_TAINTED_MODULE 113config FEATURE_CHECK_TAINTED_MODULE
114 bool "Support tainted module checking with new kernels" 114 bool "Support tainted module checking with new kernels"
115 default y 115 default y
116 depends on (LSMOD || FEATURE_2_4_MODULES) && !MODPROBE_SMALL 116 depends on (LSMOD || FEATURE_2_4_MODULES) && !MODPROBE_SMALL
117 help 117 help
118 Support checking for tainted modules. These are usually binary 118 Support checking for tainted modules. These are usually binary
119 only modules that will make the linux-kernel list ignore your 119 only modules that will make the linux-kernel list ignore your
120 support request. 120 support request.
121 This option is required to support GPLONLY modules. 121 This option is required to support GPLONLY modules.
122 122
123config FEATURE_INSMOD_TRY_MMAP 123config FEATURE_INSMOD_TRY_MMAP
124 bool "Try to load module from a mmap'ed area" 124 bool "Try to load module from a mmap'ed area"
125 default n 125 default n
126 depends on (INSMOD || MODPROBE) && !MODPROBE_SMALL 126 depends on (INSMOD || MODPROBE) && !MODPROBE_SMALL
127 help 127 help
128 This option causes module loading code to try to mmap 128 This option causes module loading code to try to mmap
129 module first. If it does not work (for example, 129 module first. If it does not work (for example,
130 it does not work for compressed modules), module will be read 130 it does not work for compressed modules), module will be read
131 (and unpacked if needed) into a memory block allocated by malloc. 131 (and unpacked if needed) into a memory block allocated by malloc.
132 132
133 The only case when mmap works but malloc does not is when 133 The only case when mmap works but malloc does not is when
134 you are trying to load a big module on a very memory-constrained 134 you are trying to load a big module on a very memory-constrained
135 machine. Malloc will momentarily need 2x as much memory as mmap. 135 machine. Malloc will momentarily need 2x as much memory as mmap.
136 136
137 Choosing N saves about 250 bytes of code (on 32-bit x86). 137 Choosing N saves about 250 bytes of code (on 32-bit x86).
138 138
139config FEATURE_MODUTILS_ALIAS 139config FEATURE_MODUTILS_ALIAS
140 bool "Support module.aliases file" 140 bool "Support module.aliases file"
141 default y 141 default y
142 depends on (DEPMOD || MODPROBE) && !MODPROBE_SMALL 142 depends on (DEPMOD || MODPROBE) && !MODPROBE_SMALL
143 help 143 help
144 Generate and parse modules.alias containing aliases for bus 144 Generate and parse modules.alias containing aliases for bus
145 identifiers: 145 identifiers:
146 alias pcmcia:m*c*f03fn*pfn*pa*pb*pc*pd* parport_cs 146 alias pcmcia:m*c*f03fn*pfn*pa*pb*pc*pd* parport_cs
147 147
148 and aliases for logical modules names e.g.: 148 and aliases for logical modules names e.g.:
149 alias padlock_aes aes 149 alias padlock_aes aes
150 alias aes_i586 aes 150 alias aes_i586 aes
151 alias aes_generic aes 151 alias aes_generic aes
152 152
153 Say Y if unsure. 153 Say Y if unsure.
154 154
155config FEATURE_MODUTILS_SYMBOLS 155config FEATURE_MODUTILS_SYMBOLS
156 bool "Support module.symbols file" 156 bool "Support module.symbols file"
157 default y 157 default y
158 depends on (DEPMOD || MODPROBE) && !MODPROBE_SMALL 158 depends on (DEPMOD || MODPROBE) && !MODPROBE_SMALL
159 help 159 help
160 Generate and parse modules.symbols containing aliases for 160 Generate and parse modules.symbols containing aliases for
161 symbol_request() kernel calls, such as: 161 symbol_request() kernel calls, such as:
162 alias symbol:usb_sg_init usbcore 162 alias symbol:usb_sg_init usbcore
163 163
164 Say Y if unsure. 164 Say Y if unsure.
165 165
166config DEFAULT_MODULES_DIR 166config DEFAULT_MODULES_DIR
167 string "Default directory containing modules" 167 string "Default directory containing modules"
168 default "/lib/modules" 168 default "/lib/modules"
169 depends on DEPMOD || MODPROBE || MODINFO 169 depends on DEPMOD || MODPROBE || MODINFO
170 help 170 help
171 Directory that contains kernel modules. 171 Directory that contains kernel modules.
172 Defaults to "/lib/modules" 172 Defaults to "/lib/modules"
173 173
174config DEFAULT_DEPMOD_FILE 174config DEFAULT_DEPMOD_FILE
175 string "Default name of modules.dep" 175 string "Default name of modules.dep"
176 default "modules.dep" 176 default "modules.dep"
177 depends on DEPMOD || MODPROBE || MODINFO 177 depends on DEPMOD || MODPROBE || MODINFO
178 help 178 help
179 Filename that contains kernel modules dependencies. 179 Filename that contains kernel modules dependencies.
180 Defaults to "modules.dep". 180 Defaults to "modules.dep".
181 If you configured the "simplified modutils" (MODPROBE_SMALL), a 181 If you configured the "simplified modutils" (MODPROBE_SMALL), a
182 ".bb" suffix will be added after this name. Do not specify ".bb" 182 ".bb" suffix will be added after this name. Do not specify ".bb"
183 here unless you intend your depmod or modprobe to work on 183 here unless you intend your depmod or modprobe to work on
184 "modules.dep.bb.bb" or such. 184 "modules.dep.bb.bb" or such.
185 185
186endmenu 186endmenu
diff --git a/modutils/depmod.c b/modutils/depmod.c
index b7965ebd2..004c67a11 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -8,13 +8,13 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config DEPMOD 10//config:config DEPMOD
11//config: bool "depmod" 11//config: bool "depmod (26 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: depmod generates modules.dep (and potentially modules.alias 15//config: depmod generates modules.dep (and potentially modules.alias
16//config: and modules.symbols) that contain dependency information 16//config: and modules.symbols) that contain dependency information
17//config: for modprobe. 17//config: for modprobe.
18 18
19//applet:IF_DEPMOD(IF_NOT_MODPROBE_SMALL(APPLET(depmod, BB_DIR_SBIN, BB_SUID_DROP))) 19//applet:IF_DEPMOD(IF_NOT_MODPROBE_SMALL(APPLET(depmod, BB_DIR_SBIN, BB_SUID_DROP)))
20 20
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 8526979eb..b8ede8a81 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config INSMOD 9//config:config INSMOD
10//config: bool "insmod" 10//config: bool "insmod (22 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: insmod is used to load specified modules in the running kernel. 14//config: insmod is used to load specified modules in the running kernel.
15 15
16//applet:IF_INSMOD(IF_NOT_MODPROBE_SMALL(APPLET(insmod, BB_DIR_SBIN, BB_SUID_DROP))) 16//applet:IF_INSMOD(IF_NOT_MODPROBE_SMALL(APPLET(insmod, BB_DIR_SBIN, BB_SUID_DROP)))
17 17
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index 24e5d35b9..4bf8f8481 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -8,20 +8,20 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config LSMOD 10//config:config LSMOD
11//config: bool "lsmod" 11//config: bool "lsmod (4.3 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: lsmod is used to display a list of loaded modules. 15//config: lsmod is used to display a list of loaded modules.
16//config: 16//config:
17//config:config FEATURE_LSMOD_PRETTY_2_6_OUTPUT 17//config:config FEATURE_LSMOD_PRETTY_2_6_OUTPUT
18//config: bool "Pretty output" 18//config: bool "Pretty output"
19//config: default y 19//config: default y
20//config: depends on LSMOD && !MODPROBE_SMALL 20//config: depends on LSMOD && !MODPROBE_SMALL
21//config: help 21//config: help
22//config: This option makes output format of lsmod adjusted to 22//config: This option makes output format of lsmod adjusted to
23//config: the format of module-init-tools for Linux kernel 2.6. 23//config: the format of module-init-tools for Linux kernel 2.6.
24//config: Increases size somewhat. 24//config: Increases size somewhat.
25 25
26//applet:IF_LSMOD(IF_NOT_MODPROBE_SMALL(APPLET(lsmod, BB_DIR_SBIN, BB_SUID_DROP))) 26//applet:IF_LSMOD(IF_NOT_MODPROBE_SMALL(APPLET(lsmod, BB_DIR_SBIN, BB_SUID_DROP)))
27 27
diff --git a/modutils/modinfo.c b/modutils/modinfo.c
index ead2cf16f..371c93991 100644
--- a/modutils/modinfo.c
+++ b/modutils/modinfo.c
@@ -6,11 +6,11 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config MODINFO 8//config:config MODINFO
9//config: bool "modinfo" 9//config: bool "modinfo (25 kb)"
10//config: default y 10//config: default y
11//config: select PLATFORM_LINUX 11//config: select PLATFORM_LINUX
12//config: help 12//config: help
13//config: Show information about a Linux Kernel module 13//config: Show information about a Linux Kernel module
14 14
15//applet:IF_MODINFO(APPLET(modinfo, BB_DIR_SBIN, BB_SUID_DROP)) 15//applet:IF_MODINFO(APPLET(modinfo, BB_DIR_SBIN, BB_SUID_DROP))
16 16
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 51ede9204..1a7db09f2 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -8,23 +8,23 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config MODPROBE 10//config:config MODPROBE
11//config: bool "modprobe" 11//config: bool "modprobe (29 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: Handle the loading of modules, and their dependencies on a high 15//config: Handle the loading of modules, and their dependencies on a high
16//config: level. 16//config: level.
17//config: 17//config:
18//config:config FEATURE_MODPROBE_BLACKLIST 18//config:config FEATURE_MODPROBE_BLACKLIST
19//config: bool "Blacklist support" 19//config: bool "Blacklist support"
20//config: default y 20//config: default y
21//config: depends on MODPROBE && !MODPROBE_SMALL 21//config: depends on MODPROBE && !MODPROBE_SMALL
22//config: help 22//config: help
23//config: Say 'y' here to enable support for the 'blacklist' command in 23//config: Say 'y' here to enable support for the 'blacklist' command in
24//config: modprobe.conf. This prevents the alias resolver to resolve 24//config: modprobe.conf. This prevents the alias resolver to resolve
25//config: blacklisted modules. This is useful if you want to prevent your 25//config: blacklisted modules. This is useful if you want to prevent your
26//config: hardware autodetection scripts to load modules like evdev, frame 26//config: hardware autodetection scripts to load modules like evdev, frame
27//config: buffer drivers etc. 27//config: buffer drivers etc.
28 28
29//applet:IF_MODPROBE(IF_NOT_MODPROBE_SMALL(APPLET(modprobe, BB_DIR_SBIN, BB_SUID_DROP))) 29//applet:IF_MODPROBE(IF_NOT_MODPROBE_SMALL(APPLET(modprobe, BB_DIR_SBIN, BB_SUID_DROP)))
30 30
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index 527696f63..d60e49413 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -8,11 +8,11 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config RMMOD 10//config:config RMMOD
11//config: bool "rmmod" 11//config: bool "rmmod (3.6 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: rmmod is used to unload specified modules from the kernel. 15//config: rmmod is used to unload specified modules from the kernel.
16 16
17//applet:IF_RMMOD(IF_NOT_MODPROBE_SMALL(APPLET(rmmod, BB_DIR_SBIN, BB_SUID_DROP))) 17//applet:IF_RMMOD(IF_NOT_MODPROBE_SMALL(APPLET(rmmod, BB_DIR_SBIN, BB_SUID_DROP)))
18 18
diff --git a/networking/Config.src b/networking/Config.src
index 0adb1e2f9..492c60da4 100644
--- a/networking/Config.src
+++ b/networking/Config.src
@@ -9,42 +9,42 @@ config FEATURE_IPV6
9 bool "Enable IPv6 support" 9 bool "Enable IPv6 support"
10 default y 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.
14 14
15config FEATURE_UNIX_LOCAL 15config FEATURE_UNIX_LOCAL
16 bool "Enable Unix domain socket support (usually not needed)" 16 bool "Enable Unix domain socket support (usually not needed)"
17 default n 17 default n
18 help 18 help
19 Enable Unix domain socket support in all busybox networking 19 Enable Unix domain socket support in all busybox networking
20 applets. Address of the form local:/path/to/unix/socket 20 applets. Address of the form local:/path/to/unix/socket
21 will be recognized. 21 will be recognized.
22 22
23 This extension is almost never used in real world usage. 23 This extension is almost never used in real world usage.
24 You most likely want to say N. 24 You most likely want to say N.
25 25
26config FEATURE_PREFER_IPV4_ADDRESS 26config FEATURE_PREFER_IPV4_ADDRESS
27 bool "Prefer IPv4 addresses from DNS queries" 27 bool "Prefer IPv4 addresses from DNS queries"
28 default y 28 default y
29 depends on FEATURE_IPV6 29 depends on FEATURE_IPV6
30 help 30 help
31 Use IPv4 address of network host if it has one. 31 Use IPv4 address of network host if it has one.
32 32
33 If this option is off, the first returned address will be used. 33 If this option is off, the first returned address will be used.
34 This may cause problems when your DNS server is IPv6-capable and 34 This may cause problems when your DNS server is IPv6-capable and
35 is returning IPv6 host addresses too. If IPv6 address 35 is returning IPv6 host addresses too. If IPv6 address
36 precedes IPv4 one in DNS reply, busybox network applets 36 precedes IPv4 one in DNS reply, busybox network applets
37 (e.g. wget) will use IPv6 address. On an IPv6-incapable host 37 (e.g. wget) will use IPv6 address. On an IPv6-incapable host
38 or network applets will fail to connect to the host 38 or network applets will fail to connect to the host
39 using IPv6 address. 39 using IPv6 address.
40 40
41config VERBOSE_RESOLUTION_ERRORS 41config VERBOSE_RESOLUTION_ERRORS
42 bool "Verbose resolution errors" 42 bool "Verbose resolution errors"
43 default n 43 default n
44 help 44 help
45 Enable if you are not satisfied with simplistic 45 Enable if you are not satisfied with simplistic
46 "can't resolve 'hostname.com'" and want to know more. 46 "can't resolve 'hostname.com'" and want to know more.
47 This may increase size of your executable a bit. 47 This may increase size of your executable a bit.
48 48
49INSERT 49INSERT
50 50
@@ -55,8 +55,8 @@ config IFUPDOWN_UDHCPC_CMD_OPTIONS
55 default "-R -n" 55 default "-R -n"
56 depends on IFUP || IFDOWN 56 depends on IFUP || IFDOWN
57 help 57 help
58 Command line options to pass to udhcpc from ifup. 58 Command line options to pass to udhcpc from ifup.
59 Intended to alter options not available in /etc/network/interfaces. 59 Intended to alter options not available in /etc/network/interfaces.
60 (IE: --syslog --background etc...) 60 (IE: --syslog --background etc...)
61 61
62endmenu 62endmenu
diff --git a/networking/arp.c b/networking/arp.c
index a62a3761c..177ab1571 100644
--- a/networking/arp.c
+++ b/networking/arp.c
@@ -13,11 +13,11 @@
13 * modified for getopt32 by Arne Bernin <arne [at] alamut.de> 13 * modified for getopt32 by Arne Bernin <arne [at] alamut.de>
14 */ 14 */
15//config:config ARP 15//config:config ARP
16//config: bool "arp" 16//config: bool "arp (11 kb)"
17//config: default y 17//config: default y
18//config: select PLATFORM_LINUX 18//config: select PLATFORM_LINUX
19//config: help 19//config: help
20//config: Manipulate the system ARP cache. 20//config: Manipulate the system ARP cache.
21 21
22//applet:IF_ARP(APPLET(arp, BB_DIR_SBIN, BB_SUID_DROP)) 22//applet:IF_ARP(APPLET(arp, BB_DIR_SBIN, BB_SUID_DROP))
23 23
diff --git a/networking/arping.c b/networking/arping.c
index 5bfeb1b45..71672957e 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -6,11 +6,11 @@
6 * Busybox port: Nick Fedchik <nick@fedchik.org.ua> 6 * Busybox port: Nick Fedchik <nick@fedchik.org.ua>
7 */ 7 */
8//config:config ARPING 8//config:config ARPING
9//config: bool "arping" 9//config: bool "arping (9.3 kb)"
10//config: default y 10//config: default y
11//config: select PLATFORM_LINUX 11//config: select PLATFORM_LINUX
12//config: help 12//config: help
13//config: Ping hosts by ARP packets. 13//config: Ping hosts by ARP packets.
14//config: 14//config:
15 15
16//applet:IF_ARPING(APPLET(arping, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_ARPING(APPLET(arping, BB_DIR_USR_SBIN, BB_SUID_DROP))
diff --git a/networking/brctl.c b/networking/brctl.c
index 35876896e..690791e4c 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -13,31 +13,31 @@
13 * At the time of this writing this was considered a feature. 13 * At the time of this writing this was considered a feature.
14 */ 14 */
15//config:config BRCTL 15//config:config BRCTL
16//config: bool "brctl" 16//config: bool "brctl (4.7 kb)"
17//config: default y 17//config: default y
18//config: select PLATFORM_LINUX 18//config: select PLATFORM_LINUX
19//config: help 19//config: help
20//config: Manage ethernet bridges. 20//config: Manage ethernet bridges.
21//config: Supports addbr/delbr and addif/delif. 21//config: Supports addbr/delbr and addif/delif.
22//config: 22//config:
23//config:config FEATURE_BRCTL_FANCY 23//config:config FEATURE_BRCTL_FANCY
24//config: bool "Fancy options" 24//config: bool "Fancy options"
25//config: default y 25//config: default y
26//config: depends on BRCTL 26//config: depends on BRCTL
27//config: help 27//config: help
28//config: Add support for extended option like: 28//config: Add support for extended option like:
29//config: setageing, setfd, sethello, setmaxage, 29//config: setageing, setfd, sethello, setmaxage,
30//config: setpathcost, setportprio, setbridgeprio, 30//config: setpathcost, setportprio, setbridgeprio,
31//config: stp 31//config: stp
32//config: This adds about 600 bytes. 32//config: This adds about 600 bytes.
33//config: 33//config:
34//config:config FEATURE_BRCTL_SHOW 34//config:config FEATURE_BRCTL_SHOW
35//config: bool "Support show" 35//config: bool "Support show"
36//config: default y 36//config: default y
37//config: depends on BRCTL && FEATURE_BRCTL_FANCY 37//config: depends on BRCTL && FEATURE_BRCTL_FANCY
38//config: help 38//config: help
39//config: Add support for option which prints the current config: 39//config: Add support for option which prints the current config:
40//config: show 40//config: show
41 41
42//applet:IF_BRCTL(APPLET(brctl, BB_DIR_USR_SBIN, BB_SUID_DROP)) 42//applet:IF_BRCTL(APPLET(brctl, BB_DIR_USR_SBIN, BB_SUID_DROP))
43 43
diff --git a/networking/dnsd.c b/networking/dnsd.c
index 1b85618c6..37a80309d 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -17,10 +17,10 @@
17 * the first porting of oao' scdns to busybox also. 17 * the first porting of oao' scdns to busybox also.
18 */ 18 */
19//config:config DNSD 19//config:config DNSD
20//config: bool "dnsd" 20//config: bool "dnsd (9.8 kb)"
21//config: default y 21//config: default y
22//config: help 22//config: help
23//config: Small and static DNS server daemon. 23//config: Small and static DNS server daemon.
24 24
25//applet:IF_DNSD(APPLET(dnsd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 25//applet:IF_DNSD(APPLET(dnsd, BB_DIR_USR_SBIN, BB_SUID_DROP))
26 26
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index d7d691772..52522e76d 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -64,11 +64,11 @@
64 * filter. That configuration consumes more power. 64 * filter. That configuration consumes more power.
65 */ 65 */
66//config:config ETHER_WAKE 66//config:config ETHER_WAKE
67//config: bool "ether-wake" 67//config: bool "ether-wake (6.6 kb)"
68//config: default y 68//config: default y
69//config: select PLATFORM_LINUX 69//config: select PLATFORM_LINUX
70//config: help 70//config: help
71//config: Send a magic packet to wake up sleeping machines. 71//config: Send a magic packet to wake up sleeping machines.
72 72
73//applet:IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, BB_DIR_USR_SBIN, BB_SUID_DROP, ether_wake)) 73//applet:IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, BB_DIR_USR_SBIN, BB_SUID_DROP, ether_wake))
74 74
diff --git a/networking/ftpd.c b/networking/ftpd.c
index 439608ce6..aee00e1c3 100644
--- a/networking/ftpd.c
+++ b/networking/ftpd.c
@@ -12,35 +12,35 @@
12 * You have to run this daemon via inetd. 12 * You have to run this daemon via inetd.
13 */ 13 */
14//config:config FTPD 14//config:config FTPD
15//config: bool "ftpd" 15//config: bool "ftpd (30 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: Simple FTP daemon. You have to run it via inetd. 18//config: Simple FTP daemon. You have to run it via inetd.
19//config: 19//config:
20//config:config FEATURE_FTPD_WRITE 20//config:config FEATURE_FTPD_WRITE
21//config: bool "Enable upload commands" 21//config: bool "Enable upload commands"
22//config: default y 22//config: default y
23//config: depends on FTPD 23//config: depends on FTPD
24//config: help 24//config: help
25//config: Enable all kinds of FTP upload commands (-w option) 25//config: Enable all kinds of FTP upload commands (-w option)
26//config: 26//config:
27//config:config FEATURE_FTPD_ACCEPT_BROKEN_LIST 27//config:config FEATURE_FTPD_ACCEPT_BROKEN_LIST
28//config: bool "Enable workaround for RFC-violating clients" 28//config: bool "Enable workaround for RFC-violating clients"
29//config: default y 29//config: default y
30//config: depends on FTPD 30//config: depends on FTPD
31//config: help 31//config: help
32//config: Some ftp clients (among them KDE's Konqueror) issue illegal 32//config: Some ftp clients (among them KDE's Konqueror) issue illegal
33//config: "LIST -l" requests. This option works around such problems. 33//config: "LIST -l" requests. This option works around such problems.
34//config: It might prevent you from listing files starting with "-" and 34//config: It might prevent you from listing files starting with "-" and
35//config: it increases the code size by ~40 bytes. 35//config: it increases the code size by ~40 bytes.
36//config: Most other ftp servers seem to behave similar to this. 36//config: Most other ftp servers seem to behave similar to this.
37//config: 37//config:
38//config:config FEATURE_FTPD_AUTHENTICATION 38//config:config FEATURE_FTPD_AUTHENTICATION
39//config: bool "Enable authentication" 39//config: bool "Enable authentication"
40//config: default y 40//config: default y
41//config: depends on FTPD 41//config: depends on FTPD
42//config: help 42//config: help
43//config: Enable basic system login as seen in telnet etc. 43//config: Enable basic system login as seen in telnet etc.
44 44
45//applet:IF_FTPD(APPLET(ftpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 45//applet:IF_FTPD(APPLET(ftpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
46 46
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 3eadd752d..cb0a96b59 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -13,16 +13,16 @@
13 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 13 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
14 */ 14 */
15//config:config FTPGET 15//config:config FTPGET
16//config: bool "ftpget" 16//config: bool "ftpget (8 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: Retrieve a remote file via FTP. 19//config: Retrieve a remote file via FTP.
20//config: 20//config:
21//config:config FTPPUT 21//config:config FTPPUT
22//config: bool "ftpput" 22//config: bool "ftpput (7.7 kb)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: Store a remote file via FTP. 25//config: Store a remote file via FTP.
26//config: 26//config:
27//config:config FEATURE_FTPGETPUT_LONG_OPTIONS 27//config:config FEATURE_FTPGETPUT_LONG_OPTIONS
28//config: bool "Enable long options in ftpget/ftpput" 28//config: bool "Enable long options in ftpget/ftpput"
diff --git a/networking/hostname.c b/networking/hostname.c
index 9f2418422..4b305d2b6 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -11,16 +11,16 @@
11 */ 11 */
12 12
13//config:config HOSTNAME 13//config:config HOSTNAME
14//config: bool "hostname" 14//config: bool "hostname (5.6 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: Show or set the system's host name. 17//config: Show or set the system's host name.
18//config: 18//config:
19//config:config DNSDOMAINNAME 19//config:config DNSDOMAINNAME
20//config: bool "dnsdomainname" 20//config: bool "dnsdomainname (3.6 kb)"
21//config: default y 21//config: default y
22//config: help 22//config: help
23//config: Alias to "hostname -d". 23//config: Alias to "hostname -d".
24 24
25// APPLET_ODDNAME:name main location suid_type help 25// APPLET_ODDNAME:name main location suid_type help
26//applet:IF_DNSDOMAINNAME(APPLET_ODDNAME(dnsdomainname, hostname, BB_DIR_BIN, BB_SUID_DROP, dnsdomainname)) 26//applet:IF_DNSDOMAINNAME(APPLET_ODDNAME(dnsdomainname, hostname, BB_DIR_BIN, BB_SUID_DROP, dnsdomainname))
diff --git a/networking/httpd.c b/networking/httpd.c
index e072f23c7..cfc07075b 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -99,123 +99,123 @@
99 */ 99 */
100 /* TODO: use TCP_CORK, parse_config() */ 100 /* TODO: use TCP_CORK, parse_config() */
101//config:config HTTPD 101//config:config HTTPD
102//config: bool "httpd" 102//config: bool "httpd (32 kb)"
103//config: default y 103//config: default y
104//config: help 104//config: help
105//config: HTTP server. 105//config: HTTP server.
106//config: 106//config:
107//config:config FEATURE_HTTPD_RANGES 107//config:config FEATURE_HTTPD_RANGES
108//config: bool "Support 'Ranges:' header" 108//config: bool "Support 'Ranges:' header"
109//config: default y 109//config: default y
110//config: depends on HTTPD 110//config: depends on HTTPD
111//config: help 111//config: help
112//config: Makes httpd emit "Accept-Ranges: bytes" header and understand 112//config: Makes httpd emit "Accept-Ranges: bytes" header and understand
113//config: "Range: bytes=NNN-[MMM]" header. Allows for resuming interrupted 113//config: "Range: bytes=NNN-[MMM]" header. Allows for resuming interrupted
114//config: downloads, seeking in multimedia players etc. 114//config: downloads, seeking in multimedia players etc.
115//config: 115//config:
116//config:config FEATURE_HTTPD_SETUID 116//config:config FEATURE_HTTPD_SETUID
117//config: bool "Enable -u <user> option" 117//config: bool "Enable -u <user> option"
118//config: default y 118//config: default y
119//config: depends on HTTPD 119//config: depends on HTTPD
120//config: help 120//config: help
121//config: This option allows the server to run as a specific user 121//config: This option allows the server to run as a specific user
122//config: rather than defaulting to the user that starts the server. 122//config: rather than defaulting to the user that starts the server.
123//config: Use of this option requires special privileges to change to a 123//config: Use of this option requires special privileges to change to a
124//config: different user. 124//config: different user.
125//config: 125//config:
126//config:config FEATURE_HTTPD_BASIC_AUTH 126//config:config FEATURE_HTTPD_BASIC_AUTH
127//config: bool "Enable Basic http Authentication" 127//config: bool "Enable Basic http Authentication"
128//config: default y 128//config: default y
129//config: depends on HTTPD 129//config: depends on HTTPD
130//config: help 130//config: help
131//config: Utilizes password settings from /etc/httpd.conf for basic 131//config: Utilizes password settings from /etc/httpd.conf for basic
132//config: authentication on a per url basis. 132//config: authentication on a per url basis.
133//config: Example for httpd.conf file: 133//config: Example for httpd.conf file:
134//config: /adm:toor:PaSsWd 134//config: /adm:toor:PaSsWd
135//config: 135//config:
136//config:config FEATURE_HTTPD_AUTH_MD5 136//config:config FEATURE_HTTPD_AUTH_MD5
137//config: bool "Support MD5 crypted passwords for http Authentication" 137//config: bool "Support MD5 crypted passwords for http Authentication"
138//config: default y 138//config: default y
139//config: depends on FEATURE_HTTPD_BASIC_AUTH 139//config: depends on FEATURE_HTTPD_BASIC_AUTH
140//config: help 140//config: help
141//config: Enables encrypted passwords, and wildcard user/passwords 141//config: Enables encrypted passwords, and wildcard user/passwords
142//config: in httpd.conf file. 142//config: in httpd.conf file.
143//config: User '*' means 'any system user name is ok', 143//config: User '*' means 'any system user name is ok',
144//config: password of '*' means 'use system password for this user' 144//config: password of '*' means 'use system password for this user'
145//config: Examples: 145//config: Examples:
146//config: /adm:toor:$1$P/eKnWXS$aI1aPGxT.dJD5SzqAKWrF0 146//config: /adm:toor:$1$P/eKnWXS$aI1aPGxT.dJD5SzqAKWrF0
147//config: /adm:root:* 147//config: /adm:root:*
148//config: /wiki:*:* 148//config: /wiki:*:*
149//config: 149//config:
150//config:config FEATURE_HTTPD_CGI 150//config:config FEATURE_HTTPD_CGI
151//config: bool "Support Common Gateway Interface (CGI)" 151//config: bool "Support Common Gateway Interface (CGI)"
152//config: default y 152//config: default y
153//config: depends on HTTPD 153//config: depends on HTTPD
154//config: help 154//config: help
155//config: This option allows scripts and executables to be invoked 155//config: This option allows scripts and executables to be invoked
156//config: when specific URLs are requested. 156//config: when specific URLs are requested.
157//config: 157//config:
158//config:config FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR 158//config:config FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
159//config: bool "Support running scripts through an interpreter" 159//config: bool "Support running scripts through an interpreter"
160//config: default y 160//config: default y
161//config: depends on FEATURE_HTTPD_CGI 161//config: depends on FEATURE_HTTPD_CGI
162//config: help 162//config: help
163//config: This option enables support for running scripts through an 163//config: This option enables support for running scripts through an
164//config: interpreter. Turn this on if you want PHP scripts to work 164//config: interpreter. Turn this on if you want PHP scripts to work
165//config: properly. You need to supply an additional line in your 165//config: properly. You need to supply an additional line in your
166//config: httpd.conf file: 166//config: httpd.conf file:
167//config: *.php:/path/to/your/php 167//config: *.php:/path/to/your/php
168//config: 168//config:
169//config:config FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV 169//config:config FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
170//config: bool "Set REMOTE_PORT environment variable for CGI" 170//config: bool "Set REMOTE_PORT environment variable for CGI"
171//config: default y 171//config: default y
172//config: depends on FEATURE_HTTPD_CGI 172//config: depends on FEATURE_HTTPD_CGI
173//config: help 173//config: help
174//config: Use of this option can assist scripts in generating 174//config: Use of this option can assist scripts in generating
175//config: references that contain a unique port number. 175//config: references that contain a unique port number.
176//config: 176//config:
177//config:config FEATURE_HTTPD_ENCODE_URL_STR 177//config:config FEATURE_HTTPD_ENCODE_URL_STR
178//config: bool "Enable -e option (useful for CGIs written as shell scripts)" 178//config: bool "Enable -e option (useful for CGIs written as shell scripts)"
179//config: default y 179//config: default y
180//config: depends on HTTPD 180//config: depends on HTTPD
181//config: help 181//config: help
182//config: This option allows html encoding of arbitrary strings for display 182//config: This option allows html encoding of arbitrary strings for display
183//config: by the browser. Output goes to stdout. 183//config: by the browser. Output goes to stdout.
184//config: For example, httpd -e "<Hello World>" produces 184//config: For example, httpd -e "<Hello World>" produces
185//config: "&#60Hello&#32World&#62". 185//config: "&#60Hello&#32World&#62".
186//config: 186//config:
187//config:config FEATURE_HTTPD_ERROR_PAGES 187//config:config FEATURE_HTTPD_ERROR_PAGES
188//config: bool "Support custom error pages" 188//config: bool "Support custom error pages"
189//config: default y 189//config: default y
190//config: depends on HTTPD 190//config: depends on HTTPD
191//config: help 191//config: help
192//config: This option allows you to define custom error pages in 192//config: This option allows you to define custom error pages in
193//config: the configuration file instead of the default HTTP status 193//config: the configuration file instead of the default HTTP status
194//config: error pages. For instance, if you add the line: 194//config: error pages. For instance, if you add the line:
195//config: E404:/path/e404.html 195//config: E404:/path/e404.html
196//config: in the config file, the server will respond the specified 196//config: in the config file, the server will respond the specified
197//config: '/path/e404.html' file instead of the terse '404 NOT FOUND' 197//config: '/path/e404.html' file instead of the terse '404 NOT FOUND'
198//config: message. 198//config: message.
199//config: 199//config:
200//config:config FEATURE_HTTPD_PROXY 200//config:config FEATURE_HTTPD_PROXY
201//config: bool "Support reverse proxy" 201//config: bool "Support reverse proxy"
202//config: default y 202//config: default y
203//config: depends on HTTPD 203//config: depends on HTTPD
204//config: help 204//config: help
205//config: This option allows you to define URLs that will be forwarded 205//config: This option allows you to define URLs that will be forwarded
206//config: to another HTTP server. To setup add the following line to the 206//config: to another HTTP server. To setup add the following line to the
207//config: configuration file 207//config: configuration file
208//config: P:/url/:http://hostname[:port]/new/path/ 208//config: P:/url/:http://hostname[:port]/new/path/
209//config: Then a request to /url/myfile will be forwarded to 209//config: Then a request to /url/myfile will be forwarded to
210//config: http://hostname[:port]/new/path/myfile. 210//config: http://hostname[:port]/new/path/myfile.
211//config: 211//config:
212//config:config FEATURE_HTTPD_GZIP 212//config:config FEATURE_HTTPD_GZIP
213//config: bool "Support GZIP content encoding" 213//config: bool "Support GZIP content encoding"
214//config: default y 214//config: default y
215//config: depends on HTTPD 215//config: depends on HTTPD
216//config: help 216//config: help
217//config: Makes httpd send files using GZIP content encoding if the 217//config: Makes httpd send files using GZIP content encoding if the
218//config: client supports it and a pre-compressed <file>.gz exists. 218//config: client supports it and a pre-compressed <file>.gz exists.
219 219
220//applet:IF_HTTPD(APPLET(httpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 220//applet:IF_HTTPD(APPLET(httpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
221 221
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index 9e16936d8..d1e9c58dc 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -26,52 +26,52 @@
26 * IPV6 support added by Bart Visscher <magick@linux-fan.com> 26 * IPV6 support added by Bart Visscher <magick@linux-fan.com>
27 */ 27 */
28//config:config IFCONFIG 28//config:config IFCONFIG
29//config: bool "ifconfig" 29//config: bool "ifconfig (12 kb)"
30//config: default y 30//config: default y
31//config: select PLATFORM_LINUX 31//config: select PLATFORM_LINUX
32//config: help 32//config: help
33//config: Ifconfig is used to configure the kernel-resident network interfaces. 33//config: Ifconfig is used to configure the kernel-resident network interfaces.
34//config: 34//config:
35//config:config FEATURE_IFCONFIG_STATUS 35//config:config FEATURE_IFCONFIG_STATUS
36//config: bool "Enable status reporting output (+7k)" 36//config: bool "Enable status reporting output (+7k)"
37//config: default y 37//config: default y
38//config: depends on IFCONFIG 38//config: depends on IFCONFIG
39//config: help 39//config: help
40//config: If ifconfig is called with no arguments it will display the status 40//config: If ifconfig is called with no arguments it will display the status
41//config: of the currently active interfaces. 41//config: of the currently active interfaces.
42//config: 42//config:
43//config:config FEATURE_IFCONFIG_SLIP 43//config:config FEATURE_IFCONFIG_SLIP
44//config: bool "Enable slip-specific options \"keepalive\" and \"outfill\"" 44//config: bool "Enable slip-specific options \"keepalive\" and \"outfill\""
45//config: default y 45//config: default y
46//config: depends on IFCONFIG 46//config: depends on IFCONFIG
47//config: help 47//config: help
48//config: Allow "keepalive" and "outfill" support for SLIP. If you're not 48//config: Allow "keepalive" and "outfill" support for SLIP. If you're not
49//config: planning on using serial lines, leave this unchecked. 49//config: planning on using serial lines, leave this unchecked.
50//config: 50//config:
51//config:config FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ 51//config:config FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
52//config: bool "Enable options \"mem_start\", \"io_addr\", and \"irq\"" 52//config: bool "Enable options \"mem_start\", \"io_addr\", and \"irq\""
53//config: default y 53//config: default y
54//config: depends on IFCONFIG 54//config: depends on IFCONFIG
55//config: help 55//config: help
56//config: Allow the start address for shared memory, start address for I/O, 56//config: Allow the start address for shared memory, start address for I/O,
57//config: and/or the interrupt line used by the specified device. 57//config: and/or the interrupt line used by the specified device.
58//config: 58//config:
59//config:config FEATURE_IFCONFIG_HW 59//config:config FEATURE_IFCONFIG_HW
60//config: bool "Enable option \"hw\" (ether only)" 60//config: bool "Enable option \"hw\" (ether only)"
61//config: default y 61//config: default y
62//config: depends on IFCONFIG 62//config: depends on IFCONFIG
63//config: help 63//config: help
64//config: Set the hardware address of this interface, if the device driver 64//config: Set the hardware address of this interface, if the device driver
65//config: supports this operation. Currently, we only support the 'ether' 65//config: supports this operation. Currently, we only support the 'ether'
66//config: class. 66//config: class.
67//config: 67//config:
68//config:config FEATURE_IFCONFIG_BROADCAST_PLUS 68//config:config FEATURE_IFCONFIG_BROADCAST_PLUS
69//config: bool "Set the broadcast automatically" 69//config: bool "Set the broadcast automatically"
70//config: default y 70//config: default y
71//config: depends on IFCONFIG 71//config: depends on IFCONFIG
72//config: help 72//config: help
73//config: Setting this will make ifconfig attempt to find the broadcast 73//config: Setting this will make ifconfig attempt to find the broadcast
74//config: automatically if the value '+' is used. 74//config: automatically if the value '+' is used.
75 75
76//applet:IF_IFCONFIG(APPLET(ifconfig, BB_DIR_SBIN, BB_SUID_DROP)) 76//applet:IF_IFCONFIG(APPLET(ifconfig, BB_DIR_SBIN, BB_SUID_DROP))
77 77
diff --git a/networking/ifenslave.c b/networking/ifenslave.c
index 070931209..26e5e8cf3 100644
--- a/networking/ifenslave.c
+++ b/networking/ifenslave.c
@@ -98,12 +98,12 @@
98 * set version to 1.1.0 98 * set version to 1.1.0
99 */ 99 */
100//config:config IFENSLAVE 100//config:config IFENSLAVE
101//config: bool "ifenslave" 101//config: bool "ifenslave (13 kb)"
102//config: default y 102//config: default y
103//config: select PLATFORM_LINUX 103//config: select PLATFORM_LINUX
104//config: help 104//config: help
105//config: Userspace application to bind several interfaces 105//config: Userspace application to bind several interfaces
106//config: to a logical interface (use with kernel bonding driver). 106//config: to a logical interface (use with kernel bonding driver).
107 107
108//applet:IF_IFENSLAVE(APPLET(ifenslave, BB_DIR_SBIN, BB_SUID_DROP)) 108//applet:IF_IFENSLAVE(APPLET(ifenslave, BB_DIR_SBIN, BB_SUID_DROP))
109 109
diff --git a/networking/ifplugd.c b/networking/ifplugd.c
index 4f8a274b0..9bc1a075f 100644
--- a/networking/ifplugd.c
+++ b/networking/ifplugd.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config IFPLUGD 9//config:config IFPLUGD
10//config: bool "ifplugd" 10//config: bool "ifplugd (9.9 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: Network interface plug detection daemon. 14//config: Network interface plug detection daemon.
15 15
16//applet:IF_IFPLUGD(APPLET(ifplugd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_IFPLUGD(APPLET(ifplugd, BB_DIR_USR_SBIN, BB_SUID_DROP))
17 17
@@ -342,10 +342,8 @@ static int run_script(const char *action)
342 /* r < 0 - can't exec, 0 <= r < 0x180 - exited, >=0x180 - killed by sig (r-0x180) */ 342 /* r < 0 - can't exec, 0 <= r < 0x180 - exited, >=0x180 - killed by sig (r-0x180) */
343 r = spawn_and_wait(argv); 343 r = spawn_and_wait(argv);
344 344
345 unsetenv(IFPLUGD_ENV_PREVIOUS); 345 bb_unsetenv_and_free(env_PREVIOUS);
346 unsetenv(IFPLUGD_ENV_CURRENT); 346 bb_unsetenv_and_free(env_CURRENT);
347 free(env_PREVIOUS);
348 free(env_CURRENT);
349 347
350 bb_error_msg("exit code: %d", r & 0xff); 348 bb_error_msg("exit code: %d", r & 0xff);
351 return (option_mask32 & FLAG_IGNORE_RETVAL) ? 0 : r; 349 return (option_mask32 & FLAG_IGNORE_RETVAL) ? 0 : r;
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index a76fe1021..f8c29ab00 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -18,66 +18,66 @@
18 */ 18 */
19 19
20//config:config IFUP 20//config:config IFUP
21//config: bool "ifup" 21//config: bool "ifup (17 kb)"
22//config: default y 22//config: default y
23//config: help 23//config: help
24//config: Activate the specified interfaces. This applet makes use 24//config: Activate the specified interfaces. This applet makes use
25//config: of either "ifconfig" and "route" or the "ip" command to actually 25//config: of either "ifconfig" and "route" or the "ip" command to actually
26//config: configure network interfaces. Therefore, you will probably also want 26//config: configure network interfaces. Therefore, you will probably also want
27//config: to enable either IFCONFIG and ROUTE, or enable 27//config: to enable either IFCONFIG and ROUTE, or enable
28//config: FEATURE_IFUPDOWN_IP and the various IP options. Of 28//config: FEATURE_IFUPDOWN_IP and the various IP options. Of
29//config: course you could use non-busybox versions of these programs, so 29//config: course you could use non-busybox versions of these programs, so
30//config: against my better judgement (since this will surely result in plenty 30//config: against my better judgement (since this will surely result in plenty
31//config: of support questions on the mailing list), I do not force you to 31//config: of support questions on the mailing list), I do not force you to
32//config: enable these additional options. It is up to you to supply either 32//config: enable these additional options. It is up to you to supply either
33//config: "ifconfig", "route" and "run-parts" or the "ip" command, either 33//config: "ifconfig", "route" and "run-parts" or the "ip" command, either
34//config: via busybox or via standalone utilities. 34//config: via busybox or via standalone utilities.
35//config: 35//config:
36//config:config IFDOWN 36//config:config IFDOWN
37//config: bool "ifdown" 37//config: bool "ifdown (15 kb)"
38//config: default y 38//config: default y
39//config: help 39//config: help
40//config: Deactivate the specified interfaces. 40//config: Deactivate the specified interfaces.
41//config: 41//config:
42//config:config IFUPDOWN_IFSTATE_PATH 42//config:config IFUPDOWN_IFSTATE_PATH
43//config: string "Absolute path to ifstate file" 43//config: string "Absolute path to ifstate file"
44//config: default "/var/run/ifstate" 44//config: default "/var/run/ifstate"
45//config: depends on IFUP || IFDOWN 45//config: depends on IFUP || IFDOWN
46//config: help 46//config: help
47//config: ifupdown keeps state information in a file called ifstate. 47//config: ifupdown keeps state information in a file called ifstate.
48//config: Typically it is located in /var/run/ifstate, however 48//config: Typically it is located in /var/run/ifstate, however
49//config: some distributions tend to put it in other places 49//config: some distributions tend to put it in other places
50//config: (debian, for example, uses /etc/network/run/ifstate). 50//config: (debian, for example, uses /etc/network/run/ifstate).
51//config: This config option defines location of ifstate. 51//config: This config option defines location of ifstate.
52//config: 52//config:
53//config:config FEATURE_IFUPDOWN_IP 53//config:config FEATURE_IFUPDOWN_IP
54//config: bool "Use ip tool (else ifconfig/route is used)" 54//config: bool "Use ip tool (else ifconfig/route is used)"
55//config: default y 55//config: default y
56//config: depends on IFUP || IFDOWN 56//config: depends on IFUP || IFDOWN
57//config: help 57//config: help
58//config: Use the iproute "ip" command to implement "ifup" and "ifdown", rather 58//config: Use the iproute "ip" command to implement "ifup" and "ifdown", rather
59//config: than the default of using the older "ifconfig" and "route" utilities. 59//config: than the default of using the older "ifconfig" and "route" utilities.
60//config: 60//config:
61//config: If Y: you must install either the full-blown iproute2 package 61//config: If Y: you must install either the full-blown iproute2 package
62//config: or enable "ip" applet in Busybox, or the "ifup" and "ifdown" applets 62//config: or enable "ip" applet in Busybox, or the "ifup" and "ifdown" applets
63//config: will not work. 63//config: will not work.
64//config: 64//config:
65//config: If N: you must install either the full-blown ifconfig and route 65//config: If N: you must install either the full-blown ifconfig and route
66//config: utilities, or enable these applets in Busybox. 66//config: utilities, or enable these applets in Busybox.
67//config: 67//config:
68//config:config FEATURE_IFUPDOWN_IPV4 68//config:config FEATURE_IFUPDOWN_IPV4
69//config: bool "Support IPv4" 69//config: bool "Support IPv4"
70//config: default y 70//config: default y
71//config: depends on IFUP || IFDOWN 71//config: depends on IFUP || IFDOWN
72//config: help 72//config: help
73//config: If you want ifup/ifdown to talk IPv4, leave this on. 73//config: If you want ifup/ifdown to talk IPv4, leave this on.
74//config: 74//config:
75//config:config FEATURE_IFUPDOWN_IPV6 75//config:config FEATURE_IFUPDOWN_IPV6
76//config: bool "Support IPv6" 76//config: bool "Support IPv6"
77//config: default y 77//config: default y
78//config: depends on (IFUP || IFDOWN) && FEATURE_IPV6 78//config: depends on (IFUP || IFDOWN) && FEATURE_IPV6
79//config: help 79//config: help
80//config: If you need support for IPv6, turn this option on. 80//config: If you need support for IPv6, turn this option on.
81//config: 81//config:
82//UNUSED: 82//UNUSED:
83////////:config FEATURE_IFUPDOWN_IPX 83////////:config FEATURE_IFUPDOWN_IPX
@@ -93,18 +93,18 @@
93//config: default y 93//config: default y
94//config: depends on IFUP || IFDOWN 94//config: depends on IFUP || IFDOWN
95//config: help 95//config: help
96//config: This enables support for the "mapping" stanza, unless you have 96//config: This enables support for the "mapping" stanza, unless you have
97//config: a weird network setup you don't need it. 97//config: a weird network setup you don't need it.
98//config: 98//config:
99//config:config FEATURE_IFUPDOWN_EXTERNAL_DHCP 99//config:config FEATURE_IFUPDOWN_EXTERNAL_DHCP
100//config: bool "Support external DHCP clients" 100//config: bool "Support external DHCP clients"
101//config: default n 101//config: default n
102//config: depends on IFUP || IFDOWN 102//config: depends on IFUP || IFDOWN
103//config: help 103//config: help
104//config: This enables support for the external dhcp clients. Clients are 104//config: This enables support for the external dhcp clients. Clients are
105//config: tried in the following order: dhcpcd, dhclient, pump and udhcpc. 105//config: tried in the following order: dhcpcd, dhclient, pump and udhcpc.
106//config: Otherwise, if udhcpc applet is enabled, it is used. 106//config: Otherwise, if udhcpc applet is enabled, it is used.
107//config: Otherwise, ifup/ifdown will have no support for DHCP. 107//config: Otherwise, ifup/ifdown will have no support for DHCP.
108 108
109// APPLET_ODDNAME:name main location suid_type help 109// APPLET_ODDNAME:name main location suid_type help
110//applet:IF_IFUP( APPLET_ODDNAME(ifup, ifupdown, BB_DIR_SBIN, BB_SUID_DROP, ifup)) 110//applet:IF_IFUP( APPLET_ODDNAME(ifup, ifupdown, BB_DIR_SBIN, BB_SUID_DROP, ifup))
diff --git a/networking/inetd.c b/networking/inetd.c
index 3bf157b70..2991edc09 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -154,46 +154,46 @@
154 * setuid() 154 * setuid()
155 */ 155 */
156//config:config INETD 156//config:config INETD
157//config: bool "inetd" 157//config: bool "inetd (18 kb)"
158//config: default y 158//config: default y
159//config: select FEATURE_SYSLOG 159//config: select FEATURE_SYSLOG
160//config: help 160//config: help
161//config: Internet superserver daemon 161//config: Internet superserver daemon
162//config: 162//config:
163//config:config FEATURE_INETD_SUPPORT_BUILTIN_ECHO 163//config:config FEATURE_INETD_SUPPORT_BUILTIN_ECHO
164//config: bool "Support echo service" 164//config: bool "Support echo service"
165//config: default y 165//config: default y
166//config: depends on INETD 166//config: depends on INETD
167//config: help 167//config: help
168//config: Echo received data internal inetd service 168//config: Echo received data internal inetd service
169//config: 169//config:
170//config:config FEATURE_INETD_SUPPORT_BUILTIN_DISCARD 170//config:config FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
171//config: bool "Support discard service" 171//config: bool "Support discard service"
172//config: default y 172//config: default y
173//config: depends on INETD 173//config: depends on INETD
174//config: help 174//config: help
175//config: Internet /dev/null internal inetd service 175//config: Internet /dev/null internal inetd service
176//config: 176//config:
177//config:config FEATURE_INETD_SUPPORT_BUILTIN_TIME 177//config:config FEATURE_INETD_SUPPORT_BUILTIN_TIME
178//config: bool "Support time service" 178//config: bool "Support time service"
179//config: default y 179//config: default y
180//config: depends on INETD 180//config: depends on INETD
181//config: help 181//config: help
182//config: Return 32 bit time since 1900 internal inetd service 182//config: Return 32 bit time since 1900 internal inetd service
183//config: 183//config:
184//config:config FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME 184//config:config FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
185//config: bool "Support daytime service" 185//config: bool "Support daytime service"
186//config: default y 186//config: default y
187//config: depends on INETD 187//config: depends on INETD
188//config: help 188//config: help
189//config: Return human-readable time internal inetd service 189//config: Return human-readable time internal inetd service
190//config: 190//config:
191//config:config FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN 191//config:config FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN
192//config: bool "Support chargen service" 192//config: bool "Support chargen service"
193//config: default y 193//config: default y
194//config: depends on INETD 194//config: depends on INETD
195//config: help 195//config: help
196//config: Familiar character generator internal inetd service 196//config: Familiar character generator internal inetd service
197//config: 197//config:
198//config:config FEATURE_INETD_RPC 198//config:config FEATURE_INETD_RPC
199//config: bool "Support RPC services" 199//config: bool "Support RPC services"
@@ -201,7 +201,7 @@
201//config: depends on INETD 201//config: depends on INETD
202//config: select FEATURE_HAVE_RPC 202//config: select FEATURE_HAVE_RPC
203//config: help 203//config: help
204//config: Support Sun-RPC based services 204//config: Support Sun-RPC based services
205 205
206//applet:IF_INETD(APPLET(inetd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 206//applet:IF_INETD(APPLET(inetd, BB_DIR_USR_SBIN, BB_SUID_DROP))
207 207
diff --git a/networking/ip.c b/networking/ip.c
index 3cf52cdd7..cca7cbe12 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -9,120 +9,120 @@
9 * Bernhard Reutner-Fischer rewrote to use index_in_substr_array 9 * Bernhard Reutner-Fischer rewrote to use index_in_substr_array
10 */ 10 */
11//config:config IP 11//config:config IP
12//config: bool "ip" 12//config: bool "ip (34 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: The "ip" applet is a TCP/IP interface configuration and routing 16//config: The "ip" applet is a TCP/IP interface configuration and routing
17//config: utility. You generally don't need "ip" to use busybox with 17//config: utility. You generally don't need "ip" to use busybox with
18//config: TCP/IP. 18//config: TCP/IP.
19//config: 19//config:
20//config:config IPADDR 20//config:config IPADDR
21//config: bool "ipaddr" 21//config: bool "ipaddr (14 kb)"
22//config: default y 22//config: default y
23//config: select FEATURE_IP_ADDRESS 23//config: select FEATURE_IP_ADDRESS
24//config: select PLATFORM_LINUX 24//config: select PLATFORM_LINUX
25//config: help 25//config: help
26//config: Support short form of ip addr: ipaddr 26//config: Support short form of ip addr: ipaddr
27//config: 27//config:
28//config:config IPLINK 28//config:config IPLINK
29//config: bool "iplink" 29//config: bool "iplink (16 kb)"
30//config: default y 30//config: default y
31//config: select FEATURE_IP_LINK 31//config: select FEATURE_IP_LINK
32//config: select PLATFORM_LINUX 32//config: select PLATFORM_LINUX
33//config: help 33//config: help
34//config: Support short form of ip link: iplink 34//config: Support short form of ip link: iplink
35//config: 35//config:
36//config:config IPROUTE 36//config:config IPROUTE
37//config: bool "iproute" 37//config: bool "iproute (15 kb)"
38//config: default y 38//config: default y
39//config: select FEATURE_IP_ROUTE 39//config: select FEATURE_IP_ROUTE
40//config: select PLATFORM_LINUX 40//config: select PLATFORM_LINUX
41//config: help 41//config: help
42//config: Support short form of ip route: iproute 42//config: Support short form of ip route: iproute
43//config: 43//config:
44//config:config IPTUNNEL 44//config:config IPTUNNEL
45//config: bool "iptunnel" 45//config: bool "iptunnel (9.6 kb)"
46//config: default y 46//config: default y
47//config: select FEATURE_IP_TUNNEL 47//config: select FEATURE_IP_TUNNEL
48//config: select PLATFORM_LINUX 48//config: select PLATFORM_LINUX
49//config: help 49//config: help
50//config: Support short form of ip tunnel: iptunnel 50//config: Support short form of ip tunnel: iptunnel
51//config: 51//config:
52//config:config IPRULE 52//config:config IPRULE
53//config: bool "iprule" 53//config: bool "iprule (10 kb)"
54//config: default y 54//config: default y
55//config: select FEATURE_IP_RULE 55//config: select FEATURE_IP_RULE
56//config: select PLATFORM_LINUX 56//config: select PLATFORM_LINUX
57//config: help 57//config: help
58//config: Support short form of ip rule: iprule 58//config: Support short form of ip rule: iprule
59//config: 59//config:
60//config:config IPNEIGH 60//config:config IPNEIGH
61//config: bool "ipneigh" 61//config: bool "ipneigh (8.3 kb)"
62//config: default y 62//config: default y
63//config: select FEATURE_IP_NEIGH 63//config: select FEATURE_IP_NEIGH
64//config: select PLATFORM_LINUX 64//config: select PLATFORM_LINUX
65//config: help 65//config: help
66//config: Support short form of ip neigh: ipneigh 66//config: Support short form of ip neigh: ipneigh
67//config: 67//config:
68//config:config FEATURE_IP_ADDRESS 68//config:config FEATURE_IP_ADDRESS
69//config: bool "ip address" 69//config: bool "ip address"
70//config: default y 70//config: default y
71//config: depends on IP || IPADDR 71//config: depends on IP || IPADDR
72//config: help 72//config: help
73//config: Address manipulation support for the "ip" applet. 73//config: Address manipulation support for the "ip" applet.
74//config: 74//config:
75//config:config FEATURE_IP_LINK 75//config:config FEATURE_IP_LINK
76//config: bool "ip link" 76//config: bool "ip link"
77//config: default y 77//config: default y
78//config: depends on IP || IPLINK 78//config: depends on IP || IPLINK
79//config: help 79//config: help
80//config: Configure network devices with "ip". 80//config: Configure network devices with "ip".
81//config: 81//config:
82//config:config FEATURE_IP_ROUTE 82//config:config FEATURE_IP_ROUTE
83//config: bool "ip route" 83//config: bool "ip route"
84//config: default y 84//config: default y
85//config: depends on IP || IPROUTE 85//config: depends on IP || IPROUTE
86//config: help 86//config: help
87//config: Add support for routing table management to "ip". 87//config: Add support for routing table management to "ip".
88//config: 88//config:
89//config:config FEATURE_IP_ROUTE_DIR 89//config:config FEATURE_IP_ROUTE_DIR
90//config: string "ip route configuration directory" 90//config: string "ip route configuration directory"
91//config: default "/etc/iproute2" 91//config: default "/etc/iproute2"
92//config: depends on FEATURE_IP_ROUTE 92//config: depends on FEATURE_IP_ROUTE
93//config: help 93//config: help
94//config: Location of the "ip" applet routing configuration. 94//config: Location of the "ip" applet routing configuration.
95//config: 95//config:
96//config:config FEATURE_IP_TUNNEL 96//config:config FEATURE_IP_TUNNEL
97//config: bool "ip tunnel" 97//config: bool "ip tunnel"
98//config: default y 98//config: default y
99//config: depends on IP || IPTUNNEL 99//config: depends on IP || IPTUNNEL
100//config: help 100//config: help
101//config: Add support for tunneling commands to "ip". 101//config: Add support for tunneling commands to "ip".
102//config: 102//config:
103//config:config FEATURE_IP_RULE 103//config:config FEATURE_IP_RULE
104//config: bool "ip rule" 104//config: bool "ip rule"
105//config: default y 105//config: default y
106//config: depends on IP || IPRULE 106//config: depends on IP || IPRULE
107//config: help 107//config: help
108//config: Add support for rule commands to "ip". 108//config: Add support for rule commands to "ip".
109//config: 109//config:
110//config:config FEATURE_IP_NEIGH 110//config:config FEATURE_IP_NEIGH
111//config: bool "ip neighbor" 111//config: bool "ip neighbor"
112//config: default y 112//config: default y
113//config: depends on IP || IPNEIGH 113//config: depends on IP || IPNEIGH
114//config: help 114//config: help
115//config: Add support for neighbor commands to "ip". 115//config: Add support for neighbor commands to "ip".
116//config: 116//config:
117//config:config FEATURE_IP_RARE_PROTOCOLS 117//config:config FEATURE_IP_RARE_PROTOCOLS
118//config: bool "Support displaying rarely used link types" 118//config: bool "Support displaying rarely used link types"
119//config: default n 119//config: default n
120//config: depends on IP || IPADDR || IPLINK || IPROUTE || IPTUNNEL || IPRULE || IPNEIGH 120//config: depends on IP || IPADDR || IPLINK || IPROUTE || IPTUNNEL || IPRULE || IPNEIGH
121//config: help 121//config: help
122//config: If you are not going to use links of type "frad", "econet", 122//config: If you are not going to use links of type "frad", "econet",
123//config: "bif" etc, you probably don't need to enable this. 123//config: "bif" etc, you probably don't need to enable this.
124//config: Ethernet, wireless, infrared, ppp/slip, ip tunnelling 124//config: Ethernet, wireless, infrared, ppp/slip, ip tunnelling
125//config: link types are supported without this option selected. 125//config: link types are supported without this option selected.
126 126
127//applet:IF_IP(APPLET(ip, BB_DIR_SBIN, BB_SUID_DROP)) 127//applet:IF_IP(APPLET(ip, BB_DIR_SBIN, BB_SUID_DROP))
128//applet:IF_IPADDR(APPLET(ipaddr, BB_DIR_SBIN, BB_SUID_DROP)) 128//applet:IF_IPADDR(APPLET(ipaddr, BB_DIR_SBIN, BB_SUID_DROP))
diff --git a/networking/ipcalc.c b/networking/ipcalc.c
index 9359f9016..9888a6ff2 100644
--- a/networking/ipcalc.c
+++ b/networking/ipcalc.c
@@ -12,11 +12,11 @@
12 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 12 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
13 */ 13 */
14//config:config IPCALC 14//config:config IPCALC
15//config: bool "ipcalc" 15//config: bool "ipcalc (4.3 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: ipcalc takes an IP address and netmask and calculates the 18//config: ipcalc takes an IP address and netmask and calculates the
19//config: resulting broadcast, network, and host range. 19//config: resulting broadcast, network, and host range.
20//config: 20//config:
21//config:config FEATURE_IPCALC_LONG_OPTIONS 21//config:config FEATURE_IPCALC_LONG_OPTIONS
22//config: bool "Enable long options" 22//config: bool "Enable long options"
@@ -28,8 +28,8 @@
28//config: default y 28//config: default y
29//config: depends on IPCALC 29//config: depends on IPCALC
30//config: help 30//config: help
31//config: Adds the options hostname, prefix and silent to the output of 31//config: Adds the options hostname, prefix and silent to the output of
32//config: "ipcalc". 32//config: "ipcalc".
33 33
34//applet:IF_IPCALC(APPLET(ipcalc, BB_DIR_BIN, BB_SUID_DROP)) 34//applet:IF_IPCALC(APPLET(ipcalc, BB_DIR_BIN, BB_SUID_DROP))
35 35
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c
index 219c64b66..133d62a65 100644
--- a/networking/isrv_identd.c
+++ b/networking/isrv_identd.c
@@ -7,12 +7,12 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config FAKEIDENTD 9//config:config FAKEIDENTD
10//config: bool "fakeidentd" 10//config: bool "fakeidentd (8.9 kb)"
11//config: default y 11//config: default y
12//config: select FEATURE_SYSLOG 12//config: select FEATURE_SYSLOG
13//config: help 13//config: help
14//config: fakeidentd listens on the ident port and returns a predefined 14//config: fakeidentd listens on the ident port and returns a predefined
15//config: fake value on any query. 15//config: fake value on any query.
16 16
17//applet:IF_FAKEIDENTD(APPLET(fakeidentd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 17//applet:IF_FAKEIDENTD(APPLET(fakeidentd, BB_DIR_USR_SBIN, BB_SUID_DROP))
18 18
diff --git a/networking/nameif.c b/networking/nameif.c
index cffd5bfde..31ee98a39 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -11,34 +11,34 @@
11 */ 11 */
12 12
13//config:config NAMEIF 13//config:config NAMEIF
14//config: bool "nameif" 14//config: bool "nameif (6.6 kb)"
15//config: default y 15//config: default y
16//config: select PLATFORM_LINUX 16//config: select PLATFORM_LINUX
17//config: select FEATURE_SYSLOG 17//config: select FEATURE_SYSLOG
18//config: help 18//config: help
19//config: nameif is used to rename network interface by its MAC address. 19//config: nameif is used to rename network interface by its MAC address.
20//config: Renamed interfaces MUST be in the down state. 20//config: Renamed interfaces MUST be in the down state.
21//config: It is possible to use a file (default: /etc/mactab) 21//config: It is possible to use a file (default: /etc/mactab)
22//config: with list of new interface names and MACs. 22//config: with list of new interface names and MACs.
23//config: Maximum interface name length: IFNAMSIZ = 16 23//config: Maximum interface name length: IFNAMSIZ = 16
24//config: File fields are separated by space or tab. 24//config: File fields are separated by space or tab.
25//config: File format: 25//config: File format:
26//config: # Comment 26//config: # Comment
27//config: new_interface_name XX:XX:XX:XX:XX:XX 27//config: new_interface_name XX:XX:XX:XX:XX:XX
28//config: 28//config:
29//config:config FEATURE_NAMEIF_EXTENDED 29//config:config FEATURE_NAMEIF_EXTENDED
30//config: bool "Extended nameif" 30//config: bool "Extended nameif"
31//config: default y 31//config: default y
32//config: depends on NAMEIF 32//config: depends on NAMEIF
33//config: help 33//config: help
34//config: This extends the nameif syntax to support the bus_info, driver, 34//config: This extends the nameif syntax to support the bus_info, driver,
35//config: phyaddr selectors. The syntax is compatible to the normal nameif. 35//config: phyaddr selectors. The syntax is compatible to the normal nameif.
36//config: File format: 36//config: File format:
37//config: new_interface_name driver=asix bus=usb-0000:00:08.2-3 37//config: new_interface_name driver=asix bus=usb-0000:00:08.2-3
38//config: new_interface_name bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5 38//config: new_interface_name bus=usb-0000:00:08.2-3 00:80:C8:38:91:B5
39//config: new_interface_name phy_address=2 00:80:C8:38:91:B5 39//config: new_interface_name phy_address=2 00:80:C8:38:91:B5
40//config: new_interface_name mac=00:80:C8:38:91:B5 40//config: new_interface_name mac=00:80:C8:38:91:B5
41//config: new_interface_name 00:80:C8:38:91:B5 41//config: new_interface_name 00:80:C8:38:91:B5
42 42
43//applet:IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP)) 43//applet:IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP))
44 44
diff --git a/networking/nbd-client.c b/networking/nbd-client.c
index 70869d651..a5e25e6aa 100644
--- a/networking/nbd-client.c
+++ b/networking/nbd-client.c
@@ -12,10 +12,10 @@
12//kbuild:lib-$(CONFIG_NBDCLIENT) += nbd-client.o 12//kbuild:lib-$(CONFIG_NBDCLIENT) += nbd-client.o
13 13
14//config:config NBDCLIENT 14//config:config NBDCLIENT
15//config: bool "nbd-client" 15//config: bool "nbd-client (4.6 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: Network block device client 18//config: Network block device client
19 19
20#define NBD_SET_SOCK _IO(0xab, 0) 20#define NBD_SET_SOCK _IO(0xab, 0)
21#define NBD_SET_BLKSIZE _IO(0xab, 1) 21#define NBD_SET_BLKSIZE _IO(0xab, 1)
diff --git a/networking/nc.c b/networking/nc.c
index 1b70434ac..df073d7df 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -7,37 +7,37 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config NC 9//config:config NC
10//config: bool "nc" 10//config: bool "nc (11 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: A simple Unix utility which reads and writes data across network 13//config: A simple Unix utility which reads and writes data across network
14//config: connections. 14//config: connections.
15//config: 15//config:
16//config:config NC_SERVER 16//config:config NC_SERVER
17//config: bool "Netcat server options (-l)" 17//config: bool "Netcat server options (-l)"
18//config: default y 18//config: default y
19//config: depends on NC 19//config: depends on NC
20//config: help 20//config: help
21//config: Allow netcat to act as a server. 21//config: Allow netcat to act as a server.
22//config: 22//config:
23//config:config NC_EXTRA 23//config:config NC_EXTRA
24//config: bool "Netcat extensions (-eiw and -f FILE)" 24//config: bool "Netcat extensions (-eiw and -f FILE)"
25//config: default y 25//config: default y
26//config: depends on NC 26//config: depends on NC
27//config: help 27//config: help
28//config: Add -e (support for executing the rest of the command line after 28//config: Add -e (support for executing the rest of the command line after
29//config: making or receiving a successful connection), -i (delay interval for 29//config: making or receiving a successful connection), -i (delay interval for
30//config: lines sent), -w (timeout for initial connection). 30//config: lines sent), -w (timeout for initial connection).
31//config: 31//config:
32//config:config NC_110_COMPAT 32//config:config NC_110_COMPAT
33//config: bool "Netcat 1.10 compatibility (+2.5k)" 33//config: bool "Netcat 1.10 compatibility (+2.5k)"
34//config: default n # off specially for Rob 34//config: default n # off specially for Rob
35//config: depends on NC 35//config: depends on NC
36//config: help 36//config: help
37//config: This option makes nc closely follow original nc-1.10. 37//config: This option makes nc closely follow original nc-1.10.
38//config: The code is about 2.5k bigger. It enables 38//config: The code is about 2.5k bigger. It enables
39//config: -s ADDR, -n, -u, -v, -o FILE, -z options, but loses 39//config: -s ADDR, -n, -u, -v, -o FILE, -z options, but loses
40//config: busybox-specific extensions: -f FILE. 40//config: busybox-specific extensions: -f FILE.
41 41
42//applet:IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP)) 42//applet:IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP))
43 43
diff --git a/networking/netstat.c b/networking/netstat.c
index 68e0c1a04..33281e333 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -14,27 +14,27 @@
14 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 14 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
15 */ 15 */
16//config:config NETSTAT 16//config:config NETSTAT
17//config: bool "netstat" 17//config: bool "netstat (10 kb)"
18//config: default y 18//config: default y
19//config: select PLATFORM_LINUX 19//config: select PLATFORM_LINUX
20//config: help 20//config: help
21//config: netstat prints information about the Linux networking subsystem. 21//config: netstat prints information about the Linux networking subsystem.
22//config: 22//config:
23//config:config FEATURE_NETSTAT_WIDE 23//config:config FEATURE_NETSTAT_WIDE
24//config: bool "Enable wide output" 24//config: bool "Enable wide output"
25//config: default y 25//config: default y
26//config: depends on NETSTAT 26//config: depends on NETSTAT
27//config: help 27//config: help
28//config: Add support for wide columns. Useful when displaying IPv6 addresses 28//config: Add support for wide columns. Useful when displaying IPv6 addresses
29//config: (-W option). 29//config: (-W option).
30//config: 30//config:
31//config:config FEATURE_NETSTAT_PRG 31//config:config FEATURE_NETSTAT_PRG
32//config: bool "Enable PID/Program name output" 32//config: bool "Enable PID/Program name output"
33//config: default y 33//config: default y
34//config: depends on NETSTAT 34//config: depends on NETSTAT
35//config: help 35//config: help
36//config: Add support for -p flag to print out PID and program name. 36//config: Add support for -p flag to print out PID and program name.
37//config: +700 bytes of code. 37//config: +700 bytes of code.
38 38
39//applet:IF_NETSTAT(APPLET(netstat, BB_DIR_BIN, BB_SUID_DROP)) 39//applet:IF_NETSTAT(APPLET(netstat, BB_DIR_BIN, BB_SUID_DROP))
40 40
diff --git a/networking/nslookup.c b/networking/nslookup.c
index 8e3c8fed9..45c218e6c 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -11,10 +11,10 @@
11 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 11 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
12 */ 12 */
13//config:config NSLOOKUP 13//config:config NSLOOKUP
14//config: bool "nslookup" 14//config: bool "nslookup (4.5 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: nslookup is a tool to query Internet name servers. 17//config: nslookup is a tool to query Internet name servers.
18 18
19//applet:IF_NSLOOKUP(APPLET(nslookup, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_NSLOOKUP(APPLET(nslookup, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 73d27ac20..f21f9513d 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -41,27 +41,27 @@
41 *********************************************************************** 41 ***********************************************************************
42 */ 42 */
43//config:config NTPD 43//config:config NTPD
44//config: bool "ntpd" 44//config: bool "ntpd (17 kb)"
45//config: default y 45//config: default y
46//config: select PLATFORM_LINUX 46//config: select PLATFORM_LINUX
47//config: help 47//config: help
48//config: The NTP client/server daemon. 48//config: The NTP client/server daemon.
49//config: 49//config:
50//config:config FEATURE_NTPD_SERVER 50//config:config FEATURE_NTPD_SERVER
51//config: bool "Make ntpd usable as a NTP server" 51//config: bool "Make ntpd usable as a NTP server"
52//config: default y 52//config: default y
53//config: depends on NTPD 53//config: depends on NTPD
54//config: help 54//config: help
55//config: Make ntpd usable as a NTP server. If you disable this option 55//config: Make ntpd usable as a NTP server. If you disable this option
56//config: ntpd will be usable only as a NTP client. 56//config: ntpd will be usable only as a NTP client.
57//config: 57//config:
58//config:config FEATURE_NTPD_CONF 58//config:config FEATURE_NTPD_CONF
59//config: bool "Make ntpd understand /etc/ntp.conf" 59//config: bool "Make ntpd understand /etc/ntp.conf"
60//config: default y 60//config: default y
61//config: depends on NTPD 61//config: depends on NTPD
62//config: help 62//config: help
63//config: Make ntpd look in /etc/ntp.conf for peers. Only "server address" 63//config: Make ntpd look in /etc/ntp.conf for peers. Only "server address"
64//config: is supported. 64//config: is supported.
65 65
66//applet:IF_NTPD(APPLET(ntpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 66//applet:IF_NTPD(APPLET(ntpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
67 67
diff --git a/networking/ping.c b/networking/ping.c
index 94fb007f5..506e7b11b 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -47,27 +47,28 @@
47#endif 47#endif
48 48
49//config:config PING 49//config:config PING
50//config: bool "ping" 50//config: bool "ping (9.5 kb)"
51//config: default y 51//config: default y
52//config: select PLATFORM_LINUX 52//config: select PLATFORM_LINUX
53//config: help 53//config: help
54//config: ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to 54//config: ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
55//config: elicit an ICMP ECHO_RESPONSE from a host or gateway. 55//config: elicit an ICMP ECHO_RESPONSE from a host or gateway.
56//config: 56//config:
57//config:config PING6 57//config:config PING6
58//config: bool "ping6" 58//config: bool "ping6 (10 kb)"
59//config: default y 59//config: default y
60//config: depends on FEATURE_IPV6 60//config: depends on FEATURE_IPV6
61//config: help 61//config: help
62//config: This will give you a ping that can talk IPv6. 62//config: Alias to "ping -6".
63//config: 63//config:
64//config:config FEATURE_FANCY_PING 64//config:config FEATURE_FANCY_PING
65//config: bool "Enable fancy ping output" 65//config: bool "Enable fancy ping output"
66//config: default y 66//config: default y
67//config: depends on PING || PING6 67//config: depends on PING || PING6
68//config: help 68//config: help
69//config: Make the output from the ping applet include statistics, and at the 69//config: With this option off, ping will say "HOST is alive!"
70//config: same time provide full support for ICMP packets. 70//config: or terminate with SIGALRM in 5 seconds otherwise.
71//config: No command-line options will be recognized.
71 72
72/* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore BB_SUID_MAYBE: */ 73/* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore BB_SUID_MAYBE: */
73//applet:IF_PING(APPLET(ping, BB_DIR_BIN, BB_SUID_MAYBE)) 74//applet:IF_PING(APPLET(ping, BB_DIR_BIN, BB_SUID_MAYBE))
@@ -103,7 +104,7 @@
103//usage: "\n (can exit earlier with -c CNT)" 104//usage: "\n (can exit earlier with -c CNT)"
104//usage: "\n -q Quiet, only display output at start" 105//usage: "\n -q Quiet, only display output at start"
105//usage: "\n and when finished" 106//usage: "\n and when finished"
106//usage: "\n -p Pattern to use for payload" 107//usage: "\n -p HEXBYTE Pattern to use for payload"
107//usage: 108//usage:
108//usage:# define ping6_trivial_usage 109//usage:# define ping6_trivial_usage
109//usage: "[OPTIONS] HOST" 110//usage: "[OPTIONS] HOST"
@@ -114,7 +115,7 @@
114//usage: "\n -I IFACE/IP Source interface or IP address" 115//usage: "\n -I IFACE/IP Source interface or IP address"
115//usage: "\n -q Quiet, only display output at start" 116//usage: "\n -q Quiet, only display output at start"
116//usage: "\n and when finished" 117//usage: "\n and when finished"
117//usage: "\n -p Pattern to use for payload" 118//usage: "\n -p HEXBYTE Pattern to use for payload"
118//usage: 119//usage:
119//usage:#endif 120//usage:#endif
120//usage: 121//usage:
@@ -236,8 +237,6 @@ static void ping4(len_and_sockaddr *lsa)
236 break; 237 break;
237 } 238 }
238 } 239 }
239 if (ENABLE_FEATURE_CLEAN_UP)
240 close(pingsock);
241} 240}
242 241
243#if ENABLE_PING6 242#if ENABLE_PING6
@@ -280,8 +279,6 @@ static void ping6(len_and_sockaddr *lsa)
280 break; 279 break;
281 } 280 }
282 } 281 }
283 if (ENABLE_FEATURE_CLEAN_UP)
284 close(pingsock);
285} 282}
286#endif 283#endif
287 284
@@ -331,6 +328,8 @@ static int common_ping_main(sa_family_t af, char **argv)
331 else 328 else
332#endif 329#endif
333 ping4(lsa); 330 ping4(lsa);
331 if (ENABLE_FEATURE_CLEAN_UP)
332 close(pingsock);
334 printf("%s is alive!\n", G.hostname); 333 printf("%s is alive!\n", G.hostname);
335 return EXIT_SUCCESS; 334 return EXIT_SUCCESS;
336} 335}
diff --git a/networking/pscan.c b/networking/pscan.c
index 0893c3577..17985d2c8 100644
--- a/networking/pscan.c
+++ b/networking/pscan.c
@@ -6,10 +6,10 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config PSCAN 8//config:config PSCAN
9//config: bool "pscan" 9//config: bool "pscan (6.6 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: Simple network port scanner. 12//config: Simple network port scanner.
13 13
14//applet:IF_PSCAN(APPLET(pscan, BB_DIR_USR_BIN, BB_SUID_DROP)) 14//applet:IF_PSCAN(APPLET(pscan, BB_DIR_USR_BIN, BB_SUID_DROP))
15 15
diff --git a/networking/route.c b/networking/route.c
index 7dc2b5a3d..32789eecc 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -25,11 +25,11 @@
25 * remove ridiculous amounts of bloat. 25 * remove ridiculous amounts of bloat.
26 */ 26 */
27//config:config ROUTE 27//config:config ROUTE
28//config: bool "route" 28//config: bool "route (8.9 kb)"
29//config: default y 29//config: default y
30//config: select PLATFORM_LINUX 30//config: select PLATFORM_LINUX
31//config: help 31//config: help
32//config: Route displays or manipulates the kernel's IP routing tables. 32//config: Route displays or manipulates the kernel's IP routing tables.
33 33
34//applet:IF_ROUTE(APPLET(route, BB_DIR_SBIN, BB_SUID_DROP)) 34//applet:IF_ROUTE(APPLET(route, BB_DIR_SBIN, BB_SUID_DROP))
35 35
diff --git a/networking/slattach.c b/networking/slattach.c
index 9267eb1d0..71b5bf427 100644
--- a/networking/slattach.c
+++ b/networking/slattach.c
@@ -13,12 +13,12 @@
13 * - The -F options allows disabling of RTS/CTS flow control. 13 * - The -F options allows disabling of RTS/CTS flow control.
14 */ 14 */
15//config:config SLATTACH 15//config:config SLATTACH
16//config: bool "slattach" 16//config: bool "slattach (6.1 kb)"
17//config: default y 17//config: default y
18//config: select PLATFORM_LINUX 18//config: select PLATFORM_LINUX
19//config: help 19//config: help
20//config: slattach is a small utility to attach network interfaces to serial 20//config: slattach is a small utility to attach network interfaces to serial
21//config: lines. 21//config: lines.
22 22
23//applet:IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP)) 23//applet:IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP))
24 24
diff --git a/networking/ssl_client.c b/networking/ssl_client.c
index cfeae1587..d479846d7 100644
--- a/networking/ssl_client.c
+++ b/networking/ssl_client.c
@@ -4,11 +4,11 @@
4 * Licensed under GPLv2, see file LICENSE in this source tree. 4 * Licensed under GPLv2, see file LICENSE in this source tree.
5 */ 5 */
6//config:config SSL_CLIENT 6//config:config SSL_CLIENT
7//config: bool "ssl_client" 7//config: bool "ssl_client (23 kb)"
8//config: default y 8//config: default y
9//config: select TLS 9//config: select TLS
10//config: help 10//config: help
11//config: This tool pipes data to/from a socket, TLS-encrypting it. 11//config: This tool pipes data to/from a socket, TLS-encrypting it.
12 12
13//applet:IF_SSL_CLIENT(APPLET(ssl_client, BB_DIR_USR_BIN, BB_SUID_DROP)) 13//applet:IF_SSL_CLIENT(APPLET(ssl_client, BB_DIR_USR_BIN, BB_SUID_DROP))
14 14
diff --git a/networking/tcpudp.c b/networking/tcpudp.c
index 3ebe7d5fc..270325164 100644
--- a/networking/tcpudp.c
+++ b/networking/tcpudp.c
@@ -29,18 +29,18 @@
29 * - don't know how to retrieve ORIGDST for udp. 29 * - don't know how to retrieve ORIGDST for udp.
30 */ 30 */
31//config:config TCPSVD 31//config:config TCPSVD
32//config: bool "tcpsvd" 32//config: bool "tcpsvd (13 kb)"
33//config: default y 33//config: default y
34//config: help 34//config: help
35//config: tcpsvd listens on a TCP port and runs a program for each new 35//config: tcpsvd listens on a TCP port and runs a program for each new
36//config: connection. 36//config: connection.
37//config: 37//config:
38//config:config UDPSVD 38//config:config UDPSVD
39//config: bool "udpsvd" 39//config: bool "udpsvd (13 kb)"
40//config: default y 40//config: default y
41//config: help 41//config: help
42//config: udpsvd listens on an UDP port and runs a program for each new 42//config: udpsvd listens on an UDP port and runs a program for each new
43//config: connection. 43//config: connection.
44 44
45//applet:IF_TCPSVD(APPLET_ODDNAME(tcpsvd, tcpudpsvd, BB_DIR_USR_BIN, BB_SUID_DROP, tcpsvd)) 45//applet:IF_TCPSVD(APPLET_ODDNAME(tcpsvd, tcpudpsvd, BB_DIR_USR_BIN, BB_SUID_DROP, tcpsvd))
46//applet:IF_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, BB_DIR_USR_BIN, BB_SUID_DROP, udpsvd)) 46//applet:IF_UDPSVD(APPLET_ODDNAME(udpsvd, tcpudpsvd, BB_DIR_USR_BIN, BB_SUID_DROP, udpsvd))
diff --git a/networking/telnet.c b/networking/telnet.c
index a70f74762..9f191f7ad 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -21,30 +21,30 @@
21 * 21 *
22 */ 22 */
23//config:config TELNET 23//config:config TELNET
24//config: bool "telnet" 24//config: bool "telnet (8.7 kb)"
25//config: default y 25//config: default y
26//config: help 26//config: help
27//config: Telnet is an interface to the TELNET protocol, but is also commonly 27//config: Telnet is an interface to the TELNET protocol, but is also commonly
28//config: used to test other simple protocols. 28//config: used to test other simple protocols.
29//config: 29//config:
30//config:config FEATURE_TELNET_TTYPE 30//config:config FEATURE_TELNET_TTYPE
31//config: bool "Pass TERM type to remote host" 31//config: bool "Pass TERM type to remote host"
32//config: default y 32//config: default y
33//config: depends on TELNET 33//config: depends on TELNET
34//config: help 34//config: help
35//config: Setting this option will forward the TERM environment variable to the 35//config: Setting this option will forward the TERM environment variable to the
36//config: remote host you are connecting to. This is useful to make sure that 36//config: remote host you are connecting to. This is useful to make sure that
37//config: things like ANSI colors and other control sequences behave. 37//config: things like ANSI colors and other control sequences behave.
38//config: 38//config:
39//config:config FEATURE_TELNET_AUTOLOGIN 39//config:config FEATURE_TELNET_AUTOLOGIN
40//config: bool "Pass USER type to remote host" 40//config: bool "Pass USER type to remote host"
41//config: default y 41//config: default y
42//config: depends on TELNET 42//config: depends on TELNET
43//config: help 43//config: help
44//config: Setting this option will forward the USER environment variable to the 44//config: Setting this option will forward the USER environment variable to the
45//config: remote host you are connecting to. This is useful when you need to 45//config: remote host you are connecting to. This is useful when you need to
46//config: log into a machine without telling the username (autologin). This 46//config: log into a machine without telling the username (autologin). This
47//config: option enables `-a' and `-l USER' arguments. 47//config: option enables `-a' and `-l USER' arguments.
48//config: 48//config:
49//config:config FEATURE_TELNET_WIDTH 49//config:config FEATURE_TELNET_WIDTH
50//config: bool "Enable window size autodetection" 50//config: bool "Enable window size autodetection"
diff --git a/networking/telnetd.c b/networking/telnetd.c
index f06e9583e..6e12de07a 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -21,73 +21,73 @@
21 * Set process group corrections, initial busybox port 21 * Set process group corrections, initial busybox port
22 */ 22 */
23//config:config TELNETD 23//config:config TELNETD
24//config: bool "telnetd" 24//config: bool "telnetd (12 kb)"
25//config: default y 25//config: default y
26//config: select FEATURE_SYSLOG 26//config: select FEATURE_SYSLOG
27//config: help 27//config: help
28//config: A daemon for the TELNET protocol, allowing you to log onto the host 28//config: A daemon for the TELNET protocol, allowing you to log onto the host
29//config: running the daemon. Please keep in mind that the TELNET protocol 29//config: running the daemon. Please keep in mind that the TELNET protocol
30//config: sends passwords in plain text. If you can't afford the space for an 30//config: sends passwords in plain text. If you can't afford the space for an
31//config: SSH daemon and you trust your network, you may say 'y' here. As a 31//config: SSH daemon and you trust your network, you may say 'y' here. As a
32//config: more secure alternative, you should seriously consider installing the 32//config: more secure alternative, you should seriously consider installing the
33//config: very small Dropbear SSH daemon instead: 33//config: very small Dropbear SSH daemon instead:
34//config: http://matt.ucc.asn.au/dropbear/dropbear.html 34//config: http://matt.ucc.asn.au/dropbear/dropbear.html
35//config: 35//config:
36//config: Note that for busybox telnetd to work you need several things: 36//config: Note that for busybox telnetd to work you need several things:
37//config: First of all, your kernel needs: 37//config: First of all, your kernel needs:
38//config: CONFIG_UNIX98_PTYS=y 38//config: CONFIG_UNIX98_PTYS=y
39//config: 39//config:
40//config: Next, you need a /dev/pts directory on your root filesystem: 40//config: Next, you need a /dev/pts directory on your root filesystem:
41//config: 41//config:
42//config: $ ls -ld /dev/pts 42//config: $ ls -ld /dev/pts
43//config: drwxr-xr-x 2 root root 0 Sep 23 13:21 /dev/pts/ 43//config: drwxr-xr-x 2 root root 0 Sep 23 13:21 /dev/pts/
44//config: 44//config:
45//config: Next you need the pseudo terminal master multiplexer /dev/ptmx: 45//config: Next you need the pseudo terminal master multiplexer /dev/ptmx:
46//config: 46//config:
47//config: $ ls -la /dev/ptmx 47//config: $ ls -la /dev/ptmx
48//config: crw-rw-rw- 1 root tty 5, 2 Sep 23 13:55 /dev/ptmx 48//config: crw-rw-rw- 1 root tty 5, 2 Sep 23 13:55 /dev/ptmx
49//config: 49//config:
50//config: Any /dev/ttyp[0-9]* files you may have can be removed. 50//config: Any /dev/ttyp[0-9]* files you may have can be removed.
51//config: Next, you need to mount the devpts filesystem on /dev/pts using: 51//config: Next, you need to mount the devpts filesystem on /dev/pts using:
52//config: 52//config:
53//config: mount -t devpts devpts /dev/pts 53//config: mount -t devpts devpts /dev/pts
54//config: 54//config:
55//config: You need to be sure that busybox has LOGIN and 55//config: You need to be sure that busybox has LOGIN and
56//config: FEATURE_SUID enabled. And finally, you should make 56//config: FEATURE_SUID enabled. And finally, you should make
57//config: certain that Busybox has been installed setuid root: 57//config: certain that Busybox has been installed setuid root:
58//config: 58//config:
59//config: chown root.root /bin/busybox 59//config: chown root.root /bin/busybox
60//config: chmod 4755 /bin/busybox 60//config: chmod 4755 /bin/busybox
61//config: 61//config:
62//config: with all that done, telnetd _should_ work.... 62//config: with all that done, telnetd _should_ work....
63//config: 63//config:
64//config:config FEATURE_TELNETD_STANDALONE 64//config:config FEATURE_TELNETD_STANDALONE
65//config: bool "Support standalone telnetd (not inetd only)" 65//config: bool "Support standalone telnetd (not inetd only)"
66//config: default y 66//config: default y
67//config: depends on TELNETD 67//config: depends on TELNETD
68//config: help 68//config: help
69//config: Selecting this will make telnetd able to run standalone. 69//config: Selecting this will make telnetd able to run standalone.
70//config: 70//config:
71//config:config FEATURE_TELNETD_INETD_WAIT 71//config:config FEATURE_TELNETD_INETD_WAIT
72//config: bool "Support -w SEC option (inetd wait mode)" 72//config: bool "Support -w SEC option (inetd wait mode)"
73//config: default y 73//config: default y
74//config: depends on FEATURE_TELNETD_STANDALONE 74//config: depends on FEATURE_TELNETD_STANDALONE
75//config: help 75//config: help
76//config: This option allows you to run telnetd in "inet wait" mode. 76//config: This option allows you to run telnetd in "inet wait" mode.
77//config: Example inetd.conf line (note "wait", not usual "nowait"): 77//config: Example inetd.conf line (note "wait", not usual "nowait"):
78//config: 78//config:
79//config: telnet stream tcp wait root /bin/telnetd telnetd -w10 79//config: telnet stream tcp wait root /bin/telnetd telnetd -w10
80//config: 80//config:
81//config: In this example, inetd passes _listening_ socket_ as fd 0 81//config: In this example, inetd passes _listening_ socket_ as fd 0
82//config: to telnetd when connection appears. 82//config: to telnetd when connection appears.
83//config: telnetd will wait for connections until all existing 83//config: telnetd will wait for connections until all existing
84//config: connections are closed, and no new connections 84//config: connections are closed, and no new connections
85//config: appear during 10 seconds. Then it exits, and inetd continues 85//config: appear during 10 seconds. Then it exits, and inetd continues
86//config: to listen for new connections. 86//config: to listen for new connections.
87//config: 87//config:
88//config: This option is rarely used. "tcp nowait" is much more usual 88//config: This option is rarely used. "tcp nowait" is much more usual
89//config: way of running tcp services, including telnetd. 89//config: way of running tcp services, including telnetd.
90//config: You most probably want to say N here. 90//config: You most probably want to say N here.
91 91
92//applet:IF_TELNETD(APPLET(telnetd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 92//applet:IF_TELNETD(APPLET(telnetd, BB_DIR_USR_SBIN, BB_SUID_DROP))
93 93
diff --git a/networking/tftp.c b/networking/tftp.c
index 189364f0c..947e65169 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -19,22 +19,22 @@
19 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 19 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
20 */ 20 */
21//config:config TFTP 21//config:config TFTP
22//config: bool "tftp" 22//config: bool "tftp (12 kb)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: This enables the Trivial File Transfer Protocol client program. TFTP 25//config: This enables the Trivial File Transfer Protocol client program. TFTP
26//config: is usually used for simple, small transfers such as a root image 26//config: is usually used for simple, small transfers such as a root image
27//config: for a network-enabled bootloader. 27//config: for a network-enabled bootloader.
28//config: 28//config:
29//config:config TFTPD 29//config:config TFTPD
30//config: bool "tftpd" 30//config: bool "tftpd (10 kb)"
31//config: default y 31//config: default y
32//config: help 32//config: help
33//config: This enables the Trivial File Transfer Protocol server program. 33//config: This enables the Trivial File Transfer Protocol server program.
34//config: It expects that stdin is a datagram socket and a packet 34//config: It expects that stdin is a datagram socket and a packet
35//config: is already pending on it. It will exit after one transfer. 35//config: is already pending on it. It will exit after one transfer.
36//config: In other words: it should be run from inetd in nowait mode, 36//config: In other words: it should be run from inetd in nowait mode,
37//config: or from udpsvd. Example: "udpsvd -E 0 69 tftpd DIR" 37//config: or from udpsvd. Example: "udpsvd -E 0 69 tftpd DIR"
38//config: 38//config:
39//config:comment "Common options for tftp/tftpd" 39//config:comment "Common options for tftp/tftpd"
40//config: depends on TFTP || TFTPD 40//config: depends on TFTP || TFTPD
@@ -44,29 +44,29 @@
44//config: default y 44//config: default y
45//config: depends on TFTP || TFTPD 45//config: depends on TFTP || TFTPD
46//config: help 46//config: help
47//config: Add support for the GET command within the TFTP client. This allows 47//config: Add support for the GET command within the TFTP client. This allows
48//config: a client to retrieve a file from a TFTP server. 48//config: a client to retrieve a file from a TFTP server.
49//config: Also enable upload support in tftpd, if tftpd is selected. 49//config: Also enable upload support in tftpd, if tftpd is selected.
50//config: 50//config:
51//config: Note: this option does _not_ make tftpd capable of download 51//config: Note: this option does _not_ make tftpd capable of download
52//config: (the usual operation people need from it)! 52//config: (the usual operation people need from it)!
53//config: 53//config:
54//config:config FEATURE_TFTP_PUT 54//config:config FEATURE_TFTP_PUT
55//config: bool "Enable 'tftp put' and/or tftpd download code" 55//config: bool "Enable 'tftp put' and/or tftpd download code"
56//config: default y 56//config: default y
57//config: depends on TFTP || TFTPD 57//config: depends on TFTP || TFTPD
58//config: help 58//config: help
59//config: Add support for the PUT command within the TFTP client. This allows 59//config: Add support for the PUT command within the TFTP client. This allows
60//config: a client to transfer a file to a TFTP server. 60//config: a client to transfer a file to a TFTP server.
61//config: Also enable download support in tftpd, if tftpd is selected. 61//config: Also enable download support in tftpd, if tftpd is selected.
62//config: 62//config:
63//config:config FEATURE_TFTP_BLOCKSIZE 63//config:config FEATURE_TFTP_BLOCKSIZE
64//config: bool "Enable 'blksize' and 'tsize' protocol options" 64//config: bool "Enable 'blksize' and 'tsize' protocol options"
65//config: default y 65//config: default y
66//config: depends on TFTP || TFTPD 66//config: depends on TFTP || TFTPD
67//config: help 67//config: help
68//config: Allow tftp to specify block size, and tftpd to understand 68//config: Allow tftp to specify block size, and tftpd to understand
69//config: "blksize" and "tsize" options. 69//config: "blksize" and "tsize" options.
70//config: 70//config:
71//config:config FEATURE_TFTP_PROGRESS_BAR 71//config:config FEATURE_TFTP_PROGRESS_BAR
72//config: bool "Enable progress bar" 72//config: bool "Enable progress bar"
@@ -78,8 +78,8 @@
78//config: default n 78//config: default n
79//config: depends on TFTP || TFTPD 79//config: depends on TFTP || TFTPD
80//config: help 80//config: help
81//config: Make tftp[d] print debugging messages on stderr. 81//config: Make tftp[d] print debugging messages on stderr.
82//config: This is useful if you are diagnosing a bug in tftp[d]. 82//config: This is useful if you are diagnosing a bug in tftp[d].
83 83
84//applet:#if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT 84//applet:#if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT
85//applet:IF_TFTP(APPLET(tftp, BB_DIR_USR_BIN, BB_SUID_DROP)) 85//applet:IF_TFTP(APPLET(tftp, BB_DIR_USR_BIN, BB_SUID_DROP))
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 6817861ef..a958a2c6c 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -210,26 +210,26 @@
210 * Tue Dec 20 03:50:13 PST 1988 210 * Tue Dec 20 03:50:13 PST 1988
211 */ 211 */
212//config:config TRACEROUTE 212//config:config TRACEROUTE
213//config: bool "traceroute" 213//config: bool "traceroute (11 kb)"
214//config: default y 214//config: default y
215//config: select PLATFORM_LINUX 215//config: select PLATFORM_LINUX
216//config: help 216//config: help
217//config: Utility to trace the route of IP packets. 217//config: Utility to trace the route of IP packets.
218//config: 218//config:
219//config:config TRACEROUTE6 219//config:config TRACEROUTE6
220//config: bool "traceroute6" 220//config: bool "traceroute6 (12 kb)"
221//config: default y 221//config: default y
222//config: depends on FEATURE_IPV6 222//config: depends on FEATURE_IPV6
223//config: help 223//config: help
224//config: Utility to trace the route of IPv6 packets. 224//config: Utility to trace the route of IPv6 packets.
225//config: 225//config:
226//config:config FEATURE_TRACEROUTE_VERBOSE 226//config:config FEATURE_TRACEROUTE_VERBOSE
227//config: bool "Enable verbose output" 227//config: bool "Enable verbose output"
228//config: default y 228//config: default y
229//config: depends on TRACEROUTE || TRACEROUTE6 229//config: depends on TRACEROUTE || TRACEROUTE6
230//config: help 230//config: help
231//config: Add some verbosity to traceroute. This includes among other things 231//config: Add some verbosity to traceroute. This includes among other things
232//config: hostnames and ICMP response types. 232//config: hostnames and ICMP response types.
233//config: 233//config:
234//config:config FEATURE_TRACEROUTE_USE_ICMP 234//config:config FEATURE_TRACEROUTE_USE_ICMP
235//config: bool "Enable -I option (use ICMP instead of UDP)" 235//config: bool "Enable -I option (use ICMP instead of UDP)"
diff --git a/networking/tunctl.c b/networking/tunctl.c
index fa904c2a9..0a26ff7fb 100644
--- a/networking/tunctl.c
+++ b/networking/tunctl.c
@@ -10,19 +10,19 @@
10 * Licensed under GPLv2, see file LICENSE in this source tree. 10 * Licensed under GPLv2, see file LICENSE in this source tree.
11 */ 11 */
12//config:config TUNCTL 12//config:config TUNCTL
13//config: bool "tunctl" 13//config: bool "tunctl (6.4 kb)"
14//config: default y 14//config: default y
15//config: select PLATFORM_LINUX 15//config: select PLATFORM_LINUX
16//config: help 16//config: help
17//config: tunctl creates or deletes tun devices. 17//config: tunctl creates or deletes tun devices.
18//config: 18//config:
19//config:config FEATURE_TUNCTL_UG 19//config:config FEATURE_TUNCTL_UG
20//config: bool "Support owner:group assignment" 20//config: bool "Support owner:group assignment"
21//config: default y 21//config: default y
22//config: depends on TUNCTL 22//config: depends on TUNCTL
23//config: help 23//config: help
24//config: Allow to specify owner and group of newly created interface. 24//config: Allow to specify owner and group of newly created interface.
25//config: 340 bytes of pure bloat. Say no here. 25//config: 340 bytes of pure bloat. Say no here.
26 26
27//applet:IF_TUNCTL(APPLET(tunctl, BB_DIR_SBIN, BB_SUID_DROP)) 27//applet:IF_TUNCTL(APPLET(tunctl, BB_DIR_SBIN, BB_SUID_DROP))
28 28
diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src
index 5c068441a..af2fe1835 100644
--- a/networking/udhcp/Config.src
+++ b/networking/udhcp/Config.src
@@ -10,105 +10,105 @@ config UDHCPD
10 default y 10 default y
11 select PLATFORM_LINUX 11 select PLATFORM_LINUX
12 help 12 help
13 udhcpd is a DHCP server geared primarily toward embedded systems, 13 udhcpd is a DHCP server geared primarily toward embedded systems,
14 while striving to be fully functional and RFC compliant. 14 while striving to be fully functional and RFC compliant.
15 15
16config FEATURE_UDHCPD_WRITE_LEASES_EARLY 16config FEATURE_UDHCPD_WRITE_LEASES_EARLY
17 bool "Rewrite the lease file at every new acknowledge" 17 bool "Rewrite the lease file at every new acknowledge"
18 default y 18 default y
19 depends on UDHCPD 19 depends on UDHCPD
20 help 20 help
21 If selected, udhcpd will write a new file with leases every 21 If selected, udhcpd will write a new file with leases every
22 time a new lease has been accepted, thus eliminating the need 22 time a new lease has been accepted, thus eliminating the need
23 to send SIGUSR1 for the initial writing or updating. Any timed 23 to send SIGUSR1 for the initial writing or updating. Any timed
24 rewriting remains undisturbed. 24 rewriting remains undisturbed.
25 25
26config FEATURE_UDHCPD_BASE_IP_ON_MAC 26config FEATURE_UDHCPD_BASE_IP_ON_MAC
27 bool "Select IP address based on client MAC" 27 bool "Select IP address based on client MAC"
28 default n 28 default n
29 depends on UDHCPD 29 depends on UDHCPD
30 help 30 help
31 If selected, udhcpd will base its selection of IP address to offer 31 If selected, udhcpd will base its selection of IP address to offer
32 on the client's hardware address. Otherwise udhcpd uses the next 32 on the client's hardware address. Otherwise udhcpd uses the next
33 consecutive free address. 33 consecutive free address.
34 34
35 This reduces the frequency of IP address changes for clients 35 This reduces the frequency of IP address changes for clients
36 which let their lease expire, and makes consecutive DHCPOFFERS 36 which let their lease expire, and makes consecutive DHCPOFFERS
37 for the same client to (almost always) contain the same 37 for the same client to (almost always) contain the same
38 IP address. 38 IP address.
39 39
40config DHCPD_LEASES_FILE 40config DHCPD_LEASES_FILE
41 string "Absolute path to lease file" 41 string "Absolute path to lease file"
42 default "/var/lib/misc/udhcpd.leases" 42 default "/var/lib/misc/udhcpd.leases"
43 depends on UDHCPD 43 depends on UDHCPD
44 help 44 help
45 udhcpd stores addresses in a lease file. This is the absolute path 45 udhcpd stores addresses in a lease file. This is the absolute path
46 of the file. Normally it is safe to leave it untouched. 46 of the file. Normally it is safe to leave it untouched.
47 47
48config DUMPLEASES 48config DUMPLEASES
49 bool "dumpleases" 49 bool "dumpleases (6.4 kb)"
50 default y 50 default y
51 help 51 help
52 dumpleases displays the leases written out by the udhcpd. 52 dumpleases displays the leases written out by the udhcpd.
53 Lease times are stored in the file by time remaining in lease, or 53 Lease times are stored in the file by time remaining in lease, or
54 by the absolute time that it expires in seconds from epoch. 54 by the absolute time that it expires in seconds from epoch.
55 55
56config DHCPRELAY 56config DHCPRELAY
57 bool "dhcprelay" 57 bool "dhcprelay (5.8 kb)"
58 default y 58 default y
59 help 59 help
60 dhcprelay listens for dhcp requests on one or more interfaces 60 dhcprelay listens for dhcp requests on one or more interfaces
61 and forwards these requests to a different interface or dhcp 61 and forwards these requests to a different interface or dhcp
62 server. 62 server.
63 63
64config UDHCPC 64config UDHCPC
65 bool "udhcpc (DHCP client)" 65 bool "udhcpc (DHCP client)"
66 default y 66 default y
67 select PLATFORM_LINUX 67 select PLATFORM_LINUX
68 help 68 help
69 udhcpc is a DHCP client geared primarily toward embedded systems, 69 udhcpc is a DHCP client geared primarily toward embedded systems,
70 while striving to be fully functional and RFC compliant. 70 while striving to be fully functional and RFC compliant.
71 71
72 The udhcp client negotiates a lease with the DHCP server and 72 The udhcp client negotiates a lease with the DHCP server and
73 runs a script when a lease is obtained or lost. 73 runs a script when a lease is obtained or lost.
74 74
75config FEATURE_UDHCPC_ARPING 75config FEATURE_UDHCPC_ARPING
76 bool "Verify that the offered address is free, using ARP ping" 76 bool "Verify that the offered address is free, using ARP ping"
77 default y 77 default y
78 depends on UDHCPC 78 depends on UDHCPC
79 help 79 help
80 If selected, udhcpc will send ARP probes and make sure 80 If selected, udhcpc will send ARP probes and make sure
81 the offered address is really not in use by anyone. The client 81 the offered address is really not in use by anyone. The client
82 will DHCPDECLINE the offer if the address is in use, 82 will DHCPDECLINE the offer if the address is in use,
83 and restart the discover process. 83 and restart the discover process.
84 84
85config FEATURE_UDHCPC_SANITIZEOPT 85config FEATURE_UDHCPC_SANITIZEOPT
86 bool "Do not pass malformed host and domain names" 86 bool "Do not pass malformed host and domain names"
87 default y 87 default y
88 depends on UDHCPC 88 depends on UDHCPC
89 help 89 help
90 If selected, udhcpc will check some options (such as option 12 - 90 If selected, udhcpc will check some options (such as option 12 -
91 hostname) and if they don't look like valid hostnames 91 hostname) and if they don't look like valid hostnames
92 (for example, if they start with dash or contain spaces), 92 (for example, if they start with dash or contain spaces),
93 they will be replaced with string "bad" when exporting 93 they will be replaced with string "bad" when exporting
94 to the environment. 94 to the environment.
95 95
96config UDHCPC_DEFAULT_SCRIPT 96config UDHCPC_DEFAULT_SCRIPT
97 string "Absolute path to config script" 97 string "Absolute path to config script"
98 default "/usr/share/udhcpc/default.script" 98 default "/usr/share/udhcpc/default.script"
99 depends on UDHCPC 99 depends on UDHCPC
100 help 100 help
101 This script is called after udhcpc receives an answer. See 101 This script is called after udhcpc receives an answer. See
102 examples/udhcp for a working example. Normally it is safe 102 examples/udhcp for a working example. Normally it is safe
103 to leave this untouched. 103 to leave this untouched.
104 104
105config FEATURE_UDHCP_PORT 105config FEATURE_UDHCP_PORT
106 bool "Enable '-P port' option for udhcpd and udhcpc" 106 bool "Enable '-P port' option for udhcpd and udhcpc"
107 default n 107 default n
108 depends on UDHCPD || UDHCPC 108 depends on UDHCPD || UDHCPC
109 help 109 help
110 At the cost of ~300 bytes, enables -P port option. 110 At the cost of ~300 bytes, enables -P port option.
111 This feature is typically not needed. 111 This feature is typically not needed.
112 112
113config UDHCP_DEBUG 113config UDHCP_DEBUG
114 int "Maximum verbosity level for udhcp applets (0..9)" 114 int "Maximum verbosity level for udhcp applets (0..9)"
@@ -116,28 +116,28 @@ config UDHCP_DEBUG
116 range 0 9 116 range 0 9
117 depends on UDHCPD || UDHCPC || DHCPRELAY 117 depends on UDHCPD || UDHCPC || DHCPRELAY
118 help 118 help
119 Verbosity can be increased with multiple -v options. 119 Verbosity can be increased with multiple -v options.
120 This option controls how high it can be cranked up. 120 This option controls how high it can be cranked up.
121 121
122 Bigger values result in bigger code. Levels above 1 122 Bigger values result in bigger code. Levels above 1
123 are very verbose and useful for debugging only. 123 are very verbose and useful for debugging only.
124 124
125config FEATURE_UDHCP_RFC3397 125config FEATURE_UDHCP_RFC3397
126 bool "Support RFC3397 domain search (experimental)" 126 bool "Support RFC3397 domain search (experimental)"
127 default y 127 default y
128 depends on UDHCPD || UDHCPC 128 depends on UDHCPD || UDHCPC
129 help 129 help
130 If selected, both client and server will support passing of domain 130 If selected, both client and server will support passing of domain
131 search lists via option 119, specified in RFC 3397, 131 search lists via option 119, specified in RFC 3397,
132 and SIP servers option 120, specified in RFC 3361. 132 and SIP servers option 120, specified in RFC 3361.
133 133
134config FEATURE_UDHCP_8021Q 134config FEATURE_UDHCP_8021Q
135 bool "Support 802.1Q VLAN parameters" 135 bool "Support 802.1Q VLAN parameters"
136 default y 136 default y
137 depends on UDHCPD || UDHCPC 137 depends on UDHCPD || UDHCPC
138 help 138 help
139 If selected, both client and server will support passing of VLAN 139 If selected, both client and server will support passing of VLAN
140 ID and priority via options 132 and 133 as per 802.1Q. 140 ID and priority via options 132 and 133 as per 802.1Q.
141 141
142config UDHCPC_SLACK_FOR_BUGGY_SERVERS 142config UDHCPC_SLACK_FOR_BUGGY_SERVERS
143 int "DHCP options slack buffer size" 143 int "DHCP options slack buffer size"
@@ -145,19 +145,19 @@ config UDHCPC_SLACK_FOR_BUGGY_SERVERS
145 range 0 924 145 range 0 924
146 depends on UDHCPD || UDHCPC 146 depends on UDHCPD || UDHCPC
147 help 147 help
148 Some buggy DHCP servers send DHCP offer packets with option 148 Some buggy DHCP servers send DHCP offer packets with option
149 field larger than we expect (which might also be considered a 149 field larger than we expect (which might also be considered a
150 buffer overflow attempt). These packets are normally discarded. 150 buffer overflow attempt). These packets are normally discarded.
151 If circumstances beyond your control force you to support such 151 If circumstances beyond your control force you to support such
152 servers, this may help. The upper limit (924) makes dhcpc accept 152 servers, this may help. The upper limit (924) makes dhcpc accept
153 even 1500 byte packets (maximum-sized ethernet packets). 153 even 1500 byte packets (maximum-sized ethernet packets).
154 154
155 This option does not make dhcp[cd] emit non-standard 155 This option does not make dhcp[cd] emit non-standard
156 sized packets. 156 sized packets.
157 157
158 Known buggy DHCP servers: 158 Known buggy DHCP servers:
159 3Com OfficeConnect Remote 812 ADSL Router: 159 3Com OfficeConnect Remote 812 ADSL Router:
160 seems to confuse maximum allowed UDP packet size with 160 seems to confuse maximum allowed UDP packet size with
161 maximum size of entire IP packet, and sends packets which are 161 maximum size of entire IP packet, and sends packets
162 28 bytes too large. 162 which are 28 bytes too large.
163 Seednet (ISP) VDSL: sends packets 2 bytes too large. 163 Seednet (ISP) VDSL: sends packets 2 bytes too large.
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index f6d3fb98b..5ebd05d01 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -14,31 +14,31 @@
14//config: default n # not yet ready 14//config: default n # not yet ready
15//config: depends on FEATURE_IPV6 15//config: depends on FEATURE_IPV6
16//config: help 16//config: help
17//config: udhcpc6 is a DHCPv6 client 17//config: udhcpc6 is a DHCPv6 client
18//config: 18//config:
19//config:config FEATURE_UDHCPC6_RFC3646 19//config:config FEATURE_UDHCPC6_RFC3646
20//config: bool "Support RFC 3646 (DNS server and search list)" 20//config: bool "Support RFC 3646 (DNS server and search list)"
21//config: default y 21//config: default y
22//config: depends on UDHCPC6 22//config: depends on UDHCPC6
23//config: help 23//config: help
24//config: List of DNS servers and domain search list can be requested with 24//config: List of DNS servers and domain search list can be requested with
25//config: "-O dns" and "-O search". If server gives these values, 25//config: "-O dns" and "-O search". If server gives these values,
26//config: they will be set in environment variables "dns" and "search". 26//config: they will be set in environment variables "dns" and "search".
27//config: 27//config:
28//config:config FEATURE_UDHCPC6_RFC4704 28//config:config FEATURE_UDHCPC6_RFC4704
29//config: bool "Support RFC 4704 (Client FQDN)" 29//config: bool "Support RFC 4704 (Client FQDN)"
30//config: default y 30//config: default y
31//config: depends on UDHCPC6 31//config: depends on UDHCPC6
32//config: help 32//config: help
33//config: You can request FQDN to be given by server using "-O fqdn". 33//config: You can request FQDN to be given by server using "-O fqdn".
34//config: 34//config:
35//config:config FEATURE_UDHCPC6_RFC4833 35//config:config FEATURE_UDHCPC6_RFC4833
36//config: bool "Support RFC 4833 (Timezones)" 36//config: bool "Support RFC 4833 (Timezones)"
37//config: default y 37//config: default y
38//config: depends on UDHCPC6 38//config: depends on UDHCPC6
39//config: help 39//config: help
40//config: You can request POSIX timezone with "-O tz" and timezone name 40//config: You can request POSIX timezone with "-O tz" and timezone name
41//config: with "-O timezone". 41//config: with "-O timezone".
42 42
43//applet:IF_UDHCPC6(APPLET(udhcpc6, BB_DIR_USR_BIN, BB_SUID_DROP)) 43//applet:IF_UDHCPC6(APPLET(udhcpc6, BB_DIR_USR_BIN, BB_SUID_DROP))
44 44
@@ -877,10 +877,10 @@ static int d6_raw_socket(int ifindex)
877 }; 877 };
878#endif 878#endif
879 879
880 log1("opening raw socket on ifindex %d", ifindex); //log2? 880 log2("opening raw socket on ifindex %d", ifindex);
881 881
882 fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6)); 882 fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6));
883 log1("got raw socket fd %d", fd); //log2? 883 log2("got raw socket fd %d", fd);
884 884
885 sock.sll_family = AF_PACKET; 885 sock.sll_family = AF_PACKET;
886 sock.sll_protocol = htons(ETH_P_IPV6); 886 sock.sll_protocol = htons(ETH_P_IPV6);
@@ -1238,7 +1238,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
1238 retval = 0; 1238 retval = 0;
1239 /* If we already timed out, fall through with retval = 0, else... */ 1239 /* If we already timed out, fall through with retval = 0, else... */
1240 if (tv > 0) { 1240 if (tv > 0) {
1241 log1("waiting on select %u seconds", tv); 1241 log1("waiting %u seconds", tv);
1242 timestamp_before_wait = (unsigned)monotonic_sec(); 1242 timestamp_before_wait = (unsigned)monotonic_sec();
1243 retval = poll(pfds, 2, tv < INT_MAX/1000 ? tv * 1000 : INT_MAX); 1243 retval = poll(pfds, 2, tv < INT_MAX/1000 ? tv * 1000 : INT_MAX);
1244 if (retval < 0) { 1244 if (retval < 0) {
@@ -1248,7 +1248,7 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
1248 continue; 1248 continue;
1249 } 1249 }
1250 /* Else: an error occured, panic! */ 1250 /* Else: an error occured, panic! */
1251 bb_perror_msg_and_die("select"); 1251 bb_perror_msg_and_die("poll");
1252 } 1252 }
1253 } 1253 }
1254 1254
diff --git a/networking/udhcp/d6_socket.c b/networking/udhcp/d6_socket.c
index 930e5e4f5..d00c217d6 100644
--- a/networking/udhcp/d6_socket.c
+++ b/networking/udhcp/d6_socket.c
@@ -28,8 +28,8 @@ int FAST_FUNC d6_read_interface(const char *interface, int *ifindex, struct in6_
28 if (ifa->ifa_addr->sa_family == AF_PACKET) { 28 if (ifa->ifa_addr->sa_family == AF_PACKET) {
29 struct sockaddr_ll *sll = (struct sockaddr_ll*)(ifa->ifa_addr); 29 struct sockaddr_ll *sll = (struct sockaddr_ll*)(ifa->ifa_addr);
30 memcpy(mac, sll->sll_addr, 6); 30 memcpy(mac, sll->sll_addr, 6);
31 log1("MAC %02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); 31 log2("MAC %02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
32 log1("adapter index %d", sll->sll_ifindex); 32 log2("ifindex %d", sll->sll_ifindex);
33 *ifindex = sll->sll_ifindex; 33 *ifindex = sll->sll_ifindex;
34 retval &= (0xf - (1<<0)); 34 retval &= (0xf - (1<<0));
35 } 35 }
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 1a66c610e..ccf04993d 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1001,14 +1001,14 @@ static int udhcp_raw_socket(int ifindex)
1001 int fd; 1001 int fd;
1002 struct sockaddr_ll sock; 1002 struct sockaddr_ll sock;
1003 1003
1004 log1("opening raw socket on ifindex %d", ifindex); //log2? 1004 log2("opening raw socket on ifindex %d", ifindex);
1005 1005
1006 fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); 1006 fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
1007 /* ^^^^^ 1007 /* ^^^^^
1008 * SOCK_DGRAM: remove link-layer headers on input (SOCK_RAW keeps them) 1008 * SOCK_DGRAM: remove link-layer headers on input (SOCK_RAW keeps them)
1009 * ETH_P_IP: want to receive only packets with IPv4 eth type 1009 * ETH_P_IP: want to receive only packets with IPv4 eth type
1010 */ 1010 */
1011 log1("got raw socket fd"); //log2? 1011 log2("got raw socket fd");
1012 1012
1013 sock.sll_family = AF_PACKET; 1013 sock.sll_family = AF_PACKET;
1014 sock.sll_protocol = htons(ETH_P_IP); 1014 sock.sll_protocol = htons(ETH_P_IP);
@@ -1455,7 +1455,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1455 retval = 0; 1455 retval = 0;
1456 /* If we already timed out, fall through with retval = 0, else... */ 1456 /* If we already timed out, fall through with retval = 0, else... */
1457 if (tv > 0) { 1457 if (tv > 0) {
1458 log1("waiting on select %u seconds", tv); 1458 log1("waiting %u seconds", tv);
1459 timestamp_before_wait = (unsigned)monotonic_sec(); 1459 timestamp_before_wait = (unsigned)monotonic_sec();
1460 retval = poll(pfds, 2, tv < INT_MAX/1000 ? tv * 1000 : INT_MAX); 1460 retval = poll(pfds, 2, tv < INT_MAX/1000 ? tv * 1000 : INT_MAX);
1461 if (retval < 0) { 1461 if (retval < 0) {
@@ -1465,7 +1465,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1465 continue; 1465 continue;
1466 } 1466 }
1467 /* Else: an error occurred, panic! */ 1467 /* Else: an error occurred, panic! */
1468 bb_perror_msg_and_die("select"); 1468 bb_perror_msg_and_die("poll");
1469 } 1469 }
1470 } 1470 }
1471 1471
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c
index 4fd79f423..ec6a1dc0f 100644
--- a/networking/udhcp/socket.c
+++ b/networking/udhcp/socket.c
@@ -56,7 +56,7 @@ int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t
56 close(fd); 56 close(fd);
57 return -1; 57 return -1;
58 } 58 }
59 log1("adapter index %d", ifr->ifr_ifindex); 59 log2("ifindex %d", ifr->ifr_ifindex);
60 *ifindex = ifr->ifr_ifindex; 60 *ifindex = ifr->ifr_ifindex;
61 } 61 }
62 62
diff --git a/networking/vconfig.c b/networking/vconfig.c
index 854eca0a1..e6e2872bf 100644
--- a/networking/vconfig.c
+++ b/networking/vconfig.c
@@ -10,11 +10,11 @@
10/* BB_AUDIT SUSv3 N/A */ 10/* BB_AUDIT SUSv3 N/A */
11 11
12//config:config VCONFIG 12//config:config VCONFIG
13//config: bool "vconfig" 13//config: bool "vconfig (2.5 kb)"
14//config: default y 14//config: default y
15//config: select PLATFORM_LINUX 15//config: select PLATFORM_LINUX
16//config: help 16//config: help
17//config: Creates, removes, and configures VLAN interfaces 17//config: Creates, removes, and configures VLAN interfaces
18 18
19//applet:IF_VCONFIG(APPLET(vconfig, BB_DIR_SBIN, BB_SUID_DROP)) 19//applet:IF_VCONFIG(APPLET(vconfig, BB_DIR_SBIN, BB_SUID_DROP))
20 20
diff --git a/networking/wget.c b/networking/wget.c
index b9d840328..ab9bc1836 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -10,11 +10,11 @@
10 */ 10 */
11 11
12//config:config WGET 12//config:config WGET
13//config: bool "wget" 13//config: bool "wget (35 kb)"
14//config: default y 14//config: default y
15//config: help 15//config: help
16//config: wget is a utility for non-interactive download of files from HTTP 16//config: wget is a utility for non-interactive download of files from HTTP
17//config: and FTP servers. 17//config: and FTP servers.
18//config: 18//config:
19//config:config FEATURE_WGET_LONG_OPTIONS 19//config:config FEATURE_WGET_LONG_OPTIONS
20//config: bool "Enable long options" 20//config: bool "Enable long options"
@@ -31,21 +31,21 @@
31//config: default y 31//config: default y
32//config: depends on WGET 32//config: depends on WGET
33//config: help 33//config: help
34//config: Support authenticated HTTP transfers. 34//config: Support authenticated HTTP transfers.
35//config: 35//config:
36//config:config FEATURE_WGET_TIMEOUT 36//config:config FEATURE_WGET_TIMEOUT
37//config: bool "Enable timeout option -T SEC" 37//config: bool "Enable timeout option -T SEC"
38//config: default y 38//config: default y
39//config: depends on WGET 39//config: depends on WGET
40//config: help 40//config: help
41//config: Supports network read and connect timeouts for wget, 41//config: Supports network read and connect timeouts for wget,
42//config: so that wget will give up and timeout, through the -T 42//config: so that wget will give up and timeout, through the -T
43//config: command line option. 43//config: command line option.
44//config: 44//config:
45//config: Currently only connect and network data read timeout are 45//config: Currently only connect and network data read timeout are
46//config: supported (i.e., timeout is not applied to the DNS query). When 46//config: supported (i.e., timeout is not applied to the DNS query). When
47//config: FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option 47//config: FEATURE_WGET_LONG_OPTIONS is also enabled, the --timeout option
48//config: will work in addition to -T. 48//config: will work in addition to -T.
49//config: 49//config:
50//config:config FEATURE_WGET_HTTPS 50//config:config FEATURE_WGET_HTTPS
51//config: bool "Support HTTPS using internal TLS code" 51//config: bool "Support HTTPS using internal TLS code"
@@ -53,68 +53,68 @@
53//config: depends on WGET 53//config: depends on WGET
54//config: select TLS 54//config: select TLS
55//config: help 55//config: help
56//config: wget will use internal TLS code to connect to https:// URLs. 56//config: wget will use internal TLS code to connect to https:// URLs.
57//config: Note: 57//config: Note:
58//config: On NOMMU machines, ssl_helper applet should be available 58//config: On NOMMU machines, ssl_helper applet should be available
59//config: in the $PATH for this to work. Make sure to select that applet. 59//config: in the $PATH for this to work. Make sure to select that applet.
60//config: 60//config:
61//config: Note: currently, TLS code only makes TLS I/O work, it 61//config: Note: currently, TLS code only makes TLS I/O work, it
62//config: does *not* check that the peer is who it claims to be, etc. 62//config: does *not* check that the peer is who it claims to be, etc.
63//config: IOW: it uses peer-supplied public keys to establish encryption 63//config: IOW: it uses peer-supplied public keys to establish encryption
64//config: and signing keys, then encrypts and signs outgoing data and 64//config: and signing keys, then encrypts and signs outgoing data and
65//config: decrypts incoming data. 65//config: decrypts incoming data.
66//config: It does not check signature hashes on the incoming data: 66//config: It does not check signature hashes on the incoming data:
67//config: this means that attackers manipulating TCP packets can 67//config: this means that attackers manipulating TCP packets can
68//config: send altered data and we unknowingly receive garbage. 68//config: send altered data and we unknowingly receive garbage.
69//config: (This check might be relatively easy to add). 69//config: (This check might be relatively easy to add).
70//config: It does not check public key's certificate: 70//config: It does not check public key's certificate:
71//config: this means that the peer may be an attacker impersonating 71//config: this means that the peer may be an attacker impersonating
72//config: the server we think we are talking to. 72//config: the server we think we are talking to.
73//config: 73//config:
74//config: If you think this is unacceptable, consider this. As more and more 74//config: If you think this is unacceptable, consider this. As more and more
75//config: servers switch to HTTPS-only operation, without such "crippled" 75//config: servers switch to HTTPS-only operation, without such "crippled"
76//config: TLS code it is *impossible* to simply download a kernel source 76//config: TLS code it is *impossible* to simply download a kernel source
77//config: from kernel.org. Which can in real world translate into 77//config: from kernel.org. Which can in real world translate into
78//config: "my small automatic tooling to build cross-compilers from sources 78//config: "my small automatic tooling to build cross-compilers from sources
79//config: no longer works, I need to additionally keep a local copy 79//config: no longer works, I need to additionally keep a local copy
80//config: of ~4 megabyte source tarball of a SSL library and ~2 megabyte 80//config: of ~4 megabyte source tarball of a SSL library and ~2 megabyte
81//config: source of wget, need to compile and built both before I can 81//config: source of wget, need to compile and built both before I can
82//config: download anything. All this despite the fact that the build 82//config: download anything. All this despite the fact that the build
83//config: is done in a QEMU sandbox on a machine with absolutely nothing 83//config: is done in a QEMU sandbox on a machine with absolutely nothing
84//config: worth stealing, so I don't care if someone would go to a lot 84//config: worth stealing, so I don't care if someone would go to a lot
85//config: of trouble to intercept my HTTPS download to send me an altered 85//config: of trouble to intercept my HTTPS download to send me an altered
86//config: kernel tarball". 86//config: kernel tarball".
87//config: 87//config:
88//config: If you still think this is unacceptable, send patches. 88//config: If you still think this is unacceptable, send patches.
89//config: 89//config:
90//config: If you still think this is unacceptable, do not want to send 90//config: If you still think this is unacceptable, do not want to send
91//config: patches, but do want to waste bandwidth expaining how wrong 91//config: patches, but do want to waste bandwidth expaining how wrong
92//config: it is, you will be ignored. 92//config: it is, you will be ignored.
93//config: 93//config:
94//config:config FEATURE_WGET_OPENSSL 94//config:config FEATURE_WGET_OPENSSL
95//config: bool "Try to connect to HTTPS using openssl" 95//config: bool "Try to connect to HTTPS using openssl"
96//config: default y 96//config: default y
97//config: depends on WGET 97//config: depends on WGET
98//config: help 98//config: help
99//config: Try to use openssl to handle HTTPS. 99//config: Try to use openssl to handle HTTPS.
100//config: 100//config:
101//config: OpenSSL has a simple SSL client for debug purposes. 101//config: OpenSSL has a simple SSL client for debug purposes.
102//config: If you select this option, wget will effectively run: 102//config: If you select this option, wget will effectively run:
103//config: "openssl s_client -quiet -connect hostname:443 103//config: "openssl s_client -quiet -connect hostname:443
104//config: -servername hostname 2>/dev/null" and pipe its data 104//config: -servername hostname 2>/dev/null" and pipe its data
105//config: through it. -servername is not used if hostname is numeric. 105//config: through it. -servername is not used if hostname is numeric.
106//config: Note inconvenient API: host resolution is done twice, 106//config: Note inconvenient API: host resolution is done twice,
107//config: and there is no guarantee openssl's idea of IPv6 address 107//config: and there is no guarantee openssl's idea of IPv6 address
108//config: format is the same as ours. 108//config: format is the same as ours.
109//config: Another problem is that s_client prints debug information 109//config: Another problem is that s_client prints debug information
110//config: to stderr, and it needs to be suppressed. This means 110//config: to stderr, and it needs to be suppressed. This means
111//config: all error messages get suppressed too. 111//config: all error messages get suppressed too.
112//config: openssl is also a big binary, often dynamically linked 112//config: openssl is also a big binary, often dynamically linked
113//config: against ~15 libraries. 113//config: against ~15 libraries.
114//config: 114//config:
115//config: If openssl can't be executed, internal TLS code will be used 115//config: If openssl can't be executed, internal TLS code will be used
116//config: (if you enabled it); if openssl can be executed but fails later, 116//config: (if you enabled it); if openssl can be executed but fails later,
117//config: wget can't detect this, and download will fail. 117//config: wget can't detect this, and download will fail.
118 118
119//applet:IF_WGET(APPLET(wget, BB_DIR_USR_BIN, BB_SUID_DROP)) 119//applet:IF_WGET(APPLET(wget, BB_DIR_USR_BIN, BB_SUID_DROP))
120 120
diff --git a/networking/whois.c b/networking/whois.c
index c9dfcf5ee..0cb7e5411 100644
--- a/networking/whois.c
+++ b/networking/whois.c
@@ -11,10 +11,10 @@
11 */ 11 */
12 12
13//config:config WHOIS 13//config:config WHOIS
14//config: bool "whois" 14//config: bool "whois (6.6 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: whois is a client for the whois directory service 17//config: whois is a client for the whois directory service
18 18
19//applet:IF_WHOIS(APPLET(whois, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_WHOIS(APPLET(whois, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/networking/zcip.c b/networking/zcip.c
index 9122bd681..94174a165 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -15,17 +15,17 @@
15 * certainly be used. Its naming is built over multicast DNS. 15 * certainly be used. Its naming is built over multicast DNS.
16 */ 16 */
17//config:config ZCIP 17//config:config ZCIP
18//config: bool "zcip" 18//config: bool "zcip (7.8 kb)"
19//config: default y 19//config: default y
20//config: select PLATFORM_LINUX 20//config: select PLATFORM_LINUX
21//config: select FEATURE_SYSLOG 21//config: select FEATURE_SYSLOG
22//config: help 22//config: help
23//config: ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927. 23//config: ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927.
24//config: It's a daemon that allocates and defends a dynamically assigned 24//config: It's a daemon that allocates and defends a dynamically assigned
25//config: address on the 169.254/16 network, requiring no system administrator. 25//config: address on the 169.254/16 network, requiring no system administrator.
26//config: 26//config:
27//config: See http://www.zeroconf.org for further details, and "zcip.script" 27//config: See http://www.zeroconf.org for further details, and "zcip.script"
28//config: in the busybox examples. 28//config: in the busybox examples.
29 29
30//applet:IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP)) 30//applet:IF_ZCIP(APPLET(zcip, BB_DIR_SBIN, BB_SUID_DROP))
31 31
@@ -183,6 +183,7 @@ static int run(char *argv[3], const char *param, uint32_t nip)
183 int status; 183 int status;
184 const char *addr = addr; /* for gcc */ 184 const char *addr = addr; /* for gcc */
185 const char *fmt = "%s %s %s" + 3; 185 const char *fmt = "%s %s %s" + 3;
186 char *env_ip = env_ip;
186 187
187 argv[2] = (char*)param; 188 argv[2] = (char*)param;
188 189
@@ -190,12 +191,16 @@ static int run(char *argv[3], const char *param, uint32_t nip)
190 191
191 if (nip != 0) { 192 if (nip != 0) {
192 addr = nip_to_a(nip); 193 addr = nip_to_a(nip);
193 xsetenv("ip", addr); 194 /* Must not use setenv() repeatedly, it leaks memory. Use putenv() */
195 env_ip = xasprintf("ip=%s", addr);
196 putenv(env_ip);
194 fmt -= 3; 197 fmt -= 3;
195 } 198 }
196 bb_error_msg(fmt, argv[2], argv[0], addr); 199 bb_error_msg(fmt, argv[2], argv[0], addr);
197
198 status = spawn_and_wait(argv + 1); 200 status = spawn_and_wait(argv + 1);
201 if (nip != 0)
202 bb_unsetenv_and_free(env_ip);
203
199 if (status < 0) { 204 if (status < 0) {
200 bb_perror_msg("%s %s %s" + 3, argv[2], argv[0]); 205 bb_perror_msg("%s %s %s" + 3, argv[2], argv[0]);
201 return -errno; 206 return -errno;
diff --git a/printutils/lpd.c b/printutils/lpd.c
index 882393436..3fdba5d2b 100644
--- a/printutils/lpd.c
+++ b/printutils/lpd.c
@@ -70,10 +70,10 @@
70 * mv -f ./"$DATAFILE" save/ 70 * mv -f ./"$DATAFILE" save/
71 */ 71 */
72//config:config LPD 72//config:config LPD
73//config: bool "lpd" 73//config: bool "lpd (5.3 kb)"
74//config: default y 74//config: default y
75//config: help 75//config: help
76//config: lpd is a print spooling daemon. 76//config: lpd is a print spooling daemon.
77 77
78//applet:IF_LPD(APPLET(lpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 78//applet:IF_LPD(APPLET(lpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
79 79
diff --git a/printutils/lpr.c b/printutils/lpr.c
index 8cc87d167..808ecb5dc 100644
--- a/printutils/lpr.c
+++ b/printutils/lpr.c
@@ -12,16 +12,16 @@
12 * See RFC 1179 for protocol description. 12 * See RFC 1179 for protocol description.
13 */ 13 */
14//config:config LPR 14//config:config LPR
15//config: bool "lpr" 15//config: bool "lpr (10 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: lpr sends files (or standard input) to a print spooling daemon. 18//config: lpr sends files (or standard input) to a print spooling daemon.
19//config: 19//config:
20//config:config LPQ 20//config:config LPQ
21//config: bool "lpq" 21//config: bool "lpq (10 kb)"
22//config: default y 22//config: default y
23//config: help 23//config: help
24//config: lpq is a print spool queue examination and manipulation program. 24//config: lpq is a print spool queue examination and manipulation program.
25 25
26// APPLET_ODDNAME:name main location suid_type help 26// APPLET_ODDNAME:name main location suid_type help
27//applet:IF_LPQ(APPLET_ODDNAME(lpq, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpq)) 27//applet:IF_LPQ(APPLET_ODDNAME(lpq, lpqr, BB_DIR_USR_BIN, BB_SUID_DROP, lpq))
diff --git a/procps/Config.src b/procps/Config.src
index 35fef2eda..515d79938 100644
--- a/procps/Config.src
+++ b/procps/Config.src
@@ -12,7 +12,7 @@ config FEATURE_SHOW_THREADS
12 default y 12 default y
13 depends on PS || TOP || PSTREE 13 depends on PS || TOP || PSTREE
14 help 14 help
15 Enables the ps -T option, showing of threads in pstree, 15 Enables the ps -T option, showing of threads in pstree,
16 and 'h' command in top. 16 and 'h' command in top.
17 17
18endmenu 18endmenu
diff --git a/procps/free.c b/procps/free.c
index f3a2c3c0c..618664e08 100644
--- a/procps/free.c
+++ b/procps/free.c
@@ -7,13 +7,13 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config FREE 9//config:config FREE
10//config: bool "free" 10//config: bool "free (2.4 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX #sysinfo() 12//config: select PLATFORM_LINUX #sysinfo()
13//config: help 13//config: help
14//config: free displays the total amount of free and used physical and swap 14//config: free displays the total amount of free and used physical and swap
15//config: memory in the system, as well as the buffers used by the kernel. 15//config: memory in the system, as well as the buffers used by the kernel.
16//config: The shared memory column should be ignored; it is obsolete. 16//config: The shared memory column should be ignored; it is obsolete.
17 17
18//applet:IF_FREE(APPLET(free, BB_DIR_USR_BIN, BB_SUID_DROP)) 18//applet:IF_FREE(APPLET(free, BB_DIR_USR_BIN, BB_SUID_DROP))
19 19
diff --git a/procps/fuser.c b/procps/fuser.c
index db28cca79..2585a4203 100644
--- a/procps/fuser.c
+++ b/procps/fuser.c
@@ -7,12 +7,12 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config FUSER 9//config:config FUSER
10//config: bool "fuser" 10//config: bool "fuser (7 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: fuser lists all PIDs (Process IDs) that currently have a given 13//config: fuser lists all PIDs (Process IDs) that currently have a given
14//config: file open. fuser can also list all PIDs that have a given network 14//config: file open. fuser can also list all PIDs that have a given network
15//config: (TCP or UDP) port open. 15//config: (TCP or UDP) port open.
16 16
17//applet:IF_FUSER(APPLET(fuser, BB_DIR_USR_BIN, BB_SUID_DROP)) 17//applet:IF_FUSER(APPLET(fuser, BB_DIR_USR_BIN, BB_SUID_DROP))
18 18
diff --git a/procps/iostat.c b/procps/iostat.c
index 2db343f69..6a39c324f 100644
--- a/procps/iostat.c
+++ b/procps/iostat.c
@@ -8,10 +8,10 @@
8 */ 8 */
9 9
10//config:config IOSTAT 10//config:config IOSTAT
11//config: bool "iostat" 11//config: bool "iostat (7.4 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Report CPU and I/O statistics 14//config: Report CPU and I/O statistics
15 15
16//applet:IF_IOSTAT(APPLET(iostat, BB_DIR_BIN, BB_SUID_DROP)) 16//applet:IF_IOSTAT(APPLET(iostat, BB_DIR_BIN, BB_SUID_DROP))
17 17
diff --git a/procps/kill.c b/procps/kill.c
index 975a3e8c5..5cff24475 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -8,29 +8,29 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config KILL 10//config:config KILL
11//config: bool "kill" 11//config: bool "kill (2.6 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: The command kill sends the specified signal to the specified 14//config: The command kill sends the specified signal to the specified
15//config: process or process group. If no signal is specified, the TERM 15//config: process or process group. If no signal is specified, the TERM
16//config: signal is sent. 16//config: signal is sent.
17//config: 17//config:
18//config:config KILLALL 18//config:config KILLALL
19//config: bool "killall" 19//config: bool "killall (5.6 kb)"
20//config: default y 20//config: default y
21//config: help 21//config: help
22//config: killall sends a signal to all processes running any of the 22//config: killall sends a signal to all processes running any of the
23//config: specified commands. If no signal name is specified, SIGTERM is 23//config: specified commands. If no signal name is specified, SIGTERM is
24//config: sent. 24//config: sent.
25//config: 25//config:
26//config:config KILLALL5 26//config:config KILLALL5
27//config: bool "killall5" 27//config: bool "killall5 (5.3 kb)"
28//config: default y 28//config: default y
29//config: help 29//config: help
30//config: The SystemV killall command. killall5 sends a signal 30//config: The SystemV killall command. killall5 sends a signal
31//config: to all processes except kernel threads and the processes 31//config: to all processes except kernel threads and the processes
32//config: in its own session, so it won't kill the shell that is running 32//config: in its own session, so it won't kill the shell that is running
33//config: the script it was called from. 33//config: the script it was called from.
34 34
35//applet:IF_KILL(APPLET(kill, BB_DIR_BIN, BB_SUID_DROP)) 35//applet:IF_KILL(APPLET(kill, BB_DIR_BIN, BB_SUID_DROP))
36// APPLET_ODDNAME:name main location suid_type help 36// APPLET_ODDNAME:name main location suid_type help
diff --git a/procps/lsof.c b/procps/lsof.c
index b0156a538..8d3a23cc8 100644
--- a/procps/lsof.c
+++ b/procps/lsof.c
@@ -8,11 +8,11 @@
8 */ 8 */
9 9
10//config:config LSOF 10//config:config LSOF
11//config: bool "lsof" 11//config: bool "lsof (3.6 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Show open files in the format of: 14//config: Show open files in the format of:
15//config: PID <TAB> /path/to/executable <TAB> /path/to/opened/file 15//config: PID <TAB> /path/to/executable <TAB> /path/to/opened/file
16 16
17//applet:IF_LSOF(APPLET(lsof, BB_DIR_USR_BIN, BB_SUID_DROP)) 17//applet:IF_LSOF(APPLET(lsof, BB_DIR_USR_BIN, BB_SUID_DROP))
18 18
diff --git a/procps/mpstat.c b/procps/mpstat.c
index 8a79fd8ba..05a3f3ff3 100644
--- a/procps/mpstat.c
+++ b/procps/mpstat.c
@@ -12,10 +12,10 @@
12//kbuild:lib-$(CONFIG_MPSTAT) += mpstat.o 12//kbuild:lib-$(CONFIG_MPSTAT) += mpstat.o
13 13
14//config:config MPSTAT 14//config:config MPSTAT
15//config: bool "mpstat" 15//config: bool "mpstat (10 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: Per-processor statistics 18//config: Per-processor statistics
19 19
20#include "libbb.h" 20#include "libbb.h"
21#include <sys/utsname.h> /* struct utsname */ 21#include <sys/utsname.h> /* struct utsname */
diff --git a/procps/nmeter.c b/procps/nmeter.c
index 05bf0a08c..9463f94dc 100644
--- a/procps/nmeter.c
+++ b/procps/nmeter.c
@@ -7,10 +7,10 @@
7 */ 7 */
8 8
9//config:config NMETER 9//config:config NMETER
10//config: bool "nmeter" 10//config: bool "nmeter (10 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: Prints selected system stats continuously, one line per update. 13//config: Prints selected system stats continuously, one line per update.
14 14
15//applet:IF_NMETER(APPLET(nmeter, BB_DIR_USR_BIN, BB_SUID_DROP)) 15//applet:IF_NMETER(APPLET(nmeter, BB_DIR_USR_BIN, BB_SUID_DROP))
16 16
diff --git a/procps/pgrep.c b/procps/pgrep.c
index 3d01c6cff..a3ca9e295 100644
--- a/procps/pgrep.c
+++ b/procps/pgrep.c
@@ -7,16 +7,16 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config PGREP 9//config:config PGREP
10//config: bool "pgrep" 10//config: bool "pgrep (6.8 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: Look for processes by name. 13//config: Look for processes by name.
14//config: 14//config:
15//config:config PKILL 15//config:config PKILL
16//config: bool "pkill" 16//config: bool "pkill (7.6 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: Send signals to processes by name. 19//config: Send signals to processes by name.
20 20
21//applet:IF_PGREP(APPLET(pgrep, BB_DIR_USR_BIN, BB_SUID_DROP)) 21//applet:IF_PGREP(APPLET(pgrep, BB_DIR_USR_BIN, BB_SUID_DROP))
22// APPLET_ODDNAME:name main location suid_type help 22// APPLET_ODDNAME:name main location suid_type help
@@ -155,15 +155,18 @@ int pgrep_main(int argc UNUSED_PARAM, char **argv)
155 proc = NULL; 155 proc = NULL;
156 while ((proc = procps_scan(proc, scan_mask)) != NULL) { 156 while ((proc = procps_scan(proc, scan_mask)) != NULL) {
157 char *cmd; 157 char *cmd;
158 int cmdlen; 158 int cmdlen, match;
159 159
160 if (proc->pid == pid) 160 if (proc->pid == pid)
161 continue; 161 continue;
162 162
163 if (ppid2match >= 0 && ppid2match != proc->ppid) 163 if (!OPT_INVERT) {
164 continue; 164 /* Quickly reject -sN -PN mismatches... unless -v */
165 if (sid2match >= 0 && sid2match != proc->sid) 165 if (ppid2match >= 0 && ppid2match != proc->ppid)
166 continue; 166 continue;
167 if (sid2match >= 0 && sid2match != proc->sid)
168 continue;
169 }
167 170
168 cmdlen = -1; 171 cmdlen = -1;
169 cmd = proc->argv0; 172 cmd = proc->argv0;
@@ -186,12 +189,36 @@ int pgrep_main(int argc UNUSED_PARAM, char **argv)
186 } 189 }
187 } 190 }
188 191
192 if (OPT_INVERT) {
193 /* "pgrep -v -P1 firefox" means "not (ppid=1 AND name=firefox)"
194 * or equivalently "ppid!=1 OR name!=firefox".
195 * Check the first condition and if true, skip matching.
196 */
197 if (ppid2match >= 0 && ppid2match != proc->ppid)
198 goto got_it;
199 if (sid2match >= 0 && sid2match != proc->sid)
200 goto got_it;
201 }
202
203 match = !argv[0]; /* if no PATTERN, then it's a match, else... */
204 if (!match) {
205 again:
206 match = (regexec(&re_buffer, cmd, 1, re_match, 0) == 0);
207 if (!match && cmd != proc->comm) {
208 /* if argv[] did not match, try comm */
209 cmdlen = -1;
210 cmd = proc->comm;
211 goto again;
212 }
213 if (match && OPT_ANCHOR) {
214 /* -x requires full string match */
215 match = (re_match[0].rm_so == 0 && cmd[re_match[0].rm_eo] == '\0');
216 }
217 }
218
189 /* NB: OPT_INVERT is always 0 or 1 */ 219 /* NB: OPT_INVERT is always 0 or 1 */
190 if (!argv[0] 220 if (match ^ OPT_INVERT) {
191 || (regexec(&re_buffer, cmd, 1, re_match, 0) == 0 /* match found */ 221 got_it:
192 && (!OPT_ANCHOR || (re_match[0].rm_so == 0 && re_match[0].rm_eo == (regoff_t)strlen(cmd)))
193 ) ^ OPT_INVERT
194 ) {
195 matched_pid = proc->pid; 222 matched_pid = proc->pid;
196 if (OPT_LAST) { 223 if (OPT_LAST) {
197 free(cmd_last); 224 free(cmd_last);
diff --git a/procps/pidof.c b/procps/pidof.c
index b64f0cbd6..41247a02c 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -7,27 +7,27 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config PIDOF 9//config:config PIDOF
10//config: bool "pidof" 10//config: bool "pidof (6.6 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: Pidof finds the process id's (pids) of the named programs. It prints 13//config: Pidof finds the process id's (pids) of the named programs. It prints
14//config: those id's on the standard output. 14//config: those id's on the standard output.
15//config: 15//config:
16//config:config FEATURE_PIDOF_SINGLE 16//config:config FEATURE_PIDOF_SINGLE
17//config: bool "Enable single shot (-s)" 17//config: bool "Enable single shot (-s)"
18//config: default y 18//config: default y
19//config: depends on PIDOF 19//config: depends on PIDOF
20//config: help 20//config: help
21//config: Support '-s' for returning only the first pid found. 21//config: Support '-s' for returning only the first pid found.
22//config: 22//config:
23//config:config FEATURE_PIDOF_OMIT 23//config:config FEATURE_PIDOF_OMIT
24//config: bool "Enable omitting pids (-o PID)" 24//config: bool "Enable omitting pids (-o PID)"
25//config: default y 25//config: default y
26//config: depends on PIDOF 26//config: depends on PIDOF
27//config: help 27//config: help
28//config: Support '-o PID' for omitting the given pid(s) in output. 28//config: Support '-o PID' for omitting the given pid(s) in output.
29//config: The special pid %PPID can be used to name the parent process 29//config: The special pid %PPID can be used to name the parent process
30//config: of the pidof, in other words the calling shell or shell script. 30//config: of the pidof, in other words the calling shell or shell script.
31 31
32//applet:IF_PIDOF(APPLET(pidof, BB_DIR_BIN, BB_SUID_DROP)) 32//applet:IF_PIDOF(APPLET(pidof, BB_DIR_BIN, BB_SUID_DROP))
33 33
diff --git a/procps/pmap.c b/procps/pmap.c
index aa221cfb8..c8f728897 100644
--- a/procps/pmap.c
+++ b/procps/pmap.c
@@ -9,10 +9,10 @@
9 */ 9 */
10 10
11//config:config PMAP 11//config:config PMAP
12//config: bool "pmap" 12//config: bool "pmap (6 kb)"
13//config: default y 13//config: default y
14//config: help 14//config: help
15//config: Display processes' memory mappings. 15//config: Display processes' memory mappings.
16 16
17//applet:IF_PMAP(APPLET(pmap, BB_DIR_USR_BIN, BB_SUID_DROP)) 17//applet:IF_PMAP(APPLET(pmap, BB_DIR_USR_BIN, BB_SUID_DROP))
18//kbuild:lib-$(CONFIG_PMAP) += pmap.o 18//kbuild:lib-$(CONFIG_PMAP) += pmap.o
diff --git a/procps/powertop.c b/procps/powertop.c
index 413806836..ebd659bdb 100644
--- a/procps/powertop.c
+++ b/procps/powertop.c
@@ -14,18 +14,18 @@
14//kbuild:lib-$(CONFIG_POWERTOP) += powertop.o 14//kbuild:lib-$(CONFIG_POWERTOP) += powertop.o
15 15
16//config:config POWERTOP 16//config:config POWERTOP
17//config: bool "powertop" 17//config: bool "powertop (9.1 kb)"
18//config: default y 18//config: default y
19//config: help 19//config: help
20//config: Analyze power consumption on Intel-based laptops 20//config: Analyze power consumption on Intel-based laptops
21//config: 21//config:
22//config:config FEATURE_POWERTOP_INTERACTIVE 22//config:config FEATURE_POWERTOP_INTERACTIVE
23//config: bool "Accept keyboard commands" 23//config: bool "Accept keyboard commands"
24//config: default y 24//config: default y
25//config: depends on POWERTOP 25//config: depends on POWERTOP
26//config: help 26//config: help
27//config: Without this, powertop will only refresh display every 10 seconds. 27//config: Without this, powertop will only refresh display every 10 seconds.
28//config: No keyboard commands will work, only ^C to terminate. 28//config: No keyboard commands will work, only ^C to terminate.
29 29
30// XXX This should be configurable 30// XXX This should be configurable
31#define ENABLE_FEATURE_POWERTOP_PROCIRQ 1 31#define ENABLE_FEATURE_POWERTOP_PROCIRQ 1
diff --git a/procps/ps.c b/procps/ps.c
index f7242f2d5..c1da921bd 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -9,27 +9,27 @@
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 */ 10 */
11//config:config PS 11//config:config PS
12//config: bool "ps" 12//config: bool "ps (11 kb)"
13//config: default y 13//config: default y
14//config: help 14//config: help
15//config: ps gives a snapshot of the current processes. 15//config: ps gives a snapshot of the current processes.
16//config: 16//config:
17//config:config FEATURE_PS_WIDE 17//config:config FEATURE_PS_WIDE
18//config: bool "Enable wide output option (-w)" 18//config: bool "Enable wide output option (-w)"
19//config: default y 19//config: default y
20//config: depends on PS && !DESKTOP 20//config: depends on PS && !DESKTOP
21//config: help 21//config: help
22//config: Support argument 'w' for wide output. 22//config: Support argument 'w' for wide output.
23//config: If given once, 132 chars are printed, and if given more 23//config: If given once, 132 chars are printed, and if given more
24//config: than once, the length is unlimited. 24//config: than once, the length is unlimited.
25//config: 25//config:
26//config:config FEATURE_PS_LONG 26//config:config FEATURE_PS_LONG
27//config: bool "Enable long output option (-l)" 27//config: bool "Enable long output option (-l)"
28//config: default y 28//config: default y
29//config: depends on PS && !DESKTOP 29//config: depends on PS && !DESKTOP
30//config: help 30//config: help
31//config: Support argument 'l' for long output. 31//config: Support argument 'l' for long output.
32//config: Adds fields PPID, RSS, START, TIME & TTY 32//config: Adds fields PPID, RSS, START, TIME & TTY
33//config: 33//config:
34//config:config FEATURE_PS_TIME 34//config:config FEATURE_PS_TIME
35//config: bool "Support -o time and -o etime output specifiers" 35//config: bool "Support -o time and -o etime output specifiers"
@@ -42,8 +42,8 @@
42//config: default n 42//config: default n
43//config: depends on FEATURE_PS_TIME 43//config: depends on FEATURE_PS_TIME
44//config: help 44//config: help
45//config: Include support for measuring HZ on old kernels and non-ELF systems 45//config: Include support for measuring HZ on old kernels and non-ELF systems
46//config: (if you are on Linux 2.4.0+ and use ELF, you don't need this) 46//config: (if you are on Linux 2.4.0+ and use ELF, you don't need this)
47//config: 47//config:
48//config:config FEATURE_PS_ADDITIONAL_COLUMNS 48//config:config FEATURE_PS_ADDITIONAL_COLUMNS
49//config: bool "Support -o rgroup, -o ruser, -o nice specifiers" 49//config: bool "Support -o rgroup, -o ruser, -o nice specifiers"
diff --git a/procps/pstree.c b/procps/pstree.c
index bc9f0c927..212cda23c 100644
--- a/procps/pstree.c
+++ b/procps/pstree.c
@@ -11,10 +11,10 @@
11 */ 11 */
12 12
13//config:config PSTREE 13//config:config PSTREE
14//config: bool "pstree" 14//config: bool "pstree (9.4 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: Display a tree of processes. 17//config: Display a tree of processes.
18 18
19//applet:IF_PSTREE(APPLET(pstree, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_PSTREE(APPLET(pstree, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/procps/pwdx.c b/procps/pwdx.c
index 4e34149ed..dac238950 100644
--- a/procps/pwdx.c
+++ b/procps/pwdx.c
@@ -9,10 +9,10 @@
9 */ 9 */
10 10
11//config:config PWDX 11//config:config PWDX
12//config: bool "pwdx" 12//config: bool "pwdx (3.5 kb)"
13//config: default y 13//config: default y
14//config: help 14//config: help
15//config: Report current working directory of a process 15//config: Report current working directory of a process
16 16
17//applet:IF_PWDX(APPLET(pwdx, BB_DIR_USR_BIN, BB_SUID_DROP)) 17//applet:IF_PWDX(APPLET(pwdx, BB_DIR_USR_BIN, BB_SUID_DROP))
18 18
diff --git a/procps/smemcap.c b/procps/smemcap.c
index b2b32198f..17aeccd53 100644
--- a/procps/smemcap.c
+++ b/procps/smemcap.c
@@ -13,11 +13,11 @@
13//kbuild:lib-$(CONFIG_SMEMCAP) += smemcap.o 13//kbuild:lib-$(CONFIG_SMEMCAP) += smemcap.o
14 14
15//config:config SMEMCAP 15//config:config SMEMCAP
16//config: bool "smemcap" 16//config: bool "smemcap (2.5 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: smemcap is a tool for capturing process data for smem, 19//config: smemcap is a tool for capturing process data for smem,
20//config: a memory usage statistic tool. 20//config: a memory usage statistic tool.
21 21
22#include "libbb.h" 22#include "libbb.h"
23#define BB_ARCHIVE_PUBLIC 23#define BB_ARCHIVE_PUBLIC
diff --git a/procps/sysctl.c b/procps/sysctl.c
index 93d7c3418..b17f5e896 100644
--- a/procps/sysctl.c
+++ b/procps/sysctl.c
@@ -11,10 +11,10 @@
11 * v1.01.1 - busybox applet aware by <solar@gentoo.org> 11 * v1.01.1 - busybox applet aware by <solar@gentoo.org>
12 */ 12 */
13//config:config BB_SYSCTL 13//config:config BB_SYSCTL
14//config: bool "sysctl" 14//config: bool "sysctl (6.9 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: Configure kernel parameters at runtime. 17//config: Configure kernel parameters at runtime.
18 18
19//applet:IF_BB_SYSCTL(APPLET(sysctl, BB_DIR_SBIN, BB_SUID_DROP)) 19//applet:IF_BB_SYSCTL(APPLET(sysctl, BB_DIR_SBIN, BB_SUID_DROP))
20 20
diff --git a/procps/top.c b/procps/top.c
index ff2fddeea..015d1ab74 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -50,66 +50,66 @@
50 * chroot . ./top -bn1 >top1.out 50 * chroot . ./top -bn1 >top1.out
51 */ 51 */
52//config:config TOP 52//config:config TOP
53//config: bool "top" 53//config: bool "top (17 kb)"
54//config: default y 54//config: default y
55//config: help 55//config: help
56//config: The top program provides a dynamic real-time view of a running 56//config: The top program provides a dynamic real-time view of a running
57//config: system. 57//config: system.
58//config: 58//config:
59//config:config FEATURE_TOP_INTERACTIVE 59//config:config FEATURE_TOP_INTERACTIVE
60//config: bool "Accept keyboard commands" 60//config: bool "Accept keyboard commands"
61//config: default y 61//config: default y
62//config: depends on TOP 62//config: depends on TOP
63//config: help 63//config: help
64//config: Without this, top will only refresh display every 5 seconds. 64//config: Without this, top will only refresh display every 5 seconds.
65//config: No keyboard commands will work, only ^C to terminate. 65//config: No keyboard commands will work, only ^C to terminate.
66//config: 66//config:
67//config:config FEATURE_TOP_CPU_USAGE_PERCENTAGE 67//config:config FEATURE_TOP_CPU_USAGE_PERCENTAGE
68//config: bool "Show CPU per-process usage percentage" 68//config: bool "Show CPU per-process usage percentage"
69//config: default y 69//config: default y
70//config: depends on TOP 70//config: depends on TOP
71//config: help 71//config: help
72//config: Make top display CPU usage for each process. 72//config: Make top display CPU usage for each process.
73//config: This adds about 2k. 73//config: This adds about 2k.
74//config: 74//config:
75//config:config FEATURE_TOP_CPU_GLOBAL_PERCENTS 75//config:config FEATURE_TOP_CPU_GLOBAL_PERCENTS
76//config: bool "Show CPU global usage percentage" 76//config: bool "Show CPU global usage percentage"
77//config: default y 77//config: default y
78//config: depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE 78//config: depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE
79//config: help 79//config: help
80//config: Makes top display "CPU: NN% usr NN% sys..." line. 80//config: Makes top display "CPU: NN% usr NN% sys..." line.
81//config: This adds about 0.5k. 81//config: This adds about 0.5k.
82//config: 82//config:
83//config:config FEATURE_TOP_SMP_CPU 83//config:config FEATURE_TOP_SMP_CPU
84//config: bool "SMP CPU usage display ('c' key)" 84//config: bool "SMP CPU usage display ('c' key)"
85//config: default y 85//config: default y
86//config: depends on FEATURE_TOP_CPU_GLOBAL_PERCENTS 86//config: depends on FEATURE_TOP_CPU_GLOBAL_PERCENTS
87//config: help 87//config: help
88//config: Allow 'c' key to switch between individual/cumulative CPU stats 88//config: Allow 'c' key to switch between individual/cumulative CPU stats
89//config: This adds about 0.5k. 89//config: This adds about 0.5k.
90//config: 90//config:
91//config:config FEATURE_TOP_DECIMALS 91//config:config FEATURE_TOP_DECIMALS
92//config: bool "Show 1/10th of a percent in CPU/mem statistics" 92//config: bool "Show 1/10th of a percent in CPU/mem statistics"
93//config: default y 93//config: default y
94//config: depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE 94//config: depends on FEATURE_TOP_CPU_USAGE_PERCENTAGE
95//config: help 95//config: help
96//config: Show 1/10th of a percent in CPU/mem statistics. 96//config: Show 1/10th of a percent in CPU/mem statistics.
97//config: This adds about 0.3k. 97//config: This adds about 0.3k.
98//config: 98//config:
99//config:config FEATURE_TOP_SMP_PROCESS 99//config:config FEATURE_TOP_SMP_PROCESS
100//config: bool "Show CPU process runs on ('j' field)" 100//config: bool "Show CPU process runs on ('j' field)"
101//config: default y 101//config: default y
102//config: depends on TOP 102//config: depends on TOP
103//config: help 103//config: help
104//config: Show CPU where process was last found running on. 104//config: Show CPU where process was last found running on.
105//config: This is the 'j' field. 105//config: This is the 'j' field.
106//config: 106//config:
107//config:config FEATURE_TOPMEM 107//config:config FEATURE_TOPMEM
108//config: bool "Topmem command ('s' key)" 108//config: bool "Topmem command ('s' key)"
109//config: default y 109//config: default y
110//config: depends on TOP 110//config: depends on TOP
111//config: help 111//config: help
112//config: Enable 's' in top (gives lots of memory info). 112//config: Enable 's' in top (gives lots of memory info).
113 113
114//applet:IF_TOP(APPLET(top, BB_DIR_USR_BIN, BB_SUID_DROP)) 114//applet:IF_TOP(APPLET(top, BB_DIR_USR_BIN, BB_SUID_DROP))
115 115
diff --git a/procps/uptime.c b/procps/uptime.c
index 8e8956c0f..24b2b39df 100644
--- a/procps/uptime.c
+++ b/procps/uptime.c
@@ -12,20 +12,20 @@
12 * Added FEATURE_UPTIME_UTMP_SUPPORT flag. 12 * Added FEATURE_UPTIME_UTMP_SUPPORT flag.
13 */ 13 */
14//config:config UPTIME 14//config:config UPTIME
15//config: bool "uptime" 15//config: bool "uptime (632 bytes)"
16//config: default y 16//config: default y
17//config: select PLATFORM_LINUX #sysinfo() 17//config: select PLATFORM_LINUX #sysinfo()
18//config: help 18//config: help
19//config: uptime gives a one line display of the current time, how long 19//config: uptime gives a one line display of the current time, how long
20//config: the system has been running, how many users are currently logged 20//config: the system has been running, how many users are currently logged
21//config: on, and the system load averages for the past 1, 5, and 15 minutes. 21//config: on, and the system load averages for the past 1, 5, and 15 minutes.
22//config: 22//config:
23//config:config FEATURE_UPTIME_UTMP_SUPPORT 23//config:config FEATURE_UPTIME_UTMP_SUPPORT
24//config: bool "Show the number of users" 24//config: bool "Show the number of users"
25//config: default y 25//config: default y
26//config: depends on UPTIME && FEATURE_UTMP 26//config: depends on UPTIME && FEATURE_UTMP
27//config: help 27//config: help
28//config: Display the number of users currently logged on. 28//config: Display the number of users currently logged on.
29 29
30//applet:IF_UPTIME(APPLET(uptime, BB_DIR_USR_BIN, BB_SUID_DROP)) 30//applet:IF_UPTIME(APPLET(uptime, BB_DIR_USR_BIN, BB_SUID_DROP))
31 31
diff --git a/procps/watch.c b/procps/watch.c
index bb34124c0..2bb7cca90 100644
--- a/procps/watch.c
+++ b/procps/watch.c
@@ -12,11 +12,11 @@
12/* BB_AUDIT GNU defects -- only option -n is supported. */ 12/* BB_AUDIT GNU defects -- only option -n is supported. */
13 13
14//config:config WATCH 14//config:config WATCH
15//config: bool "watch" 15//config: bool "watch (4.1 kb)"
16//config: default y 16//config: default y
17//config: help 17//config: help
18//config: watch is used to execute a program periodically, showing 18//config: watch is used to execute a program periodically, showing
19//config: output to the screen. 19//config: output to the screen.
20 20
21//applet:IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP)) 21//applet:IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP))
22 22
diff --git a/runit/chpst.c b/runit/chpst.c
index ee3a33153..3a2f9e616 100644
--- a/runit/chpst.c
+++ b/runit/chpst.c
@@ -28,36 +28,36 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28/* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ 28/* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */
29 29
30//config:config CHPST 30//config:config CHPST
31//config: bool "chpst" 31//config: bool "chpst (8.7 kb)"
32//config: default y 32//config: default y
33//config: help 33//config: help
34//config: chpst changes the process state according to the given options, and 34//config: chpst changes the process state according to the given options, and
35//config: execs specified program. 35//config: execs specified program.
36//config: 36//config:
37//config:config SETUIDGID 37//config:config SETUIDGID
38//config: bool "setuidgid" 38//config: bool "setuidgid (4.2 kb)"
39//config: default y 39//config: default y
40//config: help 40//config: help
41//config: Sets soft resource limits as specified by options 41//config: Sets soft resource limits as specified by options
42//config: 42//config:
43//config:config ENVUIDGID 43//config:config ENVUIDGID
44//config: bool "envuidgid" 44//config: bool "envuidgid (3.6 kb)"
45//config: default y 45//config: default y
46//config: help 46//config: help
47//config: Sets $UID to account's uid and $GID to account's gid 47//config: Sets $UID to account's uid and $GID to account's gid
48//config: 48//config:
49//config:config ENVDIR 49//config:config ENVDIR
50//config: bool "envdir" 50//config: bool "envdir (2.5 kb)"
51//config: default y 51//config: default y
52//config: help 52//config: help
53//config: Sets various environment variables as specified by files 53//config: Sets various environment variables as specified by files
54//config: in the given directory 54//config: in the given directory
55//config: 55//config:
56//config:config SOFTLIMIT 56//config:config SOFTLIMIT
57//config: bool "softlimit" 57//config: bool "softlimit (4.3 kb)"
58//config: default y 58//config: default y
59//config: help 59//config: help
60//config: Sets soft resource limits as specified by options 60//config: Sets soft resource limits as specified by options
61 61
62//applet:IF_CHPST(APPLET(chpst, BB_DIR_USR_BIN, BB_SUID_DROP)) 62//applet:IF_CHPST(APPLET(chpst, BB_DIR_USR_BIN, BB_SUID_DROP))
63// APPLET_ODDNAME:name main location suid_type help 63// APPLET_ODDNAME:name main location suid_type help
diff --git a/runit/runsv.c b/runit/runsv.c
index 939653d12..ad7d82cb8 100644
--- a/runit/runsv.c
+++ b/runit/runsv.c
@@ -28,11 +28,11 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28/* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ 28/* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */
29 29
30//config:config RUNSV 30//config:config RUNSV
31//config: bool "runsv" 31//config: bool "runsv (7.2 kb)"
32//config: default y 32//config: default y
33//config: help 33//config: help
34//config: runsv starts and monitors a service and optionally an appendant log 34//config: runsv starts and monitors a service and optionally an appendant log
35//config: service. 35//config: service.
36 36
37//applet:IF_RUNSV(APPLET(runsv, BB_DIR_USR_BIN, BB_SUID_DROP)) 37//applet:IF_RUNSV(APPLET(runsv, BB_DIR_USR_BIN, BB_SUID_DROP))
38 38
diff --git a/runit/runsvdir.c b/runit/runsvdir.c
index 84916e929..b4f5c303b 100644
--- a/runit/runsvdir.c
+++ b/runit/runsvdir.c
@@ -28,21 +28,21 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28/* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ 28/* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */
29 29
30//config:config RUNSVDIR 30//config:config RUNSVDIR
31//config: bool "runsvdir" 31//config: bool "runsvdir (6 kb)"
32//config: default y 32//config: default y
33//config: help 33//config: help
34//config: runsvdir starts a runsv process for each subdirectory, or symlink to 34//config: runsvdir starts a runsv process for each subdirectory, or symlink to
35//config: a directory, in the services directory dir, up to a limit of 1000 35//config: a directory, in the services directory dir, up to a limit of 1000
36//config: subdirectories, and restarts a runsv process if it terminates. 36//config: subdirectories, and restarts a runsv process if it terminates.
37//config: 37//config:
38//config:config FEATURE_RUNSVDIR_LOG 38//config:config FEATURE_RUNSVDIR_LOG
39//config: bool "Enable scrolling argument log" 39//config: bool "Enable scrolling argument log"
40//config: depends on RUNSVDIR 40//config: depends on RUNSVDIR
41//config: default n 41//config: default n
42//config: help 42//config: help
43//config: Enable feature where second parameter of runsvdir holds last error 43//config: Enable feature where second parameter of runsvdir holds last error
44//config: message (viewable via top/ps). Otherwise (feature is off 44//config: message (viewable via top/ps). Otherwise (feature is off
45//config: or no parameter), error messages go to stderr only. 45//config: or no parameter), error messages go to stderr only.
46 46
47//applet:IF_RUNSVDIR(APPLET(runsvdir, BB_DIR_USR_BIN, BB_SUID_DROP)) 47//applet:IF_RUNSVDIR(APPLET(runsvdir, BB_DIR_USR_BIN, BB_SUID_DROP))
48 48
diff --git a/runit/sv.c b/runit/sv.c
index faa31d4fa..2d5b466bf 100644
--- a/runit/sv.c
+++ b/runit/sv.c
@@ -154,26 +154,26 @@ Exit Codes
154/* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */ 154/* Busyboxed by Denys Vlasenko <vda.linux@googlemail.com> */
155 155
156//config:config SV 156//config:config SV
157//config: bool "sv" 157//config: bool "sv (7.8 kb)"
158//config: default y 158//config: default y
159//config: help 159//config: help
160//config: sv reports the current status and controls the state of services 160//config: sv reports the current status and controls the state of services
161//config: monitored by the runsv supervisor. 161//config: monitored by the runsv supervisor.
162//config: 162//config:
163//config:config SV_DEFAULT_SERVICE_DIR 163//config:config SV_DEFAULT_SERVICE_DIR
164//config: string "Default directory for services" 164//config: string "Default directory for services"
165//config: default "/var/service" 165//config: default "/var/service"
166//config: depends on SV 166//config: depends on SV
167//config: help 167//config: help
168//config: Default directory for services. 168//config: Default directory for services.
169//config: Defaults to "/var/service" 169//config: Defaults to "/var/service"
170//config: 170//config:
171//config:config SVC 171//config:config SVC
172//config: bool "svc" 172//config: bool "svc (7.8 kb)"
173//config: default y 173//config: default y
174//config: help 174//config: help
175//config: svc controls the state of services monitored by the runsv supervisor. 175//config: svc controls the state of services monitored by the runsv supervisor.
176//config: It is comaptible with daemontools command with the same name. 176//config: It is comaptible with daemontools command with the same name.
177 177
178//applet:IF_SV(APPLET(sv, BB_DIR_USR_BIN, BB_SUID_DROP)) 178//applet:IF_SV(APPLET(sv, BB_DIR_USR_BIN, BB_SUID_DROP))
179//applet:IF_SVC(APPLET(svc, BB_DIR_USR_BIN, BB_SUID_DROP)) 179//applet:IF_SVC(APPLET(svc, BB_DIR_USR_BIN, BB_SUID_DROP))
diff --git a/runit/svlogd.c b/runit/svlogd.c
index 795bf48bb..8dbf67106 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -125,12 +125,12 @@ log message, you can use a pattern like this instead
125*/ 125*/
126 126
127//config:config SVLOGD 127//config:config SVLOGD
128//config: bool "svlogd" 128//config: bool "svlogd (15 kb)"
129//config: default y 129//config: default y
130//config: help 130//config: help
131//config: svlogd continuously reads log data from its standard input, optionally 131//config: svlogd continuously reads log data from its standard input, optionally
132//config: filters log messages, and writes the data to one or more automatically 132//config: filters log messages, and writes the data to one or more automatically
133//config: rotated logs. 133//config: rotated logs.
134 134
135//applet:IF_SVLOGD(APPLET(svlogd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 135//applet:IF_SVLOGD(APPLET(svlogd, BB_DIR_USR_SBIN, BB_SUID_DROP))
136 136
diff --git a/scripts/test_setenv_leak.c b/scripts/test_setenv_leak.c
new file mode 100644
index 000000000..e51722ca7
--- /dev/null
+++ b/scripts/test_setenv_leak.c
@@ -0,0 +1,18 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <unistd.h>
4int main(int argc, char **argv)
5{
6 char buf[256];
7
8 int i = argv[1] ? atoi(argv[1]) : 999999;
9 while (--i > 0) {
10 sprintf(buf, "%d", i);
11 setenv("VAR", buf, 1);
12 }
13 printf("Check size of [heap] mapping:\n");
14 freopen("/proc/self/maps", "r", stdin);
15 while (fgets(buf, sizeof(buf), stdin))
16 fputs(buf, stdout);
17 return 0;
18}
diff --git a/selinux/chcon.c b/selinux/chcon.c
index ba9b08638..ae87fb554 100644
--- a/selinux/chcon.c
+++ b/selinux/chcon.c
@@ -8,11 +8,11 @@
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10//config:config CHCON 10//config:config CHCON
11//config: bool "chcon" 11//config: bool "chcon (8.9 kb)"
12//config: default n 12//config: default n
13//config: depends on SELINUX 13//config: depends on SELINUX
14//config: help 14//config: help
15//config: Enable support to change the security context of file. 15//config: Enable support to change the security context of file.
16//config: 16//config:
17//config:config FEATURE_CHCON_LONG_OPTIONS 17//config:config FEATURE_CHCON_LONG_OPTIONS
18//config: bool "Enable long options" 18//config: bool "Enable long options"
diff --git a/selinux/getenforce.c b/selinux/getenforce.c
index 37477652b..0286dd0be 100644
--- a/selinux/getenforce.c
+++ b/selinux/getenforce.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config GETENFORCE 9//config:config GETENFORCE
10//config: bool "getenforce" 10//config: bool "getenforce (1.7 kb)"
11//config: default n 11//config: default n
12//config: depends on SELINUX 12//config: depends on SELINUX
13//config: help 13//config: help
14//config: Enable support to get the current mode of SELinux. 14//config: Enable support to get the current mode of SELinux.
15 15
16//applet:IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
17 17
diff --git a/selinux/getsebool.c b/selinux/getsebool.c
index fce478f5b..6d7805c8d 100644
--- a/selinux/getsebool.c
+++ b/selinux/getsebool.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config GETSEBOOL 9//config:config GETSEBOOL
10//config: bool "getsebool" 10//config: bool "getsebool (5.5 kb)"
11//config: default n 11//config: default n
12//config: depends on SELINUX 12//config: depends on SELINUX
13//config: help 13//config: help
14//config: Enable support to get SELinux boolean values. 14//config: Enable support to get SELinux boolean values.
15 15
16//applet:IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
17 17
diff --git a/selinux/load_policy.c b/selinux/load_policy.c
index f969453e3..b7930839c 100644
--- a/selinux/load_policy.c
+++ b/selinux/load_policy.c
@@ -5,11 +5,11 @@
5 * Licensed under GPLv2, see file LICENSE in this source tree. 5 * Licensed under GPLv2, see file LICENSE in this source tree.
6 */ 6 */
7//config:config LOAD_POLICY 7//config:config LOAD_POLICY
8//config: bool "load_policy" 8//config: bool "load_policy (1.6 kb)"
9//config: default n 9//config: default n
10//config: depends on SELINUX 10//config: depends on SELINUX
11//config: help 11//config: help
12//config: Enable support to load SELinux policy. 12//config: Enable support to load SELinux policy.
13 13
14//applet:IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP)) 14//applet:IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
15 15
diff --git a/selinux/matchpathcon.c b/selinux/matchpathcon.c
index a3b2fcb74..3388d0857 100644
--- a/selinux/matchpathcon.c
+++ b/selinux/matchpathcon.c
@@ -6,12 +6,12 @@
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8//config:config MATCHPATHCON 8//config:config MATCHPATHCON
9//config: bool "matchpathcon" 9//config: bool "matchpathcon (6.1 kb)"
10//config: default n 10//config: default n
11//config: depends on SELINUX 11//config: depends on SELINUX
12//config: help 12//config: help
13//config: Enable support to get default security context of the 13//config: Enable support to get default security context of the
14//config: specified path from the file contexts configuration. 14//config: specified path from the file contexts configuration.
15 15
16//applet:IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP))
17 17
diff --git a/selinux/runcon.c b/selinux/runcon.c
index 82f4d50d3..09082d6c2 100644
--- a/selinux/runcon.c
+++ b/selinux/runcon.c
@@ -29,11 +29,11 @@
29 * Licensed under GPLv2, see file LICENSE in this source tree. 29 * Licensed under GPLv2, see file LICENSE in this source tree.
30 */ 30 */
31//config:config RUNCON 31//config:config RUNCON
32//config: bool "runcon" 32//config: bool "runcon (6.6 kb)"
33//config: default n 33//config: default n
34//config: depends on SELINUX 34//config: depends on SELINUX
35//config: help 35//config: help
36//config: Enable support to run command in specified security context. 36//config: Enable support to run command in specified security context.
37//config: 37//config:
38//config:config FEATURE_RUNCON_LONG_OPTIONS 38//config:config FEATURE_RUNCON_LONG_OPTIONS
39//config: bool "Enable long options" 39//config: bool "Enable long options"
diff --git a/selinux/selinuxenabled.c b/selinux/selinuxenabled.c
index b80c4e71b..e70a452cf 100644
--- a/selinux/selinuxenabled.c
+++ b/selinux/selinuxenabled.c
@@ -7,12 +7,12 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config SELINUXENABLED 9//config:config SELINUXENABLED
10//config: bool "selinuxenabled" 10//config: bool "selinuxenabled (321 bytes)"
11//config: default n 11//config: default n
12//config: depends on SELINUX 12//config: depends on SELINUX
13//config: help 13//config: help
14//config: Enable support for this command to be used within shell scripts 14//config: Enable support for this command to be used within shell scripts
15//config: to determine if selinux is enabled. 15//config: to determine if selinux is enabled.
16 16
17//applet:IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP)) 17//applet:IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP))
18 18
diff --git a/selinux/sestatus.c b/selinux/sestatus.c
index ad49c9d25..daf4b223b 100644
--- a/selinux/sestatus.c
+++ b/selinux/sestatus.c
@@ -8,11 +8,11 @@
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10//config:config SESTATUS 10//config:config SESTATUS
11//config: bool "sestatus" 11//config: bool "sestatus (12 kb)"
12//config: default n 12//config: default n
13//config: depends on SELINUX 13//config: depends on SELINUX
14//config: help 14//config: help
15//config: Displays the status of SELinux. 15//config: Displays the status of SELinux.
16 16
17//applet:IF_SESTATUS(APPLET(sestatus, BB_DIR_USR_SBIN, BB_SUID_DROP)) 17//applet:IF_SESTATUS(APPLET(sestatus, BB_DIR_USR_SBIN, BB_SUID_DROP))
18 18
diff --git a/selinux/setenforce.c b/selinux/setenforce.c
index 8d18abd29..c28de6ec5 100644
--- a/selinux/setenforce.c
+++ b/selinux/setenforce.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config SETENFORCE 9//config:config SETENFORCE
10//config: bool "setenforce" 10//config: bool "setenforce (2.1 kb)"
11//config: default n 11//config: default n
12//config: depends on SELINUX 12//config: depends on SELINUX
13//config: help 13//config: help
14//config: Enable support to modify the mode SELinux is running in. 14//config: Enable support to modify the mode SELinux is running in.
15 15
16//applet:IF_SETENFORCE(APPLET(setenforce, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_SETENFORCE(APPLET(setenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
17 17
diff --git a/selinux/setfiles.c b/selinux/setfiles.c
index c14a67be5..01106bd67 100644
--- a/selinux/setfiles.c
+++ b/selinux/setfiles.c
@@ -4,30 +4,30 @@
4 Port to BusyBox (c) 2007 by Yuichi Nakamura <ynakam@hitachisoft.jp> 4 Port to BusyBox (c) 2007 by Yuichi Nakamura <ynakam@hitachisoft.jp>
5*/ 5*/
6//config:config SETFILES 6//config:config SETFILES
7//config: bool "setfiles" 7//config: bool "setfiles (13 kb)"
8//config: default n 8//config: default n
9//config: depends on SELINUX 9//config: depends on SELINUX
10//config: help 10//config: help
11//config: Enable support to modify to relabel files. 11//config: Enable support to modify to relabel files.
12//config: Notice: If you built libselinux with -D_FILE_OFFSET_BITS=64, 12//config: Notice: If you built libselinux with -D_FILE_OFFSET_BITS=64,
13//config: (It is default in libselinux's Makefile), you _must_ enable 13//config: (It is default in libselinux's Makefile), you _must_ enable
14//config: CONFIG_LFS. 14//config: CONFIG_LFS.
15//config: 15//config:
16//config:config FEATURE_SETFILES_CHECK_OPTION 16//config:config FEATURE_SETFILES_CHECK_OPTION
17//config: bool "Enable check option" 17//config: bool "Enable check option"
18//config: default n 18//config: default n
19//config: depends on SETFILES 19//config: depends on SETFILES
20//config: help 20//config: help
21//config: Support "-c" option (check the validity of the contexts against 21//config: Support "-c" option (check the validity of the contexts against
22//config: the specified binary policy) for setfiles. Requires libsepol. 22//config: the specified binary policy) for setfiles. Requires libsepol.
23//config: 23//config:
24//config:config RESTORECON 24//config:config RESTORECON
25//config: bool "restorecon" 25//config: bool "restorecon (12 kb)"
26//config: default n 26//config: default n
27//config: depends on SELINUX 27//config: depends on SELINUX
28//config: help 28//config: help
29//config: Enable support to relabel files. The feature is almost 29//config: Enable support to relabel files. The feature is almost
30//config: the same as setfiles, but usage is a little different. 30//config: the same as setfiles, but usage is a little different.
31 31
32//applet:IF_SETFILES(APPLET(setfiles, BB_DIR_SBIN, BB_SUID_DROP)) 32//applet:IF_SETFILES(APPLET(setfiles, BB_DIR_SBIN, BB_SUID_DROP))
33// APPLET_ODDNAME:name main location suid_type help 33// APPLET_ODDNAME:name main location suid_type help
diff --git a/selinux/setsebool.c b/selinux/setsebool.c
index 6a6bd031c..579118172 100644
--- a/selinux/setsebool.c
+++ b/selinux/setsebool.c
@@ -8,12 +8,12 @@
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10//config:config SETSEBOOL 10//config:config SETSEBOOL
11//config: bool "setsebool" 11//config: bool "setsebool (1.7 kb)"
12//config: default n 12//config: default n
13//config: depends on SELINUX 13//config: depends on SELINUX
14//config: help 14//config: help
15//config: Enable support for change boolean. 15//config: Enable support for change boolean.
16//config: semanage and -P option is not supported yet. 16//config: semanage and -P option is not supported yet.
17 17
18//applet:IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) 18//applet:IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
19 19
diff --git a/shell/Config.src b/shell/Config.src
index ccb1b15fe..81c4ec874 100644
--- a/shell/Config.src
+++ b/shell/Config.src
@@ -10,26 +10,26 @@ choice
10 prompt "Choose which shell is aliased to 'sh' name" 10 prompt "Choose which shell is aliased to 'sh' name"
11 default SH_IS_ASH 11 default SH_IS_ASH
12 help 12 help
13 Choose which shell you want to be executed by 'sh' alias. 13 Choose which shell you want to be executed by 'sh' alias.
14 The ash shell is the most bash compatible and full featured one. 14 The ash shell is the most bash compatible and full featured one.
15 15
16# note: cannot use "select ASH" here, it breaks "make allnoconfig" 16# note: cannot use "select ASH" here, it breaks "make allnoconfig"
17config SH_IS_ASH 17config SH_IS_ASH
18 depends on !NOMMU 18 depends on !NOMMU
19 bool "ash" 19 bool "ash"
20 help 20 help
21 Choose ash to be the shell executed by 'sh' name. 21 Choose ash to be the shell executed by 'sh' name.
22 The ash code will be built into busybox. If you don't select 22 The ash code will be built into busybox. If you don't select
23 "ash" choice (CONFIG_ASH), this shell may only be invoked by 23 "ash" choice (CONFIG_ASH), this shell may only be invoked by
24 the name 'sh' (and not 'ash'). 24 the name 'sh' (and not 'ash').
25 25
26config SH_IS_HUSH 26config SH_IS_HUSH
27 bool "hush" 27 bool "hush"
28 help 28 help
29 Choose hush to be the shell executed by 'sh' name. 29 Choose hush to be the shell executed by 'sh' name.
30 The hush code will be built into busybox. If you don't select 30 The hush code will be built into busybox. If you don't select
31 "hush" choice (CONFIG_HUSH), this shell may only be invoked by 31 "hush" choice (CONFIG_HUSH), this shell may only be invoked by
32 the name 'sh' (and not 'hush'). 32 the name 'sh' (and not 'hush').
33 33
34config SH_IS_NONE 34config SH_IS_NONE
35 bool "none" 35 bool "none"
@@ -40,36 +40,36 @@ choice
40 prompt "Choose which shell is aliased to 'bash' name" 40 prompt "Choose which shell is aliased to 'bash' name"
41 default BASH_IS_NONE 41 default BASH_IS_NONE
42 help 42 help
43 Choose which shell you want to be executed by 'bash' alias. 43 Choose which shell you want to be executed by 'bash' alias.
44 The ash shell is the most bash compatible and full featured one, 44 The ash shell is the most bash compatible and full featured one,
45 although compatibility is far from being complete. 45 although compatibility is far from being complete.
46 46
47 Note that selecting this option does not switch on any bash 47 Note that selecting this option does not switch on any bash
48 compatibility code. It merely makes it possible to install 48 compatibility code. It merely makes it possible to install
49 /bin/bash (sym)link and run scripts which start with 49 /bin/bash (sym)link and run scripts which start with
50 #!/bin/bash line. 50 #!/bin/bash line.
51 51
52 Many systems use it in scripts which use bash-specific features, 52 Many systems use it in scripts which use bash-specific features,
53 even simple ones like $RANDOM. Without this option, busybox 53 even simple ones like $RANDOM. Without this option, busybox
54 can't be used for running them because it won't recongnize 54 can't be used for running them because it won't recongnize
55 "bash" as a supported applet name. 55 "bash" as a supported applet name.
56 56
57config BASH_IS_ASH 57config BASH_IS_ASH
58 depends on !NOMMU 58 depends on !NOMMU
59 bool "ash" 59 bool "ash"
60 help 60 help
61 Choose ash to be the shell executed by 'bash' name. 61 Choose ash to be the shell executed by 'bash' name.
62 The ash code will be built into busybox. If you don't select 62 The ash code will be built into busybox. If you don't select
63 "ash" choice (CONFIG_ASH), this shell may only be invoked by 63 "ash" choice (CONFIG_ASH), this shell may only be invoked by
64 the name 'bash' (and not 'ash'). 64 the name 'bash' (and not 'ash').
65 65
66config BASH_IS_HUSH 66config BASH_IS_HUSH
67 bool "hush" 67 bool "hush"
68 help 68 help
69 Choose hush to be the shell executed by 'bash' name. 69 Choose hush to be the shell executed by 'bash' name.
70 The hush code will be built into busybox. If you don't select 70 The hush code will be built into busybox. If you don't select
71 "hush" choice (CONFIG_HUSH), this shell may only be invoked by 71 "hush" choice (CONFIG_HUSH), this shell may only be invoked by
72 the name 'bash' (and not 'hush'). 72 the name 'bash' (and not 'hush').
73 73
74config BASH_IS_NONE 74config BASH_IS_NONE
75 bool "none" 75 bool "none"
@@ -88,71 +88,78 @@ config FEATURE_SH_MATH
88 default y 88 default y
89 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH 89 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
90 help 90 help
91 Enable math support in the shell via $((...)) syntax. 91 Enable math support in the shell via $((...)) syntax.
92 92
93config FEATURE_SH_MATH_64 93config FEATURE_SH_MATH_64
94 bool "Extend POSIX math support to 64 bit" 94 bool "Extend POSIX math support to 64 bit"
95 default y 95 default y
96 depends on FEATURE_SH_MATH 96 depends on FEATURE_SH_MATH
97 help 97 help
98 Enable 64-bit math support in the shell. This will make the shell 98 Enable 64-bit math support in the shell. This will make the shell
99 slightly larger, but will allow computation with very large numbers. 99 slightly larger, but will allow computation with very large numbers.
100 This is not in POSIX, so do not rely on this in portable code. 100 This is not in POSIX, so do not rely on this in portable code.
101 101
102config FEATURE_SH_EXTRA_QUIET 102config FEATURE_SH_EXTRA_QUIET
103 bool "Hide message on interactive shell startup" 103 bool "Hide message on interactive shell startup"
104 default y 104 default y
105 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH 105 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
106 help 106 help
107 Remove the busybox introduction when starting a shell. 107 Remove the busybox introduction when starting a shell.
108 108
109config FEATURE_SH_STANDALONE 109config FEATURE_SH_STANDALONE
110 bool "Standalone shell" 110 bool "Standalone shell"
111 default n 111 default n
112 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH 112 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
113 help 113 help
114 This option causes busybox shells to use busybox applets 114 This option causes busybox shells to use busybox applets
115 in preference to executables in the PATH whenever possible. For 115 in preference to executables in the PATH whenever possible. For
116 example, entering the command 'ifconfig' into the shell would cause 116 example, entering the command 'ifconfig' into the shell would cause
117 busybox to use the ifconfig busybox applet. Specifying the fully 117 busybox to use the ifconfig busybox applet. Specifying the fully
118 qualified executable name, such as '/sbin/ifconfig' will still 118 qualified executable name, such as '/sbin/ifconfig' will still
119 execute the /sbin/ifconfig executable on the filesystem. This option 119 execute the /sbin/ifconfig executable on the filesystem. This option
120 is generally used when creating a statically linked version of busybox 120 is generally used when creating a statically linked version of busybox
121 for use as a rescue shell, in the event that you screw up your system. 121 for use as a rescue shell, in the event that you screw up your system.
122 122
123 This is implemented by re-execing /proc/self/exe (typically) 123 This is implemented by re-execing /proc/self/exe (typically)
124 with right parameters. 124 with right parameters.
125 125
126 However, there are drawbacks: it is problematic in chroot jails 126 However, there are drawbacks: it is problematic in chroot jails
127 without mounted /proc, and ps/top may show command name as 'exe' 127 without mounted /proc, and ps/top may show command name as 'exe'
128 for applets started this way. 128 for applets started this way.
129 129
130config FEATURE_SH_NOFORK 130config FEATURE_SH_NOFORK
131 bool "Run 'nofork' applets directly" 131 bool "Run 'nofork' applets directly"
132 default n 132 default n
133 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH 133 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
134 help 134 help
135 This option causes busybox shells to not execute typical 135 This option causes busybox shells to not execute typical
136 fork/exec/wait sequence, but call <applet>_main directly, 136 fork/exec/wait sequence, but call <applet>_main directly,
137 if possible. (Sometimes it is not possible: for example, 137 if possible. (Sometimes it is not possible: for example,
138 this is not possible in pipes). 138 this is not possible in pipes).
139 139
140 This will be done only for some applets (those which are marked 140 This will be done only for some applets (those which are marked
141 NOFORK in include/applets.h). 141 NOFORK in include/applets.h).
142 142
143 This may significantly speed up some shell scripts. 143 This may significantly speed up some shell scripts.
144 144
145 This feature is relatively new. Use with care. Report bugs 145 This feature is relatively new. Use with care. Report bugs
146 to project mailing list. 146 to project mailing list.
147
148config FEATURE_SH_READ_FRAC
149 bool "read -t N.NNN support (+110 bytes)"
150 default y
151 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
152 help
153 Enable support for fractional second timeout in read builtin.
147 154
148config FEATURE_SH_HISTFILESIZE 155config FEATURE_SH_HISTFILESIZE
149 bool "Use $HISTFILESIZE" 156 bool "Use $HISTFILESIZE"
150 default y 157 default y
151 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH 158 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
152 help 159 help
153 This option makes busybox shells to use $HISTFILESIZE variable 160 This option makes busybox shells to use $HISTFILESIZE variable
154 to set shell history size. Note that its max value is capped 161 to set shell history size. Note that its max value is capped
155 by "History size" setting in library tuning section. 162 by "History size" setting in library tuning section.
156 163
157endif # Options common to all shells 164endif # Options common to all shells
158 165
diff --git a/shell/ash.c b/shell/ash.c
index dc5561765..28b522d7c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -31,15 +31,14 @@
31 */ 31 */
32 32
33//config:config ASH 33//config:config ASH
34//config: bool "ash" 34//config: bool "ash (77 kb)"
35//config: default y 35//config: default y
36//config: depends on !NOMMU 36//config: depends on !NOMMU
37//config: help 37//config: help
38//config: Tha 'ash' shell adds about 60k in the default configuration and is 38//config: The most complete and most pedantically correct shell included with
39//config: the most complete and most pedantically correct shell included with 39//config: busybox. This shell is actually a derivative of the Debian 'dash'
40//config: busybox. This shell is actually a derivative of the Debian 'dash' 40//config: shell (by Herbert Xu), which was created by porting the 'ash' shell
41//config: shell (by Herbert Xu), which was created by porting the 'ash' shell 41//config: (written by Kenneth Almquist) from NetBSD.
42//config: (written by Kenneth Almquist) from NetBSD.
43//config: 42//config:
44//config:# ash options 43//config:# ash options
45//config:# note: Don't remove !NOMMU part in the next line; it would break 44//config:# note: Don't remove !NOMMU part in the next line; it would break
@@ -56,11 +55,11 @@
56//config: default y # Y is bigger, but because of uclibc glob() bug, let Y be default for now 55//config: default y # Y is bigger, but because of uclibc glob() bug, let Y be default for now
57//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 56//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH
58//config: help 57//config: help
59//config: Do not use glob() function from libc, use internal implementation. 58//config: Do not use glob() function from libc, use internal implementation.
60//config: Use this if you are getting "glob.h: No such file or directory" 59//config: Use this if you are getting "glob.h: No such file or directory"
61//config: or similar build errors. 60//config: or similar build errors.
62//config: Note that as of now (2017-01), uclibc and musl glob() both have bugs 61//config: Note that as of now (2017-01), uclibc and musl glob() both have bugs
63//config: which would break ash if you select N here. 62//config: which would break ash if you select N here.
64//config: 63//config:
65//config:config ASH_BASH_COMPAT 64//config:config ASH_BASH_COMPAT
66//config: bool "bash-compatible extensions" 65//config: bool "bash-compatible extensions"
@@ -82,37 +81,37 @@
82//config: default y 81//config: default y
83//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 82//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH
84//config: help 83//config: help
85//config: Enable pseudorandom generator and dynamic variable "$RANDOM". 84//config: Enable pseudorandom generator and dynamic variable "$RANDOM".
86//config: Each read of "$RANDOM" will generate a new pseudorandom value. 85//config: Each read of "$RANDOM" will generate a new pseudorandom value.
87//config: You can reset the generator by using a specified start value. 86//config: You can reset the generator by using a specified start value.
88//config: After "unset RANDOM" the generator will switch off and this 87//config: After "unset RANDOM" the generator will switch off and this
89//config: variable will no longer have special treatment. 88//config: variable will no longer have special treatment.
90//config: 89//config:
91//config:config ASH_EXPAND_PRMT 90//config:config ASH_EXPAND_PRMT
92//config: bool "Expand prompt string" 91//config: bool "Expand prompt string"
93//config: default y 92//config: default y
94//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 93//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH
95//config: help 94//config: help
96//config: $PS# may contain volatile content, such as backquote commands. 95//config: $PS# may contain volatile content, such as backquote commands.
97//config: This option recreates the prompt string from the environment 96//config: This option recreates the prompt string from the environment
98//config: variable each time it is displayed. 97//config: variable each time it is displayed.
99//config: 98//config:
100//config:config ASH_IDLE_TIMEOUT 99//config:config ASH_IDLE_TIMEOUT
101//config: bool "Idle timeout variable $TMOUT" 100//config: bool "Idle timeout variable $TMOUT"
102//config: default y 101//config: default y
103//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 102//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH
104//config: help 103//config: help
105//config: Enable bash-like auto-logout after $TMOUT seconds of idle time. 104//config: Enable bash-like auto-logout after $TMOUT seconds of idle time.
106//config: 105//config:
107//config:config ASH_MAIL 106//config:config ASH_MAIL
108//config: bool "Check for new mail in interactive shell" 107//config: bool "Check for new mail in interactive shell"
109//config: default y 108//config: default y
110//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 109//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH
111//config: help 110//config: help
112//config: Enable "check for new mail" function: 111//config: Enable "check for new mail" function:
113//config: if set, $MAIL file and $MAILPATH list of files 112//config: if set, $MAIL file and $MAILPATH list of files
114//config: are checked for mtime changes, and "you have mail" 113//config: are checked for mtime changes, and "you have mail"
115//config: message is printed if change is detected. 114//config: message is printed if change is detected.
116//config: 115//config:
117//config:config ASH_ECHO 116//config:config ASH_ECHO
118//config: bool "echo builtin" 117//config: bool "echo builtin"
@@ -144,9 +143,9 @@
144//config: default y 143//config: default y
145//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH 144//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH
146//config: help 145//config: help
147//config: Enable support for the 'command' builtin, which allows 146//config: Enable support for the 'command' builtin, which allows
148//config: you to run the specified command or builtin, 147//config: you to run the specified command or builtin,
149//config: even when there is a function with the same name. 148//config: even when there is a function with the same name.
150//config: 149//config:
151//config: 150//config:
152//config:config ASH_NOCONSOLE 151//config:config ASH_NOCONSOLE
@@ -1746,7 +1745,7 @@ static char *
1746stack_nputstr(const char *s, size_t n, char *p) 1745stack_nputstr(const char *s, size_t n, char *p)
1747{ 1746{
1748 p = makestrspace(n, p); 1747 p = makestrspace(n, p);
1749 p = (char *)memcpy(p, s, n) + n; 1748 p = (char *)mempcpy(p, s, n);
1750 return p; 1749 return p;
1751} 1750}
1752 1751
@@ -1830,7 +1829,7 @@ number(const char *s)
1830} 1829}
1831 1830
1832/* 1831/*
1833 * Produce a possibly single quoted string suitable as input to the shell. 1832 * Produce a single quoted string suitable as input to the shell.
1834 * The return string is allocated on the stack. 1833 * The return string is allocated on the stack.
1835 */ 1834 */
1836static char * 1835static char *
@@ -1849,7 +1848,7 @@ single_quote(const char *s)
1849 q = p = makestrspace(len + 3, p); 1848 q = p = makestrspace(len + 3, p);
1850 1849
1851 *q++ = '\''; 1850 *q++ = '\'';
1852 q = (char *)memcpy(q, s, len) + len; 1851 q = (char *)mempcpy(q, s, len);
1853 *q++ = '\''; 1852 *q++ = '\'';
1854 s += len; 1853 s += len;
1855 1854
@@ -1863,7 +1862,7 @@ single_quote(const char *s)
1863 q = p = makestrspace(len + 3, p); 1862 q = p = makestrspace(len + 3, p);
1864 1863
1865 *q++ = '"'; 1864 *q++ = '"';
1866 q = (char *)memcpy(q, s - len, len) + len; 1865 q = (char *)mempcpy(q, s - len, len);
1867 *q++ = '"'; 1866 *q++ = '"';
1868 1867
1869 STADJUST(q - p, p); 1868 STADJUST(q - p, p);
@@ -1874,6 +1873,47 @@ single_quote(const char *s)
1874 return stackblock(); 1873 return stackblock();
1875} 1874}
1876 1875
1876/*
1877 * Produce a possibly single quoted string suitable as input to the shell.
1878 * If 'conditional' is nonzero, quoting is only done if the string contains
1879 * non-shellsafe characters, or is identical to a shell keyword (reserved
1880 * word); if it is zero, quoting is always done.
1881 * If quoting was done, the return string is allocated on the stack,
1882 * otherwise a pointer to the original string is returned.
1883 */
1884static const char *
1885maybe_single_quote(const char *s)
1886{
1887 const char *p = s;
1888
1889 while (*p) {
1890 /* Assuming ACSII */
1891 /* quote ctrl_chars space !"#$%&'()* */
1892 if (*p < '+')
1893 goto need_quoting;
1894 /* quote ;<=>? */
1895 if (*p >= ';' && *p <= '?')
1896 goto need_quoting;
1897 /* quote `[\ */
1898 if (*p == '`')
1899 goto need_quoting;
1900 if (*p == '[')
1901 goto need_quoting;
1902 if (*p == '\\')
1903 goto need_quoting;
1904 /* quote {|}~ DEL and high bytes */
1905 if (*p > 'z')
1906 goto need_quoting;
1907 /* Not quoting these: +,-./ 0-9 :@ A-Z ]^_ a-z */
1908 /* TODO: maybe avoid quoting % */
1909 p++;
1910 }
1911 return s;
1912
1913 need_quoting:
1914 return single_quote(s);
1915}
1916
1877 1917
1878/* ============ nextopt */ 1918/* ============ nextopt */
1879 1919
@@ -2362,10 +2402,10 @@ setvar(const char *name, const char *val, int flags)
2362 2402
2363 INT_OFF; 2403 INT_OFF;
2364 nameeq = ckmalloc(namelen + vallen + 2); 2404 nameeq = ckmalloc(namelen + vallen + 2);
2365 p = memcpy(nameeq, name, namelen) + namelen; 2405 p = mempcpy(nameeq, name, namelen);
2366 if (val) { 2406 if (val) {
2367 *p++ = '='; 2407 *p++ = '=';
2368 p = memcpy(p, val, vallen) + vallen; 2408 p = mempcpy(p, val, vallen);
2369 } 2409 }
2370 *p = '\0'; 2410 *p = '\0';
2371 setvareq(nameeq, flags | VNOSAVE); 2411 setvareq(nameeq, flags | VNOSAVE);
@@ -2512,8 +2552,7 @@ path_advance(const char **path, const char *name)
2512 growstackblock(); 2552 growstackblock();
2513 q = stackblock(); 2553 q = stackblock();
2514 if (p != start) { 2554 if (p != start) {
2515 memcpy(q, start, p - start); 2555 q = mempcpy(q, start, p - start);
2516 q += p - start;
2517 *q++ = '/'; 2556 *q++ = '/';
2518 } 2557 }
2519 strcpy(q, name); 2558 strcpy(q, name);
@@ -6277,7 +6316,7 @@ rmescapes(char *str, int flag)
6277 } 6316 }
6278 q = r; 6317 q = r;
6279 if (len > 0) { 6318 if (len > 0) {
6280 q = (char *)memcpy(q, str, len) + len; 6319 q = (char *)mempcpy(q, str, len);
6281 } 6320 }
6282 } 6321 }
6283 6322
@@ -10161,18 +10200,36 @@ evalcommand(union node *cmd, int flags)
10161 10200
10162 /* Print the command if xflag is set. */ 10201 /* Print the command if xflag is set. */
10163 if (xflag) { 10202 if (xflag) {
10164 int n; 10203 const char *pfx = "";
10165 const char *p = " %s" + 1; 10204
10205 fdprintf(preverrout_fd, "%s", expandstr(ps4val()));
10166 10206
10167 fdprintf(preverrout_fd, p, expandstr(ps4val()));
10168 sp = varlist.list; 10207 sp = varlist.list;
10169 for (n = 0; n < 2; n++) { 10208 while (sp) {
10170 while (sp) { 10209 char *varval = sp->text;
10171 fdprintf(preverrout_fd, p, sp->text); 10210 char *eq = strchrnul(varval, '=');
10172 sp = sp->next; 10211 if (*eq)
10173 p = " %s"; 10212 eq++;
10174 } 10213 fdprintf(preverrout_fd, "%s%.*s%s",
10175 sp = arglist.list; 10214 pfx,
10215 (int)(eq - varval), varval,
10216 maybe_single_quote(eq)
10217 );
10218 sp = sp->next;
10219 pfx = " ";
10220 }
10221
10222 sp = arglist.list;
10223 while (sp) {
10224 fdprintf(preverrout_fd, "%s%s",
10225 pfx,
10226 /* always quote if matches reserved word: */
10227 findkwd(sp->text)
10228 ? single_quote(sp->text)
10229 : maybe_single_quote(sp->text)
10230 );
10231 sp = sp->next;
10232 pfx = " ";
10176 } 10233 }
10177 safe_write(preverrout_fd, "\n", 1); 10234 safe_write(preverrout_fd, "\n", 1);
10178 } 10235 }
diff --git a/shell/ash_test/ash-parsing/argv0.right b/shell/ash_test/ash-parsing/argv0.right
new file mode 100644
index 000000000..d86bac9de
--- /dev/null
+++ b/shell/ash_test/ash-parsing/argv0.right
@@ -0,0 +1 @@
OK
diff --git a/shell/ash_test/ash-parsing/argv0.tests b/shell/ash_test/ash-parsing/argv0.tests
new file mode 100755
index 000000000..f5c40f6fe
--- /dev/null
+++ b/shell/ash_test/ash-parsing/argv0.tests
@@ -0,0 +1,4 @@
1if test $# = 0; then
2 exec "$THIS_SH" "$0" arg
3fi
4echo OK
diff --git a/shell/ash_test/ash-parsing/brace1.right b/shell/ash_test/ash-parsing/brace1.right
new file mode 100644
index 000000000..10aa7a419
--- /dev/null
+++ b/shell/ash_test/ash-parsing/brace1.right
@@ -0,0 +1,7 @@
1{abc}
2{
3}
4./brace1.tests: line 4: {cmd: not found
5./brace1.tests: line 5: {: not found
6./brace1.tests: line 6: {: not found
7Done: 127
diff --git a/shell/ash_test/ash-parsing/brace1.tests b/shell/ash_test/ash-parsing/brace1.tests
new file mode 100755
index 000000000..2b45927c0
--- /dev/null
+++ b/shell/ash_test/ash-parsing/brace1.tests
@@ -0,0 +1,7 @@
1echo {abc}
2echo {
3echo }
4{cmd
5""{
6{""
7echo Done: $?
diff --git a/shell/ash_test/ash-parsing/brace2.right b/shell/ash_test/ash-parsing/brace2.right
new file mode 100644
index 000000000..37a966654
--- /dev/null
+++ b/shell/ash_test/ash-parsing/brace2.right
@@ -0,0 +1,3 @@
1{q,w}
2{q,w}
3Done
diff --git a/shell/ash_test/ash-parsing/brace2.tests b/shell/ash_test/ash-parsing/brace2.tests
new file mode 100755
index 000000000..ef75f0b70
--- /dev/null
+++ b/shell/ash_test/ash-parsing/brace2.tests
@@ -0,0 +1,5 @@
1v='{q,w}'
2# Should not brace-expand v value
3echo $v
4echo "$v"
5echo Done
diff --git a/shell/ash_test/ash-parsing/comment1.right b/shell/ash_test/ash-parsing/comment1.right
new file mode 100644
index 000000000..a102b1d4e
--- /dev/null
+++ b/shell/ash_test/ash-parsing/comment1.right
@@ -0,0 +1,2 @@
1Nothing:
2String: #should-be-echoed
diff --git a/shell/ash_test/ash-parsing/comment1.tests b/shell/ash_test/ash-parsing/comment1.tests
new file mode 100755
index 000000000..d268860ff
--- /dev/null
+++ b/shell/ash_test/ash-parsing/comment1.tests
@@ -0,0 +1,2 @@
1echo Nothing: #should-not-be-echoed
2echo String: ""#should-be-echoed
diff --git a/shell/ash_test/ash-parsing/eol1.right b/shell/ash_test/ash-parsing/eol1.right
new file mode 100644
index 000000000..31c896f62
--- /dev/null
+++ b/shell/ash_test/ash-parsing/eol1.right
@@ -0,0 +1 @@
Done:0
diff --git a/shell/ash_test/ash-parsing/eol1.tests b/shell/ash_test/ash-parsing/eol1.tests
new file mode 100755
index 000000000..f1b55e8b8
--- /dev/null
+++ b/shell/ash_test/ash-parsing/eol1.tests
@@ -0,0 +1,18 @@
1# bug was that we treated <newline> as ';' in this line:
2true || echo foo |
3echo BAD1 | cat
4
5# variation on the same theme
6true || echo foo |
7# comment
8echo BAD2 | cat
9
10# variation on the same theme
11true || echo foo |
12
13echo BAD3 | cat
14
15# this should error out, but currently works in hush:
16#true || echo foo |;
17
18echo Done:$?
diff --git a/shell/ash_test/ash-parsing/escape1.right b/shell/ash_test/ash-parsing/escape1.right
new file mode 100644
index 000000000..1899b87ef
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape1.right
@@ -0,0 +1,4 @@
1\
2a\b
3\\
4c\\d
diff --git a/shell/ash_test/ash-parsing/escape1.tests b/shell/ash_test/ash-parsing/escape1.tests
new file mode 100755
index 000000000..25ac96b25
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape1.tests
@@ -0,0 +1,6 @@
1test "$CONFIG_FEATURE_FANCY_ECHO" = "y" || exit 77
2
3echo "\\"
4echo a"\\"b
5echo '\\'
6echo c'\\'d
diff --git a/shell/ash_test/ash-parsing/escape2.right b/shell/ash_test/ash-parsing/escape2.right
new file mode 100644
index 000000000..f55fd4a42
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape2.right
@@ -0,0 +1,4 @@
1*?[a]*
2a*?[a]*b
3*?[a]*
4c*?[a]*d
diff --git a/shell/ash_test/ash-parsing/escape2.tests b/shell/ash_test/ash-parsing/escape2.tests
new file mode 100755
index 000000000..ee718018d
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape2.tests
@@ -0,0 +1,4 @@
1echo "*?[a]*"
2echo a"*?[a]*"b
3echo '*?[a]*'
4echo c'*?[a]*'d
diff --git a/shell/ash_test/ash-parsing/escape3.right b/shell/ash_test/ash-parsing/escape3.right
new file mode 100644
index 000000000..da02a976a
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape3.right
@@ -0,0 +1,23 @@
1v: a \ b \\ c \\\ d \\\\ e
2v: a \ b \\ c \\\ d \\\\ e
3Unquoted:
4.a.
5.\.
6.b.
7.\\.
8.c.
9.\\\.
10.d.
11.\\\\.
12.e.
13Quoted:
14.a.
15.\.
16.b.
17.\\.
18.c.
19.\\\.
20.d.
21.\\\\.
22.e.
23done
diff --git a/shell/ash_test/ash-parsing/escape3.tests b/shell/ash_test/ash-parsing/escape3.tests
new file mode 100755
index 000000000..18705bd0c
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape3.tests
@@ -0,0 +1,10 @@
1test "$CONFIG_FEATURE_FANCY_ECHO" = "y" || exit 77
2
3v='a \ b \\ c \\\ d \\\\ e'
4echo v: $v
5echo v: "$v"
6echo Unquoted:
7for a in $v; do echo .$a.; done
8echo Quoted:
9for a in $v; do echo ".$a."; done
10echo done
diff --git a/shell/ash_test/ash-parsing/escape4.right b/shell/ash_test/ash-parsing/escape4.right
new file mode 100644
index 000000000..5de3e0c90
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape4.right
@@ -0,0 +1,2 @@
1Ok
2End
diff --git a/shell/ash_test/ash-parsing/escape4.tests b/shell/ash_test/ash-parsing/escape4.tests
new file mode 100755
index 000000000..df8bf0af7
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape4.tests
@@ -0,0 +1,6 @@
1i\
2f tr\
3ue; th\
4en echo "O\
5k"; fi; echo "\
6End" \ No newline at end of file
diff --git a/shell/ash_test/ash-parsing/escape5.right b/shell/ash_test/ash-parsing/escape5.right
new file mode 100644
index 000000000..3cdd393c7
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape5.right
@@ -0,0 +1,9 @@
1a\nb\nc\n
2a
3b
4c
5a\nb\nc\n
6a
7b
8c
9Done
diff --git a/shell/ash_test/ash-parsing/escape5.tests b/shell/ash_test/ash-parsing/escape5.tests
new file mode 100755
index 000000000..337a98ec7
--- /dev/null
+++ b/shell/ash_test/ash-parsing/escape5.tests
@@ -0,0 +1,7 @@
1v="a\nb\nc\n"
2echo "$v"
3printf "$v"
4v='a\nb\nc\n'
5echo "$v"
6printf "$v"
7echo Done
diff --git a/shell/ash_test/ash-parsing/group1.right b/shell/ash_test/ash-parsing/group1.right
new file mode 100644
index 000000000..6a7c4be0a
--- /dev/null
+++ b/shell/ash_test/ash-parsing/group1.right
@@ -0,0 +1 @@
word} }
diff --git a/shell/ash_test/ash-parsing/group1.tests b/shell/ash_test/ash-parsing/group1.tests
new file mode 100755
index 000000000..f063fbcb3
--- /dev/null
+++ b/shell/ash_test/ash-parsing/group1.tests
@@ -0,0 +1 @@
{ echo word} }; }
diff --git a/shell/ash_test/ash-parsing/group2.right b/shell/ash_test/ash-parsing/group2.right
new file mode 100644
index 000000000..df4d9306a
--- /dev/null
+++ b/shell/ash_test/ash-parsing/group2.right
@@ -0,0 +1,2 @@
1got TERM
2Done: 0
diff --git a/shell/ash_test/ash-parsing/group2.tests b/shell/ash_test/ash-parsing/group2.tests
new file mode 100755
index 000000000..d99178585
--- /dev/null
+++ b/shell/ash_test/ash-parsing/group2.tests
@@ -0,0 +1,3 @@
1# Bug was in handling of "}&" without space
2{ trap "echo got TERM" TERM; sleep 2; }& sleep 1; kill $!; wait
3echo Done: $?
diff --git a/shell/ash_test/ash-parsing/groups_and_keywords1.right b/shell/ash_test/ash-parsing/groups_and_keywords1.right
new file mode 100644
index 000000000..4c46650dc
--- /dev/null
+++ b/shell/ash_test/ash-parsing/groups_and_keywords1.right
@@ -0,0 +1,11 @@
1Semicolons after } can be omitted 1:
2foo
3bar
4Semicolons after } can be omitted 2:
5foo
6bar
7Semicolons after fi can be omitted:
8foo
9bar
10baz
11Done:0
diff --git a/shell/ash_test/ash-parsing/groups_and_keywords1.tests b/shell/ash_test/ash-parsing/groups_and_keywords1.tests
new file mode 100755
index 000000000..01944d714
--- /dev/null
+++ b/shell/ash_test/ash-parsing/groups_and_keywords1.tests
@@ -0,0 +1,10 @@
1echo "Semicolons after } can be omitted 1:"
2if { echo foo; } then { echo bar; } fi
3
4echo "Semicolons after } can be omitted 2:"
5while { echo foo; } do { echo bar; break; } done
6
7echo "Semicolons after fi can be omitted:"
8while if echo foo; then echo bar; fi do echo baz; break; done
9
10echo Done:$?
diff --git a/shell/ash_test/ash-parsing/negate.right b/shell/ash_test/ash-parsing/negate.right
new file mode 100644
index 000000000..61d2ecd3a
--- /dev/null
+++ b/shell/ash_test/ash-parsing/negate.right
@@ -0,0 +1,36 @@
1! printing !
20
31
41
50
60
70
8!
9a
10b
11c
12! 1
13a 1
14b 1
15c 1
16! 1
17a 1
18b 1
19c 1
200
210
220
230
241
251
261
271
280
290
300
310
321
331
341
351
36Done
diff --git a/shell/ash_test/ash-parsing/negate.tests b/shell/ash_test/ash-parsing/negate.tests
new file mode 100755
index 000000000..51151cbd4
--- /dev/null
+++ b/shell/ash_test/ash-parsing/negate.tests
@@ -0,0 +1,19 @@
1echo ! printing !
2! false
3echo $?
4! true
5echo $?
6if ! false; then false; echo $?; fi
7echo $?
8if ! false; then ! false; echo $?; fi
9echo $?
10PRINTF=`which printf`
11for a in ! a b c; do echo $a; done
12for a in ! a b c; do ! printf "$a "; echo $?; done
13test x"$PRINTF" = x"" && exit 1
14for a in ! a b c; do ! "$PRINTF" "$a "; echo $?; done
15for a in ! a b c; do ! printf "$a " | false; echo $?; done
16for a in ! a b c; do ! printf "$a " | true; echo $?; done
17for a in ! a b c; do ! { printf "$a " | false; }; echo $?; done
18for a in ! a b c; do ! { printf "$a " | true; }; echo $?; done
19echo Done
diff --git a/shell/ash_test/ash-parsing/noeol.right b/shell/ash_test/ash-parsing/noeol.right
new file mode 100644
index 000000000..e427984d4
--- /dev/null
+++ b/shell/ash_test/ash-parsing/noeol.right
@@ -0,0 +1 @@
HELLO
diff --git a/shell/ash_test/ash-parsing/noeol.tests b/shell/ash_test/ash-parsing/noeol.tests
new file mode 100755
index 000000000..a93113a03
--- /dev/null
+++ b/shell/ash_test/ash-parsing/noeol.tests
@@ -0,0 +1,2 @@
1# next line has no EOL!
2echo HELLO \ No newline at end of file
diff --git a/shell/ash_test/ash-parsing/noeol2.right b/shell/ash_test/ash-parsing/noeol2.right
new file mode 100644
index 000000000..d00491fd7
--- /dev/null
+++ b/shell/ash_test/ash-parsing/noeol2.right
@@ -0,0 +1 @@
1
diff --git a/shell/ash_test/ash-parsing/noeol2.tests b/shell/ash_test/ash-parsing/noeol2.tests
new file mode 100755
index 000000000..1220f056f
--- /dev/null
+++ b/shell/ash_test/ash-parsing/noeol2.tests
@@ -0,0 +1,7 @@
1# last line has no EOL!
2if true
3then
4 echo 1
5else
6 echo 2
7fi \ No newline at end of file
diff --git a/shell/ash_test/ash-parsing/noeol3.right b/shell/ash_test/ash-parsing/noeol3.right
new file mode 100644
index 000000000..c2a0e38f8
--- /dev/null
+++ b/shell/ash_test/ash-parsing/noeol3.right
@@ -0,0 +1 @@
./noeol3.tests: line 2: syntax error: unterminated quoted string
diff --git a/shell/ash_test/ash-parsing/noeol3.tests b/shell/ash_test/ash-parsing/noeol3.tests
new file mode 100755
index 000000000..ec958ed7a
--- /dev/null
+++ b/shell/ash_test/ash-parsing/noeol3.tests
@@ -0,0 +1,2 @@
1# last line has no EOL!
2echo "unterminated \ No newline at end of file
diff --git a/shell/ash_test/ash-parsing/process_subst.right b/shell/ash_test/ash-parsing/process_subst.right
new file mode 100644
index 000000000..397bc8067
--- /dev/null
+++ b/shell/ash_test/ash-parsing/process_subst.right
@@ -0,0 +1,3 @@
1TESTzzBEST
2TEST$(echo zz)BEST
3TEST'BEST
diff --git a/shell/ash_test/ash-parsing/process_subst.tests b/shell/ash_test/ash-parsing/process_subst.tests
new file mode 100755
index 000000000..21996bc0e
--- /dev/null
+++ b/shell/ash_test/ash-parsing/process_subst.tests
@@ -0,0 +1,3 @@
1echo "TEST`echo zz;echo;echo`BEST"
2echo "TEST`echo '$(echo zz)'`BEST"
3echo "TEST`echo "'"`BEST"
diff --git a/shell/ash_test/ash-parsing/quote1.right b/shell/ash_test/ash-parsing/quote1.right
new file mode 100644
index 000000000..cb382054c
--- /dev/null
+++ b/shell/ash_test/ash-parsing/quote1.right
@@ -0,0 +1 @@
'1'
diff --git a/shell/ash_test/ash-parsing/quote1.tests b/shell/ash_test/ash-parsing/quote1.tests
new file mode 100755
index 000000000..f55895466
--- /dev/null
+++ b/shell/ash_test/ash-parsing/quote1.tests
@@ -0,0 +1,2 @@
1a=1
2echo "'$a'"
diff --git a/shell/ash_test/ash-parsing/quote2.right b/shell/ash_test/ash-parsing/quote2.right
new file mode 100644
index 000000000..3bc9edcd6
--- /dev/null
+++ b/shell/ash_test/ash-parsing/quote2.right
@@ -0,0 +1 @@
>1
diff --git a/shell/ash_test/ash-parsing/quote2.tests b/shell/ash_test/ash-parsing/quote2.tests
new file mode 100755
index 000000000..bd966f30b
--- /dev/null
+++ b/shell/ash_test/ash-parsing/quote2.tests
@@ -0,0 +1,2 @@
1a=1
2echo ">$a"
diff --git a/shell/ash_test/ash-parsing/quote3.right b/shell/ash_test/ash-parsing/quote3.right
new file mode 100644
index 000000000..bbe46df67
--- /dev/null
+++ b/shell/ash_test/ash-parsing/quote3.right
@@ -0,0 +1,12 @@
1Testing: in ""
2..
3Testing: in ''
4..
5Testing: in $empty
6Testing: in $empty""
7..
8Testing: in $empty''
9..
10Testing: in "$empty"
11..
12Finished
diff --git a/shell/ash_test/ash-parsing/quote3.tests b/shell/ash_test/ash-parsing/quote3.tests
new file mode 100755
index 000000000..b5fd5978c
--- /dev/null
+++ b/shell/ash_test/ash-parsing/quote3.tests
@@ -0,0 +1,21 @@
1empty=''
2
3echo 'Testing: in ""'
4for a in ""; do echo ".$a."; done
5
6echo 'Testing: in '"''"
7for a in ''; do echo ".$a."; done
8
9echo 'Testing: in $empty'
10for a in $empty; do echo ".$a."; done
11
12echo 'Testing: in $empty""'
13for a in $empty""; do echo ".$a."; done
14
15echo 'Testing: in $empty'"''"
16for a in $empty''; do echo ".$a."; done
17
18echo 'Testing: in "$empty"'
19for a in "$empty"; do echo ".$a."; done
20
21echo Finished
diff --git a/shell/ash_test/ash-parsing/quote4.right b/shell/ash_test/ash-parsing/quote4.right
new file mode 100644
index 000000000..b2901ea97
--- /dev/null
+++ b/shell/ash_test/ash-parsing/quote4.right
@@ -0,0 +1 @@
a b
diff --git a/shell/ash_test/ash-parsing/quote4.tests b/shell/ash_test/ash-parsing/quote4.tests
new file mode 100755
index 000000000..f1dabfa54
--- /dev/null
+++ b/shell/ash_test/ash-parsing/quote4.tests
@@ -0,0 +1,2 @@
1a_b='a b'
2echo "$a_b"
diff --git a/shell/ash_test/ash-parsing/starquoted.right b/shell/ash_test/ash-parsing/starquoted.right
new file mode 100644
index 000000000..b56323fe1
--- /dev/null
+++ b/shell/ash_test/ash-parsing/starquoted.right
@@ -0,0 +1,8 @@
1.1 abc d e f.
2.1.
3.abc.
4.d e f.
5.-1 abc d e f-.
6.-1.
7.abc.
8.d e f-.
diff --git a/shell/ash_test/ash-parsing/starquoted.tests b/shell/ash_test/ash-parsing/starquoted.tests
new file mode 100755
index 000000000..2fe49b1cd
--- /dev/null
+++ b/shell/ash_test/ash-parsing/starquoted.tests
@@ -0,0 +1,8 @@
1if test $# = 0; then
2 exec "$THIS_SH" "$0" 1 abc 'd e f'
3fi
4
5for a in "$*"; do echo ".$a."; done
6for a in "$@"; do echo ".$a."; done
7for a in "-$*-"; do echo ".$a."; done
8for a in "-$@-"; do echo ".$a."; done
diff --git a/shell/ash_test/ash-parsing/starquoted2.right b/shell/ash_test/ash-parsing/starquoted2.right
new file mode 100644
index 000000000..1bff408ca
--- /dev/null
+++ b/shell/ash_test/ash-parsing/starquoted2.right
@@ -0,0 +1,8 @@
1Should be printed
2Would not be printed by bash
3Would not be printed by bash
4Would not be printed by bash
5Should be printed
6Empty:
7Empty:
8Empty:
diff --git a/shell/ash_test/ash-parsing/starquoted2.tests b/shell/ash_test/ash-parsing/starquoted2.tests
new file mode 100755
index 000000000..7c5ff45b8
--- /dev/null
+++ b/shell/ash_test/ash-parsing/starquoted2.tests
@@ -0,0 +1,19 @@
1if test $# != 0; then
2 exec "$THIS_SH" "$0"
3fi
4
5# No params!
6for a in "$*"; do echo Should be printed; done
7for a in "$@"; do echo Should not be printed; done
8# Yes, believe it or not, bash is mesmerized by "$@" and stops
9# treating "" as "this word cannot be expanded to nothing,
10# but must be at least null string". Now it can be expanded to nothing.
11for a in "$@"""; do echo Would not be printed by bash; done
12for a in """$@"; do echo Would not be printed by bash; done
13for a in """$@"''"$@"''; do echo Would not be printed by bash; done
14for a in ""; do echo Should be printed; done
15
16# Bug 207: "$@" expands to nothing, and we erroneously glob "%s\n" twice:
17printf 'Empty:%s\n' "$@"
18printf "Empty:%s\n" "$@"
19printf "Empty:%s\\n" "$@"
diff --git a/shell/ash_test/ash-quoting/mode_x.right b/shell/ash_test/ash-quoting/mode_x.right
new file mode 100644
index 000000000..c2dd3550c
--- /dev/null
+++ b/shell/ash_test/ash-quoting/mode_x.right
@@ -0,0 +1,10 @@
1+ var1=val
2+ var2='one two'
3+ true '%s\n' one 'two '"'"'three' four
4+ this=command
5+ 'this=command'
6./mode_x.tests: line 1: this=command: not found
7+ true
8+ true
9+ 'if' true
10./mode_x.tests: line 1: if: not found
diff --git a/shell/ash_test/ash-quoting/mode_x.tests b/shell/ash_test/ash-quoting/mode_x.tests
new file mode 100755
index 000000000..16dae3f4b
--- /dev/null
+++ b/shell/ash_test/ash-quoting/mode_x.tests
@@ -0,0 +1,14 @@
1set -x
2
3var1=val
4var2='one two'
5true %s\\n one "two 'three" four
6
7# assignment:
8this=command
9# NOT assignment, +x code should show it quoted:
10"this=command"
11
12if true; then true; fi
13# +x code should quote 'if' here:
14"if" true
diff --git a/shell/ash_test/ash-read/read_t0.right b/shell/ash_test/ash-read/read_t0.right
new file mode 100644
index 000000000..f02105961
--- /dev/null
+++ b/shell/ash_test/ash-read/read_t0.right
@@ -0,0 +1,3 @@
1><[0]
2><[0]
3><[1]
diff --git a/shell/ash_test/ash-read/read_t0.tests b/shell/ash_test/ash-read/read_t0.tests
new file mode 100755
index 000000000..6b7bc217b
--- /dev/null
+++ b/shell/ash_test/ash-read/read_t0.tests
@@ -0,0 +1,14 @@
1# ><[0]
2echo Ok | { sleep 0.1; read -t 0 reply; echo ">$reply<[$?]"; }
3
4# This would not be deterministic: returns 0 "data exists" if EOF is seen
5# (true terminated) - because EOF is considered to be data (read will not block),
6# else returns 1 "no data".
7## ><[????]
8#true | { read -t 0 reply; echo ">$reply<[$?]"; }
9
10# ><[0]
11true | { sleep 0.1; read -t 0 reply; echo ">$reply<[$?]"; }
12
13# ><[1]
14sleep 0.2 | { read -p IGNORED_PROMPT -t 0 reply; echo ">$reply<[$?]"; }
diff --git a/shell/ash_test/ash-vars/readonly0.right b/shell/ash_test/ash-vars/readonly0.right
new file mode 100644
index 000000000..f3a6bde9e
--- /dev/null
+++ b/shell/ash_test/ash-vars/readonly0.right
@@ -0,0 +1,13 @@
1readonly a='A'
2readonly b='B'
3Ok:0
4
5./readonly0.tests: line 19: a: is read only
6Fail:2
7./readonly0.tests: readonly: line 21: a: is read only
8Fail:2
9
10./readonly0.tests: export: line 27: a: is read only
11Fail:2
12
13Fail:1
diff --git a/shell/ash_test/ash-vars/readonly0.tests b/shell/ash_test/ash-vars/readonly0.tests
new file mode 100755
index 000000000..94af79060
--- /dev/null
+++ b/shell/ash_test/ash-vars/readonly0.tests
@@ -0,0 +1,45 @@
1unset a b
2#
3readonly a=A
4b=B
5readonly b
6# readonly on already readonly var is harmless:
7readonly b a
8readonly | grep '^readonly [ab]='
9# this should work:
10export a b
11export -n a b
12echo Ok:$?
13env | grep -e^a= -e^b= # shows nothing
14
15echo
16# these should all fail (despite the same value being assigned)
17# bash does not abort even in non-interactive more (in script)
18# ash does, using subshell to continue
19true; (a=A)
20echo Fail:$?
21true; (readonly a=A)
22echo Fail:$?
23
24echo
25# in bash, assignment in export fails, but export succeeds! :)
26# we don't mimic that!
27true; (export a=Z)
28echo Fail:$?
29#env | grep '^a='
30#echo "^^^a is exported"
31export -n a # undo that bashism, if it happens
32
33## ash: assignment errors in "a=Z CMD" lead to CMD not executed
34## echo
35## export b
36## # this fails to both set and export a:
37## a=Z env | echo grep '^[ab]='
38## echo "^^^a is not exported"
39## # but external command does get executed, and $? is not mangled (stays 42):
40## (exit 42); a=Z env echo Visible:$?
41
42echo
43# ash: this fails *silently*, bug? bash says "cannot unset: readonly variable"
44true; unset a
45echo Fail:$?
diff --git a/shell/ash_test/ash-vars/readonly1.right b/shell/ash_test/ash-vars/readonly1.right
index 2b363e325..1f5be64c7 100644
--- a/shell/ash_test/ash-vars/readonly1.right
+++ b/shell/ash_test/ash-vars/readonly1.right
@@ -1,2 +1,2 @@
1One:1 1Fail:2
2One:1 2Fail:2
diff --git a/shell/ash_test/ash-vars/readonly1.tests b/shell/ash_test/ash-vars/readonly1.tests
index 81b461f5f..f3cccd940 100755
--- a/shell/ash_test/ash-vars/readonly1.tests
+++ b/shell/ash_test/ash-vars/readonly1.tests
@@ -1,7 +1,7 @@
1readonly bla=123 1readonly bla=123
2# Bare "eval bla=123" should abort ("eval" is a special builtin): 2# Bare "eval bla=123" should abort ("eval" is a special builtin):
3(eval bla=123 2>/dev/null; echo BUG) 3(eval bla=123 2>/dev/null; echo BUG)
4echo One:$? 4echo Fail:$?
5# "command BLTIN" disables "special-ness", should not abort: 5# "command BLTIN" disables "special-ness", should not abort:
6command eval bla=123 2>/dev/null 6command eval bla=123 2>/dev/null
7echo One:$? 7echo Fail:$?
diff --git a/shell/ash_test/run-all b/shell/ash_test/run-all
index 983e6d184..caf033577 100755
--- a/shell/ash_test/run-all
+++ b/shell/ash_test/run-all
@@ -2,10 +2,24 @@
2 2
3TOPDIR=`pwd` 3TOPDIR=`pwd`
4 4
5test -x ash || { 5if test ! -x ash; then
6 echo "No ./ash - creating a link to ../../busybox" 6 if test ! -x ../../busybox; then
7 ln -s ../../busybox ash 7 echo "Can't run tests. Put ash binary into this directory (`pwd`)"
8} 8 exit 1
9 fi
10 echo "No ./ash - creating a link to ../../busybox"
11 ln -s ../../busybox ash
12fi
13if test ! -f .config; then
14 if test ! -f ../../.config; then
15 echo "Missing .config file"
16 exit 1
17 fi
18 cp ../../.config . || exit 1
19fi
20
21eval $(sed -e '/^#/d' -e '/^$/d' -e 's:^:export :' .config)
22
9test -x printenv || gcc -O2 -o printenv printenv.c || exit $? 23test -x printenv || gcc -O2 -o printenv printenv.c || exit $?
10test -x recho || gcc -O2 -o recho recho.c || exit $? 24test -x recho || gcc -O2 -o recho recho.c || exit $?
11test -x zecho || gcc -O2 -o zecho zecho.c || exit $? 25test -x zecho || gcc -O2 -o zecho zecho.c || exit $?
diff --git a/shell/cttyhack.c b/shell/cttyhack.c
index f9b59c263..9004b4763 100644
--- a/shell/cttyhack.c
+++ b/shell/cttyhack.c
@@ -11,48 +11,48 @@
11//kbuild:lib-$(CONFIG_CTTYHACK) += cttyhack.o 11//kbuild:lib-$(CONFIG_CTTYHACK) += cttyhack.o
12 12
13//config:config CTTYHACK 13//config:config CTTYHACK
14//config: bool "cttyhack" 14//config: bool "cttyhack (2.5 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: One common problem reported on the mailing list is the "can't 17//config: One common problem reported on the mailing list is the "can't
18//config: access tty; job control turned off" error message, which typically 18//config: access tty; job control turned off" error message, which typically
19//config: appears when one tries to use a shell with stdin/stdout on 19//config: appears when one tries to use a shell with stdin/stdout on
20//config: /dev/console. 20//config: /dev/console.
21//config: This device is special - it cannot be a controlling tty. 21//config: This device is special - it cannot be a controlling tty.
22//config: 22//config:
23//config: The proper solution is to use the correct device instead of 23//config: The proper solution is to use the correct device instead of
24//config: /dev/console. 24//config: /dev/console.
25//config: 25//config:
26//config: cttyhack provides a "quick and dirty" solution to this problem. 26//config: cttyhack provides a "quick and dirty" solution to this problem.
27//config: It analyzes stdin with various ioctls, trying to determine whether 27//config: It analyzes stdin with various ioctls, trying to determine whether
28//config: it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line). 28//config: it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
29//config: On Linux it also checks sysfs for a pointer to the active console. 29//config: On Linux it also checks sysfs for a pointer to the active console.
30//config: If cttyhack is able to find the real console device, it closes 30//config: If cttyhack is able to find the real console device, it closes
31//config: stdin/out/err and reopens that device. 31//config: stdin/out/err and reopens that device.
32//config: Then it executes the given program. Opening the device will make 32//config: Then it executes the given program. Opening the device will make
33//config: that device a controlling tty. This may require cttyhack 33//config: that device a controlling tty. This may require cttyhack
34//config: to be a session leader. 34//config: to be a session leader.
35//config: 35//config:
36//config: Example for /etc/inittab (for busybox init): 36//config: Example for /etc/inittab (for busybox init):
37//config: 37//config:
38//config: ::respawn:/bin/cttyhack /bin/sh 38//config: ::respawn:/bin/cttyhack /bin/sh
39//config: 39//config:
40//config: Starting an interactive shell from boot shell script: 40//config: Starting an interactive shell from boot shell script:
41//config: 41//config:
42//config: setsid cttyhack sh 42//config: setsid cttyhack sh
43//config: 43//config:
44//config: Giving controlling tty to shell running with PID 1: 44//config: Giving controlling tty to shell running with PID 1:
45//config: 45//config:
46//config: # exec cttyhack sh 46//config: # exec cttyhack sh
47//config: 47//config:
48//config: Without cttyhack, you need to know exact tty name, 48//config: Without cttyhack, you need to know exact tty name,
49//config: and do something like this: 49//config: and do something like this:
50//config: 50//config:
51//config: # exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1' 51//config: # exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
52//config: 52//config:
53//config: Starting getty on a controlling tty from a shell script: 53//config: Starting getty on a controlling tty from a shell script:
54//config: 54//config:
55//config: # getty 115200 $(cttyhack) 55//config: # getty 115200 $(cttyhack)
56 56
57//usage:#define cttyhack_trivial_usage 57//usage:#define cttyhack_trivial_usage
58//usage: "[PROG ARGS]" 58//usage: "[PROG ARGS]"
diff --git a/shell/hush.c b/shell/hush.c
index f6da826d3..309ed2139 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -101,18 +101,18 @@
101 * aaa 101 * aaa
102 */ 102 */
103//config:config HUSH 103//config:config HUSH
104//config: bool "hush" 104//config: bool "hush (64 kb)"
105//config: default y 105//config: default y
106//config: help 106//config: help
107//config: hush is a small shell (25k). It handles the normal flow control 107//config: hush is a small shell. It handles the normal flow control
108//config: constructs such as if/then/elif/else/fi, for/in/do/done, while loops, 108//config: constructs such as if/then/elif/else/fi, for/in/do/done, while loops,
109//config: case/esac. Redirections, here documents, $((arithmetic)) 109//config: case/esac. Redirections, here documents, $((arithmetic))
110//config: and functions are supported. 110//config: and functions are supported.
111//config: 111//config:
112//config: It will compile and work on no-mmu systems. 112//config: It will compile and work on no-mmu systems.
113//config: 113//config:
114//config: It does not handle select, aliases, tilde expansion, 114//config: It does not handle select, aliases, tilde expansion,
115//config: &>file and >&file redirection of stdout+stderr. 115//config: &>file and >&file redirection of stdout+stderr.
116//config: 116//config:
117//config:config HUSH_BASH_COMPAT 117//config:config HUSH_BASH_COMPAT
118//config: bool "bash-compatible extensions" 118//config: bool "bash-compatible extensions"
@@ -124,17 +124,17 @@
124//config: default y 124//config: default y
125//config: depends on HUSH_BASH_COMPAT 125//config: depends on HUSH_BASH_COMPAT
126//config: help 126//config: help
127//config: Enable {abc,def} extension. 127//config: Enable {abc,def} extension.
128//config: 128//config:
129//config:config HUSH_INTERACTIVE 129//config:config HUSH_INTERACTIVE
130//config: bool "Interactive mode" 130//config: bool "Interactive mode"
131//config: default y 131//config: default y
132//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH 132//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
133//config: help 133//config: help
134//config: Enable interactive mode (prompt and command editing). 134//config: Enable interactive mode (prompt and command editing).
135//config: Without this, hush simply reads and executes commands 135//config: Without this, hush simply reads and executes commands
136//config: from stdin just like a shell script from a file. 136//config: from stdin just like a shell script from a file.
137//config: No prompt, no PS1/PS2 magic shell variables. 137//config: No prompt, no PS1/PS2 magic shell variables.
138//config: 138//config:
139//config:config HUSH_SAVEHISTORY 139//config:config HUSH_SAVEHISTORY
140//config: bool "Save command history to .hush_history" 140//config: bool "Save command history to .hush_history"
@@ -146,18 +146,18 @@
146//config: default y 146//config: default y
147//config: depends on HUSH_INTERACTIVE 147//config: depends on HUSH_INTERACTIVE
148//config: help 148//config: help
149//config: Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current 149//config: Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current
150//config: command (not entire shell), fg/bg builtins work. Without this option, 150//config: command (not entire shell), fg/bg builtins work. Without this option,
151//config: "cmd &" still works by simply spawning a process and immediately 151//config: "cmd &" still works by simply spawning a process and immediately
152//config: prompting for next command (or executing next command in a script), 152//config: prompting for next command (or executing next command in a script),
153//config: but no separate process group is formed. 153//config: but no separate process group is formed.
154//config: 154//config:
155//config:config HUSH_TICK 155//config:config HUSH_TICK
156//config: bool "Support process substitution" 156//config: bool "Support process substitution"
157//config: default y 157//config: default y
158//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH 158//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
159//config: help 159//config: help
160//config: Enable `command` and $(command). 160//config: Enable `command` and $(command).
161//config: 161//config:
162//config:config HUSH_IF 162//config:config HUSH_IF
163//config: bool "Support if/then/elif/else/fi" 163//config: bool "Support if/then/elif/else/fi"
@@ -174,37 +174,37 @@
174//config: default y 174//config: default y
175//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH 175//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
176//config: help 176//config: help
177//config: Enable case ... esac statement. +400 bytes. 177//config: Enable case ... esac statement. +400 bytes.
178//config: 178//config:
179//config:config HUSH_FUNCTIONS 179//config:config HUSH_FUNCTIONS
180//config: bool "Support funcname() { commands; } syntax" 180//config: bool "Support funcname() { commands; } syntax"
181//config: default y 181//config: default y
182//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH 182//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
183//config: help 183//config: help
184//config: Enable support for shell functions. +800 bytes. 184//config: Enable support for shell functions. +800 bytes.
185//config: 185//config:
186//config:config HUSH_LOCAL 186//config:config HUSH_LOCAL
187//config: bool "local builtin" 187//config: bool "local builtin"
188//config: default y 188//config: default y
189//config: depends on HUSH_FUNCTIONS 189//config: depends on HUSH_FUNCTIONS
190//config: help 190//config: help
191//config: Enable support for local variables in functions. 191//config: Enable support for local variables in functions.
192//config: 192//config:
193//config:config HUSH_RANDOM_SUPPORT 193//config:config HUSH_RANDOM_SUPPORT
194//config: bool "Pseudorandom generator and $RANDOM variable" 194//config: bool "Pseudorandom generator and $RANDOM variable"
195//config: default y 195//config: default y
196//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH 196//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
197//config: help 197//config: help
198//config: Enable pseudorandom generator and dynamic variable "$RANDOM". 198//config: Enable pseudorandom generator and dynamic variable "$RANDOM".
199//config: Each read of "$RANDOM" will generate a new pseudorandom value. 199//config: Each read of "$RANDOM" will generate a new pseudorandom value.
200//config: 200//config:
201//config:config HUSH_MODE_X 201//config:config HUSH_MODE_X
202//config: bool "Support 'hush -x' option and 'set -x' command" 202//config: bool "Support 'hush -x' option and 'set -x' command"
203//config: default y 203//config: default y
204//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH 204//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
205//config: help 205//config: help
206//config: This instructs hush to print commands before execution. 206//config: This instructs hush to print commands before execution.
207//config: Adds ~300 bytes. 207//config: Adds ~300 bytes.
208//config: 208//config:
209//config:config HUSH_ECHO 209//config:config HUSH_ECHO
210//config: bool "echo builtin" 210//config: bool "echo builtin"
@@ -236,14 +236,14 @@
236//config: default y 236//config: default y
237//config: depends on HUSH_EXPORT 237//config: depends on HUSH_EXPORT
238//config: help 238//config: help
239//config: export -n unexports variables. It is a bash extension. 239//config: export -n unexports variables. It is a bash extension.
240//config: 240//config:
241//config:config HUSH_READONLY 241//config:config HUSH_READONLY
242//config: bool "readonly builtin" 242//config: bool "readonly builtin"
243//config: default y 243//config: default y
244//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH 244//config: depends on HUSH || SH_IS_HUSH || BASH_IS_HUSH
245//config: help 245//config: help
246//config: Enable support for read-only variables. 246//config: Enable support for read-only variables.
247//config: 247//config:
248//config:config HUSH_KILL 248//config:config HUSH_KILL
249//config: bool "kill builtin (supports kill %jobspec)" 249//config: bool "kill builtin (supports kill %jobspec)"
@@ -1068,7 +1068,7 @@ static const struct built_in_command bltins1[] = {
1068 BLTIN("export" , builtin_export , "Set environment variables"), 1068 BLTIN("export" , builtin_export , "Set environment variables"),
1069#endif 1069#endif
1070#if ENABLE_HUSH_JOB 1070#if ENABLE_HUSH_JOB
1071 BLTIN("fg" , builtin_fg_bg , "Bring job into foreground"), 1071 BLTIN("fg" , builtin_fg_bg , "Bring job to foreground"),
1072#endif 1072#endif
1073#if ENABLE_HUSH_HELP 1073#if ENABLE_HUSH_HELP
1074 BLTIN("help" , builtin_help , NULL), 1074 BLTIN("help" , builtin_help , NULL),
@@ -1121,7 +1121,7 @@ static const struct built_in_command bltins1[] = {
1121 BLTIN("unset" , builtin_unset , "Unset variables"), 1121 BLTIN("unset" , builtin_unset , "Unset variables"),
1122#endif 1122#endif
1123#if ENABLE_HUSH_WAIT 1123#if ENABLE_HUSH_WAIT
1124 BLTIN("wait" , builtin_wait , "Wait for process"), 1124 BLTIN("wait" , builtin_wait , "Wait for process to finish"),
1125#endif 1125#endif
1126}; 1126};
1127/* These builtins won't be used if we are on NOMMU and need to re-exec 1127/* These builtins won't be used if we are on NOMMU and need to re-exec
@@ -2662,9 +2662,8 @@ static void o_delchr(o_string *o)
2662static void o_addblock(o_string *o, const char *str, int len) 2662static void o_addblock(o_string *o, const char *str, int len)
2663{ 2663{
2664 o_grow_by(o, len); 2664 o_grow_by(o, len);
2665 memcpy(&o->data[o->length], str, len); 2665 ((char*)mempcpy(&o->data[o->length], str, len))[0] = '\0';
2666 o->length += len; 2666 o->length += len;
2667 o->data[o->length] = '\0';
2668} 2667}
2669 2668
2670static void o_addstr(o_string *o, const char *str) 2669static void o_addstr(o_string *o, const char *str)
@@ -5519,17 +5518,15 @@ static char *replace_pattern(char *val, const char *pattern, const char *repl, c
5519 break; 5518 break;
5520 5519
5521 result = xrealloc(result, res_len + (s - val) + repl_len + 1); 5520 result = xrealloc(result, res_len + (s - val) + repl_len + 1);
5522 memcpy(result + res_len, val, s - val); 5521 strcpy(mempcpy(result + res_len, val, s - val), repl);
5523 res_len += s - val; 5522 res_len += (s - val) + repl_len;
5524 strcpy(result + res_len, repl);
5525 res_len += repl_len;
5526 debug_printf_varexp("val:'%s' s:'%s' result:'%s'\n", val, s, result); 5523 debug_printf_varexp("val:'%s' s:'%s' result:'%s'\n", val, s, result);
5527 5524
5528 val = s + size; 5525 val = s + size;
5529 if (exp_op == '/') 5526 if (exp_op == '/')
5530 break; 5527 break;
5531 } 5528 }
5532 if (val[0] && result) { 5529 if (*val && result) {
5533 result = xrealloc(result, res_len + strlen(val) + 1); 5530 result = xrealloc(result, res_len + strlen(val) + 1);
5534 strcpy(result + res_len, val); 5531 strcpy(result + res_len, val);
5535 debug_printf_varexp("val:'%s' result:'%s'\n", val, result); 5532 debug_printf_varexp("val:'%s' result:'%s'\n", val, result);
diff --git a/shell/hush_test/hush-read/read_t0.right b/shell/hush_test/hush-read/read_t0.right
new file mode 100644
index 000000000..f02105961
--- /dev/null
+++ b/shell/hush_test/hush-read/read_t0.right
@@ -0,0 +1,3 @@
1><[0]
2><[0]
3><[1]
diff --git a/shell/hush_test/hush-read/read_t0.tests b/shell/hush_test/hush-read/read_t0.tests
new file mode 100755
index 000000000..6b7bc217b
--- /dev/null
+++ b/shell/hush_test/hush-read/read_t0.tests
@@ -0,0 +1,14 @@
1# ><[0]
2echo Ok | { sleep 0.1; read -t 0 reply; echo ">$reply<[$?]"; }
3
4# This would not be deterministic: returns 0 "data exists" if EOF is seen
5# (true terminated) - because EOF is considered to be data (read will not block),
6# else returns 1 "no data".
7## ><[????]
8#true | { read -t 0 reply; echo ">$reply<[$?]"; }
9
10# ><[0]
11true | { sleep 0.1; read -t 0 reply; echo ">$reply<[$?]"; }
12
13# ><[1]
14sleep 0.2 | { read -p IGNORED_PROMPT -t 0 reply; echo ">$reply<[$?]"; }
diff --git a/shell/shell_common.c b/shell/shell_common.c
index 154b860f8..750adc5d8 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -61,9 +61,10 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
61 const char *opt_u 61 const char *opt_u
62) 62)
63{ 63{
64 struct pollfd pfd[1];
65#define fd (pfd[0].fd) /* -u FD */
64 unsigned err; 66 unsigned err;
65 unsigned end_ms; /* -t TIMEOUT */ 67 unsigned end_ms; /* -t TIMEOUT */
66 int fd; /* -u FD */
67 int nchars; /* -n NUM */ 68 int nchars; /* -n NUM */
68 char **pp; 69 char **pp;
69 char *buffer; 70 char *buffer;
@@ -92,38 +93,43 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
92 return "invalid count"; 93 return "invalid count";
93 /* note: "-n 0": off (bash 3.2 does this too) */ 94 /* note: "-n 0": off (bash 3.2 does this too) */
94 } 95 }
96
95 end_ms = 0; 97 end_ms = 0;
96 if (opt_t) { 98 if (opt_t && !ENABLE_FEATURE_SH_READ_FRAC) {
97 end_ms = bb_strtou(opt_t, NULL, 10); 99 end_ms = bb_strtou(opt_t, NULL, 10);
98 if (errno || end_ms > UINT_MAX / 2048) 100 if (errno)
99 return "invalid timeout"; 101 return "invalid timeout";
102 if (end_ms > UINT_MAX / 2048) /* be safely away from overflow */
103 end_ms = UINT_MAX / 2048;
100 end_ms *= 1000; 104 end_ms *= 1000;
101#if 0 /* even bash has no -t N.NNN support */ 105 }
102 ts.tv_sec = bb_strtou(opt_t, &p, 10); 106 if (opt_t && ENABLE_FEATURE_SH_READ_FRAC) {
103 ts.tv_usec = 0; 107 /* bash 4.3 (maybe earlier) supports -t N.NNNNNN */
104 /* EINVAL means number is ok, but not terminated by NUL */ 108 char *p;
105 if (*p == '.' && errno == EINVAL) { 109 /* Eat up to three fractional digits */
106 char *p2; 110 int frac_digits = 3 + 1;
107 if (*++p) { 111
108 int scale; 112 end_ms = bb_strtou(opt_t, &p, 10);
109 ts.tv_usec = bb_strtou(p, &p2, 10); 113 if (end_ms > UINT_MAX / 2048) /* be safely away from overflow */
110 if (errno) 114 end_ms = UINT_MAX / 2048;
111 return "invalid timeout"; 115
112 scale = p2 - p; 116 if (errno) {
113 /* normalize to usec */ 117 /* EINVAL = number is ok, but not NUL terminated */
114 if (scale > 6) 118 if (errno != EINVAL || *p != '.')
119 return "invalid timeout";
120 /* Do not check the rest: bash allows "0.123456xyz" */
121 while (*++p && --frac_digits) {
122 end_ms *= 10;
123 end_ms += (*p - '0');
124 if ((unsigned char)(*p - '0') > 9)
115 return "invalid timeout"; 125 return "invalid timeout";
116 while (scale++ < 6)
117 ts.tv_usec *= 10;
118 } 126 }
119 } else if (ts.tv_sec < 0 || errno) {
120 return "invalid timeout";
121 } 127 }
122 if (!(ts.tv_sec | ts.tv_usec)) { /* both are 0? */ 128 while (--frac_digits > 0) {
123 return "invalid timeout"; 129 end_ms *= 10;
124 } 130 }
125#endif /* if 0 */
126 } 131 }
132
127 fd = STDIN_FILENO; 133 fd = STDIN_FILENO;
128 if (opt_u) { 134 if (opt_u) {
129 fd = bb_strtou(opt_u, NULL, 10); 135 fd = bb_strtou(opt_u, NULL, 10);
@@ -131,6 +137,19 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
131 return "invalid file descriptor"; 137 return "invalid file descriptor";
132 } 138 }
133 139
140 if (opt_t && end_ms == 0) {
141 /* "If timeout is 0, read returns immediately, without trying
142 * to read any data. The exit status is 0 if input is available
143 * on the specified file descriptor, non-zero otherwise."
144 * bash seems to ignore -p PROMPT for this use case.
145 */
146 int r;
147 pfd[0].events = POLLIN;
148 r = poll(pfd, 1, /*timeout:*/ 0);
149 /* Return 0 only if poll returns 1 ("one fd ready"), else return 1: */
150 return (const char *)(uintptr_t)(r <= 0);
151 }
152
134 if (opt_p && isatty(fd)) { 153 if (opt_p && isatty(fd)) {
135 fputs(opt_p, stderr); 154 fputs(opt_p, stderr);
136 fflush_all(); 155 fflush_all();
@@ -165,21 +184,24 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
165 retval = (const char *)(uintptr_t)0; 184 retval = (const char *)(uintptr_t)0;
166 startword = 1; 185 startword = 1;
167 backslash = 0; 186 backslash = 0;
168 if (end_ms) /* NB: end_ms stays nonzero: */ 187 if (opt_t)
169 end_ms = ((unsigned)monotonic_ms() + end_ms) | 1; 188 end_ms += (unsigned)monotonic_ms();
170 buffer = NULL; 189 buffer = NULL;
171 bufpos = 0; 190 bufpos = 0;
172 do { 191 do {
173 char c; 192 char c;
174 struct pollfd pfd[1];
175 int timeout; 193 int timeout;
176 194
177 if ((bufpos & 0xff) == 0) 195 if ((bufpos & 0xff) == 0)
178 buffer = xrealloc(buffer, bufpos + 0x101); 196 buffer = xrealloc(buffer, bufpos + 0x101);
179 197
180 timeout = -1; 198 timeout = -1;
181 if (end_ms) { 199 if (opt_t) {
182 timeout = end_ms - (unsigned)monotonic_ms(); 200 timeout = end_ms - (unsigned)monotonic_ms();
201 /* ^^^^^^^^^^^^^ all values are unsigned,
202 * wrapping math is used here, good even if
203 * 32-bit unix time wrapped (year 2038+).
204 */
183 if (timeout <= 0) { /* already late? */ 205 if (timeout <= 0) { /* already late? */
184 retval = (const char *)(uintptr_t)1; 206 retval = (const char *)(uintptr_t)1;
185 goto ret; 207 goto ret;
@@ -192,9 +214,8 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
192 */ 214 */
193 errno = 0; 215 errno = 0;
194#if !ENABLE_PLATFORM_MINGW32 216#if !ENABLE_PLATFORM_MINGW32
195 pfd[0].fd = fd;
196 pfd[0].events = POLLIN; 217 pfd[0].events = POLLIN;
197 if (poll(pfd, 1, timeout) != 1) { 218 if (poll(pfd, 1, timeout) <= 0) {
198 /* timed out, or EINTR */ 219 /* timed out, or EINTR */
199 err = errno; 220 err = errno;
200 retval = (const char *)(uintptr_t)1; 221 retval = (const char *)(uintptr_t)1;
@@ -278,6 +299,7 @@ shell_builtin_read(void FAST_FUNC (*setvar)(const char *name, const char *val),
278 299
279 errno = err; 300 errno = err;
280 return retval; 301 return retval;
302#undef fd
281} 303}
282 304
283/* ulimit builtin */ 305/* ulimit builtin */
diff --git a/size_single_applets.sh b/size_single_applets.sh
new file mode 100755
index 000000000..0fa56e09e
--- /dev/null
+++ b/size_single_applets.sh
@@ -0,0 +1,76 @@
1#!/bin/bash
2# The list of all applet config symbols
3test -f include/applets.h || { echo "No include/applets.h file"; exit 1; }
4apps="`
5grep ^IF_ include/applets.h \
6| grep -v ^IF_FEATURE_ \
7| sed 's/IF_\([A-Z0-9._-]*\)(.*/\1/' \
8| sort | uniq
9`"
10
11test $# = 0 && set -- $apps
12
13mintext=999999999
14for app; do
15 b="busybox_${app}"
16 test -f "$b" || continue
17 text=`size "$b" | tail -1 | sed -e's/\t/ /g' -e's/^ *//' -e's/ .*//'`
18 #echo "text from $app: $text"
19 test x"${text//[0123456789]/}" = x"" || {
20 echo "Can't get: size $b"
21 exit 1
22 }
23 test $mintext -gt $text && {
24 mintext=$text
25 echo "New mintext from $app: $mintext"
26 }
27 eval "text_${app}=$text"
28done
29
30for app; do
31 b="busybox_${app}"
32 test -f "$b" || continue
33 eval "text=\$text_${app}"
34 echo "$app adds $((text-mintext))"
35done
36
37grep ^IF_ include/applets.h \
38| grep -v ^IF_FEATURE_ \
39| sed 's/, .*//' \
40| sed 's/\t//g' \
41| sed 's/ //g' \
42| sed 's/(APPLET(/(/' \
43| sed 's/(APPLET_[A-Z]*(/(/' \
44| sed 's/(IF_[A-Z_]*(/(/' \
45| sed 's/IF_\([A-Z0-9._-]*\)(\(.*\)/\1 \2/' \
46| sort | uniq \
47| while read app name; do
48 b="busybox_${app}"
49 test -f "$b" || continue
50
51 file=`grep -lF "bool \"$name" $(find -name '*.c') | xargs`
52 # so far all such items are in .c files; if need to check Config.* files:
53 #test "$file" || file=`grep -lF "bool \"$name" $(find -name 'Config.*') | xargs`
54 test "$file" || continue
55 #echo "FILE:'$file'"
56
57 eval "text=\$text_${app}"
58 sz=$((text-mintext))
59 sz_kb=$((sz/1000))
60 sz_frac=$(( (sz - sz_kb*1000) ))
61 sz_f=$((sz_frac / 100))
62
63 echo -n "sed 's/bool \"$name *(*[0-9tinykbytes .]*)*\"/"
64 if test "$sz_kb" -ge 10; then
65 echo -n "bool \"$name (${sz_kb} kb)\""
66 elif test "$sz_kb" -gt 0 -a "$sz_f" = 0; then
67 echo -n "bool \"$name (${sz_kb} kb)\""
68 elif test "$sz_kb" -gt 0; then
69 echo -n "bool \"$name ($sz_kb.${sz_f} kb)\""
70 elif test "$sz" -ge 200; then
71 echo -n "bool \"$name ($sz bytes)\""
72 else
73 echo -n "bool \"$name (tiny)\""
74 fi
75 echo "/' -i $file"
76done
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c
index 4db72110d..728cc8d38 100644
--- a/sysklogd/klogd.c
+++ b/sysklogd/klogd.c
@@ -17,14 +17,14 @@
17 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 17 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
18 */ 18 */
19//config:config KLOGD 19//config:config KLOGD
20//config: bool "klogd" 20//config: bool "klogd (5.5 kb)"
21//config: default y 21//config: default y
22//config: help 22//config: help
23//config: klogd is a utility which intercepts and logs all 23//config: klogd is a utility which intercepts and logs all
24//config: messages from the Linux kernel and sends the messages 24//config: messages from the Linux kernel and sends the messages
25//config: out to the 'syslogd' utility so they can be logged. If 25//config: out to the 'syslogd' utility so they can be logged. If
26//config: you wish to record the messages produced by the kernel, 26//config: you wish to record the messages produced by the kernel,
27//config: you should enable this option. 27//config: you should enable this option.
28//config: 28//config:
29//config:comment "klogd should not be used together with syslog to kernel printk buffer" 29//config:comment "klogd should not be used together with syslog to kernel printk buffer"
30//config: depends on KLOGD && FEATURE_KMSG_SYSLOG 30//config: depends on KLOGD && FEATURE_KMSG_SYSLOG
@@ -35,16 +35,16 @@
35//config: depends on KLOGD 35//config: depends on KLOGD
36//config: select PLATFORM_LINUX 36//config: select PLATFORM_LINUX
37//config: help 37//config: help
38//config: The klogd applet supports two interfaces for reading 38//config: The klogd applet supports two interfaces for reading
39//config: kernel messages. Linux provides the klogctl() interface 39//config: kernel messages. Linux provides the klogctl() interface
40//config: which allows reading messages from the kernel ring buffer 40//config: which allows reading messages from the kernel ring buffer
41//config: independently from the file system. 41//config: independently from the file system.
42//config: 42//config:
43//config: If you answer 'N' here, klogd will use the more portable 43//config: If you answer 'N' here, klogd will use the more portable
44//config: approach of reading them from /proc or a device node. 44//config: approach of reading them from /proc or a device node.
45//config: However, this method requires the file to be available. 45//config: However, this method requires the file to be available.
46//config: 46//config:
47//config: If in doubt, say 'Y'. 47//config: If in doubt, say 'Y'.
48 48
49//applet:IF_KLOGD(APPLET(klogd, BB_DIR_SBIN, BB_SUID_DROP)) 49//applet:IF_KLOGD(APPLET(klogd, BB_DIR_SBIN, BB_SUID_DROP))
50 50
diff --git a/sysklogd/logger.c b/sysklogd/logger.c
index f9eafeb25..6769a8175 100644
--- a/sysklogd/logger.c
+++ b/sysklogd/logger.c
@@ -7,14 +7,14 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config LOGGER 9//config:config LOGGER
10//config: bool "logger" 10//config: bool "logger (6.4 kb)"
11//config: default y 11//config: default y
12//config: select FEATURE_SYSLOG 12//config: select FEATURE_SYSLOG
13//config: help 13//config: help
14//config: The logger utility allows you to send arbitrary text 14//config: The logger utility allows you to send arbitrary text
15//config: messages to the system log (i.e. the 'syslogd' utility) so 15//config: messages to the system log (i.e. the 'syslogd' utility) so
16//config: they can be logged. This is generally used to help locate 16//config: they can be logged. This is generally used to help locate
17//config: problems that occur within programs and scripts. 17//config: problems that occur within programs and scripts.
18 18
19//applet:IF_LOGGER(APPLET(logger, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_LOGGER(APPLET(logger, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/sysklogd/logread.c b/sysklogd/logread.c
index 71459941e..da552e087 100644
--- a/sysklogd/logread.c
+++ b/sysklogd/logread.c
@@ -9,26 +9,26 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 10 */
11//config:config LOGREAD 11//config:config LOGREAD
12//config: bool "logread" 12//config: bool "logread (6 kb)"
13//config: default y 13//config: default y
14//WRONG: it should be compilable without SYSLOG=y: 14//WRONG: it should be compilable without SYSLOG=y:
15//WRONG: depends on FEATURE_IPC_SYSLOG 15//WRONG: depends on FEATURE_IPC_SYSLOG
16//config: help 16//config: help
17//config: If you enabled Circular Buffer support, you almost 17//config: If you enabled Circular Buffer support, you almost
18//config: certainly want to enable this feature as well. This 18//config: certainly want to enable this feature as well. This
19//config: utility will allow you to read the messages that are 19//config: utility will allow you to read the messages that are
20//config: stored in the syslogd circular buffer. 20//config: stored in the syslogd circular buffer.
21//config: 21//config:
22//config:config FEATURE_LOGREAD_REDUCED_LOCKING 22//config:config FEATURE_LOGREAD_REDUCED_LOCKING
23//config: bool "Double buffering" 23//config: bool "Double buffering"
24//config: default y 24//config: default y
25//config: depends on LOGREAD 25//config: depends on LOGREAD
26//config: help 26//config: help
27//config: 'logread' output to slow serial terminals can have 27//config: 'logread' output to slow serial terminals can have
28//config: side effects on syslog because of the semaphore. 28//config: side effects on syslog because of the semaphore.
29//config: This option make logread to double buffer copy 29//config: This option make logread to double buffer copy
30//config: from circular buffer, minimizing semaphore 30//config: from circular buffer, minimizing semaphore
31//config: contention at some minor memory expense. 31//config: contention at some minor memory expense.
32//config: 32//config:
33 33
34//applet:IF_LOGREAD(APPLET(logread, BB_DIR_SBIN, BB_SUID_DROP)) 34//applet:IF_LOGREAD(APPLET(logread, BB_DIR_SBIN, BB_SUID_DROP))
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index d64ff278f..31730a7f9 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -13,56 +13,56 @@
13 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 13 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
14 */ 14 */
15//config:config SYSLOGD 15//config:config SYSLOGD
16//config: bool "syslogd" 16//config: bool "syslogd (12 kb)"
17//config: default y 17//config: default y
18//config: help 18//config: help
19//config: The syslogd utility is used to record logs of all the 19//config: The syslogd utility is used to record logs of all the
20//config: significant events that occur on a system. Every 20//config: significant events that occur on a system. Every
21//config: message that is logged records the date and time of the 21//config: message that is logged records the date and time of the
22//config: event, and will generally also record the name of the 22//config: event, and will generally also record the name of the
23//config: application that generated the message. When used in 23//config: application that generated the message. When used in
24//config: conjunction with klogd, messages from the Linux kernel 24//config: conjunction with klogd, messages from the Linux kernel
25//config: can also be recorded. This is terribly useful, 25//config: can also be recorded. This is terribly useful,
26//config: especially for finding what happened when something goes 26//config: especially for finding what happened when something goes
27//config: wrong. And something almost always will go wrong if 27//config: wrong. And something almost always will go wrong if
28//config: you wait long enough.... 28//config: you wait long enough....
29//config: 29//config:
30//config:config FEATURE_ROTATE_LOGFILE 30//config:config FEATURE_ROTATE_LOGFILE
31//config: bool "Rotate message files" 31//config: bool "Rotate message files"
32//config: default y 32//config: default y
33//config: depends on SYSLOGD 33//config: depends on SYSLOGD
34//config: help 34//config: help
35//config: This enables syslogd to rotate the message files 35//config: This enables syslogd to rotate the message files
36//config: on his own. No need to use an external rotate script. 36//config: on his own. No need to use an external rotate script.
37//config: 37//config:
38//config:config FEATURE_REMOTE_LOG 38//config:config FEATURE_REMOTE_LOG
39//config: bool "Remote Log support" 39//config: bool "Remote Log support"
40//config: default y 40//config: default y
41//config: depends on SYSLOGD 41//config: depends on SYSLOGD
42//config: help 42//config: help
43//config: When you enable this feature, the syslogd utility can 43//config: When you enable this feature, the syslogd utility can
44//config: be used to send system log messages to another system 44//config: be used to send system log messages to another system
45//config: connected via a network. This allows the remote 45//config: connected via a network. This allows the remote
46//config: machine to log all the system messages, which can be 46//config: machine to log all the system messages, which can be
47//config: terribly useful for reducing the number of serial 47//config: terribly useful for reducing the number of serial
48//config: cables you use. It can also be a very good security 48//config: cables you use. It can also be a very good security
49//config: measure to prevent system logs from being tampered with 49//config: measure to prevent system logs from being tampered with
50//config: by an intruder. 50//config: by an intruder.
51//config: 51//config:
52//config:config FEATURE_SYSLOGD_DUP 52//config:config FEATURE_SYSLOGD_DUP
53//config: bool "Support -D (drop dups) option" 53//config: bool "Support -D (drop dups) option"
54//config: default y 54//config: default y
55//config: depends on SYSLOGD 55//config: depends on SYSLOGD
56//config: help 56//config: help
57//config: Option -D instructs syslogd to drop consecutive messages 57//config: Option -D instructs syslogd to drop consecutive messages
58//config: which are totally the same. 58//config: which are totally the same.
59//config: 59//config:
60//config:config FEATURE_SYSLOGD_CFG 60//config:config FEATURE_SYSLOGD_CFG
61//config: bool "Support syslog.conf" 61//config: bool "Support syslog.conf"
62//config: default y 62//config: default y
63//config: depends on SYSLOGD 63//config: depends on SYSLOGD
64//config: help 64//config: help
65//config: Supports restricted syslogd config. See docs/syslog.conf.txt 65//config: Supports restricted syslogd config. See docs/syslog.conf.txt
66//config: 66//config:
67//config:config FEATURE_SYSLOGD_READ_BUFFER_SIZE 67//config:config FEATURE_SYSLOGD_READ_BUFFER_SIZE
68//config: int "Read buffer size in bytes" 68//config: int "Read buffer size in bytes"
@@ -70,23 +70,23 @@
70//config: range 256 20000 70//config: range 256 20000
71//config: depends on SYSLOGD 71//config: depends on SYSLOGD
72//config: help 72//config: help
73//config: This option sets the size of the syslog read buffer. 73//config: This option sets the size of the syslog read buffer.
74//config: Actual memory usage increases around five times the 74//config: Actual memory usage increases around five times the
75//config: change done here. 75//config: change done here.
76//config: 76//config:
77//config:config FEATURE_IPC_SYSLOG 77//config:config FEATURE_IPC_SYSLOG
78//config: bool "Circular Buffer support" 78//config: bool "Circular Buffer support"
79//config: default y 79//config: default y
80//config: depends on SYSLOGD 80//config: depends on SYSLOGD
81//config: help 81//config: help
82//config: When you enable this feature, the syslogd utility will 82//config: When you enable this feature, the syslogd utility will
83//config: use a circular buffer to record system log messages. 83//config: use a circular buffer to record system log messages.
84//config: When the buffer is filled it will continue to overwrite 84//config: When the buffer is filled it will continue to overwrite
85//config: the oldest messages. This can be very useful for 85//config: the oldest messages. This can be very useful for
86//config: systems with little or no permanent storage, since 86//config: systems with little or no permanent storage, since
87//config: otherwise system logs can eventually fill up your 87//config: otherwise system logs can eventually fill up your
88//config: entire filesystem, which may cause your system to 88//config: entire filesystem, which may cause your system to
89//config: break badly. 89//config: break badly.
90//config: 90//config:
91//config:config FEATURE_IPC_SYSLOG_BUFFER_SIZE 91//config:config FEATURE_IPC_SYSLOG_BUFFER_SIZE
92//config: int "Circular buffer size in Kbytes (minimum 4KB)" 92//config: int "Circular buffer size in Kbytes (minimum 4KB)"
@@ -94,8 +94,8 @@
94//config: range 4 2147483647 94//config: range 4 2147483647
95//config: depends on FEATURE_IPC_SYSLOG 95//config: depends on FEATURE_IPC_SYSLOG
96//config: help 96//config: help
97//config: This option sets the size of the circular buffer 97//config: This option sets the size of the circular buffer
98//config: used to record system log messages. 98//config: used to record system log messages.
99//config: 99//config:
100//config:config FEATURE_KMSG_SYSLOG 100//config:config FEATURE_KMSG_SYSLOG
101//config: bool "Linux kernel printk buffer support" 101//config: bool "Linux kernel printk buffer support"
@@ -103,12 +103,12 @@
103//config: depends on SYSLOGD 103//config: depends on SYSLOGD
104//config: select PLATFORM_LINUX 104//config: select PLATFORM_LINUX
105//config: help 105//config: help
106//config: When you enable this feature, the syslogd utility will 106//config: When you enable this feature, the syslogd utility will
107//config: write system log message to the Linux kernel's printk buffer. 107//config: write system log message to the Linux kernel's printk buffer.
108//config: This can be used as a smaller alternative to the syslogd IPC 108//config: This can be used as a smaller alternative to the syslogd IPC
109//config: support, as klogd and logread aren't needed. 109//config: support, as klogd and logread aren't needed.
110//config: 110//config:
111//config: NOTICE: Syslog facilities in log entries needs kernel 3.5+. 111//config: NOTICE: Syslog facilities in log entries needs kernel 3.5+.
112 112
113//applet:IF_SYSLOGD(APPLET(syslogd, BB_DIR_SBIN, BB_SUID_DROP)) 113//applet:IF_SYSLOGD(APPLET(syslogd, BB_DIR_SBIN, BB_SUID_DROP))
114 114
diff --git a/testsuite/od.tests b/testsuite/od.tests
index 7a9da3e97..0880e0d2f 100755
--- a/testsuite/od.tests
+++ b/testsuite/od.tests
@@ -16,6 +16,16 @@ testing "od -b" \
16 "" "HELLO" 16 "" "HELLO"
17SKIP= 17SKIP=
18 18
19optional DESKTOP
20testing "od -f" \
21 "od -f" \
22"\
230000000 0.0000000e+00 0.0000000e+00
240000010
25" \
26 "" "\x00\x00\x00\x00\x00\x00\x00\x00"
27SKIP=
28
19optional DESKTOP LONG_OPTS 29optional DESKTOP LONG_OPTS
20testing "od -b --traditional" \ 30testing "od -b --traditional" \
21 "od -b --traditional" \ 31 "od -b --traditional" \
diff --git a/util-linux/Config.src b/util-linux/Config.src
index 0971d714a..68fcc266f 100644
--- a/util-linux/Config.src
+++ b/util-linux/Config.src
@@ -15,29 +15,29 @@ config FEATURE_MOUNT_LOOP
15 default y 15 default y
16 depends on MOUNT || UMOUNT 16 depends on MOUNT || UMOUNT
17 help 17 help
18 Enabling this feature allows automatic mounting of files (containing 18 Enabling this feature allows automatic mounting of files (containing
19 filesystem images) via the linux kernel's loopback devices. 19 filesystem images) via the linux kernel's loopback devices.
20 The mount command will detect you are trying to mount a file instead 20 The mount command will detect you are trying to mount a file instead
21 of a block device, and transparently associate the file with a 21 of a block device, and transparently associate the file with a
22 loopback device. The umount command will also free that loopback 22 loopback device. The umount command will also free that loopback
23 device. 23 device.
24 24
25 You can still use the 'losetup' utility (to manually associate files 25 You can still use the 'losetup' utility (to manually associate files
26 with loop devices) if you need to do something advanced, such as 26 with loop devices) if you need to do something advanced, such as
27 specify an offset or cryptographic options to the loopback device. 27 specify an offset or cryptographic options to the loopback device.
28 (If you don't want umount to free the loop device, use "umount -D".) 28 (If you don't want umount to free the loop device, use "umount -D".)
29 29
30config FEATURE_MOUNT_LOOP_CREATE 30config FEATURE_MOUNT_LOOP_CREATE
31 bool "Create new loopback devices if needed" 31 bool "Create new loopback devices if needed"
32 default y 32 default y
33 depends on FEATURE_MOUNT_LOOP 33 depends on FEATURE_MOUNT_LOOP
34 help 34 help
35 Linux kernels >= 2.6.24 support unlimited loopback devices. They are 35 Linux kernels >= 2.6.24 support unlimited loopback devices. They are
36 allocated for use when trying to use a loop device. The loop device 36 allocated for use when trying to use a loop device. The loop device
37 must however exist. 37 must however exist.
38 38
39 This feature lets mount to try to create next /dev/loopN device 39 This feature lets mount to try to create next /dev/loopN device
40 if it does not find a free one. 40 if it does not find a free one.
41 41
42config FEATURE_MTAB_SUPPORT 42config FEATURE_MTAB_SUPPORT
43 bool "Support old /etc/mtab file" 43 bool "Support old /etc/mtab file"
@@ -45,23 +45,23 @@ config FEATURE_MTAB_SUPPORT
45 depends on MOUNT || UMOUNT 45 depends on MOUNT || UMOUNT
46 select FEATURE_MOUNT_FAKE 46 select FEATURE_MOUNT_FAKE
47 help 47 help
48 Historically, Unix systems kept track of the currently mounted 48 Historically, Unix systems kept track of the currently mounted
49 partitions in the file "/etc/mtab". These days, the kernel exports 49 partitions in the file "/etc/mtab". These days, the kernel exports
50 the list of currently mounted partitions in "/proc/mounts", rendering 50 the list of currently mounted partitions in "/proc/mounts", rendering
51 the old mtab file obsolete. (In modern systems, /etc/mtab should be 51 the old mtab file obsolete. (In modern systems, /etc/mtab should be
52 a symlink to /proc/mounts.) 52 a symlink to /proc/mounts.)
53 53
54 The only reason to have mount maintain an /etc/mtab file itself is if 54 The only reason to have mount maintain an /etc/mtab file itself is if
55 your stripped-down embedded system does not have a /proc directory. 55 your stripped-down embedded system does not have a /proc directory.
56 If you must use this, keep in mind it's inherently brittle (for 56 If you must use this, keep in mind it's inherently brittle (for
57 example a mount under chroot won't update it), can't handle modern 57 example a mount under chroot won't update it), can't handle modern
58 features like separate per-process filesystem namespaces, requires 58 features like separate per-process filesystem namespaces, requires
59 that your /etc directory be writable, tends to get easily confused 59 that your /etc directory be writable, tends to get easily confused
60 by --bind or --move mounts, won't update if you rename a directory 60 by --bind or --move mounts, won't update if you rename a directory
61 that contains a mount point, and so on. (In brief: avoid.) 61 that contains a mount point, and so on. (In brief: avoid.)
62 62
63 About the only reason to use this is if you've removed /proc from 63 About the only reason to use this is if you've removed /proc from
64 your kernel. 64 your kernel.
65 65
66source util-linux/volume_id/Config.in 66source util-linux/volume_id/Config.in
67 67
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 3e68b61ab..3c3811752 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
@@ -7,27 +7,27 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config ACPID 9//config:config ACPID
10//config: bool "acpid" 10//config: bool "acpid (8.7 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: acpid listens to ACPI events coming either in textual form from 14//config: acpid listens to ACPI events coming either in textual form from
15//config: /proc/acpi/event (though it is marked deprecated it is still widely 15//config: /proc/acpi/event (though it is marked deprecated it is still widely
16//config: used and _is_ a standard) or in binary form from specified evdevs 16//config: used and _is_ a standard) or in binary form from specified evdevs
17//config: (just use /dev/input/event*). 17//config: (just use /dev/input/event*).
18//config: 18//config:
19//config: It parses the event to retrieve ACTION and a possible PARAMETER. 19//config: It parses the event to retrieve ACTION and a possible PARAMETER.
20//config: It then spawns /etc/acpi/<ACTION>[/<PARAMETER>] either via run-parts 20//config: It then spawns /etc/acpi/<ACTION>[/<PARAMETER>] either via run-parts
21//config: (if the resulting path is a directory) or directly as an executable. 21//config: (if the resulting path is a directory) or directly as an executable.
22//config: 22//config:
23//config: N.B. acpid relies on run-parts so have the latter installed. 23//config: N.B. acpid relies on run-parts so have the latter installed.
24//config: 24//config:
25//config:config FEATURE_ACPID_COMPAT 25//config:config FEATURE_ACPID_COMPAT
26//config: bool "Accept and ignore redundant options" 26//config: bool "Accept and ignore redundant options"
27//config: default y 27//config: default y
28//config: depends on ACPID 28//config: depends on ACPID
29//config: help 29//config: help
30//config: Accept and ignore compatibility options -g -m -s -S -v. 30//config: Accept and ignore compatibility options -g -m -s -S -v.
31 31
32//applet:IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP)) 32//applet:IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP))
33 33
diff --git a/util-linux/blkdiscard.c b/util-linux/blkdiscard.c
index 85039c5d0..8f6a4ab6c 100644
--- a/util-linux/blkdiscard.c
+++ b/util-linux/blkdiscard.c
@@ -6,10 +6,10 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config BLKDISCARD 8//config:config BLKDISCARD
9//config: bool "blkdiscard" 9//config: bool "blkdiscard (5.3 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: blkdiscard discards sectors on a given device. 12//config: blkdiscard discards sectors on a given device.
13 13
14//kbuild:lib-$(CONFIG_BLKDISCARD) += blkdiscard.o 14//kbuild:lib-$(CONFIG_BLKDISCARD) += blkdiscard.o
15//applet:IF_BLKDISCARD(APPLET(blkdiscard, BB_DIR_USR_BIN, BB_SUID_DROP)) 15//applet:IF_BLKDISCARD(APPLET(blkdiscard, BB_DIR_USR_BIN, BB_SUID_DROP))
diff --git a/util-linux/blkid.c b/util-linux/blkid.c
index b6f33b513..f353cf248 100644
--- a/util-linux/blkid.c
+++ b/util-linux/blkid.c
@@ -7,21 +7,21 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config BLKID 9//config:config BLKID
10//config: bool "blkid" 10//config: bool "blkid (11 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: select VOLUMEID 13//config: select VOLUMEID
14//config: help 14//config: help
15//config: Lists labels and UUIDs of all filesystems. 15//config: Lists labels and UUIDs of all filesystems.
16//config: WARNING: 16//config: WARNING:
17//config: With all submodules selected, it will add ~8k to busybox. 17//config: With all submodules selected, it will add ~8k to busybox.
18//config: 18//config:
19//config:config FEATURE_BLKID_TYPE 19//config:config FEATURE_BLKID_TYPE
20//config: bool "Print filesystem type" 20//config: bool "Print filesystem type"
21//config: default n 21//config: default n
22//config: depends on BLKID 22//config: depends on BLKID
23//config: help 23//config: help
24//config: Show TYPE="filesystem type" 24//config: Show TYPE="filesystem type"
25 25
26//applet:IF_BLKID(APPLET(blkid, BB_DIR_SBIN, BB_SUID_DROP)) 26//applet:IF_BLKID(APPLET(blkid, BB_DIR_SBIN, BB_SUID_DROP))
27 27
diff --git a/util-linux/blockdev.c b/util-linux/blockdev.c
index bf4d49792..9e1fef206 100644
--- a/util-linux/blockdev.c
+++ b/util-linux/blockdev.c
@@ -6,10 +6,10 @@
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8//config:config BLOCKDEV 8//config:config BLOCKDEV
9//config: bool "blockdev" 9//config: bool "blockdev (2.4 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: Performs some ioctls with block devices. 12//config: Performs some ioctls with block devices.
13 13
14//applet:IF_BLOCKDEV(APPLET(blockdev, BB_DIR_SBIN, BB_SUID_DROP)) 14//applet:IF_BLOCKDEV(APPLET(blockdev, BB_DIR_SBIN, BB_SUID_DROP))
15 15
diff --git a/util-linux/cal.c b/util-linux/cal.c
index 8196619b0..091fdbd2b 100644
--- a/util-linux/cal.c
+++ b/util-linux/cal.c
@@ -11,10 +11,10 @@
11 * Major size reduction... over 50% (>1.5k) on i386. 11 * Major size reduction... over 50% (>1.5k) on i386.
12 */ 12 */
13//config:config CAL 13//config:config CAL
14//config: bool "cal" 14//config: bool "cal (6.5 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: cal is used to display a monthly calendar. 17//config: cal is used to display a monthly calendar.
18 18
19//applet:IF_CAL(APPLET(cal, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_CAL(APPLET(cal, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/util-linux/chrt.c b/util-linux/chrt.c
index 1604a6890..4bc8b6cfa 100644
--- a/util-linux/chrt.c
+++ b/util-linux/chrt.c
@@ -6,11 +6,11 @@
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8//config:config CHRT 8//config:config CHRT
9//config: bool "chrt" 9//config: bool "chrt (4.4 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: manipulate real-time attributes of a process. 12//config: manipulate real-time attributes of a process.
13//config: This requires sched_{g,s}etparam support in your libc. 13//config: This requires sched_{g,s}etparam support in your libc.
14 14
15//applet:IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP)) 15//applet:IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP))
16 16
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index c3574f8f5..6da9d9f4e 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -9,38 +9,38 @@
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 */ 10 */
11//config:config DMESG 11//config:config DMESG
12//config: bool "dmesg" 12//config: bool "dmesg (3.5 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: dmesg is used to examine or control the kernel ring buffer. When the 16//config: dmesg is used to examine or control the kernel ring buffer. When the
17//config: Linux kernel prints messages to the system log, they are stored in 17//config: Linux kernel prints messages to the system log, they are stored in
18//config: the kernel ring buffer. You can use dmesg to print the kernel's ring 18//config: the kernel ring buffer. You can use dmesg to print the kernel's ring
19//config: buffer, clear the kernel ring buffer, change the size of the kernel 19//config: buffer, clear the kernel ring buffer, change the size of the kernel
20//config: ring buffer, and change the priority level at which kernel messages 20//config: ring buffer, and change the priority level at which kernel messages
21//config: are also logged to the system console. Enable this option if you 21//config: are also logged to the system console. Enable this option if you
22//config: wish to enable the 'dmesg' utility. 22//config: wish to enable the 'dmesg' utility.
23//config: 23//config:
24//config:config FEATURE_DMESG_PRETTY 24//config:config FEATURE_DMESG_PRETTY
25//config: bool "Pretty output" 25//config: bool "Pretty output"
26//config: default y 26//config: default y
27//config: depends on DMESG 27//config: depends on DMESG
28//config: help 28//config: help
29//config: If you wish to scrub the syslog level from the output, say 'Y' here. 29//config: If you wish to scrub the syslog level from the output, say 'Y' here.
30//config: The syslog level is a string prefixed to every line with the form 30//config: The syslog level is a string prefixed to every line with the form
31//config: "<#>". 31//config: "<#>".
32//config: 32//config:
33//config: With this option you will see: 33//config: With this option you will see:
34//config: # dmesg 34//config: # dmesg
35//config: Linux version 2.6.17.4 ..... 35//config: Linux version 2.6.17.4 .....
36//config: BIOS-provided physical RAM map: 36//config: BIOS-provided physical RAM map:
37//config: BIOS-e820: 0000000000000000 - 000000000009f000 (usable) 37//config: BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
38//config: 38//config:
39//config: Without this option you will see: 39//config: Without this option you will see:
40//config: # dmesg 40//config: # dmesg
41//config: <5>Linux version 2.6.17.4 ..... 41//config: <5>Linux version 2.6.17.4 .....
42//config: <6>BIOS-provided physical RAM map: 42//config: <6>BIOS-provided physical RAM map:
43//config: <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable) 43//config: <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
44 44
45//applet:IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP)) 45//applet:IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP))
46 46
diff --git a/util-linux/eject.c b/util-linux/eject.c
index 667932f6c..8095cbef0 100644
--- a/util-linux/eject.c
+++ b/util-linux/eject.c
@@ -13,19 +13,19 @@
13 * Most of the dirty work blatantly ripped off from cat.c =) 13 * Most of the dirty work blatantly ripped off from cat.c =)
14 */ 14 */
15//config:config EJECT 15//config:config EJECT
16//config: bool "eject" 16//config: bool "eject (4.1 kb)"
17//config: default y 17//config: default y
18//config: select PLATFORM_LINUX 18//config: select PLATFORM_LINUX
19//config: help 19//config: help
20//config: Used to eject cdroms. (defaults to /dev/cdrom) 20//config: Used to eject cdroms. (defaults to /dev/cdrom)
21//config: 21//config:
22//config:config FEATURE_EJECT_SCSI 22//config:config FEATURE_EJECT_SCSI
23//config: bool "SCSI support" 23//config: bool "SCSI support"
24//config: default y 24//config: default y
25//config: depends on EJECT 25//config: depends on EJECT
26//config: help 26//config: help
27//config: Add the -s option to eject, this allows to eject SCSI-Devices and 27//config: Add the -s option to eject, this allows to eject SCSI-Devices and
28//config: usb-storage devices. 28//config: usb-storage devices.
29 29
30//applet:IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP)) 30//applet:IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP))
31 31
diff --git a/util-linux/fallocate.c b/util-linux/fallocate.c
index 1cd851bde..70e7e178f 100644
--- a/util-linux/fallocate.c
+++ b/util-linux/fallocate.c
@@ -6,10 +6,10 @@
6 */ 6 */
7 7
8//config:config FALLOCATE 8//config:config FALLOCATE
9//config: bool "fallocate" 9//config: bool "fallocate (5 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: Preallocate space for files. 12//config: Preallocate space for files.
13 13
14//applet:IF_FALLOCATE(APPLET(fallocate, BB_DIR_USR_BIN, BB_SUID_DROP)) 14//applet:IF_FALLOCATE(APPLET(fallocate, BB_DIR_USR_BIN, BB_SUID_DROP))
15 15
diff --git a/util-linux/fatattr.c b/util-linux/fatattr.c
index 030978f64..9fb566d5a 100644
--- a/util-linux/fatattr.c
+++ b/util-linux/fatattr.c
@@ -9,11 +9,11 @@
9 * Public License 9 * Public License
10 */ 10 */
11//config:config FATATTR 11//config:config FATATTR
12//config: bool "fatattr" 12//config: bool "fatattr (1.9 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: fatattr lists or changes the file attributes on a fat file system. 16//config: fatattr lists or changes the file attributes on a fat file system.
17 17
18//applet:IF_FATATTR(APPLET(fatattr, BB_DIR_BIN, BB_SUID_DROP)) 18//applet:IF_FATATTR(APPLET(fatattr, BB_DIR_BIN, BB_SUID_DROP))
19 19
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 673bf9aa4..11cb20cb2 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -12,33 +12,33 @@
12 * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) 12 * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
13 */ 13 */
14//config:config FBSET 14//config:config FBSET
15//config: bool "fbset" 15//config: bool "fbset (5.8 kb)"
16//config: default y 16//config: default y
17//config: select PLATFORM_LINUX 17//config: select PLATFORM_LINUX
18//config: help 18//config: help
19//config: fbset is used to show or change the settings of a Linux frame buffer 19//config: fbset is used to show or change the settings of a Linux frame buffer
20//config: device. The frame buffer device provides a simple and unique 20//config: device. The frame buffer device provides a simple and unique
21//config: interface to access a graphics display. Enable this option 21//config: interface to access a graphics display. Enable this option
22//config: if you wish to enable the 'fbset' utility. 22//config: if you wish to enable the 'fbset' utility.
23//config: 23//config:
24//config:config FEATURE_FBSET_FANCY 24//config:config FEATURE_FBSET_FANCY
25//config: bool "Enable extra options" 25//config: bool "Enable extra options"
26//config: default y 26//config: default y
27//config: depends on FBSET 27//config: depends on FBSET
28//config: help 28//config: help
29//config: This option enables extended fbset options, allowing one to set the 29//config: This option enables extended fbset options, allowing one to set the
30//config: framebuffer size, color depth, etc. interface to access a graphics 30//config: framebuffer size, color depth, etc. interface to access a graphics
31//config: display. Enable this option if you wish to enable extended fbset 31//config: display. Enable this option if you wish to enable extended fbset
32//config: options. 32//config: options.
33//config: 33//config:
34//config:config FEATURE_FBSET_READMODE 34//config:config FEATURE_FBSET_READMODE
35//config: bool "Enable readmode support" 35//config: bool "Enable readmode support"
36//config: default y 36//config: default y
37//config: depends on FBSET 37//config: depends on FBSET
38//config: help 38//config: help
39//config: This option allows fbset to read the video mode database stored by 39//config: This option allows fbset to read the video mode database stored by
40//config: default as /etc/fb.modes, which can be used to set frame buffer 40//config: default as /etc/fb.modes, which can be used to set frame buffer
41//config: device to pre-defined video modes. 41//config: device to pre-defined video modes.
42 42
43//applet:IF_FBSET(APPLET(fbset, BB_DIR_USR_SBIN, BB_SUID_DROP)) 43//applet:IF_FBSET(APPLET(fbset, BB_DIR_USR_SBIN, BB_SUID_DROP))
44 44
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c
index 67c6e1504..6faaf1b10 100644
--- a/util-linux/fdformat.c
+++ b/util-linux/fdformat.c
@@ -5,11 +5,11 @@
5 * Licensed under GPLv2, see file LICENSE in this source tree. 5 * Licensed under GPLv2, see file LICENSE in this source tree.
6 */ 6 */
7//config:config FDFORMAT 7//config:config FDFORMAT
8//config: bool "fdformat" 8//config: bool "fdformat (4.5 kb)"
9//config: default y 9//config: default y
10//config: select PLATFORM_LINUX 10//config: select PLATFORM_LINUX
11//config: help 11//config: help
12//config: fdformat is used to low-level format a floppy disk. 12//config: fdformat is used to low-level format a floppy disk.
13 13
14//applet:IF_FDFORMAT(APPLET(fdformat, BB_DIR_USR_SBIN, BB_SUID_DROP)) 14//applet:IF_FDFORMAT(APPLET(fdformat, BB_DIR_USR_SBIN, BB_SUID_DROP))
15 15
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 4467525c7..e00f85864 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -7,14 +7,14 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config FDISK 9//config:config FDISK
10//config: bool "fdisk" 10//config: bool "fdisk (41 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: The fdisk utility is used to divide hard disks into one or more 14//config: The fdisk utility is used to divide hard disks into one or more
15//config: logical disks, which are generally called partitions. This utility 15//config: logical disks, which are generally called partitions. This utility
16//config: can be used to list and edit the set of partitions or BSD style 16//config: can be used to list and edit the set of partitions or BSD style
17//config: 'disk slices' that are defined on a hard drive. 17//config: 'disk slices' that are defined on a hard drive.
18//config: 18//config:
19//config:config FDISK_SUPPORT_LARGE_DISKS 19//config:config FDISK_SUPPORT_LARGE_DISKS
20//config: bool "Support over 4GB disks" 20//config: bool "Support over 4GB disks"
@@ -27,59 +27,59 @@
27//config: default y 27//config: default y
28//config: depends on FDISK 28//config: depends on FDISK
29//config: help 29//config: help
30//config: Enabling this option allows you to create or change a partition table 30//config: Enabling this option allows you to create or change a partition table
31//config: and write those changes out to disk. If you leave this option 31//config: and write those changes out to disk. If you leave this option
32//config: disabled, you will only be able to view the partition table. 32//config: disabled, you will only be able to view the partition table.
33//config: 33//config:
34//config:config FEATURE_AIX_LABEL 34//config:config FEATURE_AIX_LABEL
35//config: bool "Support AIX disklabels" 35//config: bool "Support AIX disklabels"
36//config: default n 36//config: default n
37//config: depends on FDISK && FEATURE_FDISK_WRITABLE 37//config: depends on FDISK && FEATURE_FDISK_WRITABLE
38//config: help 38//config: help
39//config: Enabling this option allows you to create or change AIX disklabels. 39//config: Enabling this option allows you to create or change AIX disklabels.
40//config: Most people can safely leave this option disabled. 40//config: Most people can safely leave this option disabled.
41//config: 41//config:
42//config:config FEATURE_SGI_LABEL 42//config:config FEATURE_SGI_LABEL
43//config: bool "Support SGI disklabels" 43//config: bool "Support SGI disklabels"
44//config: default n 44//config: default n
45//config: depends on FDISK && FEATURE_FDISK_WRITABLE 45//config: depends on FDISK && FEATURE_FDISK_WRITABLE
46//config: help 46//config: help
47//config: Enabling this option allows you to create or change SGI disklabels. 47//config: Enabling this option allows you to create or change SGI disklabels.
48//config: Most people can safely leave this option disabled. 48//config: Most people can safely leave this option disabled.
49//config: 49//config:
50//config:config FEATURE_SUN_LABEL 50//config:config FEATURE_SUN_LABEL
51//config: bool "Support SUN disklabels" 51//config: bool "Support SUN disklabels"
52//config: default n 52//config: default n
53//config: depends on FDISK && FEATURE_FDISK_WRITABLE 53//config: depends on FDISK && FEATURE_FDISK_WRITABLE
54//config: help 54//config: help
55//config: Enabling this option allows you to create or change SUN disklabels. 55//config: Enabling this option allows you to create or change SUN disklabels.
56//config: Most people can safely leave this option disabled. 56//config: Most people can safely leave this option disabled.
57//config: 57//config:
58//config:config FEATURE_OSF_LABEL 58//config:config FEATURE_OSF_LABEL
59//config: bool "Support BSD disklabels" 59//config: bool "Support BSD disklabels"
60//config: default n 60//config: default n
61//config: depends on FDISK && FEATURE_FDISK_WRITABLE 61//config: depends on FDISK && FEATURE_FDISK_WRITABLE
62//config: help 62//config: help
63//config: Enabling this option allows you to create or change BSD disklabels 63//config: Enabling this option allows you to create or change BSD disklabels
64//config: and define and edit BSD disk slices. 64//config: and define and edit BSD disk slices.
65//config: 65//config:
66//config:config FEATURE_GPT_LABEL 66//config:config FEATURE_GPT_LABEL
67//config: bool "Support GPT disklabels" 67//config: bool "Support GPT disklabels"
68//config: default n 68//config: default n
69//config: depends on FDISK && FEATURE_FDISK_WRITABLE 69//config: depends on FDISK && FEATURE_FDISK_WRITABLE
70//config: help 70//config: help
71//config: Enabling this option allows you to view GUID Partition Table 71//config: Enabling this option allows you to view GUID Partition Table
72//config: disklabels. 72//config: disklabels.
73//config: 73//config:
74//config:config FEATURE_FDISK_ADVANCED 74//config:config FEATURE_FDISK_ADVANCED
75//config: bool "Support expert mode" 75//config: bool "Support expert mode"
76//config: default y 76//config: default y
77//config: depends on FDISK && FEATURE_FDISK_WRITABLE 77//config: depends on FDISK && FEATURE_FDISK_WRITABLE
78//config: help 78//config: help
79//config: Enabling this option allows you to do terribly unsafe things like 79//config: Enabling this option allows you to do terribly unsafe things like
80//config: define arbitrary drive geometry, move the beginning of data in a 80//config: define arbitrary drive geometry, move the beginning of data in a
81//config: partition, and similarly evil things. Unless you have a very good 81//config: partition, and similarly evil things. Unless you have a very good
82//config: reason you would be wise to leave this disabled. 82//config: reason you would be wise to leave this disabled.
83 83
84//applet:IF_FDISK(APPLET(fdisk, BB_DIR_SBIN, BB_SUID_DROP)) 84//applet:IF_FDISK(APPLET(fdisk, BB_DIR_SBIN, BB_SUID_DROP))
85 85
diff --git a/util-linux/findfs.c b/util-linux/findfs.c
index daa46b039..359da581f 100644
--- a/util-linux/findfs.c
+++ b/util-linux/findfs.c
@@ -8,14 +8,14 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config FINDFS 10//config:config FINDFS
11//config: bool "findfs" 11//config: bool "findfs (11 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: select VOLUMEID 14//config: select VOLUMEID
15//config: help 15//config: help
16//config: Prints the name of a filesystem with given label or UUID. 16//config: Prints the name of a filesystem with given label or UUID.
17//config: WARNING: 17//config: WARNING:
18//config: With all submodules selected, it will add ~8k to busybox. 18//config: With all submodules selected, it will add ~8k to busybox.
19 19
20/* Benefits from suid root: better access to /dev/BLOCKDEVs: */ 20/* Benefits from suid root: better access to /dev/BLOCKDEVs: */
21//applet:IF_FINDFS(APPLET(findfs, BB_DIR_SBIN, BB_SUID_MAYBE)) 21//applet:IF_FINDFS(APPLET(findfs, BB_DIR_SBIN, BB_SUID_MAYBE))
diff --git a/util-linux/flock.c b/util-linux/flock.c
index f34c0ad8f..ec35af18f 100644
--- a/util-linux/flock.c
+++ b/util-linux/flock.c
@@ -4,10 +4,10 @@
4 * This is free software, licensed under the GNU General Public License v2. 4 * This is free software, licensed under the GNU General Public License v2.
5 */ 5 */
6//config:config FLOCK 6//config:config FLOCK
7//config: bool "flock" 7//config: bool "flock (6.1 kb)"
8//config: default y 8//config: default y
9//config: help 9//config: help
10//config: Manage locks from shell scripts 10//config: Manage locks from shell scripts
11 11
12//applet:IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP)) 12//applet:IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP))
13 13
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index 28148fcbe..55187cb40 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -9,29 +9,29 @@
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 */ 10 */
11//config:config FDFLUSH 11//config:config FDFLUSH
12//config: bool "fdflush" 12//config: bool "fdflush (1.4 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: fdflush is only needed when changing media on slightly-broken 16//config: fdflush is only needed when changing media on slightly-broken
17//config: removable media drives. It is used to make Linux believe that a 17//config: removable media drives. It is used to make Linux believe that a
18//config: hardware disk-change switch has been actuated, which causes Linux to 18//config: hardware disk-change switch has been actuated, which causes Linux to
19//config: forget anything it has cached from the previous media. If you have 19//config: forget anything it has cached from the previous media. If you have
20//config: such a slightly-broken drive, you will need to run fdflush every time 20//config: such a slightly-broken drive, you will need to run fdflush every time
21//config: you change a disk. Most people have working hardware and can safely 21//config: you change a disk. Most people have working hardware and can safely
22//config: leave this disabled. 22//config: leave this disabled.
23//config: 23//config:
24//config:config FREERAMDISK 24//config:config FREERAMDISK
25//config: bool "freeramdisk" 25//config: bool "freeramdisk (1.4 kb)"
26//config: default y 26//config: default y
27//config: select PLATFORM_LINUX 27//config: select PLATFORM_LINUX
28//config: help 28//config: help
29//config: Linux allows you to create ramdisks. This utility allows you to 29//config: Linux allows you to create ramdisks. This utility allows you to
30//config: delete them and completely free all memory that was used for the 30//config: delete them and completely free all memory that was used for the
31//config: ramdisk. For example, if you boot Linux into a ramdisk and later 31//config: ramdisk. For example, if you boot Linux into a ramdisk and later
32//config: pivot_root, you may want to free the memory that is allocated to the 32//config: pivot_root, you may want to free the memory that is allocated to the
33//config: ramdisk. If you have no use for freeing memory from a ramdisk, leave 33//config: ramdisk. If you have no use for freeing memory from a ramdisk, leave
34//config: this disabled. 34//config: this disabled.
35 35
36// APPLET_ODDNAME:name main location suid_type help 36// APPLET_ODDNAME:name main location suid_type help
37//applet:IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, BB_DIR_BIN, BB_SUID_DROP, fdflush)) 37//applet:IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, BB_DIR_BIN, BB_SUID_DROP, fdflush))
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 2ab7530ea..8c2b7d8de 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -89,12 +89,12 @@
89//config: bool "fsck_minix" 89//config: bool "fsck_minix"
90//config: default y 90//config: default y
91//config: help 91//config: help
92//config: The minix filesystem is a nice, small, compact, read-write filesystem 92//config: The minix filesystem is a nice, small, compact, read-write filesystem
93//config: with little overhead. It is not a journaling filesystem however and 93//config: with little overhead. It is not a journaling filesystem however and
94//config: can experience corruption if it is not properly unmounted or if the 94//config: can experience corruption if it is not properly unmounted or if the
95//config: power goes off in the middle of a write. This utility allows you to 95//config: power goes off in the middle of a write. This utility allows you to
96//config: check for and attempt to repair any corruption that occurs to a minix 96//config: check for and attempt to repair any corruption that occurs to a minix
97//config: filesystem. 97//config: filesystem.
98 98
99//applet:IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, BB_DIR_SBIN, BB_SUID_DROP, fsck_minix)) 99//applet:IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, BB_DIR_SBIN, BB_SUID_DROP, fsck_minix))
100 100
diff --git a/util-linux/fsfreeze.c b/util-linux/fsfreeze.c
index 70dec24ec..5c10c8044 100644
--- a/util-linux/fsfreeze.c
+++ b/util-linux/fsfreeze.c
@@ -6,12 +6,12 @@
6 */ 6 */
7 7
8//config:config FSFREEZE 8//config:config FSFREEZE
9//config: bool "fsfreeze" 9//config: bool "fsfreeze (3.6 kb)"
10//config: default y 10//config: default y
11//config: select PLATFORM_LINUX 11//config: select PLATFORM_LINUX
12//config: select LONG_OPTS 12//config: select LONG_OPTS
13//config: help 13//config: help
14//config: Halt new accesses and flush writes on a mounted filesystem. 14//config: Halt new accesses and flush writes on a mounted filesystem.
15 15
16//applet:IF_FSFREEZE(APPLET(fsfreeze, BB_DIR_USR_SBIN, BB_SUID_DROP)) 16//applet:IF_FSFREEZE(APPLET(fsfreeze, BB_DIR_USR_SBIN, BB_SUID_DROP))
17 17
diff --git a/util-linux/fstrim.c b/util-linux/fstrim.c
index 563aa9720..6d0d61d92 100644
--- a/util-linux/fstrim.c
+++ b/util-linux/fstrim.c
@@ -9,11 +9,11 @@
9 */ 9 */
10 10
11//config:config FSTRIM 11//config:config FSTRIM
12//config: bool "fstrim" 12//config: bool "fstrim (5.5 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: Discard unused blocks on a mounted filesystem. 16//config: Discard unused blocks on a mounted filesystem.
17 17
18//applet:IF_FSTRIM(APPLET(fstrim, BB_DIR_SBIN, BB_SUID_DROP)) 18//applet:IF_FSTRIM(APPLET(fstrim, BB_DIR_SBIN, BB_SUID_DROP))
19 19
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 79d54854b..cd5679cff 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -30,22 +30,22 @@
30 * Replaced our_malloc with xmalloc and our_realloc with xrealloc 30 * Replaced our_malloc with xmalloc and our_realloc with xrealloc
31 */ 31 */
32//config:config GETOPT 32//config:config GETOPT
33//config: bool "getopt" 33//config: bool "getopt (5.6 kb)"
34//config: default y 34//config: default y
35//config: help 35//config: help
36//config: The getopt utility is used to break up (parse) options in command 36//config: The getopt utility is used to break up (parse) options in command
37//config: lines to make it easy to write complex shell scripts that also check 37//config: lines to make it easy to write complex shell scripts that also check
38//config: for legal (and illegal) options. If you want to write horribly 38//config: for legal (and illegal) options. If you want to write horribly
39//config: complex shell scripts, or use some horribly complex shell script 39//config: complex shell scripts, or use some horribly complex shell script
40//config: written by others, this utility may be for you. Most people will 40//config: written by others, this utility may be for you. Most people will
41//config: wisely leave this disabled. 41//config: wisely leave this disabled.
42//config: 42//config:
43//config:config FEATURE_GETOPT_LONG 43//config:config FEATURE_GETOPT_LONG
44//config: bool "Support option -l" 44//config: bool "Support option -l"
45//config: default y if LONG_OPTS 45//config: default y if LONG_OPTS
46//config: depends on GETOPT 46//config: depends on GETOPT
47//config: help 47//config: help
48//config: Enable support for long options (option -l). 48//config: Enable support for long options (option -l).
49 49
50//applet:IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP)) 50//applet:IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
51 51
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index 25f771201..719feaf4e 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -9,27 +9,27 @@
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 10 */
11//config:config HEXDUMP 11//config:config HEXDUMP
12//config: bool "hexdump" 12//config: bool "hexdump (8.8 kb)"
13//config: default y 13//config: default y
14//config: help 14//config: help
15//config: The hexdump utility is used to display binary data in a readable 15//config: The hexdump utility is used to display binary data in a readable
16//config: way that is comparable to the output from most hex editors. 16//config: way that is comparable to the output from most hex editors.
17//config: 17//config:
18//config:config FEATURE_HEXDUMP_REVERSE 18//config:config FEATURE_HEXDUMP_REVERSE
19//config: bool "Support -R, reverse of 'hexdump -Cv'" 19//config: bool "Support -R, reverse of 'hexdump -Cv'"
20//config: default y 20//config: default y
21//config: depends on HEXDUMP 21//config: depends on HEXDUMP
22//config: help 22//config: help
23//config: The hexdump utility is used to display binary data in an ascii 23//config: The hexdump utility is used to display binary data in an ascii
24//config: readable way. This option creates binary data from an ascii input. 24//config: readable way. This option creates binary data from an ascii input.
25//config: NB: this option is non-standard. It's unwise to use it in scripts 25//config: NB: this option is non-standard. It's unwise to use it in scripts
26//config: aimed to be portable. 26//config: aimed to be portable.
27//config: 27//config:
28//config:config HD 28//config:config HD
29//config: bool "hd" 29//config: bool "hd (8 kb)"
30//config: default y 30//config: default y
31//config: help 31//config: help
32//config: hd is an alias to hexdump -C. 32//config: hd is an alias to hexdump -C.
33 33
34//applet:IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hexdump)) 34//applet:IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hexdump))
35//applet:IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd)) 35//applet:IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
diff --git a/util-linux/hexdump_xxd.c b/util-linux/hexdump_xxd.c
index be4b4f354..37e58f2d0 100644
--- a/util-linux/hexdump_xxd.c
+++ b/util-linux/hexdump_xxd.c
@@ -7,11 +7,11 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config XXD 9//config:config XXD
10//config: bool "xxd" 10//config: bool "xxd (8.9 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: The xxd utility is used to display binary data in a readable 13//config: The xxd utility is used to display binary data in a readable
14//config: way that is comparable to the output from most hex editors. 14//config: way that is comparable to the output from most hex editors.
15 15
16//applet:IF_XXD(APPLET_NOEXEC(xxd, xxd, BB_DIR_USR_BIN, BB_SUID_DROP, xxd)) 16//applet:IF_XXD(APPLET_NOEXEC(xxd, xxd, BB_DIR_USR_BIN, BB_SUID_DROP, xxd))
17 17
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 8cb908cb3..5df56de15 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -7,14 +7,14 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config HWCLOCK 9//config:config HWCLOCK
10//config: bool "hwclock" 10//config: bool "hwclock (5.8 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: The hwclock utility is used to read and set the hardware clock 14//config: The hwclock utility is used to read and set the hardware clock
15//config: on a system. This is primarily used to set the current time on 15//config: on a system. This is primarily used to set the current time on
16//config: shutdown in the hardware clock, so the hardware will keep the 16//config: shutdown in the hardware clock, so the hardware will keep the
17//config: correct time when Linux is _not_ running. 17//config: correct time when Linux is _not_ running.
18//config: 18//config:
19//config:config FEATURE_HWCLOCK_LONG_OPTIONS 19//config:config FEATURE_HWCLOCK_LONG_OPTIONS
20//config: bool "Support long options (--hctosys,...)" 20//config: bool "Support long options (--hctosys,...)"
@@ -26,12 +26,12 @@
26//config: default n # util-linux-ng in Fedora 13 still uses /etc/adjtime 26//config: default n # util-linux-ng in Fedora 13 still uses /etc/adjtime
27//config: depends on HWCLOCK 27//config: depends on HWCLOCK
28//config: help 28//config: help
29//config: Starting with FHS 2.3, the adjtime state file is supposed to exist 29//config: Starting with FHS 2.3, the adjtime state file is supposed to exist
30//config: at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish 30//config: at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish
31//config: to use the FHS behavior, answer Y here, otherwise answer N for the 31//config: to use the FHS behavior, answer Y here, otherwise answer N for the
32//config: classic /etc/adjtime path. 32//config: classic /etc/adjtime path.
33//config: 33//config:
34//config: pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO 34//config: pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
35 35
36//applet:IF_HWCLOCK(APPLET(hwclock, BB_DIR_SBIN, BB_SUID_DROP)) 36//applet:IF_HWCLOCK(APPLET(hwclock, BB_DIR_SBIN, BB_SUID_DROP))
37 37
diff --git a/util-linux/ionice.c b/util-linux/ionice.c
index c54b3a6e1..c7b7f0373 100644
--- a/util-linux/ionice.c
+++ b/util-linux/ionice.c
@@ -7,12 +7,12 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config IONICE 9//config:config IONICE
10//config: bool "ionice" 10//config: bool "ionice (3.6 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: Set/set program io scheduling class and priority 14//config: Set/set program io scheduling class and priority
15//config: Requires kernel >= 2.6.13 15//config: Requires kernel >= 2.6.13
16 16
17//applet:IF_IONICE(APPLET(ionice, BB_DIR_BIN, BB_SUID_DROP)) 17//applet:IF_IONICE(APPLET(ionice, BB_DIR_BIN, BB_SUID_DROP))
18 18
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c
index 76ea3ca4f..c51d33143 100644
--- a/util-linux/ipcrm.c
+++ b/util-linux/ipcrm.c
@@ -8,12 +8,12 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config IPCRM 10//config:config IPCRM
11//config: bool "ipcrm" 11//config: bool "ipcrm (2.9 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: The ipcrm utility allows the removal of System V interprocess 14//config: The ipcrm utility allows the removal of System V interprocess
15//config: communication (IPC) objects and the associated data structures 15//config: communication (IPC) objects and the associated data structures
16//config: from the system. 16//config: from the system.
17 17
18//applet:IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP)) 18//applet:IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP))
19 19
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index 88ae9225d..1404930d4 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -8,12 +8,12 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config IPCS 10//config:config IPCS
11//config: bool "ipcs" 11//config: bool "ipcs (11 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: The ipcs utility is used to provide information on the currently 15//config: The ipcs utility is used to provide information on the currently
16//config: allocated System V interprocess (IPC) objects in the system. 16//config: allocated System V interprocess (IPC) objects in the system.
17 17
18//applet:IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP)) 18//applet:IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP))
19 19
diff --git a/util-linux/last.c b/util-linux/last.c
index b3f125c3f..f5ee8e5f4 100644
--- a/util-linux/last.c
+++ b/util-linux/last.c
@@ -7,19 +7,19 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config LAST 9//config:config LAST
10//config: bool "last" 10//config: bool "last (6.2 kb)"
11//config: default y 11//config: default y
12//config: depends on FEATURE_WTMP 12//config: depends on FEATURE_WTMP
13//config: help 13//config: help
14//config: 'last' displays a list of the last users that logged into the system. 14//config: 'last' displays a list of the last users that logged into the system.
15//config: 15//config:
16//config:config FEATURE_LAST_FANCY 16//config:config FEATURE_LAST_FANCY
17//config: bool "Output extra information" 17//config: bool "Output extra information"
18//config: default y 18//config: default y
19//config: depends on LAST 19//config: depends on LAST
20//config: help 20//config: help
21//config: 'last' displays detailed information about the last users that 21//config: 'last' displays detailed information about the last users that
22//config: logged into the system (mimics sysvinit last). +900 bytes. 22//config: logged into the system (mimics sysvinit last). +900 bytes.
23 23
24//applet:IF_LAST(APPLET(last, BB_DIR_USR_BIN, BB_SUID_DROP)) 24//applet:IF_LAST(APPLET(last, BB_DIR_USR_BIN, BB_SUID_DROP))
25 25
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index d356f49c2..c608de6cc 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -7,13 +7,13 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config LOSETUP 9//config:config LOSETUP
10//config: bool "losetup" 10//config: bool "losetup (5.4 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: losetup is used to associate or detach a loop device with a regular 14//config: losetup is used to associate or detach a loop device with a regular
15//config: file or block device, and to query the status of a loop device. This 15//config: file or block device, and to query the status of a loop device. This
16//config: version does not currently support enabling data encryption. 16//config: version does not currently support enabling data encryption.
17 17
18//kbuild:lib-$(CONFIG_LOSETUP) += losetup.o 18//kbuild:lib-$(CONFIG_LOSETUP) += losetup.o
19 19
diff --git a/util-linux/lspci.c b/util-linux/lspci.c
index 8b38a2366..3877deb67 100644
--- a/util-linux/lspci.c
+++ b/util-linux/lspci.c
@@ -7,14 +7,14 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config LSPCI 9//config:config LSPCI
10//config: bool "lspci" 10//config: bool "lspci (5.7 kb)"
11//config: default y 11//config: default y
12//config: #select PLATFORM_LINUX 12//config: #select PLATFORM_LINUX
13//config: help 13//config: help
14//config: lspci is a utility for displaying information about PCI buses in the 14//config: lspci is a utility for displaying information about PCI buses in the
15//config: system and devices connected to them. 15//config: system and devices connected to them.
16//config: 16//config:
17//config: This version uses sysfs (/sys/bus/pci/devices) only. 17//config: This version uses sysfs (/sys/bus/pci/devices) only.
18 18
19//applet:IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/util-linux/lsusb.c b/util-linux/lsusb.c
index 7d36d6f5a..cabf047cf 100644
--- a/util-linux/lsusb.c
+++ b/util-linux/lsusb.c
@@ -7,14 +7,14 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config LSUSB 9//config:config LSUSB
10//config: bool "lsusb" 10//config: bool "lsusb (3.5 kb)"
11//config: default y 11//config: default y
12//config: #select PLATFORM_LINUX 12//config: #select PLATFORM_LINUX
13//config: help 13//config: help
14//config: lsusb is a utility for displaying information about USB buses in the 14//config: lsusb is a utility for displaying information about USB buses in the
15//config: system and devices connected to them. 15//config: system and devices connected to them.
16//config: 16//config:
17//config: This version uses sysfs (/sys/bus/usb/devices) only. 17//config: This version uses sysfs (/sys/bus/usb/devices) only.
18 18
19//applet:IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index a59115dd4..23b6f8285 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -9,62 +9,62 @@
9 */ 9 */
10 10
11//config:config MDEV 11//config:config MDEV
12//config: bool "mdev" 12//config: bool "mdev (16 kb)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: mdev is a mini-udev implementation for dynamically creating device 16//config: mdev is a mini-udev implementation for dynamically creating device
17//config: nodes in the /dev directory. 17//config: nodes in the /dev directory.
18//config: 18//config:
19//config: For more information, please see docs/mdev.txt 19//config: For more information, please see docs/mdev.txt
20//config: 20//config:
21//config:config FEATURE_MDEV_CONF 21//config:config FEATURE_MDEV_CONF
22//config: bool "Support /etc/mdev.conf" 22//config: bool "Support /etc/mdev.conf"
23//config: default y 23//config: default y
24//config: depends on MDEV 24//config: depends on MDEV
25//config: help 25//config: help
26//config: Add support for the mdev config file to control ownership and 26//config: Add support for the mdev config file to control ownership and
27//config: permissions of the device nodes. 27//config: permissions of the device nodes.
28//config: 28//config:
29//config: For more information, please see docs/mdev.txt 29//config: For more information, please see docs/mdev.txt
30//config: 30//config:
31//config:config FEATURE_MDEV_RENAME 31//config:config FEATURE_MDEV_RENAME
32//config: bool "Support subdirs/symlinks" 32//config: bool "Support subdirs/symlinks"
33//config: default y 33//config: default y
34//config: depends on FEATURE_MDEV_CONF 34//config: depends on FEATURE_MDEV_CONF
35//config: help 35//config: help
36//config: Add support for renaming devices and creating symlinks. 36//config: Add support for renaming devices and creating symlinks.
37//config: 37//config:
38//config: For more information, please see docs/mdev.txt 38//config: For more information, please see docs/mdev.txt
39//config: 39//config:
40//config:config FEATURE_MDEV_RENAME_REGEXP 40//config:config FEATURE_MDEV_RENAME_REGEXP
41//config: bool "Support regular expressions substitutions when renaming device" 41//config: bool "Support regular expressions substitutions when renaming device"
42//config: default y 42//config: default y
43//config: depends on FEATURE_MDEV_RENAME 43//config: depends on FEATURE_MDEV_RENAME
44//config: help 44//config: help
45//config: Add support for regular expressions substitutions when renaming 45//config: Add support for regular expressions substitutions when renaming
46//config: device. 46//config: device.
47//config: 47//config:
48//config:config FEATURE_MDEV_EXEC 48//config:config FEATURE_MDEV_EXEC
49//config: bool "Support command execution at device addition/removal" 49//config: bool "Support command execution at device addition/removal"
50//config: default y 50//config: default y
51//config: depends on FEATURE_MDEV_CONF 51//config: depends on FEATURE_MDEV_CONF
52//config: help 52//config: help
53//config: This adds support for an optional field to /etc/mdev.conf for 53//config: This adds support for an optional field to /etc/mdev.conf for
54//config: executing commands when devices are created/removed. 54//config: executing commands when devices are created/removed.
55//config: 55//config:
56//config: For more information, please see docs/mdev.txt 56//config: For more information, please see docs/mdev.txt
57//config: 57//config:
58//config:config FEATURE_MDEV_LOAD_FIRMWARE 58//config:config FEATURE_MDEV_LOAD_FIRMWARE
59//config: bool "Support loading of firmwares" 59//config: bool "Support loading of firmwares"
60//config: default y 60//config: default y
61//config: depends on MDEV 61//config: depends on MDEV
62//config: help 62//config: help
63//config: Some devices need to load firmware before they can be usable. 63//config: Some devices need to load firmware before they can be usable.
64//config: 64//config:
65//config: These devices will request userspace look up the files in 65//config: These devices will request userspace look up the files in
66//config: /lib/firmware/ and if it exists, send it to the kernel for 66//config: /lib/firmware/ and if it exists, send it to the kernel for
67//config: loading into the hardware. 67//config: loading into the hardware.
68 68
69//applet:IF_MDEV(APPLET(mdev, BB_DIR_SBIN, BB_SUID_DROP)) 69//applet:IF_MDEV(APPLET(mdev, BB_DIR_SBIN, BB_SUID_DROP))
70 70
diff --git a/util-linux/mesg.c b/util-linux/mesg.c
index 45c13b8e0..c4371eb24 100644
--- a/util-linux/mesg.c
+++ b/util-linux/mesg.c
@@ -8,23 +8,23 @@
8 */ 8 */
9 9
10//config:config MESG 10//config:config MESG
11//config: bool "mesg" 11//config: bool "mesg (1.2 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: Mesg controls access to your terminal by others. It is typically 14//config: Mesg controls access to your terminal by others. It is typically
15//config: used to allow or disallow other users to write to your terminal 15//config: used to allow or disallow other users to write to your terminal
16//config: 16//config:
17//config:config FEATURE_MESG_ENABLE_ONLY_GROUP 17//config:config FEATURE_MESG_ENABLE_ONLY_GROUP
18//config: bool "Enable writing to tty only by group, not by everybody" 18//config: bool "Enable writing to tty only by group, not by everybody"
19//config: default y 19//config: default y
20//config: depends on MESG 20//config: depends on MESG
21//config: help 21//config: help
22//config: Usually, ttys are owned by group "tty", and "write" tool is 22//config: Usually, ttys are owned by group "tty", and "write" tool is
23//config: setgid to this group. This way, "mesg y" only needs to enable 23//config: setgid to this group. This way, "mesg y" only needs to enable
24//config: "write by owning group" bit in tty mode. 24//config: "write by owning group" bit in tty mode.
25//config: 25//config:
26//config: If you set this option to N, "mesg y" will enable writing 26//config: If you set this option to N, "mesg y" will enable writing
27//config: by anybody at all. This is not recommended. 27//config: by anybody at all. This is not recommended.
28 28
29//applet:IF_MESG(APPLET(mesg, BB_DIR_USR_BIN, BB_SUID_DROP)) 29//applet:IF_MESG(APPLET(mesg, BB_DIR_USR_BIN, BB_SUID_DROP))
30 30
diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c
index 4a7a878ac..8434dd6ad 100644
--- a/util-linux/mkfs_ext2.c
+++ b/util-linux/mkfs_ext2.c
@@ -8,18 +8,18 @@
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10//config:config MKE2FS 10//config:config MKE2FS
11//config: bool "mke2fs" 11//config: bool "mke2fs (9.7 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: Utility to create EXT2 filesystems. 15//config: Utility to create EXT2 filesystems.
16//config: 16//config:
17//config:config MKFS_EXT2 17//config:config MKFS_EXT2
18//config: bool "mkfs.ext2" 18//config: bool "mkfs.ext2 (9.8 kb)"
19//config: default y 19//config: default y
20//config: select PLATFORM_LINUX 20//config: select PLATFORM_LINUX
21//config: help 21//config: help
22//config: Alias to "mke2fs". 22//config: Alias to "mke2fs".
23 23
24// APPLET_ODDNAME:name main location suid_type help 24// APPLET_ODDNAME:name main location suid_type help
25//applet:IF_MKE2FS( APPLET_ODDNAME(mke2fs, mkfs_ext2, BB_DIR_SBIN, BB_SUID_DROP, mkfs_ext2)) 25//applet:IF_MKE2FS( APPLET_ODDNAME(mke2fs, mkfs_ext2, BB_DIR_SBIN, BB_SUID_DROP, mkfs_ext2))
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 0dfe34705..88647e9d8 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -67,18 +67,18 @@
67//config: default y 67//config: default y
68//config: select PLATFORM_LINUX 68//config: select PLATFORM_LINUX
69//config: help 69//config: help
70//config: The minix filesystem is a nice, small, compact, read-write filesystem 70//config: The minix filesystem is a nice, small, compact, read-write filesystem
71//config: with little overhead. If you wish to be able to create minix 71//config: with little overhead. If you wish to be able to create minix
72//config: filesystems this utility will do the job for you. 72//config: filesystems this utility will do the job for you.
73//config: 73//config:
74//config:config FEATURE_MINIX2 74//config:config FEATURE_MINIX2
75//config: bool "Support Minix fs v2 (fsck_minix/mkfs_minix)" 75//config: bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
76//config: default y 76//config: default y
77//config: depends on FSCK_MINIX || MKFS_MINIX 77//config: depends on FSCK_MINIX || MKFS_MINIX
78//config: help 78//config: help
79//config: If you wish to be able to create version 2 minix filesystems, enable 79//config: If you wish to be able to create version 2 minix filesystems, enable
80//config: this. If you enabled 'mkfs_minix' then you almost certainly want to 80//config: this. If you enabled 'mkfs_minix' then you almost certainly want to
81//config: be using the version 2 filesystem support. 81//config: be using the version 2 filesystem support.
82 82
83// APPLET_ODDNAME:name main location suid_type help 83// APPLET_ODDNAME:name main location suid_type help
84//applet:IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, BB_DIR_SBIN, BB_SUID_DROP, mkfs_minix)) 84//applet:IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, BB_DIR_SBIN, BB_SUID_DROP, mkfs_minix))
diff --git a/util-linux/mkfs_reiser.c b/util-linux/mkfs_reiser.c
index d01119f7f..c7d99b018 100644
--- a/util-linux/mkfs_reiser.c
+++ b/util-linux/mkfs_reiser.c
@@ -11,8 +11,8 @@
11//config: default n 11//config: default n
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: Utility to create ReiserFS filesystems. 14//config: Utility to create ReiserFS filesystems.
15//config: Note: this applet needs a lot of testing and polishing. 15//config: Note: this applet needs a lot of testing and polishing.
16 16
17//applet:IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser)) 17//applet:IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser))
18 18
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
index 1fc943430..f9768ed56 100644
--- a/util-linux/mkfs_vfat.c
+++ b/util-linux/mkfs_vfat.c
@@ -8,18 +8,18 @@
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10//config:config MKDOSFS 10//config:config MKDOSFS
11//config: bool "mkdosfs" 11//config: bool "mkdosfs (6.8 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: Utility to create FAT32 filesystems. 15//config: Utility to create FAT32 filesystems.
16//config: 16//config:
17//config:config MKFS_VFAT 17//config:config MKFS_VFAT
18//config: bool "mkfs.vfat" 18//config: bool "mkfs.vfat (6.8 kb)"
19//config: default y 19//config: default y
20//config: select PLATFORM_LINUX 20//config: select PLATFORM_LINUX
21//config: help 21//config: help
22//config: Alias to "mkdosfs". 22//config: Alias to "mkdosfs".
23 23
24// APPLET_ODDNAME:name main location suid_type help 24// APPLET_ODDNAME:name main location suid_type help
25//applet:IF_MKDOSFS( APPLET_ODDNAME(mkdosfs, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat)) 25//applet:IF_MKDOSFS( APPLET_ODDNAME(mkdosfs, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat))
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 954a1948d..e44e13c0d 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -6,24 +6,24 @@
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8//config:config MKSWAP 8//config:config MKSWAP
9//config: bool "mkswap" 9//config: bool "mkswap (5.8 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: The mkswap utility is used to configure a file or disk partition as 12//config: The mkswap utility is used to configure a file or disk partition as
13//config: Linux swap space. This allows Linux to use the entire file or 13//config: Linux swap space. This allows Linux to use the entire file or
14//config: partition as if it were additional RAM, which can greatly increase 14//config: partition as if it were additional RAM, which can greatly increase
15//config: the capability of low-memory machines. This additional memory is 15//config: the capability of low-memory machines. This additional memory is
16//config: much slower than real RAM, but can be very helpful at preventing your 16//config: much slower than real RAM, but can be very helpful at preventing your
17//config: applications being killed by the Linux out of memory (OOM) killer. 17//config: applications being killed by the Linux out of memory (OOM) killer.
18//config: Once you have created swap space using 'mkswap' you need to enable 18//config: Once you have created swap space using 'mkswap' you need to enable
19//config: the swap space using the 'swapon' utility. 19//config: the swap space using the 'swapon' utility.
20//config: 20//config:
21//config:config FEATURE_MKSWAP_UUID 21//config:config FEATURE_MKSWAP_UUID
22//config: bool "UUID support" 22//config: bool "UUID support"
23//config: default y 23//config: default y
24//config: depends on MKSWAP 24//config: depends on MKSWAP
25//config: help 25//config: help
26//config: Generate swap spaces with universally unique identifiers. 26//config: Generate swap spaces with universally unique identifiers.
27 27
28//applet:IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP)) 28//applet:IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP))
29 29
diff --git a/util-linux/more.c b/util-linux/more.c
index a032a1e7f..fafc80403 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -14,14 +14,14 @@
14 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 14 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
15 */ 15 */
16//config:config MORE 16//config:config MORE
17//config: bool "more" 17//config: bool "more (6.7 kb)"
18//config: default y 18//config: default y
19//config: help 19//config: help
20//config: more is a simple utility which allows you to read text one screen 20//config: more is a simple utility which allows you to read text one screen
21//config: sized page at a time. If you want to read text that is larger than 21//config: sized page at a time. If you want to read text that is larger than
22//config: the screen, and you are using anything faster than a 300 baud modem, 22//config: the screen, and you are using anything faster than a 300 baud modem,
23//config: you will probably find this utility very helpful. If you don't have 23//config: you will probably find this utility very helpful. If you don't have
24//config: any need to reading text files, you can leave this disabled. 24//config: any need to reading text files, you can leave this disabled.
25 25
26//applet:IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP)) 26//applet:IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP))
27 27
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 5fcc7958c..1a39da2db 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -18,44 +18,44 @@
18// 18//
19 19
20//config:config MOUNT 20//config:config MOUNT
21//config: bool "mount" 21//config: bool "mount (30 kb)"
22//config: default y 22//config: default y
23//config: select PLATFORM_LINUX 23//config: select PLATFORM_LINUX
24//config: help 24//config: help
25//config: All files and filesystems in Unix are arranged into one big directory 25//config: All files and filesystems in Unix are arranged into one big directory
26//config: tree. The 'mount' utility is used to graft a filesystem onto a 26//config: tree. The 'mount' utility is used to graft a filesystem onto a
27//config: particular part of the tree. A filesystem can either live on a block 27//config: particular part of the tree. A filesystem can either live on a block
28//config: device, or it can be accessible over the network, as is the case with 28//config: device, or it can be accessible over the network, as is the case with
29//config: NFS filesystems. Most people using BusyBox will also want to enable 29//config: NFS filesystems. Most people using BusyBox will also want to enable
30//config: the 'mount' utility. 30//config: the 'mount' utility.
31//config: 31//config:
32//config:config FEATURE_MOUNT_FAKE 32//config:config FEATURE_MOUNT_FAKE
33//config: bool "Support option -f" 33//config: bool "Support option -f"
34//config: default y 34//config: default y
35//config: depends on MOUNT 35//config: depends on MOUNT
36//config: help 36//config: help
37//config: Enable support for faking a file system mount. 37//config: Enable support for faking a file system mount.
38//config: 38//config:
39//config:config FEATURE_MOUNT_VERBOSE 39//config:config FEATURE_MOUNT_VERBOSE
40//config: bool "Support option -v" 40//config: bool "Support option -v"
41//config: default y 41//config: default y
42//config: depends on MOUNT 42//config: depends on MOUNT
43//config: help 43//config: help
44//config: Enable multi-level -v[vv...] verbose messages. Useful if you 44//config: Enable multi-level -v[vv...] verbose messages. Useful if you
45//config: debug mount problems and want to see what is exactly passed 45//config: debug mount problems and want to see what is exactly passed
46//config: to the kernel. 46//config: to the kernel.
47//config: 47//config:
48//config:config FEATURE_MOUNT_HELPERS 48//config:config FEATURE_MOUNT_HELPERS
49//config: bool "Support mount helpers" 49//config: bool "Support mount helpers"
50//config: default n 50//config: default n
51//config: depends on MOUNT 51//config: depends on MOUNT
52//config: help 52//config: help
53//config: Enable mounting of virtual file systems via external helpers. 53//config: Enable mounting of virtual file systems via external helpers.
54//config: E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call 54//config: E.g. "mount obexfs#-b00.11.22.33.44.55 /mnt" will in effect call
55//config: "obexfs -b00.11.22.33.44.55 /mnt" 55//config: "obexfs -b00.11.22.33.44.55 /mnt"
56//config: Also "mount -t sometype [-o opts] fs /mnt" will try 56//config: Also "mount -t sometype [-o opts] fs /mnt" will try
57//config: "sometype [-o opts] fs /mnt" if simple mount syscall fails. 57//config: "sometype [-o opts] fs /mnt" if simple mount syscall fails.
58//config: The idea is to use such virtual filesystems in /etc/fstab. 58//config: The idea is to use such virtual filesystems in /etc/fstab.
59//config: 59//config:
60//config:config FEATURE_MOUNT_LABEL 60//config:config FEATURE_MOUNT_LABEL
61//config: bool "Support specifying devices by label or UUID" 61//config: bool "Support specifying devices by label or UUID"
@@ -63,9 +63,9 @@
63//config: depends on MOUNT 63//config: depends on MOUNT
64//config: select VOLUMEID 64//config: select VOLUMEID
65//config: help 65//config: help
66//config: This allows for specifying a device by label or uuid, rather than by 66//config: This allows for specifying a device by label or uuid, rather than by
67//config: name. This feature utilizes the same functionality as blkid/findfs. 67//config: name. This feature utilizes the same functionality as blkid/findfs.
68//config: This also enables label or uuid support for swapon. 68//config: This also enables label or uuid support for swapon.
69//config: 69//config:
70//config:config FEATURE_MOUNT_NFS 70//config:config FEATURE_MOUNT_NFS
71//config: bool "Support mounting NFS file systems on Linux < 2.6.23" 71//config: bool "Support mounting NFS file systems on Linux < 2.6.23"
@@ -74,43 +74,43 @@
74//config: select FEATURE_HAVE_RPC 74//config: select FEATURE_HAVE_RPC
75//config: select FEATURE_SYSLOG 75//config: select FEATURE_SYSLOG
76//config: help 76//config: help
77//config: Enable mounting of NFS file systems on Linux kernels prior 77//config: Enable mounting of NFS file systems on Linux kernels prior
78//config: to version 2.6.23. Note that in this case mounting of NFS 78//config: to version 2.6.23. Note that in this case mounting of NFS
79//config: over IPv6 will not be possible. 79//config: over IPv6 will not be possible.
80//config: 80//config:
81//config: Note that this option links in RPC support from libc, 81//config: Note that this option links in RPC support from libc,
82//config: which is rather large (~10 kbytes on uclibc). 82//config: which is rather large (~10 kbytes on uclibc).
83//config: 83//config:
84//config:config FEATURE_MOUNT_CIFS 84//config:config FEATURE_MOUNT_CIFS
85//config: bool "Support mounting CIFS/SMB file systems" 85//config: bool "Support mounting CIFS/SMB file systems"
86//config: default y 86//config: default y
87//config: depends on MOUNT 87//config: depends on MOUNT
88//config: help 88//config: help
89//config: Enable support for samba mounts. 89//config: Enable support for samba mounts.
90//config: 90//config:
91//config:config FEATURE_MOUNT_FLAGS 91//config:config FEATURE_MOUNT_FLAGS
92//config: depends on MOUNT 92//config: depends on MOUNT
93//config: bool "Support lots of -o flags" 93//config: bool "Support lots of -o flags"
94//config: default y 94//config: default y
95//config: help 95//config: help
96//config: Without this, mount only supports ro/rw/remount. With this, it 96//config: Without this, mount only supports ro/rw/remount. With this, it
97//config: supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime, 97//config: supports nosuid, suid, dev, nodev, exec, noexec, sync, async, atime,
98//config: noatime, diratime, nodiratime, loud, bind, move, shared, slave, 98//config: noatime, diratime, nodiratime, loud, bind, move, shared, slave,
99//config: private, unbindable, rshared, rslave, rprivate, and runbindable. 99//config: private, unbindable, rshared, rslave, rprivate, and runbindable.
100//config: 100//config:
101//config:config FEATURE_MOUNT_FSTAB 101//config:config FEATURE_MOUNT_FSTAB
102//config: depends on MOUNT 102//config: depends on MOUNT
103//config: bool "Support /etc/fstab and -a" 103//config: bool "Support /etc/fstab and -a"
104//config: default y 104//config: default y
105//config: help 105//config: help
106//config: Support mount all and looking for files in /etc/fstab. 106//config: Support mount all and looking for files in /etc/fstab.
107//config: 107//config:
108//config:config FEATURE_MOUNT_OTHERTAB 108//config:config FEATURE_MOUNT_OTHERTAB
109//config: depends on FEATURE_MOUNT_FSTAB 109//config: depends on FEATURE_MOUNT_FSTAB
110//config: bool "Support -T <alt_fstab>" 110//config: bool "Support -T <alt_fstab>"
111//config: default y 111//config: default y
112//config: help 112//config: help
113//config: Support mount -T (specifying an alternate fstab) 113//config: Support mount -T (specifying an alternate fstab)
114 114
115/* On full-blown systems, requires suid for user mounts. 115/* On full-blown systems, requires suid for user mounts.
116 * But it's not unthinkable to have it available in non-suid flavor on some systems, 116 * But it's not unthinkable to have it available in non-suid flavor on some systems,
diff --git a/util-linux/mountpoint.c b/util-linux/mountpoint.c
index 8b9e1d779..b7f048196 100644
--- a/util-linux/mountpoint.c
+++ b/util-linux/mountpoint.c
@@ -9,10 +9,10 @@
9 * Based on sysvinit's mountpoint 9 * Based on sysvinit's mountpoint
10 */ 10 */
11//config:config MOUNTPOINT 11//config:config MOUNTPOINT
12//config: bool "mountpoint" 12//config: bool "mountpoint (4.5 kb)"
13//config: default y 13//config: default y
14//config: help 14//config: help
15//config: mountpoint checks if the directory is a mountpoint. 15//config: mountpoint checks if the directory is a mountpoint.
16 16
17//applet:IF_MOUNTPOINT(APPLET(mountpoint, BB_DIR_BIN, BB_SUID_DROP)) 17//applet:IF_MOUNTPOINT(APPLET(mountpoint, BB_DIR_BIN, BB_SUID_DROP))
18 18
diff --git a/util-linux/nsenter.c b/util-linux/nsenter.c
index 57b218dab..12c86b0ed 100644
--- a/util-linux/nsenter.c
+++ b/util-linux/nsenter.c
@@ -8,19 +8,19 @@
8 */ 8 */
9 9
10//config:config NSENTER 10//config:config NSENTER
11//config: bool "nsenter" 11//config: bool "nsenter (8.6 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: Run program with namespaces of other processes. 15//config: Run program with namespaces of other processes.
16//config: 16//config:
17//config:config FEATURE_NSENTER_LONG_OPTS 17//config:config FEATURE_NSENTER_LONG_OPTS
18//config: bool "Enable long options" 18//config: bool "Enable long options"
19//config: default y 19//config: default y
20//config: depends on NSENTER && LONG_OPTS 20//config: depends on NSENTER && LONG_OPTS
21//config: help 21//config: help
22//config: Support long options for the nsenter applet. This makes 22//config: Support long options for the nsenter applet. This makes
23//config: the busybox implementation more compatible with upstream. 23//config: the busybox implementation more compatible with upstream.
24 24
25//applet:IF_NSENTER(APPLET(nsenter, BB_DIR_USR_BIN, BB_SUID_DROP)) 25//applet:IF_NSENTER(APPLET(nsenter, BB_DIR_USR_BIN, BB_SUID_DROP))
26 26
diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c
index 9bdae506c..331038057 100644
--- a/util-linux/pivot_root.c
+++ b/util-linux/pivot_root.c
@@ -9,17 +9,17 @@
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 */ 10 */
11//config:config PIVOT_ROOT 11//config:config PIVOT_ROOT
12//config: bool "pivot_root" 12//config: bool "pivot_root (898 bytes)"
13//config: default y 13//config: default y
14//config: select PLATFORM_LINUX 14//config: select PLATFORM_LINUX
15//config: help 15//config: help
16//config: The pivot_root utility swaps the mount points for the root filesystem 16//config: The pivot_root utility swaps the mount points for the root filesystem
17//config: with some other mounted filesystem. This allows you to do all sorts 17//config: with some other mounted filesystem. This allows you to do all sorts
18//config: of wild and crazy things with your Linux system and is far more 18//config: of wild and crazy things with your Linux system and is far more
19//config: powerful than 'chroot'. 19//config: powerful than 'chroot'.
20//config: 20//config:
21//config: Note: This is for initrd in linux 2.4. Under initramfs (introduced 21//config: Note: This is for initrd in linux 2.4. Under initramfs (introduced
22//config: in linux 2.6) use switch_root instead. 22//config: in linux 2.6) use switch_root instead.
23 23
24//applet:IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP)) 24//applet:IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP))
25 25
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 960df25d2..66b877e24 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -8,13 +8,13 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10//config:config RDATE 10//config:config RDATE
11//config: bool "rdate" 11//config: bool "rdate (6 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: The rdate utility allows you to synchronize the date and time of your 14//config: The rdate utility allows you to synchronize the date and time of your
15//config: system clock with the date and time of a remote networked system using 15//config: system clock with the date and time of a remote networked system using
16//config: the RFC868 protocol, which is built into the inetd daemon on most 16//config: the RFC868 protocol, which is built into the inetd daemon on most
17//config: systems. 17//config: systems.
18 18
19//applet:IF_RDATE(APPLET(rdate, BB_DIR_USR_SBIN, BB_SUID_DROP)) 19//applet:IF_RDATE(APPLET(rdate, BB_DIR_USR_SBIN, BB_SUID_DROP))
20 20
diff --git a/util-linux/rdev.c b/util-linux/rdev.c
index 0e1578e33..2ffe07688 100644
--- a/util-linux/rdev.c
+++ b/util-linux/rdev.c
@@ -9,10 +9,10 @@
9 * 9 *
10 */ 10 */
11//config:config RDEV 11//config:config RDEV
12//config: bool "rdev" 12//config: bool "rdev (1.4 kb)"
13//config: default y 13//config: default y
14//config: help 14//config: help
15//config: Print the device node associated with the filesystem mounted at '/'. 15//config: Print the device node associated with the filesystem mounted at '/'.
16 16
17//applet:IF_RDEV(APPLET(rdev, BB_DIR_USR_SBIN, BB_SUID_DROP)) 17//applet:IF_RDEV(APPLET(rdev, BB_DIR_USR_SBIN, BB_SUID_DROP))
18 18
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index 31abb6bb2..b045657d8 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -32,11 +32,11 @@
32 * Paul Mundt <lethal@linux-sh.org>. 32 * Paul Mundt <lethal@linux-sh.org>.
33 */ 33 */
34//config:config READPROFILE 34//config:config READPROFILE
35//config: bool "readprofile" 35//config: bool "readprofile (7.2 kb)"
36//config: default y 36//config: default y
37//config: #select PLATFORM_LINUX 37//config: #select PLATFORM_LINUX
38//config: help 38//config: help
39//config: This allows you to parse /proc/profile for basic profiling. 39//config: This allows you to parse /proc/profile for basic profiling.
40 40
41//applet:IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP)) 41//applet:IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP))
42 42
diff --git a/util-linux/renice.c b/util-linux/renice.c
index 4da3394a8..23cbca88d 100644
--- a/util-linux/renice.c
+++ b/util-linux/renice.c
@@ -19,11 +19,11 @@
19 * following IDs (if any). Multiple switches are allowed. 19 * following IDs (if any). Multiple switches are allowed.
20 */ 20 */
21//config:config RENICE 21//config:config RENICE
22//config: bool "renice" 22//config: bool "renice (3.8 kb)"
23//config: default y 23//config: default y
24//config: help 24//config: help
25//config: Renice alters the scheduling priority of one or more running 25//config: Renice alters the scheduling priority of one or more running
26//config: processes. 26//config: processes.
27 27
28//applet:IF_RENICE(APPLET(renice, BB_DIR_USR_BIN, BB_SUID_DROP)) 28//applet:IF_RENICE(APPLET(renice, BB_DIR_USR_BIN, BB_SUID_DROP))
29 29
diff --git a/util-linux/rev.c b/util-linux/rev.c
index d34838a35..b0a0c01aa 100644
--- a/util-linux/rev.c
+++ b/util-linux/rev.c
@@ -6,10 +6,10 @@
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8//config:config REV 8//config:config REV
9//config: bool "rev" 9//config: bool "rev (4.5 kb)"
10//config: default y 10//config: default y
11//config: help 11//config: help
12//config: Reverse lines of a file or files. 12//config: Reverse lines of a file or files.
13 13
14//applet:IF_REV(APPLET(rev, BB_DIR_BIN, BB_SUID_DROP)) 14//applet:IF_REV(APPLET(rev, BB_DIR_BIN, BB_SUID_DROP))
15 15
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c
index b63164588..4c47c5369 100644
--- a/util-linux/rtcwake.c
+++ b/util-linux/rtcwake.c
@@ -23,11 +23,11 @@
23 * That flag should not be needed on systems with adjtime support. 23 * That flag should not be needed on systems with adjtime support.
24 */ 24 */
25//config:config RTCWAKE 25//config:config RTCWAKE
26//config: bool "rtcwake" 26//config: bool "rtcwake (6.4 kb)"
27//config: default y 27//config: default y
28//config: select PLATFORM_LINUX 28//config: select PLATFORM_LINUX
29//config: help 29//config: help
30//config: Enter a system sleep state until specified wakeup time. 30//config: Enter a system sleep state until specified wakeup time.
31 31
32//applet:IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP)) 32//applet:IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP))
33 33
diff --git a/util-linux/script.c b/util-linux/script.c
index c5063e8a1..9eebb51a4 100644
--- a/util-linux/script.c
+++ b/util-linux/script.c
@@ -11,10 +11,10 @@
11 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 11 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
12 */ 12 */
13//config:config SCRIPT 13//config:config SCRIPT
14//config: bool "script" 14//config: bool "script (8 kb)"
15//config: default y 15//config: default y
16//config: help 16//config: help
17//config: The script makes typescript of terminal session. 17//config: The script makes typescript of terminal session.
18 18
19//applet:IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP)) 19//applet:IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP))
20 20
diff --git a/util-linux/scriptreplay.c b/util-linux/scriptreplay.c
index 8a0c7489d..7e9850103 100644
--- a/util-linux/scriptreplay.c
+++ b/util-linux/scriptreplay.c
@@ -8,11 +8,11 @@
8 * 8 *
9 */ 9 */
10//config:config SCRIPTREPLAY 10//config:config SCRIPTREPLAY
11//config: bool "scriptreplay" 11//config: bool "scriptreplay (2.6 kb)"
12//config: default y 12//config: default y
13//config: help 13//config: help
14//config: This program replays a typescript, using timing information 14//config: This program replays a typescript, using timing information
15//config: given by script -t. 15//config: given by script -t.
16 16
17//applet:IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP)) 17//applet:IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
18 18
diff --git a/util-linux/setarch.c b/util-linux/setarch.c
index e4124b044..d4b568832 100644
--- a/util-linux/setarch.c
+++ b/util-linux/setarch.c
@@ -7,28 +7,28 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config SETARCH 9//config:config SETARCH
10//config: bool "setarch" 10//config: bool "setarch (3.4 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: The linux32 utility is used to create a 32bit environment for the 14//config: The linux32 utility is used to create a 32bit environment for the
15//config: specified program (usually a shell). It only makes sense to have 15//config: specified program (usually a shell). It only makes sense to have
16//config: this util on a system that supports both 64bit and 32bit userland 16//config: this util on a system that supports both 64bit and 32bit userland
17//config: (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...). 17//config: (like amd64/x86, ppc64/ppc, sparc64/sparc, etc...).
18//config: 18//config:
19//config:config LINUX32 19//config:config LINUX32
20//config: bool "linux32" 20//config: bool "linux32 (3.2 kb)"
21//config: default y 21//config: default y
22//config: select PLATFORM_LINUX 22//config: select PLATFORM_LINUX
23//config: help 23//config: help
24//config: Alias to "setarch linux32". 24//config: Alias to "setarch linux32".
25//config: 25//config:
26//config:config LINUX64 26//config:config LINUX64
27//config: bool "linux64" 27//config: bool "linux64 (3.2 kb)"
28//config: default y 28//config: default y
29//config: select PLATFORM_LINUX 29//config: select PLATFORM_LINUX
30//config: help 30//config: help
31//config: Alias to "setarch linux64". 31//config: Alias to "setarch linux64".
32 32
33//applet:IF_SETARCH(APPLET(setarch, BB_DIR_BIN, BB_SUID_DROP)) 33//applet:IF_SETARCH(APPLET(setarch, BB_DIR_BIN, BB_SUID_DROP))
34// APPLET_ODDNAME:name main location suid_type help 34// APPLET_ODDNAME:name main location suid_type help
diff --git a/util-linux/setpriv.c b/util-linux/setpriv.c
index 3d8dfea52..0f85428ab 100644
--- a/util-linux/setpriv.c
+++ b/util-linux/setpriv.c
@@ -8,41 +8,41 @@
8 * 8 *
9 */ 9 */
10//config:config SETPRIV 10//config:config SETPRIV
11//config: bool "setpriv" 11//config: bool "setpriv (3.4 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: select LONG_OPTS 14//config: select LONG_OPTS
15//config: help 15//config: help
16//config: Run a program with different Linux privilege settings. 16//config: Run a program with different Linux privilege settings.
17//config: Requires kernel >= 3.5 17//config: Requires kernel >= 3.5
18//config: 18//config:
19//config:config FEATURE_SETPRIV_DUMP 19//config:config FEATURE_SETPRIV_DUMP
20//config: bool "Support dumping current privilege state" 20//config: bool "Support dumping current privilege state"
21//config: default y 21//config: default y
22//config: depends on SETPRIV 22//config: depends on SETPRIV
23//config: help 23//config: help
24//config: Enables the "--dump" switch to print out the current privilege 24//config: Enables the "--dump" switch to print out the current privilege
25//config: state. This is helpful for diagnosing problems. 25//config: state. This is helpful for diagnosing problems.
26//config: 26//config:
27//config:config FEATURE_SETPRIV_CAPABILITIES 27//config:config FEATURE_SETPRIV_CAPABILITIES
28//config: bool "Support capabilities" 28//config: bool "Support capabilities"
29//config: default y 29//config: default y
30//config: depends on SETPRIV 30//config: depends on SETPRIV
31//config: help 31//config: help
32//config: Capabilities can be used to grant processes additional rights 32//config: Capabilities can be used to grant processes additional rights
33//config: without the necessity to always execute as the root user. 33//config: without the necessity to always execute as the root user.
34//config: Enabling this option enables "--dump" to show information on 34//config: Enabling this option enables "--dump" to show information on
35//config: capabilities. 35//config: capabilities.
36//config: 36//config:
37//config:config FEATURE_SETPRIV_CAPABILITY_NAMES 37//config:config FEATURE_SETPRIV_CAPABILITY_NAMES
38//config: bool "Support capability names" 38//config: bool "Support capability names"
39//config: default y 39//config: default y
40//config: depends on SETPRIV && FEATURE_SETPRIV_CAPABILITIES 40//config: depends on SETPRIV && FEATURE_SETPRIV_CAPABILITIES
41//config: help 41//config: help
42//config: Capabilities can be either referenced via a human-readble name, 42//config: Capabilities can be either referenced via a human-readble name,
43//config: e.g. "net_admin", or using their index, e.g. "cap_12". Enabling 43//config: e.g. "net_admin", or using their index, e.g. "cap_12". Enabling
44//config: this option allows using the human-readable names in addition to 44//config: this option allows using the human-readable names in addition to
45//config: the index-based names. 45//config: the index-based names.
46 46
47//applet:IF_SETPRIV(APPLET(setpriv, BB_DIR_BIN, BB_SUID_DROP)) 47//applet:IF_SETPRIV(APPLET(setpriv, BB_DIR_BIN, BB_SUID_DROP))
48 48
diff --git a/util-linux/setsid.c b/util-linux/setsid.c
index 143a8f8fa..60cab2fcf 100644
--- a/util-linux/setsid.c
+++ b/util-linux/setsid.c
@@ -14,10 +14,10 @@
14 * - busyboxed 14 * - busyboxed
15 */ 15 */
16//config:config SETSID 16//config:config SETSID
17//config: bool "setsid" 17//config: bool "setsid (3.9 kb)"
18//config: default y 18//config: default y
19//config: help 19//config: help
20//config: setsid runs a program in a new session 20//config: setsid runs a program in a new session
21 21
22//applet:IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) 22//applet:IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP))
23 23
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 313ea0ef9..bda0687d6 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -7,39 +7,36 @@
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config SWAPON 9//config:config SWAPON
10//config: bool "swapon" 10//config: bool "swapon (4.9 kb)"
11//config: default y 11//config: default y
12//config: select PLATFORM_LINUX 12//config: select PLATFORM_LINUX
13//config: help 13//config: help
14//config: This option enables the 'swapon' utility. 14//config: Once you have created some swap space using 'mkswap', you also need
15//config: Once you have created some swap space using 'mkswap', you also need 15//config: to enable your swap space with the 'swapon' utility. The 'swapoff'
16//config: to enable your swap space with the 'swapon' utility. The 'swapoff' 16//config: utility is used, typically at system shutdown, to disable any swap
17//config: utility is used, typically at system shutdown, to disable any swap 17//config: space. If you are not using any swap space, you can leave this
18//config: space. If you are not using any swap space, you can leave this 18//config: option disabled.
19//config: option disabled.
20//config: 19//config:
21//config:config FEATURE_SWAPON_DISCARD 20//config:config FEATURE_SWAPON_DISCARD
22//config: bool "Support discard option -d" 21//config: bool "Support discard option -d"
23//config: default y 22//config: default y
24//config: depends on SWAPON 23//config: depends on SWAPON
25//config: help 24//config: help
26//config: Enable support for discarding swap area blocks at swapon and/or as 25//config: Enable support for discarding swap area blocks at swapon and/or as
27//config: the kernel frees them. This option enables both the -d option on 26//config: the kernel frees them. This option enables both the -d option on
28//config: 'swapon' and the 'discard' option for swap entries in /etc/fstab. 27//config: 'swapon' and the 'discard' option for swap entries in /etc/fstab.
29//config: 28//config:
30//config:config FEATURE_SWAPON_PRI 29//config:config FEATURE_SWAPON_PRI
31//config: bool "Support priority option -p" 30//config: bool "Support priority option -p"
32//config: default y 31//config: default y
33//config: depends on SWAPON 32//config: depends on SWAPON
34//config: help 33//config: help
35//config: Enable support for setting swap device priority in swapon. 34//config: Enable support for setting swap device priority in swapon.
36//config: 35//config:
37//config:config SWAPOFF 36//config:config SWAPOFF
38//config: bool "swapoff" 37//config: bool "swapoff (4.3 kb)"
39//config: default y 38//config: default y
40//config: select PLATFORM_LINUX 39//config: select PLATFORM_LINUX
41//config: help
42//config: This option enables the 'swapoff' utility.
43 40
44// APPLET_ODDNAME:name main location suid_type help 41// APPLET_ODDNAME:name main location suid_type help
45//applet:IF_SWAPON( APPLET_ODDNAME(swapon, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapon)) 42//applet:IF_SWAPON( APPLET_ODDNAME(swapon, swap_on_off, BB_DIR_SBIN, BB_SUID_DROP, swapon))
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c
index f18e8a5ce..32708934e 100644
--- a/util-linux/switch_root.c
+++ b/util-linux/switch_root.c
@@ -6,24 +6,24 @@
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8//config:config SWITCH_ROOT 8//config:config SWITCH_ROOT
9//config: bool "switch_root" 9//config: bool "switch_root (5.2 kb)"
10//config: default y 10//config: default y
11//config: select PLATFORM_LINUX 11//config: select PLATFORM_LINUX
12//config: help 12//config: help
13//config: The switch_root utility is used from initramfs to select a new 13//config: The switch_root utility is used from initramfs to select a new
14//config: root device. Under initramfs, you have to use this instead of 14//config: root device. Under initramfs, you have to use this instead of
15//config: pivot_root. (Stop reading here if you don't care why.) 15//config: pivot_root. (Stop reading here if you don't care why.)
16//config: 16//config:
17//config: Booting with initramfs extracts a gzipped cpio archive into rootfs 17//config: Booting with initramfs extracts a gzipped cpio archive into rootfs
18//config: (which is a variant of ramfs/tmpfs). Because rootfs can't be moved 18//config: (which is a variant of ramfs/tmpfs). Because rootfs can't be moved
19//config: or unmounted*, pivot_root will not work from initramfs. Instead, 19//config: or unmounted*, pivot_root will not work from initramfs. Instead,
20//config: switch_root deletes everything out of rootfs (including itself), 20//config: switch_root deletes everything out of rootfs (including itself),
21//config: does a mount --move that overmounts rootfs with the new root, and 21//config: does a mount --move that overmounts rootfs with the new root, and
22//config: then execs the specified init program. 22//config: then execs the specified init program.
23//config: 23//config:
24//config: * Because the Linux kernel uses rootfs internally as the starting 24//config: * Because the Linux kernel uses rootfs internally as the starting
25//config: and ending point for searching through the kernel's doubly linked 25//config: and ending point for searching through the kernel's doubly linked
26//config: list of active mount points. That's why. 26//config: list of active mount points. That's why.
27 27
28//applet:IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP)) 28//applet:IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP))
29 29
diff --git a/util-linux/taskset.c b/util-linux/taskset.c
index 94a07383a..9957b1a71 100644
--- a/util-linux/taskset.c
+++ b/util-linux/taskset.c
@@ -7,20 +7,20 @@
7 */ 7 */
8 8
9//config:config TASKSET 9//config:config TASKSET
10//config: bool "taskset" 10//config: bool "taskset (4.1 kb)"
11//config: default y 11//config: default y
12//config: help 12//config: help
13//config: Retrieve or set a processes's CPU affinity. 13//config: Retrieve or set a processes's CPU affinity.
14//config: This requires sched_{g,s}etaffinity support in your libc. 14//config: This requires sched_{g,s}etaffinity support in your libc.
15//config: 15//config:
16//config:config FEATURE_TASKSET_FANCY 16//config:config FEATURE_TASKSET_FANCY
17//config: bool "Fancy output" 17//config: bool "Fancy output"
18//config: default y 18//config: default y
19//config: depends on TASKSET 19//config: depends on TASKSET
20//config: help 20//config: help
21//config: Needed for machines with more than 32-64 CPUs: 21//config: Needed for machines with more than 32-64 CPUs:
22//config: affinity parameter 0xHHHHHHHHHHHHHHHHHHHH can be arbitrarily long 22//config: affinity parameter 0xHHHHHHHHHHHHHHHHHHHH can be arbitrarily long
23//config: in this case. Otherwise, it is limited to sizeof(long). 23//config: in this case. Otherwise, it is limited to sizeof(long).
24 24
25//applet:IF_TASKSET(APPLET(taskset, BB_DIR_USR_BIN, BB_SUID_DROP)) 25//applet:IF_TASKSET(APPLET(taskset, BB_DIR_USR_BIN, BB_SUID_DROP))
26//kbuild:lib-$(CONFIG_TASKSET) += taskset.o 26//kbuild:lib-$(CONFIG_TASKSET) += taskset.o
diff --git a/util-linux/uevent.c b/util-linux/uevent.c
index c22216a8a..252e8fb64 100644
--- a/util-linux/uevent.c
+++ b/util-linux/uevent.c
@@ -4,12 +4,12 @@
4 * Licensed under GPLv2, see file LICENSE in this source tree. 4 * Licensed under GPLv2, see file LICENSE in this source tree.
5 */ 5 */
6//config:config UEVENT 6//config:config UEVENT
7//config: bool "uevent" 7//config: bool "uevent (3.2 kb)"
8//config: default y 8//config: default y
9//config: select PLATFORM_LINUX 9//config: select PLATFORM_LINUX
10//config: help 10//config: help
11//config: uevent is a netlink listener for kernel uevent notifications 11//config: uevent is a netlink listener for kernel uevent notifications
12//config: sent via netlink. It is usually used for dynamic device creation. 12//config: sent via netlink. It is usually used for dynamic device creation.
13 13
14//applet:IF_UEVENT(APPLET(uevent, BB_DIR_SBIN, BB_SUID_DROP)) 14//applet:IF_UEVENT(APPLET(uevent, BB_DIR_SBIN, BB_SUID_DROP))
15 15
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 0c50dc9ee..31bf671c1 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -8,21 +8,21 @@
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10//config:config UMOUNT 10//config:config UMOUNT
11//config: bool "umount" 11//config: bool "umount (4.5 kb)"
12//config: default y 12//config: default y
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: help 14//config: help
15//config: When you want to remove a mounted filesystem from its current mount 15//config: When you want to remove a mounted filesystem from its current mount
16//config: point, for example when you are shutting down the system, the 16//config: point, for example when you are shutting down the system, the
17//config: 'umount' utility is the tool to use. If you enabled the 'mount' 17//config: 'umount' utility is the tool to use. If you enabled the 'mount'
18//config: utility, you almost certainly also want to enable 'umount'. 18//config: utility, you almost certainly also want to enable 'umount'.
19//config: 19//config:
20//config:config FEATURE_UMOUNT_ALL 20//config:config FEATURE_UMOUNT_ALL
21//config: bool "Support option -a" 21//config: bool "Support option -a"
22//config: default y 22//config: default y
23//config: depends on UMOUNT 23//config: depends on UMOUNT
24//config: help 24//config: help
25//config: Support -a option to unmount all currently mounted filesystems. 25//config: Support -a option to unmount all currently mounted filesystems.
26 26
27//applet:IF_UMOUNT(APPLET(umount, BB_DIR_BIN, BB_SUID_DROP)) 27//applet:IF_UMOUNT(APPLET(umount, BB_DIR_BIN, BB_SUID_DROP))
28 28
diff --git a/util-linux/unshare.c b/util-linux/unshare.c
index 875e3f86e..e7b95c72b 100644
--- a/util-linux/unshare.c
+++ b/util-linux/unshare.c
@@ -7,13 +7,13 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9//config:config UNSHARE 9//config:config UNSHARE
10//config: bool "unshare" 10//config: bool "unshare (9.2 kb)"
11//config: default y 11//config: default y
12//config: depends on !NOMMU 12//config: depends on !NOMMU
13//config: select PLATFORM_LINUX 13//config: select PLATFORM_LINUX
14//config: select LONG_OPTS 14//config: select LONG_OPTS
15//config: help 15//config: help
16//config: Run program with some namespaces unshared from parent. 16//config: Run program with some namespaces unshared from parent.
17 17
18// needs LONG_OPTS: it is awkward to exclude code which handles --propagation 18// needs LONG_OPTS: it is awkward to exclude code which handles --propagation
19// and --setgroups based on LONG_OPTS, so instead applet requires LONG_OPTS. 19// and --setgroups based on LONG_OPTS, so instead applet requires LONG_OPTS.
diff --git a/util-linux/volume_id/exfat.c b/util-linux/volume_id/exfat.c
index 7ed13a70e..14bf9d691 100644
--- a/util-linux/volume_id/exfat.c
+++ b/util-linux/volume_id/exfat.c
@@ -25,9 +25,9 @@
25//config: default y 25//config: default y
26//config: depends on VOLUMEID 26//config: depends on VOLUMEID
27//config: help 27//config: help
28//config: exFAT (extended FAT) is a proprietary file system designed especially 28//config: exFAT (extended FAT) is a proprietary file system designed especially
29//config: for flash drives. It has many features from NTFS, but with less 29//config: for flash drives. It has many features from NTFS, but with less
30//config: overhead. exFAT is used on most SDXC cards for consumer electronics. 30//config: overhead. exFAT is used on most SDXC cards for consumer electronics.
31 31
32#include "volume_id_internal.h" 32#include "volume_id_internal.h"
33 33
diff --git a/util-linux/volume_id/f2fs.c b/util-linux/volume_id/f2fs.c
index 1d3bdae36..3027f178e 100644
--- a/util-linux/volume_id/f2fs.c
+++ b/util-linux/volume_id/f2fs.c
@@ -13,10 +13,10 @@
13//config: default y 13//config: default y
14//config: depends on VOLUMEID 14//config: depends on VOLUMEID
15//config: help 15//config: help
16//config: F2FS (aka Flash-Friendly File System) is a log-structured file system, 16//config: F2FS (aka Flash-Friendly File System) is a log-structured file system,
17//config: which is adapted to newer forms of storage. F2FS also remedies some 17//config: which is adapted to newer forms of storage. F2FS also remedies some
18//config: known issues of the older log structured file systems, such as high 18//config: known issues of the older log structured file systems, such as high
19//config: cleaning overhead. 19//config: cleaning overhead.
20 20
21#include "volume_id_internal.h" 21#include "volume_id_internal.h"
22 22
diff --git a/util-linux/volume_id/nilfs.c b/util-linux/volume_id/nilfs.c
index ffe919f36..9d6c57fba 100644
--- a/util-linux/volume_id/nilfs.c
+++ b/util-linux/volume_id/nilfs.c
@@ -26,16 +26,16 @@
26//config: default y 26//config: default y
27//config: depends on VOLUMEID 27//config: depends on VOLUMEID
28//config: help 28//config: help
29//config: NILFS is a New Implementation of a Log-Structured File System (LFS) 29//config: NILFS is a New Implementation of a Log-Structured File System (LFS)
30//config: that supports continuous snapshots. This provides features like 30//config: that supports continuous snapshots. This provides features like
31//config: versioning of the entire filesystem, restoration of files that 31//config: versioning of the entire filesystem, restoration of files that
32//config: were deleted a few minutes ago. NILFS keeps consistency like 32//config: were deleted a few minutes ago. NILFS keeps consistency like
33//config: conventional LFS, so it provides quick recovery after system crashes. 33//config: conventional LFS, so it provides quick recovery after system crashes.
34//config: 34//config:
35//config: The possible use of NILFS includes versioning, tamper detection, 35//config: The possible use of NILFS includes versioning, tamper detection,
36//config: SOX compliance logging, and so forth. It can serve as an alternative 36//config: SOX compliance logging, and so forth. It can serve as an alternative
37//config: filesystem for Linux desktop environment, or as a basis of advanced 37//config: filesystem for Linux desktop environment, or as a basis of advanced
38//config: storage appliances. 38//config: storage appliances.
39 39
40#include "volume_id_internal.h" 40#include "volume_id_internal.h"
41 41
diff --git a/util-linux/volume_id/squashfs.c b/util-linux/volume_id/squashfs.c
index 6bba199cd..e3ffce35e 100644
--- a/util-linux/volume_id/squashfs.c
+++ b/util-linux/volume_id/squashfs.c
@@ -13,10 +13,10 @@
13//config: default y 13//config: default y
14//config: depends on VOLUMEID && FEATURE_BLKID_TYPE 14//config: depends on VOLUMEID && FEATURE_BLKID_TYPE
15//config: help 15//config: help
16//config: Squashfs is a compressed read-only filesystem for Linux. Squashfs is 16//config: Squashfs is a compressed read-only filesystem for Linux. Squashfs is
17//config: intended for general read-only filesystem use and in constrained block 17//config: intended for general read-only filesystem use and in constrained block
18//config: device/memory systems (e.g. embedded systems) where low overhead is 18//config: device/memory systems (e.g. embedded systems) where low overhead is
19//config: needed. 19//config: needed.
20 20
21#include "volume_id_internal.h" 21#include "volume_id_internal.h"
22 22
diff --git a/util-linux/volume_id/ubifs.c b/util-linux/volume_id/ubifs.c
index 99b0aa830..7512b84b0 100644
--- a/util-linux/volume_id/ubifs.c
+++ b/util-linux/volume_id/ubifs.c
@@ -13,8 +13,8 @@
13//config: default y 13//config: default y
14//config: depends on VOLUMEID 14//config: depends on VOLUMEID
15//config: help 15//config: help
16//config: UBIFS (Unsorted Block Image File System) is a file 16//config: UBIFS (Unsorted Block Image File System) is a file
17//config: system for use with raw flash memory media. 17//config: system for use with raw flash memory media.
18 18
19#include "volume_id_internal.h" 19#include "volume_id_internal.h"
20 20
diff --git a/util-linux/wall.c b/util-linux/wall.c
index 50658f457..e214d8c3f 100644
--- a/util-linux/wall.c
+++ b/util-linux/wall.c
@@ -7,11 +7,11 @@
7 */ 7 */
8 8
9//config:config WALL 9//config:config WALL
10//config: bool "wall" 10//config: bool "wall (2.5 kb)"
11//config: default y 11//config: default y
12//config: depends on FEATURE_UTMP 12//config: depends on FEATURE_UTMP
13//config: help 13//config: help
14//config: Write a message to all users that are logged in. 14//config: Write a message to all users that are logged in.
15 15
16/* Needs to be run by root or be suid root - needs to write to /dev/TTY: */ 16/* Needs to be run by root or be suid root - needs to write to /dev/TTY: */
17//applet:IF_WALL(APPLET(wall, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) 17//applet:IF_WALL(APPLET(wall, BB_DIR_USR_BIN, BB_SUID_REQUIRE))