aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * ash: fix EXEXEC status clobberingRon Yorston2015-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | evalcommand always clobbers the exit status in case of an EXEXEC which means that exec always fails with exit status 2 regardless of what it actually returns. This patch adds the missing check for EXEXEC so that the correct exit status is preserved. It causes the test ash-misc/exec.tests to succeed. Based on commit 7f68426 in dash git, by Herbert Xu. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: add tests for failures of the exec and command builtinsRon Yorston2015-10-304-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | The exec builtin should return an exit status of 127 if the command can't be found. It doesn't: it returns 2. If the command builtin is used to source a script that runs a second script that doesn't exist ash should issue an error. Instead it seg faults. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * stat: make -f optional. This allows to build stat for non-linux systemsDenys Vlasenko2015-10-302-36/+61
| | | | | | | | | | | | | | | | | | function old new delta packed_usage 30761 30706 -55 Based on the patch by Ron Yorston. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: FEATURE_REVERSE_SEARCH should not depend on SAVEHISTORYDenys Vlasenko2015-10-301-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: search applets as well as PATH for tab completionRon Yorston2015-10-301-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In standalone shell mode search the applet table as well as PATH when tab completing a command. Use a stupid linear search: we're also about to read all the directories on PATH so efficiency isn't a big concern. function old new delta add_match - 53 +53 complete_cmd_dir_file 687 724 +37 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 90/0) Total: 90 bytes Signed-off-by: Ron Yorston <rmy@frippery.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * busybox: alter help message in standalone shell modeRon Yorston2015-10-301-0/+9
| | | | | | | | | | Signed-off-by: Ron Yorston <rmy@frippery.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: copy for.tests from ash testsuiteDenys Vlasenko2015-10-292-0/+6
| | | | | | | | | | | | This test passes for hush Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: simplify EOF/newline handling in list parserRon Yorston2015-10-291-34/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Processing of here documents in ash has had a couple of breakages which are now the subject of tests. This commit should fix both. It is based on the following commit in dash git by Herbert Xu: <7c245aa> [PARSER] Simplify EOF/newline handling in list parser (See git://git.kernel.org/pub/scm/utils/dash/dash.git) Reported-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Revert "ash: fix a SEGV case in an invalid heredoc" xxxRon Yorston2015-10-291-11/+4
| | | | | | | | | | | | | | | | | | This reverts commit 7e66102f762a7d80715f0c7e5925433256b78cee but leaves the test in place as it's still valid. Reported-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix error during recursive processing of here documentRon Yorston2015-10-293-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Save the value of the checkkwd flag to prevent it being clobbered during recursion. Based on commit ec2c84d from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu. function old new delta readtoken 190 203 +13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0) Total: 13 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash tests: make test print test name before it is runDenys Vlasenko2015-10-291-2/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: only allow local variables in functionsRon Yorston2015-10-293-0/+5
| | | | | | | | | | Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: respect -p flag when command builtin is run with -v/-VRon Yorston2015-10-293-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command builtin should only check the default path, not $PATH, when the -p flag is used along with -v/-V. Based on commits 65ae84b (by Harald van Dijk) and 29ee27d (by Herbert Xu) from git://git.kernel.org/pub/scm/utils/dash/dash.git). function old new delta commandcmd 72 87 +15 describe_command 437 450 +13 typecmd 84 86 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 30/0) Total: 30 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix command -- crashDenys Vlasenko2015-10-291-3/+4
| | | | | | | | | | | | | | | | | | | | busybox sh -c 'command --' segfaults because parse_command_args returns a pointer to a null pointer. Based on commit 18071c7 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Gerrit Pape. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: save a few bytes in code to parse case statementsRon Yorston2015-10-291-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on commit 49b82fc from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu. function old new delta parse_command 1563 1555 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-8) Total: -8 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: allow newline after variable name in for loopRon Yorston2015-10-293-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newline is a valid delimiter between the variable name and `in` keyword in for loops. Based on commit 22e8fb4 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu. function old new delta parse_command 1568 1563 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5) Total: -5 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: add test for issue with here documentRon Yorston2015-10-292-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This used to work but doesn't now: foo () { cat <<EOF && { echo "$1" ; } $1 EOF } foo "bar" Reported-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * modinfo: fix "-F firmware", add "intree" field displayDenys Vlasenko2015-10-281-52/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta shortcuts - 52 +52 modinfo 317 330 +13 display 77 87 +10 packed_usage 30752 30761 +9 modinfo_main 351 345 -6 static.shortcuts 48 - -48 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 3/1 up/down: 84/-54) Total: 30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lzop: eliminate variable, use "int" as return typeDenys Vlasenko2015-10-281-8/+6
| | | | | | | | | | | | | | | | | | Based on patch by Maxin B. John <maxin.john@intel.com> function old new delta pack_lzop 870 859 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fbsplash: use virtual y size in mmap size calculationsTimo Teräs2015-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | The virtual y can be larger - and we can be even writing there since we are taking into account the y offset. Avoids possible crash. But use it only if set, seems it is not set if virtual area is not allocated (though, often fbcon allocates some scrollback area). Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: add support for --no-name long optionAaro Koskinen2015-10-272-0/+2
| | | | | | | | | | | | | | | | | | | | Add support for --no-name long option. Just silently ignore it like the short -n option. This allows to use busybox gzip with Lynx browser. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gunzip: add support for long optionsAaro Koskinen2015-10-271-0/+20
| | | | | | | | | | | | | | Add support for long options. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: test for bad archive SEGVingDenys Vlasenko2015-10-262-5/+29
| | | | | | | | | | | | | | function old new delta huft_build 1296 1300 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tr: support octal rangesRichard Genoud2015-10-261-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now, we can do printf "a\tb\tcdef\n" | ./busybox tr -d "\1-\14b-e" af and bonus, we save some bytes. function old new delta expand 718 699 -19 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-19) Total: -19 bytes Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ifupdown: pass interface device name for ipv6 route commandsTimo Teräs2015-10-261-3/+4
| | | | | | | | | | | | | | | | | | | | IPv6 routes need the device argument for link-local routes, or they cannot be used at all. E.g. "gateway fe80::def" seems to be used in some places, but kernel refuses to insert the route unless device name is explicitly specified in the route addition. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tweak defconfigDenys Vlasenko2015-10-254-31/+11
| | | | | | | | | | | | | | | | MONOTONIC_SYSCALL=y by default FEATURE_LAST_SMALL is gone: now FEATURE_LAST_FANCY is a "bool", not a "choice". Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * inetd: make FEATURE_INETD_RPC off by defaultDenys Vlasenko2015-10-252-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libiproute: use if_nametoindexRon Yorston2015-10-241-24/+1
| | | | | | | | | | | | | | Saves 87 bytes. Assuming, of course, all platforms have it. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xargs: make -I imply -rAaro Koskinen2015-10-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Make -I imply -r (GNU findutils seems to do the same). Fixes the following bug: $ echo -n | xargs -I% echo % Segmentation fault Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dumpleases: string reuseDenys Vlasenko2015-10-241-3/+5
| | | | | | | | | | | | | | | | text data bss dec hex filename 926254 906 17160 944320 e68c0 busybox_old 926242 906 17160 944308 e68b4 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dumpleases: new option -d to show time in secondsIsaac Dunham2015-10-241-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta dumpleases_main 493 534 +41 static.dumpleases_longopts 31 41 +10 packed_usage 30777 30752 -25 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 51/-25) Total: 26 bytes Signed-off-by: Isaac Dunham <ibid.ag@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * zcip: ...ad suppress the warningDenys Vlasenko2015-10-241-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * zcip: do not query current time if we won't use the resultDenys Vlasenko2015-10-241-2/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tweak zcip service exampleDenys Vlasenko2015-10-241-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Tweak READMEDenys Vlasenko2015-10-241-4/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * update network service examplesDenys Vlasenko2015-10-2417-20/+55
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * New example of a service: examples/var_service/zcip_ifDenys Vlasenko2015-10-247-0/+122
| | | | | | | | | | | | Zeroconf for IPv4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dumpleases: make host names sanitized to shell-friendly conditionDenys Vlasenko2015-10-241-3/+8
| | | | | | | | | | | | | | function old new delta add_lease 271 298 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * reuse a stringDenys Vlasenko2015-10-241-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * rmmod: fix bad error messageDenys Vlasenko2015-10-243-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ># busybox_old rmmod gtrhfhdfghdf rmmod: can't unload 'gtrhfhdfghdf': unknown symbol in module, or unknown parameter After: ># busybox rmmod gtrhfhdfghdf rmmod: can't unload module 'gtrhfhdfghdf': No such file or directory function old new delta modprobe_main 726 721 -5 do_modprobe 599 590 -9 rmmod_main 187 169 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-32) Total: -32 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * MODPROBE_SMALL is not experimental anymoreDenys Vlasenko2015-10-241-3/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * pmap: fix bogus {no such process} comm field textDenys Vlasenko2015-10-242-5/+7
| | | | | | | | | | | | | | | | | | | | | | function old new delta read_cmdline 246 266 +20 procps_get_maps 196 193 -3 packed_usage 30413 30404 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 20/-12) Total: 8 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tidy up strtok useDenys Vlasenko2015-10-232-5/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: fix heap buffer overflow. Closes 8426Denys Vlasenko2015-10-231-6/+19
| | | | | | | | | | | | | | function old new delta send_headers 654 677 +23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: if stderr is not a tty, progress bar shouldn't use tty-tricksDenys Vlasenko2015-10-231-3/+8
| | | | | | | | | | | | | | function old new delta bb_progress_update 706 768 +62 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: factor out code which queries screen widthDenys Vlasenko2015-10-239-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta get_terminal_width - 17 +17 stty_main 1196 1197 +1 pstree_main 321 319 -2 ls_main 735 731 -4 watch_main 232 225 -7 bb_progress_update 714 706 -8 ps_main 555 543 -12 run_applet_and_exit 708 695 -13 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 18/-46) Total: -28 byte Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: add a test that we don't write into symlinksDenys Vlasenko2015-10-221-0/+43
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * remove systemd supportDenys Vlasenko2015-10-227-76/+0
| | | | | | | | | | | | | | systemd people are not willing to play nice with the rest of the world. Therefore there is no reason for the rest of the world to cooperate with them. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: fix files skipped with --strip_components not resetting selinux contextDenys Vlasenko2015-10-221-3/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: shrink hardlink name handling codeDenys Vlasenko2015-10-221-26/+17
| | | | | | | | | | | | | | function old new delta data_extract_all 1069 1040 -29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>