summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * shell/ulimit: code shrinkDenys Vlasenko2019-10-211-18/+59
| | | | | | | | | | | | | | | | text data bss dec hex filename 1001949 551 5612 1008112 f61f0 busybox_old 1001906 551 5612 1008069 f61c5 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gunzip: code shrink by using int-, not short-sized struct memberDenys Vlasenko2019-10-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | function old new delta inflate_block 1254 1253 -1 inflate_codes 629 621 -8 huft_build 1054 1008 -46 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-55) Total: -55 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: code shrinkDenys Vlasenko2019-10-191-29/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | huft_build() still has way too many params function old new delta lit - 94 +94 dist - 94 +94 huft_build 1058 1054 -4 inflate_block 1281 1254 -27 cpdext 30 - -30 cplext 31 - -31 cpdist 60 - -60 cplens 62 - -62 ------------------------------------------------------------------------------ (add/remove: 2/4 grow/shrink: 0/2 up/down: 188/-214) Total: -26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: code shrinkDenys Vlasenko2019-10-191-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | huft_build() has way too many params function old new delta inflate_block 1293 1281 -12 huft_build 1085 1058 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-39) Total: -39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnet: add disabled code to emit EC and IPDenys Vlasenko2019-10-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | > I'm trying to connect to a Korenix 3005 switch through telnet > for management purposes, and all is well except for the backspace character > - seems like my switch doesn't handle it too well and instead of erasing > the last character all it does is print some garbage to the screen. > I've had the same issue before while using putty, but saw a solution that > suggests to enable "Telnet special commands" in the options menu, and it > worked. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: code shrinkDenys Vlasenko2019-10-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta show_bridge 323 317 -6 brctl_main 2171 2164 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-13) Total: -13 bytes text data bss dec hex filename 1002083 551 5612 1008246 f6276 busybox_old 1002065 551 5612 1008228 f6264 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * config: PID_FILE_PATH required for FEATURE_CROND_SPECIAL_TIMESJames Byrne2019-10-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When crond is built with FEATURE_CROND_SPECIAL_TIMES enabled, it creates a file called 'crond.reboot' at CONFIG_PID_FILE_PATH, but if FEATURE_PIDFILE is disabled, this will be an empty string and the file will be created in the root directory, which is undesirable. This commit makes PID_FILE_PATH depend on FEATURE_CROND_SPECIAL_TIMES as well as FEATURE_PIDFILE so that you get sensible behaviour in crond when FEATURE_PIDFILE is switched off. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: tweak help text, fix commentsDenys Vlasenko2019-10-121-5/+5
| | | | | | | | | | | | | | function old new delta packed_usage 33255 33236 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: fold show_bridge_ports_ into its callerDenys Vlasenko2019-10-121-165/+153
| | | | | | | | | | | | | | function old new delta brctl_main 2235 2171 -64 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: code shrinkDenys Vlasenko2019-10-121-32/+28
| | | | | | | | | | | | | | | | | | | | | | packed_usage 33253 33255 +2 write_uint 96 90 -6 show_bridge_timer 93 69 -24 brctl_main 2338 2235 -103 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 2/-133) Total: -131 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: add support for showstp commandMartin Lewis2019-10-111-3/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta brctl_main 974 2339 +1365 show_bridge_timer - 93 +93 static.state_names - 48 +48 printf_xstrtou - 26 +26 packed_usage 33243 33253 +10 show_bridge 333 323 -10 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 2/1 up/down: 1542/-10) Total: 1532 bytes text data bss dec hex filename 999868 551 5612 1006031 f59cf busybox_old 1002309 551 5612 1008472 f6358 busybox_unstripped Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dpkg-deb: work around bogus error message when working with XZ compressed ↵Denys Vlasenko2019-10-113-7/+28
| | | | | | | | | | | | | | | | | | | | packages function old new delta unpack_xz_stream 2309 2317 +8 bb_full_fd_action 464 472 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * replace: count_strstr - Handle an edge case where sub is emptyMartin Lewis2019-10-091-0/+4
| | | | | | | | | | | | | | | | | | | | If sub is empty, avoids an infinite loop. function old new delta count_strstr 45 63 +18 Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: Converted safe_read to safe_write formatMartin Lewis2019-10-091-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | Changed safe_read to be symmetrical to safe_write, it shall never return EINTR because it calls read multiple times, the error is considered transient. function old new delta safe_read 44 57 +13 Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * runsv: Use 64 prefix syscall if we have toAlistair Francis2019-10-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some 32-bit architectures no longer have the 32-bit time_t syscalls. Instead they have suffixed syscalls that returns a 64-bit time_t. If the architecture doesn't have the non-suffixed syscall and is using a 64-bit time_t let's use the suffixed syscall instead. This fixes build issues when building for RISC-V 32-bit with 5.1+ kernel headers. If an architecture only supports the suffixed syscalls, but is still using a 32-bit time_t report a compilation error. This avoids us have to deal with converting between 64-bit and 32-bit values. There are currently no architectures where this is the case. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * time: Use 64 prefix syscall if we have toAlistair Francis2019-10-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some 32-bit architectures no longer have the 32-bit time_t syscalls. Instead they have suffixed syscalls that returns a 64-bit time_t. If the architecture doesn't have the non-suffixed syscall and is using a 64-bit time_t let's use the suffixed syscall instead. This fixes build issues when building for RISC-V 32-bit with 5.1+ kernel headers. If an architecture only supports the suffixed syscalls, but is still using a 32-bit time_t report a compilation error. This avoids us have to deal with converting between 64-bit and 32-bit values. There are currently no architectures where this is the case. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * date: Use 64 prefix syscall if we have toAlistair Francis2019-10-081-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some 32-bit architectures no longer have the 32-bit time_t syscalls. Instead they have suffixed syscalls that returns a 64-bit time_t. If the architecture doesn't have the non-suffixed syscall and is using a 64-bit time_t let's use the suffixed syscall instead. This fixes build issues when building for RISC-V 32-bit with 5.1+ kernel headers. If an architecture only supports the suffixed syscalls, but is still using a 32-bit time_t fall back to the libc call. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: fix segmentation fault on empty bin optMichal Kazior2019-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | The following caused udhcpc to segfault: busybox udhcpc -i lo -s /dev/null -x 0x3d: function old new delta udhcp_str2optset 629 641 +12 Signed-off-by: Michal Kazior <michal@plume.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: add support for showmacs commandMartin Lewis2019-10-081-19/+92
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta brctl_main 680 974 +294 packed_usage 33167 33187 +20 compare_fdbs - 19 +19 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 333/0) Total: 333 bytes Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ln: --no-target-directory implies --no-dereferenceKaarle Ritvanen2019-10-081-4/+21
| | | | | | | | | | | | | | as in GNU coreutils Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * route: fix output of "route -n -A inet6"Tomas Paukrt2019-10-081-0/+1
| | | | | | | | | | | | | | | | | | The output of the command "route -n -A inet6" may be corrupted due to partially initialized structure snaddr6 in the function INET6_displayroutes. Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tee: do not intercept SIGPIPEDenys Vlasenko2019-10-071-4/+20
| | | | | | | | | | | | | | | | | | GNU tee does this only with -p, which we don't have yet. function old new delta tee_main 306 295 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fdisk_aix: fix aliasing warning, comment out unused global variablesDenys Vlasenko2019-10-042-23/+23
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fdisk: avoid overflow in "mega/gigabytes" calculation, code shrinkDenys Vlasenko2019-10-044-34/+29
| | | | | | | | | | | | | | function old new delta list_disk_geometry 175 145 -30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnet: fix uninitialized variable bugDenys Vlasenko2019-09-251-1/+1
| | | | | | | | | | | | | | function old new delta telnet_main 1236 1238 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: add ELAPSED_TIME option to outgoing packetsDenys Vlasenko2019-09-243-5/+21
| | | | | | | | | | | | | | | | | | | | | | function old new delta init_d6_packet 53 121 +68 udhcpc_main 2577 2582 +5 udhcpc6_main 2593 2597 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 77/0) Total: 77 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix BASE###nn bashism for bases 36..64Denys Vlasenko2019-09-221-3/+21
| | | | | | | | | | | | | | function old new delta evaluate_string 876 932 +56 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix BASE###nn bashism to accept letter 'digits' for bases > 9Denys Vlasenko2019-09-221-2/+9
| | | | | | | | | | | | | | function old new delta evaluate_string 873 876 +3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bc: Add 'U' suffix in UINT_MAX preprocessor checkKang-Che Sung2019-09-121-2/+2
| | | | | | | | | | | | | | | | Without the 'U' unsigned suffix, gcc will throw a "integer constant is so large that it is unsigned" warning. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: increase redirections limitDavid Demelier2019-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some hosting services like sourceforge perform a lot of relocations before actually serving the file. Example of current limitation: busybox wget http://sourceforge.net/projects/fluxbox/files/fluxbox/1.3.7/fluxbox-1.3.7.tar.xz Connecting to sourceforge.net (216.105.38.13:80) Connecting to sourceforge.net (216.105.38.13:443) Connecting to sourceforge.net (216.105.38.13:443) Connecting to sourceforge.net (216.105.38.13:443) Connecting to downloads.sourceforge.net (216.105.38.13:443) wget: too many redirections Signed-off-by: David Demelier <markand@malikania.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * examples/udhcp/simple.script: print the filename actually changedRolf Eike Beer2019-09-121-1/+1
| | | | | | | | | | Signed-off-by: Rolf Eike Beer <eb@emlix.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * find: implement -emptyAaro Koskinen2019-09-121-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta func_empty - 121 +121 packed_usage 33154 33167 +13 parse_params 1490 1500 +10 static.params 228 235 +7 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 151/0) Total: 151 bytes Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: code shrinkDenys Vlasenko2019-09-061-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converted a few 16-bit variables and small arrays to 32-bit. Stopped pulling desc->FOO members into temporary local variables in gen_bitlen(): on register-starved arches, this is a loss, temporaries go into stack slots. Sprinkled a few "const" on pointer arguments. function old new delta pack_gzip 742 745 +3 gen_codes 101 97 -4 build_tree 886 833 -53 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 3/-57) Total: -54 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * examples/udhcp/simple.script: up interface on deconfig eventDenys Vlasenko2019-09-051-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: add a FIXME commentDenys Vlasenko2019-09-051-1/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix "set -o INVALID" affecting -e flag stateDenys Vlasenko2019-09-051-11/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: code shrinkDenys Vlasenko2019-09-051-9/+9
| | | | | | | | | | | | | | function old new delta gzip_main 267 264 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: set default compression level to 6 when CONFIG_FEATURE_GZIP_LEVELS=nDaniel Edgecumbe2019-09-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, GNU gzip -n and BusyBox gzip now produce identical output assuming that CONFIG_GZIP_FAST=2. >> Excuse me, but I wonder one thing: Why should we follow >> strictly with gzip on the no-options default behavior? > First, the default 6 compression level is a de-facto standard. BSD gzip > and Apple gzip (on macOS) use this default as well. So there is a > reasonable expectation that different gzip implementations act the same. > For instance, if the default for busybox gzip becomes 9, then someone > writing a script using busybox gzip could reasonably expect that the > compression level will still be 9 when the same script is run on another > system. That would be wrong. Implementations should not deviate from > de-facto standards without a strong reason. > > Second, the inherent reason for this default has not gone away. While > processor speeds have exploded since the default was set, so has the > typical size of compressed files. Multiple gigabytes are nothing unusual > these days. And gzip is often used for compression on the fly, precisely > because it offers a good compromise between speed and compression ratio. > So I believe 6 continues to be a reasonable default. function old new delta deflate 939 927 -12 Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: set compression flags correctly as per standardDaniel Edgecumbe2019-09-051-8/+18
| | | | | | | | | | | | | | | | | | | | With this change and CONFIG_GZIP_FAST=2, CONFIG_FEATURE_GZIP_LEVELS=y, GNU gzip and BusyBox gzip now produce identical output at each compression level (excluding 1..3, as BusyBox does not implement these levels). Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: default level with ENABLE_FEATURE_GZIP_LEVELS should be 6Daniel Edgecumbe2019-09-051-1/+1
| | | | | | | | | | | | | | Fixes an off-by-one that actually resulted in level 7 being used Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dc: Parse error & fix out of bounds read in xc_program_printStringBrian Foley2019-09-052-2/+24
| | | | | | | | | | | | | | | | function old new delta xc_program_print 712 735 +23 Signed-off-by: Brian Foley <bpfoley@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dc: Fix segfault when executing strings generated using asciifyBrian Foley2019-09-052-2/+13
| | | | | | | | | | | | | | | | function old new delta zxc_vm_process 6884 6891 +7 Signed-off-by: Brian Foley <bpfoley@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dc: execute shouldn't pop if stack head is not a stringBrian Foley2019-09-052-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This matches the behaviour of both GNU dc (as specified in its man page), and BSD dc (where stack_popstring() pops only if the head is a string.) Add a couple of tests to verify this behavior. function old new delta zxc_vm_process 6882 6884 +2 Signed-off-by: Brian Foley <bpfoley@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: support stateless DHCPv6Eivind Versvik2019-08-241-9/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -l will send Information-Request to request configuration parameters function old new delta packed_usage 33114 33180 +66 send_d6_info_request - 62 +62 udhcpc6_main 2534 2593 +59 udhcpc6_longopts 199 211 +12 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 199/0) Total: 199 bytes Signed-off-by: Eivind Versvik <versvikeivind@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | winansi: code shrinkRon Yorston2020-01-081-37/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the ANSI emulation code to reduce its size. - Fetch console attributes when required rather than caching them. The init() function is no longer required; the only remaining initialisation is now performed in is_console(). - Turning off inverse video (ESC[27m) didn't work properly. This has been improved though it still doesn't work in some unlikely cases (ESC[7;27m). These changes save 180 bytes.
* | Update copyright dateRon Yorston2020-01-082-2/+2
| |
* | winansi: restore correct attributes after lsRon Yorston2020-01-071-1/+7
| | | | | | | | | | | | | | | | | | As reported in GitHub issue #178 the last colour set by the ls command is retained in the console. This is due to the previous commit reinitialising the stored attributes more frequently than it should. Attriubutes should only be initialised once.
* | winansi: fix escape processing in Windows 10 release 1809Ron Yorston2020-01-061-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported in GitHub issue #177, ANSI escape sequences don't work reliably after shell redirection. The problem appears to be due to a change in the behaviour of dup2() in Windows 10 release 1809. The escape handling code kept a copy of the console handle for internal use. Prior to Windows 10 release 1809 this worked; since then unwinding shell redirections results in the actual console handle changing from time to time for reasons that are unknowable without access to the source code. Fix this by always fetching the console handle instead of caching it.
* | ash: copy line editing history during forkshellRon Yorston2019-12-161-10/+94
| | | | | | | | | | Add code to store line editing history in the forkshell data block. This allows things like 'history | grep whatever' to work.
* | ash: copy alias table during forkshellRon Yorston2019-12-151-1/+77
| | | | | | | | | | | | | | | | The alias table has never been copied during forkshell. As a result any attempts to use the alias command in conjunction with pipes or backquote expansion, for example, fail. Fix this by adding the necessary code.