aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-24hush: handle backslash-newline in heredoc terminatorsDenys Vlasenko
function old new delta fetch_heredocs 479 527 +48 (ash fails this test) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-24hush: fix handling of heredocs not enclosed in groups where they are "declared"Denys Vlasenko
function old new delta fetch_heredocs - 479 +479 parse_and_run_stream 146 148 +2 parse_stream 2787 2296 -491 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 481/-491) Total: -10 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-23hush: fix heredoc handling in the "cmd <<EOF ;<newline>" caseDenys Vlasenko
function old new delta parse_stream 2759 2787 +28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-23hush: fix handling of heredocs starting with empty linesDenys Vlasenko
function old new delta parse_stream 2748 2759 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-23hexedit: fixes for redraw and down movement causing SEGV on attempt to accessDenys Vlasenko
"Go to:" command was not updating row position, making next "down" movements for one screenful print empty lines instead of showing the contents. If the file is whole pages long, "down" movement at EOF was advancing position +16 bytes, mapping the next portion (entirely past the end of the file), then finding out that the new position is beyond the EOF, rolling it back -16 bytes... ending up with this postion pointing *before* the mapped portion. Any next access (e.g. "move right" key) SEGVs. function old new delta hexedit_main 1170 1184 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: never glob result of dquoted "${v:+/bin/c*}"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: tidy up code after previous commitsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: better names for o_free_unsafe() / o_free(), no logic changesDenys Vlasenko
o_free() made o_string NULL-initialized, o_free_unsafe() did not bother reinitializing (expected caller to not need it). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: fix handling of '' in ${var:+ARG}Denys Vlasenko
This wasn't an ash bug in dollar_altvalue9, it was hush bug (and bash!) function old new delta expand_one_var 2236 2254 +18 expand_vars_to_list 1097 1103 +6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 24/0) Total: 24 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: fix word splitting in ${v:+ARG} - dollar_altvalue1 testDenys Vlasenko
ash might be a bit buggy, need to investigate dollar_altvalue9 test function old new delta expand_one_var 1639 2236 +597 expand_variables 112 128 +16 expand_vars_to_list 1117 1097 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 613/-20) Total: 593 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: expand_vars_to_list() should not assume it starts new wordDenys Vlasenko
function old new delta expand_variables 112 115 +3 expand_vars_to_list 1117 1108 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 3/-9) Total: -6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: remove pointless "next" var, simplify expand_vars_to_list()Denys Vlasenko
function old new delta o_addstr - 26 +26 expand_vars_to_list 1112 1117 +5 encode_then_expand_vararg 398 382 -16 parse_dollar 779 762 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/2 up/down: 31/-33) Total: -2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: store "ended_in_ifs" flag in o_stringDenys Vlasenko
This simplifies function parameter passing. function old new delta expand_one_var 1643 1639 -4 append_str_maybe_ifs_split 64 52 -12 expand_vars_to_list 1125 1112 -13 expand_on_ifs 361 345 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-45) Total: -45 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: propagate (output,n) parameters into expand_one_var()Denys Vlasenko
This is necessary since expand_one_var() for ${var:+ARG} must create more than one output word, and thus can't simply return a char*. function old new delta expand_one_var 1610 1643 +33 expand_vars_to_list 1139 1125 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 33/-14) Total: 19 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-20hush: make expand_vars_to_list() a bit more saneDenys Vlasenko
function old new delta append_str_maybe_ifs_split - 64 +64 expand_vars_to_list 1167 1139 -28 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 64/-28) Total: 36 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-18hush: reduce indentation, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-18hush: fix 'x=; echo ${x:-"$@"}' producing 'BUG in varexp2' messageDenys Vlasenko
function old new delta expand_string_to_string 126 128 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-18hush: smaller code to set o_string to ""Denys Vlasenko
function old new delta encode_then_expand_vararg 399 398 -1 parse_stream 2753 2748 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-17whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-17hush: faster/smaller code to check for presense of multiple chars in stringDenys Vlasenko
Go over the string only once. function old new delta encode_then_expand_string 126 105 -21 encode_then_expand_vararg 443 399 -44 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-65) Total: -65 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-17hush: improve ${var#...}, ${var:+...} and ${var/.../...} - handle quotingDenys Vlasenko
dollar_altvalue1 test partially fails: word splitting of unquoted ${var:+...} is not correct function old new delta encode_then_expand_vararg - 443 +443 expand_one_var 1599 1610 +11 parse_stream 2756 2753 -3 encode_string 250 242 -8 setup_heredoc 308 298 -10 expand_and_evaluate_arith 106 96 -10 encode_then_expand_string 142 126 -16 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/5 up/down: 454/-47) Total: 407 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-17cp: add missing quote in config snippetDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-15hush: shrink code in builtin_evalDenys Vlasenko
function old new delta builtin_eval 126 119 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-13grep: accept and ignore --color[=anything]Denys Vlasenko
function old new delta grep_main 827 834 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-13cp: optional --reflink supportDenys Vlasenko
function old new delta cp_main 428 512 +84 copy_file 1676 1742 +66 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-09usage: do not print trailing space for commands which have no argumentsDenys Vlasenko
function old new delta bb_show_usage 120 130 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-08sort: add -V "sort version"Denys Vlasenko
function old new delta packed_usage 32855 32858 +3 get_key 500 503 +3 sort_opt_str 36 37 +1 sort_main 1037 1036 -1 compare_keys 795 783 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/2 up/down: 7/-13) Total: -6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-06find: implement -executableDenys Vlasenko
function old new delta func_executable - 19 +19 parse_params 1505 1519 +14 static.params 216 228 +12 packed_usage 32847 32855 +8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 53/0) Total: 53 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-06cpio: if longopts are enabled, accept --null (synonym for -0)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-06tweak help textsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-06find: implement -quitDenys Vlasenko
function old new delta packed_usage 32816 32846 +30 find_main 446 464 +18 func_quit - 13 +13 parse_params 1495 1505 +10 static.params 210 216 +6 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/0 up/down: 77/0) Total: 77 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-06nproc: implement --all --ignore=Nharoon maqsood
function old new delta nproc_main 98 242 +144 packed_usage 32799 32816 +17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 161/0) Total: 161 bytes Signed-off-by: haroon maqsood <maqsood3525@live.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-04sendmail: fix parsing of addresses in angle bracketsRaffaello D. Di Napoli
Pointer e needs to be wound back in order to overwrite '>' with '\0'. Regression introduced in 20077c1429 Signed-off-by: Raffaello D. Di Napoli <rafdev@dinapo.li> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-04udhcp: add decimal option values in comments, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-04udhcp: tweak comment indentation, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-04udhcp: add option 211, "reboot time"Jeremy Kerr
As defined in RFC 5071. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-03examples/var_service/: use standard logger script, viewer and pager scriptsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-03examples/var_service/: use "svc" for service commands, other tweaksDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-03hexdump: fix short file of zero butes treated as dupDenys Vlasenko
function old new delta bb_dump_dump 1466 1491 +25 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-02wget: fix fetching of https URLs without http proxyDenys Vlasenko
The "fix fetching of https URLs with http proxy" commit broke the usual http-to-https redirect: $ wget http://busybox.net/downloads/busybox-1.29.0.tar.bz2 Connecting to busybox.net (140.211.167.122:80) Connecting to busybox.net (140.211.167.122:443) wget: server returned error: HTTP/1.1 400 Bad Request Fixing... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-02ntpd: increase minimum G.FREQHOLD_cnt from 8 to 10Denys Vlasenko
With ~0.9 initiall offsets, using 8 results in a bit too eager frequency correction. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-01Start 1.30.0 development cycleDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-01Bump version to 1.29.0Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-06-28testsuite/mount.tests: fix false positiveDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-06-27vi: placate "warning: variable orig_buf set but not used"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-06-27testsuite/pidof.tests: fix false positive take 2Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-06-27vi: placate "warning: statement with no effect"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-06-27nslookup: placate "warning: unused variable i"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-06-27testsuite/tar.tests: fix false positiveDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-06-27testsuite/pidof.tests: fix false positiveDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>