summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Apply post-1.23.0 patches, bump version to 1.23.11_23_1Denys Vlasenko2015-01-278-56/+71
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Bump version to 1.23.01_23_0Denys Vlasenko2014-12-241-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: add sanity check in bb_arg_max()Denys Vlasenko2014-12-241-1/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2014-12-224-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make it possible to override LOGIN_FAIL_DELAY in CONFIG_EXTRA_CFLAGSPeter Kümmel2014-12-221-0/+2
| | | | | Signed-off-by: Peter Kümmel <syntheticpp@gmx.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: account for script run timeDenys Vlasenko2014-12-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | Based on the following user report: I ran into an issue where I was seeing a long delay in the scripts called in udhcp_run_script. I was using an old version of OpenWrt (kamikaze) and a satellite modem. An NTP script was being called and the modem would sometimes take a long time to respond to the DNS lookup when it was offline. This delay started affecting my lease time. The lease that I would get from my satellite modem before it was online would be short: only 60 seconds. The delay with NTP and the modem would typically be about 18 seconds. This would cause the first DHCP renew request from dhcpc to be a little late. Under certain circumstances, I could even see the first DHCP renew to occur after the lease had expired! function old new delta udhcpc_main 2816 2837 +21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nanddump: don't show --bb in usage when disabledBaruch Siach2014-12-181-1/+3
| | | | | | | | The --bb options now depends on LONG_OPTS. Omit mentions of --bb from usage text when LONG_OPTS is disabled. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nandwrite: fix build when long options are disabledBaruch Siach2014-12-171-3/+4
| | | | | | | | | | | | The Required_argument macro is only defined when long options are enabled. Fixes the following build error: miscutils/nandwrite.c: In function 'nandwrite_main': miscutils/nandwrite.c:120:10: error: expected ',' or ';' before 'Required_argument' Reported-by: Christian Kästner <kaestner at cs.cmu.edu> Signed-off-by: Baruch Siach <baruch at tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: don't block when looking for escape sequence in vi-modeRon Yorston2014-12-151-1/+1
| | | | | | | | | | In vi-mode lineedit tries to detect some escape sequences. After the ESC it reads the next character to check for certain values. This read should have a timeout or a user-entered ESC to switch to command mode doesn't properly handle the next character. Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tar: fix "tar -cJ" ignoring -J option. closes 7706Denys Vlasenko2014-12-111-38/+28
| | | | | | | | | function old new delta tar_main 895 938 +43 vfork_compressor 206 191 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 43/-15) Total: 28 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: don't fall back to simple line input if tty is in raw modeDenys Vlasenko2014-12-101-2/+6
| | | | | | Testcase: shell command input after python ^Z should still work Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Config: select PLATFORM_LINUX if using sendfile()Bartosz Golaszewski2014-12-101-0/+1
| | | | | | | | | | | | | | Man entry for sendfile: Not specified in POSIX.1-2001, or other standards. Other UNIX systems implement sendfile() with different semantics and prototypes. It should not be used in portable programs. Select PLATFORM_LINUX if enabling FEATURE_USE_SENDFILE. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* flashcp: change BUFSIZE to 4kJacob Kjaergaard2014-12-101-1/+1
| | | | | | | | some flash partitions can be smaller than the existing BUFSIZE thus write BUFSIZE will fail with "no space left on device" Signed-off-by: Jacob Kjaergaard <jacob.kjaergaard@prevas.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make xmalloc_open_zipped_read_close result NUL terminatedDenys Vlasenko2014-12-071-1/+2
| | | | | | Compat with xmalloc_open_read_close Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libarchive: add capability to unpack to mem.bufferDenys Vlasenko2014-12-0714-125/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The performance and number of processes for a "depmod -a" with gzipped modules was abysmal. This patch adds a code path without fork, benefiting all users of xmalloc_open_zipped_read_close. "modinfo radeon.ko.gz", a single-file reader, got 30% faster. "depmod -a", which used to fork over 800 times, got 20% faster. Heavily based on a patch by Lauri Kasanen <curaga@operamail.com> function old new delta setup_transformer_on_fd - 159 +159 transformer_write - 122 +122 fork_transformer - 112 +112 xmalloc_open_zipped_read_close 63 118 +55 read_bunzip 1866 1896 +30 xtransformer_write - 19 +19 unzip_main 2449 2462 +13 bbunpack 755 766 +11 unpack_lzma_stream 2717 2723 +6 unpack_xz_stream 2393 2397 +4 unpack_Z_stream 1173 1175 +2 inflate_unzip 111 105 -6 check_signature16 70 63 -7 unpack_bz2_stream 359 349 -10 unpack_unxz 12 - -12 unpack_unlzma 12 - -12 unpack_uncompress 12 - -12 unpack_gunzip 12 - -12 unpack_bunzip2 12 - -12 open_transformer 106 92 -14 inflate_unzip_internal 1945 1916 -29 unpack_gz_stream 693 655 -38 open_zipped 89 47 -42 setup_unzip_on_fd 142 53 -89 ------------------------------------------------------------------------------ (add/remove: 4/5 grow/shrink: 7/8 up/down: 533/-295) Total: 238 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Rename transformer_aux_data_t -> transformer_state_tDenys Vlasenko2014-12-0713-70/+70
| | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* man: do not mangle $MANPATH in memoryDenys Vlasenko2014-11-301-3/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: use sendfile() to copy data between file descriptorsBartosz Golaszewski2014-11-274-42/+71
| | | | | | | | | | | | | | | | | | | | | | | Busybox already uses sendfile in httpd. This patch proposes to use it globally to copy data between file descriptors. It speeds up the copying on slow systems a lot - below are the times needed to copy a 450Mb file with and without this option enabled on a BeagleBone Black: sendfile: user 0m0.000s sys 0m8.170s read/write 4k: user 0m0.470s sys 0m16.300s function old new delta bb_full_fd_action 394 474 +80 Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* man: accept a list of dirs in $MANPATHDenys Vlasenko2014-11-271-37/+49
| | | | | | | | | | function old new delta add_MANPATH - 143 +143 man_main 852 731 -121 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 143/-121) Total: 22 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: use ARG_MAX for bb_arg_max() only if it's 60k+Denys Vlasenko2014-11-262-3/+6
| | | | | | | | | | | | | | | | | Sometimes ARG_MAX is small (like 32k) yet sysconf(_SC_ARG_MAX) is big, and people prefer using the bigger value. OTOH, with sufficiently large ARG_MAX, further wins from sysconf(_SC_ARG_MAX) being bigger are exponentially smaller: you can see 4 times fewer fork+execs when you run find, but when each execed process already takes a thousand parameters it's likely execution time is dominated by what that process does with each parameter. Thus, with this change ARG_MAX is used if it's sufficiently big, otherwise sysconf(_SC_ARG_MAX) is used. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bbunit: fix WANT_TIMING compilationDenys Vlasenko2014-11-261-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* gitignore: add testsuite/echo-neBartosz Golaszewski2014-11-261-0/+1
| | | | | Signed-off-by: Bartosz Golaszewski <bartekgola at gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: if a lease from lease file coincides with a static one, ignore itDenys Vlasenko2014-11-251-1/+13
| | | | | | | function old new delta read_leases 269 328 +59 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* init: do not run shutdown/reexec actions from signal handlerDenys Vlasenko2014-11-211-20/+30
| | | | | | | | | | | | | | this is racy wrt various libc functions such as syslog() function old new delta check_delayed_sigs 182 352 +170 init_main 772 728 -44 restart_handler 74 - -74 halt_reboot_pwoff 79 - -79 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 1/1 up/down: 170/-197) Total: -27 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* modprobe,rmmod: reject module names with slashesDenys Vlasenko2014-11-201-0/+11
| | | | | | | function old new delta add_probe 86 113 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fix in commentDenys Vlasenko2014-11-201-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: do not segfault on $((2**63 / -1))Denys Vlasenko2014-11-181-4/+23
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix handling of negative start value in ${v:start:len}Denys Vlasenko2014-11-171-1/+9
| | | | | | | function old new delta subevalvar 1140 1168 +28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* iproute: support onelink route option and print route flagsMichael Tokarev2014-11-171-1/+17
| | | | | | | | | | | function old new delta print_route 1797 1865 +68 do_iproute 2097 2112 +15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 83/0) Total: 83 bytes Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* exit with 127 if appled name wasn't found - it's more POSIXyDenys Vlasenko2014-11-171-2/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* zcip: Add environment variable for overriding log functionalityMichel Stam2014-11-045-0/+35
| | | | | | | | | | | | function old new delta bb_logenv_override - 70 +70 packed_usage 29969 30033 +64 zcip_main 1426 1431 +5 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/0 up/down: 139/0) Total: 139 bytes Signed-off-by: Michel Stam <m.stam@fugro.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* zcip: allow our own class B range to be used for ZeroConfMichel Stam2014-10-301-9/+21
| | | | | | | | | | | | | | | | | | | | | 169.254 may already be used by a local network. This patch allows specifying your own IP range. Our particular use case is a mesh network, in which the nodes partaking were using an IP range specifically assigned for the meshing purpose. As the LAN side of the mesh node could use 169.254, this default range was not an option. function old new delta zcip_main 1342 1426 +84 pick_nip - 40 +40 packed_usage 29974 29969 -5 pick 34 - -34 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/1 up/down: 124/-39) Total: 85 bytes Signed-off-by: Michel Stam <m.stam@fugro.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: add option for tweaking arppingMichel Stam2014-10-306-21/+39
| | | | | | | | | | | | | | | | | | | | | | | | Some clients have a very short timeout for sending the DHCP DISCOVER, shorter than the arpping timeout of 2000 milliseconds that udhcpd uses by default. This patch allows tweaking the timeout, or disabling of arpping altogether, at the risk of handing out addresses which are already in use. function old new delta udhcpd_main 1460 1501 +41 udhcpc_main 2814 2851 +37 packed_usage 29957 29974 +17 arpping 477 493 +16 find_free_or_expired_nip 161 174 +13 send_offer 285 292 +7 nobody_responds_to_arp 85 89 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/0 up/down: 135/0) Total: 135 bytes Signed-off-by: Michel Stam <m.stam@fugro.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: calculate offset to jitter ratio before updating jitterMiroslav Lichvar2014-10-051-4/+8
| | | | | | | | | | | | | | The offset to jitter ratio is now calculated before updating jitter to make the test more sensitive. function old new delta ntp_init 460 474 +14 update_local_clock 752 764 +12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 26/0) Total: 26 bytes Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sed: fix "sed CMD -i nonexistent_file". Closes 7484Denys Vlasenko2014-10-051-2/+6
| | | | | | | function old new delta sed_main 643 676 +33 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: don't stay at short polling intervalMiroslav Lichvar2014-10-021-27/+53
| | | | | | | | | | | | | | | | | | To avoid polling servers frequently slowly increase the interval up to BIGPOLL when - no replies are received from a peer - no source can be selected - peer claims to be unsynchronized (e.g. we are polling it too frequently) When recv() returns with an error, drop code to try to continue on network errors: I'm not convinced those cases happen in real life. function old new delta recv_and_process_peer_pkt 919 838 -81 Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getty: set tty attrs so that control chars are shown as ^cDenys Vlasenko2014-10-021-8/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: be less eager to use shorter poll intervalsDenys Vlasenko2014-09-271-39/+41
| | | | | | | | | | | | | | | | | | | | | | | | | * on step, poll interval drops to 8.5 mins instead of 32 seconds * on total loss of all replies (no replies from any peer for last 8 requests), also drop poll interval to 8.5 mins instead of 32 seconds * on send abd recv errors, RETRY_INTERVAL is now 32 seconds, not 5 seconds * on timing out listening to reply, instead of unconditional shortening poll interval by x4, clamp it to NOREPLY_INTERVAL (512 seconds) * if a largish offset is seen, clamp nexp poll interval to 128 seconds, not 64 seconds function old new delta clamp_pollexp_and_set_MAXSTRAT - 37 +37 recv_and_process_peer_pkt 861 869 +8 poll_interval 52 48 -4 update_local_clock 762 752 -10 ntpd_main 1063 1050 -13 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/3 up/down: 45/-27) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ubiupdatevol: fix -t to not require an option. Closes 7466Denys Vlasenko2014-09-251-9/+14
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* install: fix help textDenys Vlasenko2014-09-241-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: split out poll adjusting codeMiroslav Lichvar2014-09-241-37/+39
| | | | | Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: don't wait for good offset before disabling burst modeMiroslav Lichvar2014-09-241-6/+3
| | | | | | | The burst mode needs to be stopped even when no replies are received. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* install: implement -t DIRAaro Koskinen2014-09-241-15/+22
| | | | | | | | | | | | | | | Some packages want to install themselves using "-t" to specify the directory (as supported by GNU coreutils). Add support for the option for compatibility reasons. function old new delta install_longopts 76 95 +19 install_main 769 777 +8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 27/0) Total: 27 bytes Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* less: make -E workAaro Koskinen2014-09-231-1/+8
| | | | | | | | function old new delta buffer_print 71 104 +33 Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* less: trivial code shrinkDenys Vlasenko2014-09-221-4/+3
| | | | | | | function old new delta read_lines 715 695 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* less: move "retry-on-EAGAIN" logic closer to read opsDenys Vlasenko2014-09-223-32/+29
| | | | | | | | | | | | | | | This makes "G" (goto end of input) command work as well as /search_for_nonexistent_string: both will read to EOF now even from somewhat slow input (such as kernel's "git log"). function old new delta ndelay_on 35 43 +8 ndelay_off 35 43 +8 read_lines 695 691 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 16/-4) Total: 12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* less: disable "suppress empty wraparound" optimizationDenys Vlasenko2014-09-211-0/+6
| | | | | | It is buggy wrt another use case... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* df: fix -T option when ENABLE_FEATURE_HUMAN_READABLE=0Ari Sundholm2014-09-201-8/+7
| | | | | Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* false: make "false --help" exit with 1Denys Vlasenko2014-09-182-8/+35
| | | | | | | function old new delta run_applet_no_and_exit 447 445 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* df: implement -T optionAri Sundholm2014-09-171-2/+23
| | | | | | | | | | | function old new delta df_main 863 998 +135 packed_usage 29827 29861 +34 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 169/0) Total: 169 bytes Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>