Rename transformer_aux_data_t -> transformer_state_t

No code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libarchive: add capability to unpack to mem.buffer

The performance and number of processes for a "depmod -a" with gzipped
modules was abysmal. This patch adds a code path without fork,
benefiting all users of xmalloc_open_zipped_read_close.

"modinfo radeon.ko.gz", a single-file reader, got 30% faster.
"depmod -a", which used to fork over 800 times, got 20% faster.

Heavily based on a patch by Lauri Kasanen <curaga@operamail.com>

function                                             old     new   delta
setup_transformer_on_fd                                -     159    +159
transformer_write                                      -     122    +122
fork_transformer                                       -     112    +112
xmalloc_open_zipped_read_close                        63     118     +55
read_bunzip                                         1866    1896     +30
xtransformer_write                                     -      19     +19
unzip_main                                          2449    2462     +13
bbunpack                                             755     766     +11
unpack_lzma_stream                                  2717    2723      +6
unpack_xz_stream                                    2393    2397      +4
unpack_Z_stream                                     1173    1175      +2
inflate_unzip                                        111     105      -6
check_signature16                                     70      63      -7
unpack_bz2_stream                                    359     349     -10
unpack_unxz                                           12       -     -12
unpack_unlzma                                         12       -     -12
unpack_uncompress                                     12       -     -12
unpack_gunzip                                         12       -     -12
unpack_bunzip2                                        12       -     -12
open_transformer                                     106      92     -14
inflate_unzip_internal                              1945    1916     -29
unpack_gz_stream                                     693     655     -38
open_zipped                                           89      47     -42
setup_unzip_on_fd                                    142      53     -89
------------------------------------------------------------------------------
(add/remove: 4/5 grow/shrink: 7/8 up/down: 533/-295)          Total: 238 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
make xmalloc_open_zipped_read_close result NUL terminated

Compat with xmalloc_open_read_close

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
flashcp: change BUFSIZE to 4k

some flash partitions can be smaller than the existing BUFSIZE thus write
BUFSIZE will fail with "no space left on device"

Signed-off-by: Jacob Kjaergaard <jacob.kjaergaard@prevas.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Config: select PLATFORM_LINUX if using sendfile()

Man entry for sendfile:

  Not specified in POSIX.1-2001, or other standards.

  Other UNIX systems implement sendfile() with different  semantics  and
  prototypes. It should not be used in portable programs.

Select PLATFORM_LINUX if enabling FEATURE_USE_SENDFILE.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
lineedit: don't fall back to simple line input if tty is in raw mode

Testcase: shell command input after python ^Z should still work

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
tar: fix "tar -cJ" ignoring -J option. closes 7706

function                                             old     new   delta
tar_main                                             895     938     +43
vfork_compressor                                     206     191     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 43/-15)             Total: 28 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
lineedit: don't block when looking for escape sequence in vi-mode

In vi-mode lineedit tries to detect some escape sequences.
After the ESC it reads the next character to check for certain
values.  This read should have a timeout or a user-entered ESC to
switch to command mode doesn't properly handle the next character.

Signed-off-by: Ron Yorston <rmy@tigress.co.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
nandwrite: fix build when long options are disabled

The Required_argument macro is only defined when long options are enabled.
Fixes the following build error:

miscutils/nandwrite.c: In function 'nandwrite_main':
miscutils/nandwrite.c:120:10: error: expected ',' or ';' before 'Required_argument'

Reported-by: Christian Kästner <kaestner at cs.cmu.edu>
Signed-off-by: Baruch Siach <baruch at tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
nanddump: don't show --bb in usage when disabled

The --bb options now depends on LONG_OPTS. Omit mentions of --bb from usage
text when LONG_OPTS is disabled.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
udhcpc: account for script run time

Based on the following user report:

I ran into an issue where I was seeing a long delay in the scripts called
in udhcp_run_script. I was using an old version of OpenWrt (kamikaze)
and a satellite modem. An NTP script was being called and the modem
would sometimes take a long time to respond to the DNS lookup when
it was offline.

This delay started affecting my lease time. The lease that I would
get from my satellite modem before it was online would be short:
only 60 seconds. The delay with NTP and the modem would typically
be about 18 seconds. This would cause the first DHCP renew request
from dhcpc to be a little late. Under certain circumstances,
I could even see the first DHCP renew to occur after the lease
had expired!

function                                             old     new   delta
udhcpc_main                                         2816    2837     +21

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Make it possible to override LOGIN_FAIL_DELAY in CONFIG_EXTRA_CFLAGS

Signed-off-by: Peter Kümmel <syntheticpp@gmx.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
randomconfig fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb: add sanity check in bb_arg_max()

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Bump version to 1.23.0

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Start 1.24.0 development cycle

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
udhcpd: account for script delay in lease

Prevent nasty surprises if script runs longer than lease time / 2.

Signed-off-by: John Schroeder <jschroed@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ash: fix a SEGV in ${#1}

function                                             old     new   delta
varvalue                                             760     805     +45
evalvar                                              648     603     -45

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Merge remote-tracking branch 'upstream/master' into busybox-next