aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * modprobe-small: fix bogus handling of unpack errorsDenys Vlasenko2016-06-201-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "modprobe minix; echo $?" Was: modprobe: corrupted data modprobe: read error from 'kernel/fs/minix/minix.ko.xz': No such file or directory modprobe: corrupted data modprobe: read error from 'kernel/fs/minix/minix.ko.xz': No such file or directory modprobe: corrupted data modprobe: read error from 'kernel/fs/minix/minix.ko.xz' modprobe: 'kernel/fs/minix/minix.ko.xz': Success 0 Now: modprobe: corrupted data modprobe: read error from 'kernel/fs/minix/minix.ko.xz' 1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixes 4Denys Vlasenko2016-06-202-2/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixes 3Denys Vlasenko2016-06-202-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixes 2Denys Vlasenko2016-06-194-3/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixesDenys Vlasenko2016-06-1911-46/+80
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: move common code into run_applet_and_exitRon Yorston2016-06-192-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both calls to run_applet_and_exit are followed by the same code to print an error message and return status 127. Remove this duplication and make run_applet_and_exit static. function old new delta run_applet_and_exit 675 667 -8 main 119 92 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-35) Total: -35 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Allow "busybox <applet>" to work when busybox is disabledRon Yorston2016-06-181-0/+4
| | | | | | | | | | | | | | | | | | A recent commit made it possible to disable BusyBox's --install and --list options. However it also stopped "busybox <applet> <params>" from working. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: retry initial DNS resolution (forever, no timeout for now).Denys Vlasenko2016-06-061-17/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some users start ntpd on boot, and don't babysit it. If it dies because DNS is not yet up and therefore NTP servers can't be found, users are not happy. Example behavior with a peer name which can't be resolved: ntpd: bad address 'qwe.rty.ghj.kl' ...5 sec... ntpd: bad address 'qwe.rty.ghj.kl' ntpd: bad address 'qwe.rty.ghj.kl' ntpd: bad address 'qwe.rty.ghj.kl' ntpd: bad address 'qwe.rty.ghj.kl' ntpd: bad address 'qwe.rty.ghj.kl' ntpd: bad address 'qwe.rty.ghj.kl' ntpd: bad address 'qwe.rty.ghj.kl' ntpd: bad address 'qwe.rty.ghj.kl' ntpd: bad address 'qwe.rty.ghj.kl' ... Based on the patch by Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> function old new delta resolve_peer_hostname - 81 +81 ntpd_main 1130 1061 -69 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 81/-69) Total: 12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix time parsing of [[CC]YY]MMDDhhmm[.SS]. Closes 8951Natanael Copa2016-05-311-0/+1
| | | | | | | | | | | | | | | | If SS is not given a value, it is assumed to be zero. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/touch.html Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Make busybox an optional appletDenys Vlasenko2016-05-312-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If it's disabled, code shrinks by about 900 bytes: function old new delta usr_bin 10 - -10 usr_sbin 11 - -11 install_dir 20 - -20 applet_install_loc 184 - -184 run_applet_and_exit 686 21 -665 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 0/1 up/down: 0/-890) Total: -890 bytes text data bss dec hex filename 911327 493 7336 919156 e0674 busybox_old 909848 493 7336 917677 e00ad busybox_unstripped but busybox executable by itself does not say anything useful: $ busybox busybox: applet not found Based on the patch by Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: add -u/--update and --remove-destinationDenys Vlasenko2016-05-273-19/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the patch by wdlkmpx@gmail.com function old new delta copy_file 1546 1644 +98 add_partition 1270 1362 +92 ask_and_unlink 95 133 +38 do_iproute 132 157 +25 decode_one_format 710 715 +5 cp_main 369 374 +5 ubirename_main 198 202 +4 read_package_field 232 230 -2 bb_make_directory 421 412 -9 packed_usage 30505 30476 -29 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/3 up/down: 267/-40) Total: 227 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * arping: avoid use of ether_ntoa(). Closes 8926Denys Vlasenko2016-05-261-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the only non-debug use of ether_ntoa(). By not using it, we reduce bss: function old new delta arping_main 1568 1665 +97 static.asc 18 - -18 ether_ntoa 57 - -57 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 1/0 up/down: 97/-75) Total: 22 bytes text data bss dec hex filename 911020 493 7352 918865 e0551 busybox_old 911069 493 7336 918898 e0572 busybox_unstripped Also, "standard" arping zero-pads MAC. ether_ntoa() does not. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | libbb: set new listening sockets to dual-stack modeRon Yorston2016-07-051-0/+4
| | | | | | | | | | | | | | | | | | IPv6 sockets are created in IPv6-only mode on Microsoft Windows. The IPv6 socket option IPV6_V6ONLY needs to be turned off to permit dual-stack operation. Without this change netcat only listens on IPv6 addresses when run with no explicit IP address argument.
* | Add email address to READMERon Yorston2016-05-261-1/+1
| |
* | win32: correct cast of argument to _open_osfhandleRon Yorston2016-05-252-6/+6
| |
* | Fix for MinGW-w64Ron Yorston2016-05-251-3/+6
| | | | | | | | | | Limit the scope of '#pragma pack(2)', otherwise gunzip fails on 64-bit Windows.
* | archival: remove WIN32-specific code now lseek fails on pipesRon Yorston2016-05-242-9/+0
| |
* | win32: return an error when lseek is applied to a pipeRon Yorston2016-05-242-3/+18
| | | | | | | | | | | | | | | | | | | | | | tail failed to process input from a pipe correctly: $ echo -n 54321 | tail -c 3 543 It was trying to use lseek as an optimisation but WIN32 lseek doesn't return an error whan applied to a pipe. Fix this by providing a wrapper for lseek.
* | ash: enable wait builtin commandRon Yorston2016-05-191-4/+0
| |
* | which: explicit test for busybox when applets are preferredRon Yorston2016-05-191-1/+1
| |
* | less: hide unsupported signal handling in include fileRon Yorston2016-05-192-6/+5
| |
* | ash: use a macro to substitute waitpid_child for waitpidRon Yorston2016-05-181-4/+1
| |
* | ash: fix use of pid/handle in waitpid_childRon Yorston2016-05-183-35/+79
| | | | | | | | | | | | | | | | | | | | Previously spawn was returning a process handle which was treated as a pid in certain circumstances. This resulted in the following failing: find . -type f | sed xargs -n 1 sed -n '1 p' It should output the first line of each file but stopped after the first.
* | win32: adjustments to spawn functionsRon Yorston2016-05-183-14/+11
| | | | | | | | | | | | | | | | Make mingw_spawn_applet and mingw_spawn_1 static. The return value from spawnve is an exit code in synchronous mode and a process handle in asynchronous mode. Pass these upwards without interpretation.
* | Update default configurationRon Yorston2016-05-162-2/+4
| |
* | Merge branch 'busybox' into mergeRon Yorston2016-05-16128-295/+858
|\|
| * sed: fix append command to match GNU sed 4.2.1Denys Vlasenko2016-05-062-12/+23
| | | | | | | | | | | | This closes one testcase failure Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * flock: merge spawn_and_wait() code patchs for -c and sans-c usesDenys Vlasenko2016-04-241-12/+12
| | | | | | | | | | | | | | function old new delta flock_main 334 319 -15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * flock: fix -c; improve error handling of fork+execDenys Vlasenko2016-04-241-2/+17
| | | | | | | | | | | | | | function old new delta flock_main 254 334 +80 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ip: fix problem on mips64 n64 big endian musl systemsSzabolcs Nagy2016-04-241-13/+24
| | | | | | | | | | | | | | | | | | Use designated initializers for struct msghdr. The struct layout is non-portable and musl libc does not match what busybox expects. Signed-off-by: Szabolcs Nagy <nsz@port70.net> Tested-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: understand \n,\r and \t in i and a commands. Closes 8871Denys Vlasenko2016-04-242-13/+43
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * generate_BUFSIZ.sh: yet another tweakDenys Vlasenko2016-04-242-13/+42
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: slap on a few ALIGN1/2s where appropriateDenys Vlasenko2016-04-2230-49/+49
| | | | | | | | | | | | | | | | | | | | The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map" text data bss dec hex filename 829901 4086 1904 835891 cc133 busybox_before 829665 4086 1904 835655 cc047 busybox Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * scripts/trylink: document DATA_SEGMENT_ALIGN() hackDenys Vlasenko2016-04-221-0/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * generate_BUFSIZ.sh: catch BUFSIZE < 1024 also on "big" buildsDenys Vlasenko2016-04-221-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * build system: fix generate_BUFSIZ.sh to not alternate 1k and malloc buildsDenys Vlasenko2016-04-212-73/+109
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: constify *bb_common_bufsiz1 (if it is compiled to be a pointer)Denys Vlasenko2016-04-212-3/+3
| | | | | | | | | | | | | | | | | | | | This lets gcc optimize much better: text data bss dec hex filename 922846 910 13056 936812 e4b6c busybox_unstripped.nonconst 920255 910 13056 934221 e414d busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make "COMMON_BUFSIZE = 1024 bytes, the buffer will be malloced" workDenys Vlasenko2016-04-212-5/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: add setup_common_bufsiz() as neededDenys Vlasenko2016-04-213-4/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: hopefully all setup_common_bufsiz() are in placeDenys Vlasenko2016-04-2129-55/+83
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: add most of the required setup_common_bufsiz() callsDenys Vlasenko2016-04-2153-19/+63
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-2191-131/+414
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: shorter code for date/time generationDenys Vlasenko2016-04-181-6/+6
| | | | | | | | | | | | | | function old new delta unzip_main 2426 2414 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: better match for "standard" unzip's output; string shrinkageDenys Vlasenko2016-04-181-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta unzip_main 2490 2426 -64 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-64) Total: -64 bytes text data bss dec hex filename 924008 906 17160 942074 e5ffa busybox_old 923846 906 17160 941912 e5f58 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: fix percent overflow; show "stored" files properlyDenys Vlasenko2016-04-181-6/+29
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: fix a case where we find wrong CDE. Closes 8821Denys Vlasenko2016-04-171-8/+35
| | | | | | | | | | | | | | function old new delta unzip_main 2472 2490 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: bash-compatible $'...' shouldn't expand in double quotesRon Yorston2016-04-155-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bash doesn't expand its $'...' construct in double quotes: $ echo "$'a\tb'" $'a\tb' Change BusyBox ash to do the same. This also fixes a problem with here documents where BusyBox ash gave an incorrect result for: $ cat <<EOF > '$' > EOF '$' Reported-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Rewrite iteration through applet names to save a few bytesRon Yorston2016-04-153-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta run_applet_and_exit 758 755 -3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3) Total: -3 bytes In standalone shell mode the saving increases to 17 bytes. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: support "-f -" idiomDenys Vlasenko2016-04-081-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | winansi: revert to previous console behaviour for vi/lessRon Yorston2016-04-264-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | Recent changes to make the Windows console behave more like a *nix terminal didn't work too well for vi/less. On *nix the terminal buffer can't be scrolled while such screen-based applications are running. In the Windows console this remained possible and led to confusion. Add a new routine to allow vi/less to revert to their previous behaviour where the cursor is positioned at the top of the buffer and the entire buffer is cleared.