oweals/busybox.git
7 years agotypo fix in config help text
Denys Vlasenko [Thu, 5 Jan 2017 10:47:28 +0000 (11:47 +0100)]
typo fix in config help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agounzip: properly use CDF to find compressed files. Closes 9536
Denys Vlasenko [Thu, 5 Jan 2017 10:43:53 +0000 (11:43 +0100)]
unzip: properly use CDF to find compressed files. Closes 9536

function                                             old     new   delta
unzip_main                                          2437    2350     -87

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agomodutils: remove special handling of uClibc
Waldemar Brodkorb [Mon, 26 Dec 2016 19:07:59 +0000 (20:07 +0100)]
modutils: remove special handling of uClibc

Commit 3a45b87ac36f (modutils: support finit_module syscall) introduced
macro finit_module. But it is not defined for uClibc.

The compilation for busybox fails for MIPS with:
With uClibc, we get following build errors:

  modutils/lib.a(modutils.o): In function `bb_init_module':
  modutils.c:(.text.bb_init_module+0x94): undefined reference to `finit_module'
  modutils.c:(.text.bb_init_module+0xa0): undefined reference to `finit_module'

We can just use syscall() without any need for the
uClibc wrappers.

Newer versions of uClibc-ng (>1.0.20) will remove the
module syscall wrappers.

Found via Buildroot autobuilders:
http://autobuild.buildroot.net/results/556/55655daef23788fb3967f801ec8b79e9bed7122b/build-end.log

function                                             old     new   delta
bb_delete_module                                      26      32      +6
bb_init_module                                        90      95      +5
delete_module                                         37       -     -37
init_module                                           53       -     -53
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 2/0 up/down: 11/-90)            Total: -79 bytes

Reported-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoshell: clarify help text of CONFIG_{SH,BASH}_IS_* options
Kang-Che Sung [Wed, 4 Jan 2017 11:29:04 +0000 (12:29 +0100)]
shell: clarify help text of CONFIG_{SH,BASH}_IS_* options

Mention the behavior if user selects CONFIG_SH_IS_ASH but not
CONFIG_ASH. We will be explicit that invocations like "busybox ash"
will not work for such configuration.

Also clarify help text of CONFIG_BASH_IS_* that bash compatibility in
ash is not complete. (It shouldn't be anyway - ash can't support every
bash quirk out there.)

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoudhcp: tweak config order and menu item names
Denys Vlasenko [Wed, 4 Jan 2017 11:13:38 +0000 (12:13 +0100)]
udhcp: tweak config order and menu item names

All other applets are listed simply by their name, no reason why
dumpleases doesn't do that.

Group all udhcpd feature options directly after it.

Put "NOT READY" into udhcpc6 item (some users actually tried to use it,
and complained).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoFix dependency for IFUPDOWN_UDHCPC_CMD_OPTIONS
Jörg Krause [Tue, 3 Jan 2017 11:29:52 +0000 (12:29 +0100)]
Fix dependency for IFUPDOWN_UDHCPC_CMD_OPTIONS

Commit a8c696bf09d8151323f6e99348c4bc8989f829c8 makes ifup and ifdown
individually selectable, but forgets to update the dependency to
IFUPDOWN_UDHCPC_CMD_OPTIONS, so it is not selectable anymore.

This patch fixes the dependency by checking for IFUP or IFDOWN, instead
of the obsolete IFUPDOWN.

Also, it drops dependency on UDHCPC: udhcpc on the target system
does not have to come from the _same_ binary.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoREADME_distro_proposal.txt: typo fixes
Tito Ragusa [Tue, 3 Jan 2017 11:25:18 +0000 (12:25 +0100)]
README_distro_proposal.txt: typo fixes

Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoappletlib: avoid warning on unused function ingroup
Cristian Ionescu-Idbohrn [Mon, 2 Jan 2017 10:17:09 +0000 (11:17 +0100)]
appletlib: avoid warning on unused function ingroup

libbb/appletlib.c:558:12: warning: 'ingroup' defined but
                                   not used [-Wunused-function]
 static int ingroup(uid_t u, gid_t g)
            ^~~~~~~

That function is used only if FEATURE_SUID_CONFIG is also enabled.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agohush: correct exitcode for unterminated ')' - exitcode2.tests testcase
Denys Vlasenko [Tue, 3 Jan 2017 10:47:50 +0000 (11:47 +0100)]
hush: correct exitcode for unterminated ')' - exitcode2.tests testcase

function                                             old     new   delta
parse_stream                                        2595    2609     +14

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoash: fix error code regression
Ron Yorston [Tue, 3 Jan 2017 10:18:23 +0000 (11:18 +0100)]
ash: fix error code regression

The commit 'ash,hush: set exit code 127 in "sh /does/not/exist" case'
only partly implemented the dash commit '[ERROR] Allow the originator
of EXERROR to set the exit status'.  This resulted in incorrect error
codes for a syntax error:

   $ )
   $ echo $?
   0

or a redirection error for a special builtin:

   $ rm -f xxx
   $ eval cat <xxx
   $ echo $?
   0

Signed-off-by: Ron Yorston <rmy@pobox.com>
Reported-by: Martijn Dekker <martijn@inlv.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoqemu_multiarch_testing: small improvements
Denys Vlasenko [Mon, 2 Jan 2017 12:48:06 +0000 (13:48 +0100)]
qemu_multiarch_testing: small improvements

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agotcpudp: define SO_ORIGINAL_DST directly, not via include
Denys Vlasenko [Mon, 2 Jan 2017 09:46:08 +0000 (10:46 +0100)]
tcpudp: define SO_ORIGINAL_DST directly, not via include

musl does not like including linux/netfilter_ipv4.h
(enum / #define collision in two headers, resulting in "3 = 3"
type situation in enum definition).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agodepmod: don't build it if MODPROBE_SMALL=y
Denys Vlasenko [Sun, 1 Jan 2017 12:12:48 +0000 (13:12 +0100)]
depmod: don't build it if MODPROBE_SMALL=y

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoUpdate to examples/var_service/README_distro_proposal.txt
Denys Vlasenko [Sun, 25 Dec 2016 19:41:00 +0000 (20:41 +0100)]
Update to examples/var_service/README_distro_proposal.txt

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agomake_single_applets.sh: SH_IS_HUSH needs special handling too
Denys Vlasenko [Fri, 23 Dec 2016 18:42:53 +0000 (19:42 +0100)]
make_single_applets.sh: SH_IS_HUSH needs special handling too

Well, in fact it works (make oldconfig throws only a warning when it sees
both SH_IS_HUSH=y and SH_IS_NONE=y), but let's be nice.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake it possible to select "sh" and "bash" aliases without selecting ash or hush
Denys Vlasenko [Fri, 23 Dec 2016 15:49:07 +0000 (16:49 +0100)]
Make it possible to select "sh" and "bash" aliases without selecting ash or hush

The same can be done for msh, but we are probably better off just deleting it
in a next versio or two.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake RMMOD=y by default
Denys Vlasenko [Fri, 23 Dec 2016 14:57:26 +0000 (15:57 +0100)]
Make RMMOD=y by default

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake INSMOD=y by default
Denys Vlasenko [Fri, 23 Dec 2016 14:22:44 +0000 (15:22 +0100)]
Make INSMOD=y by default

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoRemove FEATURE_IFUPDOWN_IP_BUILTIN and FEATURE_IFUPDOWN_IFCONFIG_BUILTIN
Denys Vlasenko [Fri, 23 Dec 2016 14:18:31 +0000 (15:18 +0100)]
Remove FEATURE_IFUPDOWN_IP_BUILTIN and FEATURE_IFUPDOWN_IFCONFIG_BUILTIN

They merely enable ip or ifconfig/route. There is already a way to do this
on the same menuconfig page.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agomodprobe-small: make applets individually selectable
Denys Vlasenko [Fri, 23 Dec 2016 14:12:27 +0000 (15:12 +0100)]
modprobe-small: make applets individually selectable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake DPKG=y and DPKG_DEB=y by default
Denys Vlasenko [Fri, 23 Dec 2016 12:52:53 +0000 (13:52 +0100)]
Make DPKG=y and DPKG_DEB=y by default

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoSelinux complains about deprecated selinux/flask.h, stop including it
Denys Vlasenko [Fri, 23 Dec 2016 12:52:13 +0000 (13:52 +0100)]
Selinux complains about deprecated selinux/flask.h, stop including it

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake FEATURE_USERNAME_COMPLETION=y by default
Denys Vlasenko [Fri, 23 Dec 2016 12:40:24 +0000 (13:40 +0100)]
Make FEATURE_USERNAME_COMPLETION=y by default

This matches bash behavior on Fedora

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agomake_single_applets.sh: a tool to check single-applet builds
Denys Vlasenko [Fri, 23 Dec 2016 12:39:22 +0000 (13:39 +0100)]
make_single_applets.sh: a tool to check single-applet builds

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agofix breakage found by mass one-applet builds
Denys Vlasenko [Fri, 23 Dec 2016 01:42:26 +0000 (02:42 +0100)]
fix breakage found by mass one-applet builds

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoip: make ip aliases individually selectable
Denys Vlasenko [Thu, 22 Dec 2016 21:30:13 +0000 (22:30 +0100)]
ip: make ip aliases individually selectable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake POST upload example script easier to use
Denys Vlasenko [Thu, 22 Dec 2016 14:33:11 +0000 (15:33 +0100)]
Make POST upload example script easier to use

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoshell: move "config" blocks above their use in coditional includes
Denys Vlasenko [Thu, 22 Dec 2016 14:21:58 +0000 (15:21 +0100)]
shell: move "config" blocks above their use in coditional includes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoUpdate information on building httpd and wget helpers
Denys Vlasenko [Thu, 22 Dec 2016 14:13:37 +0000 (15:13 +0100)]
Update information on building httpd and wget helpers

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoTweak some config defaults; fix MODPROBE_SMALL ordering in "make config"
Denys Vlasenko [Thu, 22 Dec 2016 13:36:49 +0000 (14:36 +0100)]
Tweak some config defaults; fix MODPROBE_SMALL ordering in "make config"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoash: clarify uclibc glob() bug in comment
Denys Vlasenko [Wed, 21 Dec 2016 20:04:16 +0000 (21:04 +0100)]
ash: clarify uclibc glob() bug in comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoash: error out if ASH_INTERNAL_GLOB is not selected on uClibc
Denys Vlasenko [Wed, 21 Dec 2016 03:13:23 +0000 (04:13 +0100)]
ash: error out if ASH_INTERNAL_GLOB is not selected on uClibc

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoStart 1.27.0 development cycle
Denys Vlasenko [Wed, 21 Dec 2016 02:33:42 +0000 (03:33 +0100)]
Start 1.27.0 development cycle

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoBump version to 1.26.0 1_26_0
Denys Vlasenko [Tue, 20 Dec 2016 02:00:43 +0000 (03:00 +0100)]
Bump version to 1.26.0

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agolibiproute: handle table ids larger than 255
Lukasz Nowak [Tue, 13 Dec 2016 12:58:31 +0000 (12:58 +0000)]
libiproute: handle table ids larger than 255

Linux kernel, starting from 2.6.19 allows ip table ids to have 32-bit values.
In order to preserve compatibility, the old 8-bit field: rtm_table is still
in use when table id is lower than 256.

Add support for the 32-bit table id (RTA_TABLE attribute) in:
- ip route print
- ip route modify
- ip rule print
- ip rule modify

Add printing of table ids to ip route.

Changes are compatible with the mainline iproute2 utilities.

These changes are required for compatibility with ConnMan, which by default
uses table ids greater than 255.

function                                             old     new   delta
print_route                                         1588    1637     +49
do_iproute                                          2187    2222     +35
do_iprule                                            955     987     +32
print_rule                                           617     630     +13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 129/0)             Total: 129 bytes

Signed-off-by: Lukasz Nowak <lnowak@tycoint.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agodf: implement -B n<suff> and -B <suff> formats of -B option
Denys Vlasenko [Mon, 12 Dec 2016 18:56:31 +0000 (19:56 +0100)]
df: implement -B n<suff> and -B <suff> formats of -B option

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agorandomconfig fixes
Denys Vlasenko [Mon, 12 Dec 2016 18:17:12 +0000 (19:17 +0100)]
randomconfig fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoash: fix signed char expansion bug
Denys Vlasenko [Mon, 12 Dec 2016 16:39:12 +0000 (17:39 +0100)]
ash: fix signed char expansion bug

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoshell: suppress "unused var/func" warnings on some configs
Denys Vlasenko [Mon, 12 Dec 2016 15:30:20 +0000 (16:30 +0100)]
shell: suppress "unused var/func" warnings on some configs

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agosuppress glibc "use sysmacros.h for major" warning
Denys Vlasenko [Mon, 12 Dec 2016 15:29:32 +0000 (16:29 +0100)]
suppress glibc "use sysmacros.h for major" warning

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agorandomconfig fixes
Denys Vlasenko [Mon, 12 Dec 2016 13:33:53 +0000 (14:33 +0100)]
randomconfig fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agorandomconfig fixes
Denys Vlasenko [Mon, 12 Dec 2016 10:08:51 +0000 (11:08 +0100)]
randomconfig fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agorandomconfig fixes
Denys Vlasenko [Mon, 12 Dec 2016 08:26:16 +0000 (09:26 +0100)]
randomconfig fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agorandomconfig fixes
Denys Vlasenko [Sat, 10 Dec 2016 19:57:00 +0000 (20:57 +0100)]
randomconfig fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoselinux: drop deprecated headers
Mike Frysinger [Fri, 9 Dec 2016 23:30:30 +0000 (18:30 -0500)]
selinux: drop deprecated headers

The selinux guys want you to get class values at runtime by converting
textual names into constants.  Drop the deprecated headers and switch
to the new format.

This API has been around for years, so there shouldn't be an issue
with backwards compatibility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
7 years agosetfiles: fix build failure after common_bufsiz change
Mike Frysinger [Fri, 9 Dec 2016 23:14:12 +0000 (18:14 -0500)]
setfiles: fix build failure after common_bufsiz change

Commit 47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 ("*: add most of the
required setup_common_bufsiz() calls") switched this tool over to use
the common_bufsiz logic but missed including the header leading to a
build failure when enabled:
selinux/setfiles.c:80:30: error: 'bb_common_bufsiz1' undeclared (first use in this function)

URL: https://bugs.gentoo.org/600106
Reported-by: Jonas Jelten <jj@stusta.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
7 years agomdev.conf: rename hw_random to hwrng
Mike Frysinger [Fri, 9 Dec 2016 21:12:15 +0000 (16:12 -0500)]
mdev.conf: rename hw_random to hwrng

The kernel broke the name years ago, but didn't notice until it was much
too late.  Rename the node to match expectations of userland software,
and what the kernel itself documents in its Kconfig help:
This provides a device that's usually called /dev/hwrng, ...

URL: https://marc.info/?l=linux-crypto-vger&m=144249767024990&w=2
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
7 years agorandomconfig fixes
Denys Vlasenko [Thu, 8 Dec 2016 11:24:48 +0000 (12:24 +0100)]
randomconfig fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agosvc: new applet (daemontools-compatible version of "sv")
Denys Vlasenko [Mon, 5 Dec 2016 12:56:40 +0000 (13:56 +0100)]
svc: new applet (daemontools-compatible version of "sv")

function                                             old     new   delta
sv                                                     -    1199   +1199
svc_main                                               -     145    +145
packed_usage                                       30255   30364    +109
applet_names                                        2437    2441      +4
applet_main                                         1420    1424      +4
find_applet_by_name                                  125     126      +1
sv_main                                             1201       9   -1192
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 4/1 up/down: 1462/-1192)        Total: 270 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agofix musl problem with dirname, now for all users of bb_make_directory()
Denys Vlasenko [Sun, 4 Dec 2016 09:42:07 +0000 (10:42 +0100)]
fix musl problem with dirname, now for all users of bb_make_directory()

function                                             old     new   delta
bb_make_directory                                    412     419      +7
install_main                                         793     769     -24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-24)             Total: -17 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoREADME_distro_proposal.txt: writeup about runit adoption
Denys Vlasenko [Sat, 3 Dec 2016 13:06:55 +0000 (14:06 +0100)]
README_distro_proposal.txt: writeup about runit adoption

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agotop: fix help text: with !TERMIOS, no keys are affected top output
Denys Vlasenko [Sat, 3 Dec 2016 11:09:50 +0000 (12:09 +0100)]
top: fix help text: with !TERMIOS, no keys are affected top output

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoinstall: fix musl problem with dirname
Denys Vlasenko [Sat, 3 Dec 2016 10:49:23 +0000 (11:49 +0100)]
install: fix musl problem with dirname

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoDo not print useless empty line after list of applets
Denys Vlasenko [Mon, 28 Nov 2016 00:29:28 +0000 (01:29 +0100)]
Do not print useless empty line after list of applets

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoCode style fixes, no code changes
Denys Vlasenko [Mon, 28 Nov 2016 00:22:57 +0000 (01:22 +0100)]
Code style fixes, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agolineedit: simplify code a bit
Denys Vlasenko [Mon, 28 Nov 2016 00:10:16 +0000 (01:10 +0100)]
lineedit: simplify code a bit

function                                             old     new   delta
lineedit_read_key                                    155     162      +7
put_prompt                                            51      46      -5
read_line_input                                     3722    3715      -7
cmdedit_setwidth                                      81      50     -31
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 7/-43)             Total: -36 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agomakedevs: make special node creation idempotent
Denys Vlasenko [Sun, 27 Nov 2016 22:27:54 +0000 (23:27 +0100)]
makedevs: make special node creation idempotent

When makedevs is called for a second time with the same device file,
it fails because the files already exist and mknod() gives -EEXIST.

Ignore EEXIST errors.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agolineedit: fix two bugs in SIGWINCH signal handling
Denys Vlasenko [Sun, 27 Nov 2016 21:25:07 +0000 (22:25 +0100)]
lineedit: fix two bugs in SIGWINCH signal handling

(1) restore entire sigaction, not only signal handler function
(2) do not use stdio when not sure WINCH did not interrupt a printf() or such.

function                                             old     new   delta
cmdedit_setwidth                                       -      81     +81
read_line_input                                     3682    3722     +40
lineedit_read_key                                    138     155     +17
put_prompt                                            55      51      -4
win_changed                                           93      47     -46
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/2 up/down: 138/-50)            Total: 88 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agofdisk_gpt: simplify GPT partition name printing
Denys Vlasenko [Sun, 27 Nov 2016 19:47:01 +0000 (20:47 +0100)]
fdisk_gpt: simplify GPT partition name printing

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agofdisk: sanitize partition name printing; drop "Code" column; get rid of one static var
Denys Vlasenko [Sun, 27 Nov 2016 05:13:43 +0000 (06:13 +0100)]
fdisk: sanitize partition name printing; drop "Code" column; get rid of one static var

function                                             old     new   delta
list_table                                          2335    2373     +38
fill_bounds                                          131     128      -3
part_array_len                                         4       -      -4
get_boot                                            1584    1574     -10
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/2 up/down: 38/-17)             Total: 21 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agodpkg-deb: shorten code, improve help text
Denys Vlasenko [Sun, 27 Nov 2016 03:48:53 +0000 (04:48 +0100)]
dpkg-deb: shorten code, improve help text

function                                             old     new   delta
packed_usage                                       30261   30236     -25
dpkg_deb_main                                        437     401     -36
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-61)             Total: -61 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agodpkg-deb: remove unused FEATURE_DPKG_DEB_EXTRACT_ONLY config option
Denys Vlasenko [Sun, 27 Nov 2016 02:57:08 +0000 (03:57 +0100)]
dpkg-deb: remove unused FEATURE_DPKG_DEB_EXTRACT_ONLY config option

Its usage in C code was removed in 2004.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agofind: fix handling of trailing slashes in -name PATTERN comparisons
Denys Vlasenko [Fri, 25 Nov 2016 19:14:33 +0000 (20:14 +0100)]
find: fix handling of trailing slashes in -name PATTERN comparisons

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoash,hush: make ^C in interactive mode visually much closer to bash behavior
Denys Vlasenko [Fri, 25 Nov 2016 02:41:03 +0000 (03:41 +0100)]
ash,hush: make ^C in interactive mode visually much closer to bash behavior

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMove FEATURE_BUFFERS_USE_foo options to library tuning
Denys Vlasenko [Thu, 24 Nov 2016 21:30:52 +0000 (22:30 +0100)]
Move FEATURE_BUFFERS_USE_foo options to library tuning

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMove locale, unicode, and "use sendfile?" options to library tuning
Denys Vlasenko [Thu, 24 Nov 2016 21:18:55 +0000 (22:18 +0100)]
Move locale, unicode, and "use sendfile?" options to library tuning

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoCollapse three levers of menuconfig to two levels.
Denys Vlasenko [Thu, 24 Nov 2016 21:08:12 +0000 (22:08 +0100)]
Collapse three levers of menuconfig to two levels.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoash,hush: ^C from command line should set $? to 128+SIGINT
Denys Vlasenko [Thu, 24 Nov 2016 16:44:02 +0000 (17:44 +0100)]
ash,hush: ^C from command line should set $? to 128+SIGINT

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agolineedit: fix handling of repeating Alt-b, Alt-f, Alt-d, Alt-Backspace
Rostislav Skudnov [Thu, 24 Nov 2016 14:04:00 +0000 (15:04 +0100)]
lineedit: fix handling of repeating Alt-b, Alt-f, Alt-d, Alt-Backspace

These key combinations should repeat correctly when the keys are
pressed and held.

Before this change, they do this erratically - many repeats are "eaten"
because they are treated as unrecognized ESC seqs:
ESC 0x7f is treated by Alt+baskspace, but ESC 0x7f ESC 0x7f ESC 0x7f
is unrecognized.

Escape sequences corresponding to these key combinations are moved from
read_line_input to lineedit_read_key.

Also, these key sequences are now enabled regardless of whether
FEATURE_EDITING_VI is set, since Vim does not actually support these key
combinations, but they are present in readline library.

function                                             old     new   delta
static.esccmds                                        93     103     +10
read_line_input                                     3737    3687     -50

Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agopatch: fix matching failure
Aaro Koskinen [Mon, 21 Nov 2016 22:19:51 +0000 (00:19 +0200)]
patch: fix matching failure

Fix matching failure when plist is advanced while checking for buffered
lines - the lines in the hunk that are about to be added should be
skipped when checking for matching context.

Also add a valid test case that fails with current busybox and is fixed
by the change.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agopatch: fix debug log failure
Aaro Koskinen [Mon, 21 Nov 2016 22:19:50 +0000 (00:19 +0200)]
patch: fix debug log failure

If we reach the end of plist it means the input has still data while we
are expecting EOF. Fix the log to avoid a crash.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoRemove outdated comments
Denys Vlasenko [Wed, 23 Nov 2016 20:51:11 +0000 (21:51 +0100)]
Remove outdated comments

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all udhcp applets to "new style" applet definitions
Denys Vlasenko [Wed, 23 Nov 2016 17:54:59 +0000 (18:54 +0100)]
Convert all udhcp applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all selinux/* applets to "new style" applet definitions
Denys Vlasenko [Wed, 23 Nov 2016 17:46:40 +0000 (18:46 +0100)]
Convert all selinux/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agotest: make [ and [[ forms individually selectable
Denys Vlasenko [Wed, 23 Nov 2016 17:31:48 +0000 (18:31 +0100)]
test: make [ and [[ forms individually selectable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoRemove remnants of disabled "length" applet
Denys Vlasenko [Wed, 23 Nov 2016 13:54:38 +0000 (14:54 +0100)]
Remove remnants of disabled "length" applet

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake dos2unix/unix2dos independently selectable
Denys Vlasenko [Wed, 23 Nov 2016 13:52:19 +0000 (14:52 +0100)]
Make dos2unix/unix2dos independently selectable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all coreutils/* applets to "new style" applet definitions
Denys Vlasenko [Wed, 23 Nov 2016 13:46:56 +0000 (14:46 +0100)]
Convert all coreutils/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake "hd" independently selectable
Denys Vlasenko [Wed, 23 Nov 2016 10:53:12 +0000 (11:53 +0100)]
Make "hd" independently selectable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all util-linux/* applets to "new style" applet definitions
Denys Vlasenko [Wed, 23 Nov 2016 10:46:32 +0000 (11:46 +0100)]
Convert all util-linux/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoRemove trailing empty lines
Denys Vlasenko [Wed, 23 Nov 2016 09:43:39 +0000 (10:43 +0100)]
Remove trailing empty lines

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all console-tools/* applets to "new style" applet definitions
Denys Vlasenko [Wed, 23 Nov 2016 09:39:27 +0000 (10:39 +0100)]
Convert all console-tools/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all mailutils/* applets to "new style" applet definitions
Denys Vlasenko [Wed, 23 Nov 2016 08:58:03 +0000 (09:58 +0100)]
Convert all mailutils/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agotc: consolidate its disabled bits
Denys Vlasenko [Wed, 23 Nov 2016 08:51:33 +0000 (09:51 +0100)]
tc: consolidate its disabled bits

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake ping6 and traceroute6 selectable independently from ping/traceroute
Denys Vlasenko [Wed, 23 Nov 2016 08:25:57 +0000 (09:25 +0100)]
Make ping6 and traceroute6 selectable independently from ping/traceroute

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoipneigh: add this shortcur similar to other "ip <CMD>" shortcuts
Denys Vlasenko [Wed, 23 Nov 2016 08:18:05 +0000 (09:18 +0100)]
ipneigh: add this shortcur similar to other "ip <CMD>" shortcuts

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoRename FEATURE_FTP_WRITE and FEATURE_FTP_AUTHENTICATION to *_FTPD_*
Denys Vlasenko [Wed, 23 Nov 2016 08:07:44 +0000 (09:07 +0100)]
Rename FEATURE_FTP_WRITE and FEATURE_FTP_AUTHENTICATION to *_FTPD_*

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all networking/* applets to "new style" applet definitions
Denys Vlasenko [Wed, 23 Nov 2016 08:05:14 +0000 (09:05 +0100)]
Convert all networking/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all modutils/* applets to "new style" applet definitions
Denys Vlasenko [Wed, 23 Nov 2016 06:54:52 +0000 (07:54 +0100)]
Convert all modutils/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake killall and killall5 selecatable independent from kill
Denys Vlasenko [Wed, 23 Nov 2016 05:43:46 +0000 (06:43 +0100)]
Make killall and killall5 selecatable independent from kill

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all procps/* applets to "new style" applet definitions
Denys Vlasenko [Wed, 23 Nov 2016 05:23:44 +0000 (06:23 +0100)]
Convert all procps/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoConvert all miscutils/* applets to "new style" applet definitions
Denys Vlasenko [Tue, 22 Nov 2016 22:54:17 +0000 (23:54 +0100)]
Convert all miscutils/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoSplit miscutils/Config.src items into miscutils/*.c files
Denys Vlasenko [Tue, 22 Nov 2016 22:14:24 +0000 (23:14 +0100)]
Split miscutils/Config.src items into miscutils/*.c files

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agohttpd: explain why we use sprintf and why it should be fine
Denys Vlasenko [Tue, 22 Nov 2016 01:23:35 +0000 (02:23 +0100)]
httpd: explain why we use sprintf and why it should be fine

While at it, fix a pathological case where it is not fine:
-r REALM with some 8-kbyte long REALM would overflow the buffer.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoFix allnoconfig warnings
Denys Vlasenko [Fri, 18 Nov 2016 20:42:44 +0000 (21:42 +0100)]
Fix allnoconfig warnings

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoapplets.h.sh: a script to check applet names against config options
Denys Vlasenko [Thu, 17 Nov 2016 14:34:16 +0000 (15:34 +0100)]
applets.h.sh: a script to check applet names against config options

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake mkfs.vfat and mkdosfs individually selectable
Denys Vlasenko [Wed, 16 Nov 2016 15:18:50 +0000 (16:18 +0100)]
Make mkfs.vfat and mkdosfs individually selectable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake mke2fs and mkfs.ext2 individually selectable
Denys Vlasenko [Wed, 16 Nov 2016 15:12:11 +0000 (16:12 +0100)]
Make mke2fs and mkfs.ext2 individually selectable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake bzcat, lzcat, xzcat, zcat, lzopcat, unlzop individually selectable
Denys Vlasenko [Wed, 16 Nov 2016 14:45:05 +0000 (15:45 +0100)]
Make bzcat, lzcat, xzcat, zcat, lzopcat, unlzop individually selectable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
7 years agoMake ifup and ifdown individually selectable.
Denys Vlasenko [Mon, 14 Nov 2016 17:31:07 +0000 (18:31 +0100)]
Make ifup and ifdown individually selectable.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>