aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * ipcs: further code shrinkDenys Vlasenko2018-03-081-24/+23
| | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 32543 32547 +4 ipcs_main 1014 980 -34 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-34) Total: -30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ipcs: code shrinkDenys Vlasenko2018-03-081-24/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 32539 32543 +4 format 1 - -1 do_shm 883 880 -3 do_sem 636 633 -3 do_msg 782 779 -3 ipcs_main 1049 1014 -35 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/4 up/down: 4/-45) Total: -41 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * md5sum: use config help text similar to other "sum" toolsDenys Vlasenko2018-03-081-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: much faster cursor key navigation by avoiding process rescanDenys Vlasenko2018-03-071-6/+19
| | | | | | | | | | | | | | | | function old new delta handle_input 549 560 +11 top_main 889 891 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: do unsigned rather than signed division in do_stats()Denys Vlasenko2018-03-071-3/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: handle much larger VSZ valuesDenys Vlasenko2018-03-071-7/+5
| | | | | | | | | | | | | | function old new delta display_process_list 1018 999 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * use gmtime_r() instead of gmtime()Denys Vlasenko2018-03-063-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids pulling in gmtime's static buffer: function old new delta svlogd_main 1401 1412 +11 send_headers 668 678 +10 gmtime 21 - -21 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 2/0 up/down: 21/-21) Total: 0 bytes text data bss dec hex filename 920221 555 5804 926580 e2374 busybox_old 920221 555 5740 926516 e2334 busybox_unstripped ^^^^ Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: code shrinkDenys Vlasenko2018-03-061-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta run_pipe 1589 1591 +2 pseudo_exec_argv 374 375 +1 builtin_type 114 115 +1 find_function 8 - -8 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 3/0 up/down: 4/-8) Total: -4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * networking/interface.c: get rid of global dataDenys Vlasenko2018-03-051-85/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were data/bss: static.proc_read 1 - -1 int_list 4 - -4 int_last 4 - -4 We never call display_interfaces() twice, thus code to not scan /proc twice never triggers. function old new delta do_if_print - 1998 +1998 display_interfaces 145 249 +104 static.proc_read 1 - -1 add_interface 104 103 -1 int_list 4 - -4 int_last 4 - -4 if_readlist_proc 560 542 -18 if_readconf 141 - -141 do_if_fetch 643 - -643 ife_print 1296 - -1296 ------------------------------------------------------------------------------ (add/remove: 1/6 grow/shrink: 1/2 up/down: 2102/-2108) Total: -6 bytes text data bss dec hex filename 933084 473 6844 940401 e5971 busybox_old 933087 473 6836 940396 e596c busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * networking/interface.c: get rid of global "smallint interface_opt_a"Denys Vlasenko2018-03-053-27/+20
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * networking/interface.c: code shrinkDenys Vlasenko2018-03-051-61/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta ife_print 1293 1296 +3 display_interfaces 145 146 +1 if_readconf 162 141 -21 if_readlist_proc 631 560 -71 do_if_fetch 753 643 -110 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/3 up/down: 4/-202) Total: -198 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: fix fetching of https URLs with http proxyPeter Lloyd2018-03-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When fetching a https:// URL with HTTP proxy configured (e.g. with environment variable http_proxy=http://your-proxy:3128) busybox was making a https connection to the proxy. This was because the protocol scheme for the target URL was used to determine whether to connect to the proxy over SSL or not. When the proxy is in use, the decision on whether to connect to the proxy over https should based on the proxy URL not on the target URL. function old new delta wget_main 2381 2387 +6 Signed-off-by: Peter Lloyd <l-busybox@pgl22.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * make busybox more portableSean MacLennan2018-03-042-11/+9
| | | | | | | | | | | | | | | | Move some distro specific include files into the appropriate #ifdef blocks to make the code more portable. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: fix a='a\\'; echo "${a%\\\\}"Denys Vlasenko2018-03-0210-3/+39
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: tweak bkslash_in_varexp.tests, add bkslash_in_varexp1.testsDenys Vlasenko2018-03-028-5/+50
| | | | | | | | | | | | | | | | | | It turns out bkslash_in_varexp.tests was a bash bug :] ash and hush fail "corrected" bkslash_in_varexp.tests as well, just not as badly as I thought (hush gets half of the cases right). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: two new tests, both fail for ash and hushDenys Vlasenko2018-03-028-0/+44
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | winansi: check for broken pipe in winansi_writeRon Yorston2018-03-091-7/+21
| | | | | | | | | | | | | | write(2) is commonly used in applets like cat and tr so we should check for broken pipes there too. See issue #99.
* | pipe_progress: enable in default buildRon Yorston2018-03-092-2/+2
| | | | | | | | See issue #97.
* | dd: mention /dev/zero and /dev/urandom in help messageRon Yorston2018-03-061-0/+3
| |
* | winansi: check for broken pipeRon Yorston2018-03-061-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Microsoft Windows doesn't support SIGPIPE and its support for the EPIPE error is somewhat inadequate. Most of the time a broken pipe leads to an EINVAL error which is misleading: $ yes hello | head -1 hello yes: Invalid argument Add a function to test for the underlying Windows error that indicates a broken pipe and set errno to EPIPE. Call this function in a few strategic places.
* | winansi: changes to puts, fputs and fwriteRon Yorston2018-03-061-18/+3
| | | | | | | | | | | | | | Rewrite winansi_puts using winansi_fputs and putchar. There's no need to use winansi_putchar. Improve error return values from winansi_fputs and winansi_fwrite.
* | winansi: improve error return values in ANSI emulationRon Yorston2018-03-061-20/+23
| | | | | | | | Also tighten up the code slightly.
* | winansi: create and use functions to test for consoleRon Yorston2018-03-061-51/+20
| |
* | win32: squeeze a few bytes out of strftimeRon Yorston2018-03-051-4/+6
| |
* | win32: use strchrnul from BusyBox in fnmatchRon Yorston2018-03-051-1/+5
| | | | | | | | | | | | BusyBox ensures that strchrnul is always available, either from the target platform or by including its own version. Therefore it isn't necessary for fnmatch to use its equivalent.
* | win32: reduce amount of static dataRon Yorston2018-03-044-101/+127
| | | | | | | | | | | | | | It appears that uninitialised static variables are placed in the data section rather than bss, increasing the size of the binary. Rewrite some code to reduce the amount of static data.
* | ar: conditional compilation for variable only needed on WIN32Ron Yorston2018-03-031-0/+2
| |
* | Minor improvements to buildRon Yorston2018-03-025-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | Exclude source files in libbb that aren't used by busybox-w32. This speeds up the build marginally. They can always be reinstated if necessary. Provide fake routines for everything in inode_hash.c so that it can be excluded. inode_hash.c is now unchanged from upstream. Use last_char_is in has_exe_suffix_or_dot. It doesn't save any bytes but it makes the code neater.
* | Merge branch 'busybox' into mergeRon Yorston2018-03-0135-238/+604
|\|
| * libbb: Use return value from is_prefixed_with()Andy Shevchenko2018-02-271-3/+2
| | | | | | | | | | | | | | | | | | | | add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5 (-5) Function old new delta skip_dev_pfx 30 25 -5 Total: Before=779966, After=779961, chg -0.00% Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tcpudp: shrink per-host rate-limiting codeDenys Vlasenko2018-02-273-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta tcpudpsvd_main 1775 1780 +5 ipsvd_perhost_add 108 107 -1 cclen 4 - -4 cc 4 - -4 ipsvd_perhost_init 30 25 -5 ipsvd_perhost_remove 80 44 -36 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 1/3 up/down: 5/-50) Total: -45 bytes text data bss dec hex filename 933358 473 6852 940683 e5a8b busybox_old 933326 473 6844 940643 e5a63 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * less: accept -R option. Closes 10816Denys Vlasenko2018-02-271-1/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: allow window size tracking to be disabledRon Yorston2018-02-252-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta lineedit_read_key 269 261 -8 win_changed 47 - -47 read_line_input 3884 3821 -63 cmdedit_setwidth 63 - -63 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 0/2 up/down: 0/-181) Total: -181 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * df: do "rootfs" check soonerDenys Vlasenko2018-02-231-4/+5
| | | | | | | | | | | | | | function old new delta df_main 1065 1064 -1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * df: 4TB+ support on 32 bits archDenys Vlasenko2018-02-231-8/+15
| | | | | | | | | | | | | | | | | | Reported for Pascal Bellard. function old new delta df_main 1054 1065 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix install with hardlinks and a custom PREFIX. Closes 10801Denys Vlasenko2018-02-231-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Trying to install busybox with hardlinks and a custom PREFIX will fail for applets not in the /bin directory, because relative pathnames are used. applets/install.sh is *supposed to* use the absolute pathname for hardlinks but it fails to do so because the wrong check is used in the if statement. While fixing it, shore up other sloppy coding in applets/install.sh Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * od: move address_fmt[] from data to globals. 8 less bytes in data sectionDenys Vlasenko2018-02-221-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta od_main 2164 2179 +15 address_fmt 8 - -8 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 15/-8) Total: 7 bytes text data bss dec hex filename 930954 481 6852 938287 e512f busybox_old 930977 473 6852 938302 e513e busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: fix potentially buggy use of OPT_STRDenys Vlasenko2018-02-221-12/+15
| | | | | | | | | | | | | | | | | | | | | | This also makes OPT_STR reused: text data bss dec hex filename 930979 481 6852 938312 e5148 busybox_old 930954 481 6852 938287 e512f busybox_unstripped ^^^^^^ Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: in -s handling, return 1/-1, not 1/0 compare resultDenys Vlasenko2018-02-221-2/+3
| | | | | | | | | | | | | | function old new delta compare_keys 794 795 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: compile capability code only if FEATURE_SETPRIV_CAPABILITIES or RUN_INITDenys Vlasenko2018-02-213-4/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: fix -s. Closes 10671Denys Vlasenko2018-02-211-12/+57
| | | | | | | | | | | | | | | | | | | | function old new delta sort_main 786 862 +76 compare_keys 720 794 +74 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 150/0) Total: 150 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * iplink: implement support for selecting a master interfaceJan Luebbe2018-02-203-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attaching an interface to a VRF is done by setting the interface's master. Besides VRF, this can also be used for bridges. function old new delta set_master - 142 +142 do_iplink 1262 1357 +95 packed_usage 32546 32539 -7 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 237/-7) Total: 230 bytes Signed-off-by: Jan Luebbe <jluebbe@debian.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ip link: support "add TYPE vrf", improve --helpJan Luebbe2018-02-202-5/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | VRF interfaces have a mandatory table parameter, which needs to be specified using a RTNL attribute. function old new delta do_add_or_delete 1150 1254 +104 packed_usage 32444 32546 +102 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 206/0) Total: 206 bytes Signed-off-by: Jan Luebbe <jluebbe@debian.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * umount: fix "umount -t FSTYPE MNTPOINT" acting as if -a is specifiedDenys Vlasenko2018-02-201-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | While at it, add -t to --help, and fix comments which say that -t is ignored function old new delta packed_usage 32427 32444 +17 umount_main 558 552 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 17/-6) Total: 11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar,unzip: postpone creation of symlinks with "suspicious" targetsDenys Vlasenko2018-02-206-79/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mostly reverts commit bc9bbeb2b81001e8731cd2ae501c8fccc8d87cc7 "libarchive: do not extract unsafe symlinks unless $EXTRACT_UNSAFE_SYMLINKS=1" Users report that it is somewhat too restrictive. See https://bugs.busybox.net/show_bug.cgi?id=8411 In particular, this interferes with unpacking of busybox-based filesystems with links like "sbin/applet" -> "../bin/busybox". The change is made smaller by deleting ARCHIVE_EXTRACT_QUIET flag - it is unused since 2010, and removing conditionals on it allows commonalizing some error message codes. function old new delta create_or_remember_symlink - 94 +94 create_symlinks_from_list - 64 +64 tar_main 1002 1006 +4 unzip_main 2732 2724 -8 data_extract_all 984 891 -93 unsafe_symlink_target 147 - -147 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 1/2 up/down: 162/-248) Total: -86 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * poweroff: add a config option for people needing VERY early poweroffDenys Vlasenko2018-02-191-0/+54
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mkfs_ext2, mkfs_vfat: fix warnings in STORE_LE on big-endian platformsDenys Vlasenko2018-02-152-6/+6
| | | | | | | | | | | | "warning: large integer implicitly truncated to unsigned type [-Woverflow]" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: remove redundant floor preventionDenys Vlasenko2018-02-141-2/+0
| | | | | | | | | | | | | | function old new delta tls_xread_record 499 489 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ping: don't call monotonic_us twice per sending the pingDenys Vlasenko2018-02-131-10/+11
| | | | | | | | | | | | | | | | | | | | | | function old new delta sendping6 80 85 +5 sendping4 106 111 +5 sendping_tail 209 204 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 10/-5) Total: 5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ping: implement -A "adaptive ping"Denys Vlasenko2018-02-131-40/+60
| | | | | | | | | | | | | | | | | | | | | | function old new delta common_ping_main 1757 1862 +105 packed_usage 32367 32427 +60 sendping_tail 236 209 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 165/-27) Total: 138 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>