ash: factor out ASH_HELP config option

It used to be aliased to !FEATURE_SH_EXTRA_QUIET for ash,
while hush had it separate from FEATURE_SH_EXTRA_QUIET.

Bring ash in line with hush.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ash: fix off-by-one in "jobs %4" handling. closes 7310

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
mdev: treat zero-length /dev/mdev.seq the same as "\n" one. Closes 7334

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
vi: fix incorrect memory access on brace matching. Closes 7256

While at it, fix brace matching to actually show the match
(missed fflush was causing cursor positioning to be buffered);
shorten brace matching code; remove unused macro indirection
in indicate_error().

Custom linker script 'busybox_ldscript' found, using it
function                                             old     new   delta
indicate_error                                         -      61     +61
mysleep                                               43      56     +13
char_insert                                          483     486      +3
find_pair                                            167     124     -43
Indicate_Error                                        61       -     -61
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/1 up/down: 77/-104)           Total: -27 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ftpd: make LIST command show dotfiles too

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
sed: fix a buglet in s///NUM handling

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
df: implement -T option

function                                             old     new   delta
df_main                                              863     998    +135
packed_usage                                       29827   29861     +34
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 169/0)             Total: 169 bytes

Signed-off-by: Ari Sundholm <ari@tuxera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
false: make "false --help" exit with 1

function                                             old     new   delta
run_applet_no_and_exit                               447     445      -2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
df: fix -T option when ENABLE_FEATURE_HUMAN_READABLE=0

Signed-off-by: Ari Sundholm <ari@tuxera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
less: disable "suppress empty wraparound" optimization

It is buggy wrt another use case...

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
less: move "retry-on-EAGAIN" logic closer to read ops

This makes "G" (goto end of input) command work as well as
/search_for_nonexistent_string: both will read to EOF now
even from somewhat slow input (such as kernel's "git log").

function                                             old     new   delta
ndelay_on                                             35      43      +8
ndelay_off                                            35      43      +8
read_lines                                           695     691      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 16/-4)              Total: 12 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
less: trivial code shrink

function                                             old     new   delta
read_lines                                           715     695     -20

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
less: make -E work

function                                             old     new   delta
buffer_print                                          71     104     +33

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
install: implement -t DIR

Some packages want to install themselves using "-t" to specify
the directory (as supported by GNU coreutils). Add support for the option
for compatibility reasons.

function                                             old     new   delta
install_longopts                                      76      95     +19
install_main                                         769     777      +8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 27/0)               Total: 27 bytes

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ntpd: don't wait for good offset before disabling burst mode

The burst mode needs to be stopped even when no replies are received.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ntpd: split out poll adjusting code

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
install: fix help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ubiupdatevol: fix -t to not require an option. Closes 7466

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ntpd: be less eager to use shorter poll intervals

* on step, poll interval drops to 8.5 mins instead of 32 seconds
* on total loss of all replies (no replies from any peer
  for last 8 requests), also drop poll interval to 8.5 mins
  instead of 32 seconds
* on send abd recv errors, RETRY_INTERVAL is now 32 seconds,
  not 5 seconds
* on timing out listening to reply, instead of unconditional
  shortening poll interval by x4, clamp it to NOREPLY_INTERVAL
  (512 seconds)
* if a largish offset is seen, clamp nexp poll interval
  to 128 seconds, not 64 seconds

function                                             old     new   delta
clamp_pollexp_and_set_MAXSTRAT                         -      37     +37
recv_and_process_peer_pkt                            861     869      +8
poll_interval                                         52      48      -4
update_local_clock                                   762     752     -10
ntpd_main                                           1063    1050     -13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/3 up/down: 45/-27)             Total: 18 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
getty: set tty attrs so that control chars are shown as ^c

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