aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * telnetd: fix handling of short writes to ptyDenys Vlasenko2016-10-121-111/+120
| | | | | | | | | | | | | | | | | | | | | | | | If a write to pty is short, remove_iacs() can be run on a buffer repeatedly. This, for example, can eat 0xff chars (IACs, in telnet terms). Rework the logic to handle IACs in a special "write to pty" function. function old new delta telnetd_main 1662 1750 +88 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * more: accept and ignore a bunch of optionsDenys Vlasenko2016-10-111-1/+10
| | | | | | | | | | | | | | | | | | | | Alpine Linux stumbled over "more -s": http://bugs.alpinelinux.org/issues/5190 function old new delta more_main 857 872 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ifupdown: rewrite state file atomicallyDenys Vlasenko2016-10-091-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | By user's request. Decided to not use fcntl(F_SETLKW) in lieu of problems with locking on networked filesystems. The existence of /var/run/ifstate.new is treated as a write lock. rename() provides atomicity. function old new delta ifupdown_main 1019 1122 +103 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tcpsvd: don't keep shared fd open if fd limit is reached. closes 9331Denys Vlasenko2016-10-071-23/+46
| | | | | | | | | | | | | | | | | | | | Also, much improved help text. function old new delta packed_usage 30652 30851 +199 tcpudpsvd_main 1782 1784 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Skip merge of "ash: all blocks in function node..."Ron Yorston2016-10-190-0/+0
|\|
| * ash: all blocks in function node copying must be SHELL_ALIGNedDenys Vlasenko2016-10-071-3/+3
| | | | | | | | | | | | | | | | | | | | Previous commit probably introduced a bug: non-matching size calculation in size counting and actual copying caused by SHELL_ALIGN being applied differently! This won't bite if string sizes are also SHELL_ALIGNed. Thus fixing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge "ash testsuite: fix false positives"Ron Yorston2016-10-192-2/+2
|\|
| * ash testsuite: fix false positivesDenys Vlasenko2016-10-072-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Skip merge of "ash: get rid of two global data variables"Ron Yorston2016-10-190-0/+0
|\|
| * ash: get rid of two global data variablesDenys Vlasenko2016-10-071-51/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta calcsize 126 147 +21 funcstring_end - 4 +4 sizenodelist 28 24 -4 funcstringsize 4 - -4 funcstring 4 - -4 funcblocksize 4 - -4 nodeckstrdup 48 39 -9 evaltree 828 788 -40 ------------------------------------------------------------------------------ (add/remove: 1/3 grow/shrink: 1/4 up/down: 25/-105) Total: -40 bytes text data bss dec hex filename 943376 916 14292 958584 ea078 busybox_old 943344 916 14284 958544 ea050 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch busybox (up to "ash: comment out free(p) just before...")Ron Yorston2016-10-19456-2350/+5694
|\|
| * ash: comment out free(p) just before _exit, tweak some outdated commentsDenys Vlasenko2016-10-071-16/+5
| | | | | | | | | | | | Planned to sync exitshell up to dash, turned out ours is better :) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: there is no -s option in GNU Wget 1.18, we should be compatibleDenys Vlasenko2016-10-041-24/+33
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dhcp: merge leases.c and static_leases.c into dhcpd.cDenys Vlasenko2016-10-046-253/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta send_offer 292 461 +169 udhcpd_main 1531 1588 +57 read_leases 330 332 +2 add_lease 314 312 -2 find_lease_by_mac 68 - -68 find_free_or_expired_nip 174 - -174 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 3/1 up/down: 228/-244) Total: -16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dhcp: merge most of static_leases.c into dhcpd.cDenys Vlasenko2016-10-043-69/+58
| | | | | | | | | | | | | | | | | | | | | | function old new delta read_staticlease 121 222 +101 add_static_lease 48 - -48 log_static_leases 68 - -68 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 1/0 up/down: 101/-116) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dhcp: merge files.c into dhcpd.cDenys Vlasenko2016-10-044-243/+222
| | | | | | | | | | | | | | | | | | Added NOINLINE to two function, since my version of gcc would actualy increase code size otherwise. I see no size changes. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * examples: add example of a DHCP serverDenys Vlasenko2016-10-038-0/+91
| | | | | | | | | | | | | | As usual, by multiplying directories - "dhcpd_eth0", "dhcpd_wlan1" you can run many servers on different interfaces. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: add commented-out debug printouts in "memleak" built-inDenys Vlasenko2016-10-032-0/+17
| | | | | | | | | | | | | | Allocation addresses of malloc() are jittery, thought I had a mem leak in hush, but it was malloc variability. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix a memory corruption when exported variable is modifiedDenys Vlasenko2016-10-031-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | The construct such as this: t=1 export t t=new_value1 had a small probability of momentarily using free()d value. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix exitcode on exec failure with EACCES - should be 126Denys Vlasenko2016-10-031-1/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sh testsuite: add tests for exitcode on failure to execDenys Vlasenko2016-10-038-0/+16
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: delete all msh testsDenys Vlasenko2016-10-0347-356/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush testsuite: fix another false positiveDenys Vlasenko2016-10-032-2/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hust testsuite: fix a false positiveDenys Vlasenko2016-10-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash testsuite: add most of hust tests which pass for ashDenys Vlasenko2016-10-03103-0/+795
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: [PARSER] Add nlprompt/nlnoprompt helpersDenys Vlasenko2016-10-021-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Mon, 29 Sep 2014 22:53:53 +0800 [PARSER] Add nlprompt/nlnoprompt helpers This patch adds the nlprompt/nlnoprompt helpers to isolate code dealing with newlines and prompting. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * whitespace fixesDenys Vlasenko2016-10-022-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: add var4.tests, var5.testsDenys Vlasenko2016-10-024-0/+22
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix var3.testsDenys Vlasenko2016-10-024-206/+214
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sh: do not print empty line at the end of "help" outputDenys Vlasenko2016-10-022-2/+1
| | | | | | | | | | | | It's pointless. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sh testsuite: sync ash-redir/ and hush-redir/Denys Vlasenko2016-10-0218-114/+313
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sh testsuite: sync ash-misc/source* and hush-misc/source*Denys Vlasenko2016-10-0210-27/+50
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sh testsuite: sync ash-vars/ and hush-vars/Denys Vlasenko2016-10-0211-20/+39
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash testsuite: update some of variable tests with newer versions from hushDenys Vlasenko2016-10-026-25/+156
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sh testsuite: create hush-redir/* and move files aroundDenys Vlasenko2016-10-0230-0/+143
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sh testsuite: create hush-heredoc/* and move files aroundDenys Vlasenko2016-10-0216-0/+30
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush testsuite: add many tests from ash testsuiteDenys Vlasenko2016-10-0234-3/+254
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: undo "tokname hack"Denys Vlasenko2016-10-021-41/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dash has tokendlist[] array to decide which tokens end lists. We store it as first byte of each tokname_array[i]. Switch to bit array, name it like dash (tokendlist), drop special 1st byte of tokname_array[i]. This brings us closer to dash, and shrinks the binary, because many more string aliasing opportunities are now open: function old new delta pstrcmp1 - 16 +16 readtoken1 2852 2858 +6 list 326 327 +1 pstrcmp 16 15 -1 tokname 45 42 -3 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/2 up/down: 23/-4) Total: 19 bytes text data bss dec hex filename 943556 916 14292 958764 ea12c busybox_old 943463 916 14292 958671 ea0cf busybox_unstripped ^^^^^^^ note this! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: placate gcc: "warning: ! is only applied to the left hand side of =="Denys Vlasenko2016-10-021-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush testsuite: add glob_dir.testsDenys Vlasenko2016-10-023-1/+45
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix globbing bugs when using glibc glob()Denys Vlasenko2016-10-023-7/+66
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: style fixesDenys Vlasenko2016-10-021-8/+16
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: support "--" in "source" builtinDenys Vlasenko2016-10-021-12/+18
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: expand: Fixed "$@" expansion when EXP_FULL is falseDenys Vlasenko2016-10-025-15/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Thu, 1 Jan 2015 07:53:10 +1100 expand: Fixed "$@" expansion when EXP_FULL is false The commit 3c06acdac0b1ba0e0acdda513a57ee6e31385dce ([EXPAND] Split unquoted $@/$* correctly when IFS is set but empty) broke the case where $@ is in quotes and EXP_FULL is false. In that case we should still emit IFS as field splitting is not performed. Reported-by: Juergen Daubert <jue@jue.li> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * test: fix compile error in last commitDenys Vlasenko2016-10-021-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * test: memory leak: free group id listDenys Vlasenko2016-10-022-7/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: add a test that "continue" does not cripple trapsDenys Vlasenko2016-10-014-0/+16
| | | | | | | | | | | | Both shells pass this test. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix return_in_trap1.tests failureDenys Vlasenko2016-10-011-23/+28
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash testsuite: add return_in_trap1.testsDenys Vlasenko2016-10-0122-0/+22
| | | | | | | | | | | | Currently it fails Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: 'return' should have effect earlierDenys Vlasenko2016-10-013-14/+42
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>