sh: only change to user's home directory in login mode
hush: fix for "while false && true; do echo BUG; break; done". closes 6170

function                                             old     new   delta
run_list                                             959     941     -18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ash,hush: history builtin

function                                             old     new   delta
show_history                                           -      39     +39
builtin_history                                        -      16     +16
historycmd                                             -      13     +13
bltins1                                              312     324     +12
builtintab                                           336     344      +8
popstring                                            134     140      +6
hush_main                                           1048    1046      -2
ash_main                                            1398    1396      -2
size_from_HISTFILESIZE                                44      40      -4
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 3/3 up/down: 94/-8)              Total: 86 bytes

Signed-off-by: Flemming Madsen <busybox@themadsens.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
vi: make regexp search case-insensitive if ":set ignorecase" is active

Reported by Dan Moinescu <dan@moinescu.net>.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ash: Add a very small timeout to nonblocking wait

A nonblocking waitpid was implemented using WaitForMultipleObjects
with a timeout of 0.  This was to fix an issue where builtin
commands in a foreground shell were blocked while a background
command was running.

However, this caused the shell to consume 100% CPU.  A workaround
seems to be to use a very small (1ms) timeout.
volume_id: fix ntfs attribute search

len is declared as uint32_t but le16_to_cpu macro is used

Signed-off-by: Oliver Metz <oliver.metz@gmx.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
telnet: code shrink

function                                             old     new   delta
telnet_main                                         1519    1515      -4
con_escape                                           296     285     -11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Fix build failures caused by not compiling open_transformer.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
hush: fix build failure if FEATURE_EDITING=y && !HUSH_INTERACTIVE

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
mdev: use $DEVNAME in uevent sysfs file for device node name

516530c932bd17d87c9eb4347a490be051e495f4 uses $DEVNAME variable
for device node name. This is fine, but only works for hotplugging,
"mdev -s" will behave differently when DEVNAME and basename(path)
differ.

This patch extracts the DEVNAME from the uevent sysfs file in
make_device(), thus works for hot- and coldplugging; so using
the environment DEVNAME on hotplug events is no longer necessary.

Signed-off-by: Nikolaus Voss <n.voss@weinmann.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
find: support -HLP

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Fix build failures caused by not compiling open_transformer.c (#2)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
grep: don't bail out on first mismatch if '-w' option is set

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
volume_id_internal.h: drop unoptimized byteswap routines

function                                             old     new   delta
volume_id_probe_hfs_hfsplus                          802     627    -175

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
grep: fix grep -x to not set REG_NOSUB

When -F isn't specified (and !ENABLE_EXTRA_COMPAT), grep -x uses
regexec's regmatch_t output to determine if the match was the entire
line. However it also set the REG_NOSUB flag which makes it ignore the
regmatch_t argument.

Add an exception to the setting of REG_NOSUB for OPT_x and add some test
cases to test the behaviour of -x.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Natanael Copa <ncopa@alpinelinux.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
find:: get rid of nested function (it's a gcc-ism)

function                                             old     new   delta
alloc_action                                           -      80     +80
parse_params                                        1459    1445     -14
static.alloc_action                                   98       -     -98
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 80/-112)           Total: -32 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
udhcpc: fix a problem with binary-encoded options #2

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

function                                             old     new   delta
attach_option                                        416     413      -3
allocate_tempopt_if_needed                            74       -     -74

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

function                                             old     new   delta
set_mode                                             759     725     -34

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
stty: disable CIBAUD leak check - it is not necessary on Linux

function                                             old     new   delta
stty_main                                           1233    1196     -37

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