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>