summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-10dd: fixed partial count logicDenys Vlasenko
$ busybox dd if=/dev/zero of=/dev/loop0 bs=100M count=8; echo $? 8+0 records in 7+0 records out <=========== FIXED, was 7+1 805220352 bytes (767.9MB) copied, 0.464010 seconds, 1.6GB/s 1 function old new delta write_and_stats 97 99 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-10dd: exit with 1 if last write was incompleteDenys Vlasenko
$ busybox dd if=/dev/zero of=/dev/loop0 bs=100M count=8; echo $? 8+0 records in 7+1 records out 805220352 bytes (767.9MB) copied, 0.464010 seconds, 1.6GB/s 1 <=========== FIXED function old new delta write_and_stats 96 97 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-09ash: add comment explaining last changeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-09ash: fix var_bash5.tests - ${VAR/pattern/repl} constructDenys Vlasenko
function old new delta subevalvar 1198 1279 +81 rmescapes 308 330 +22 preglob 8 10 +2 parsefname 152 154 +2 expandarg 973 975 +2 argstr 1144 1146 +2 mklocal 290 288 -2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/1 up/down: 111/-2) Total: 109 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-08umount: ignore -cShawn Landden
"-c, --no-canonicalize: Do not canonicalize paths." As busybox doesn't canonicalize paths in the first place it is safe to ignore this option. See https://github.com/systemd/systemd/issues/7786 Signed-off-by: Shawn Landden <slandden@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-08mknod: better --help, much clearer codeDenys Vlasenko
function old new delta packed_usage 32066 32091 +25 mknod_main 173 174 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-08less: code shrinkDenys Vlasenko
function old new delta less_main 2471 2464 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-08dhcprelay: code shrinkDenys Vlasenko
function old new delta dhcprelay_main 961 958 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-08nice: code shrinkDenys Vlasenko
function old new delta nice_main 157 152 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-08*: make "argc UNUSED_PARAM" consistentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-07awk: code shrinkDenys Vlasenko
function old new delta awk_main 955 948 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-07ash: fail if 'shift' operand is out of rangeIngo van Lil
If the numeric argument passed to ash's 'shift' built-in is greater than '$#' the command performs no operation and exits successfully. It should return a non-zero exit code instead: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#shift This is consistent with bash and hush. function old new delta shiftcmd 122 120 -2 Signed-off-by: Ingo van Lil <inguin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-07awk: fix 'delete array[var--]' decrementing var twiceDenys Vlasenko
function old new delta evaluate 3395 3390 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-04libbb: compile obscure() only if FEATURE_PASSWD_WEAK_CHECK=yDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-04build system: add rule to install without cloberring existing utilitiesYann E. MORIN
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-04applets/install: accept more than one install optionYann E. MORIN
Currently, it is impossible to pass more than one option to the isntall script, so it totally prevents using --noclobber. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-04applets/install: respect noclobber for script wrappers tooYann E. MORIN
Simplify the handling of --noclobber so that it applies to all types of installation types, even to script wrappers. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-04tc: enables this appletDenys Vlasenko
function old new delta tc_main - 946 +946 cbq_print_opt - 517 +517 print_qdisc - 475 +475 print_class - 359 +359 llproto_names - 264 +264 packed_usage 31853 32066 +213 ll_proto_a2n - 112 +112 llproto_ids - 86 +86 print_tc_classid - 82 +82 static.objects - 20 +20 static._q_ - 16 +16 applet_main 1564 1568 +4 print_filter - 3 +3 applet_names 2708 2711 +3 ------------------------------------------------------------------------------ (add/remove: 13/0 grow/shrink: 3/0 up/down: 3100/0) Total: 3100 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-02Start 1.29.0 development cycleDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-02Bump version to 1.28.01_28_0Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-12-31scripts/randomtest: do not try building static libbysuboxDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-12-31chown: fix a mistake in opt_complementary changeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-12-31randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-12-26ntpd: do run the script at leat once in 11 minutesDenys Vlasenko
function old new delta ntpd_main 1197 1226 +29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-12-25env: -u option fails due to typoRon Yorston
The -u option is supposed to be allowed to appear multiple times; the option string supplied to getopt32long requires it to be followed by a nonnegative integer. Reported-by: Keith Maxwell <keith.maxwell@gmail.com> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-13tar: code shrinkDenys Vlasenko
function old new delta packed_usage 31863 31853 -10 tar_main 1013 1002 -11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-21) Total: -21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-13tar: code shrink, better help textDenys Vlasenko
function old new delta tar_main 994 1013 +19 packed_usage 31893 31863 -30 writeTarFile 250 207 -43 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 19/-73) Total: -54 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-10tar: improve help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-09inetd: fix for running by non-rootDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-09unshare: -r should map root to user, not the other way aroundDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-09unshare: -r implies -U, not -uDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-09unzip: add missing -j to trivial usageEugene Rudoy
Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-09unzip: fix content listing and filtering when -j is usedEugene Rudoy
Original Info-ZIP's unzip uses unstripped filenames while doing content listing and filtering, i.e. - in content listing mode -j is ignored completely - filtering is applied to non-stripped names, -j takes effect first while extracting the files 997ad2c64abbe931dffa3598b015c5de04e515cf strips path components a little bit too early resulting in behavior deviations. Fix it by doing stripping after listing/filtering. p.s. Info-ZIP's unzip behavior is the same as that of tar in --strip-components=NUM mode Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-08lineedit: get terminal width before printing promptDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-08lineedit: do not tab-complete any strings which have control charactersDenys Vlasenko
function old new delta add_match 41 68 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-03ash: fix nofork bug where environment is not properly passed to a commandDenys Vlasenko
function old new delta listvars 144 252 +108 evalcommand 1500 1546 +46 showvars 142 147 +5 shellexec 242 245 +3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 162/0) Total: 162 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-02init: reduce the window when init can lose reboot/poweroff signalsDenys Vlasenko
function old new delta init_main 695 712 +17 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-11-02ash: retain envvars with bad names in initial environment. Closes 10231Denys Vlasenko
Reworks "ash: [VAR] Sanitise environment variable names on entry" commit. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-31ntpd: skip over setting next DNS resolution attempt if it is not neededDenys Vlasenko
function old new delta ntpd_main 1177 1197 +20 resolve_peer_hostname 127 129 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-31Fix build failures if MAXHOSTNAMELEN or MAXPATHLEN is not definedDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-31grep: skip grepping symlinks to directoriesJames Clarke
When grep is passed -r, recursive_action will treat any symlinks to directories not in the root as normal files, since it lstat's them and is therefore told they are not directories. However, file_action_grep will still try to fopen and read from them to see whether they match, which varies in behaviour across platforms. Linux will give EISDIR and thus grep will not find any matching lines, but FreeBSD will give the raw contents of the directory itself, which may match the given pattern. Also, if grep is passed -c, it will even print a count for these symlinks, even on Linux. Since this recursive_action behaviour is required for the correct functioning of other applets, such as tar, grep should handle this special case and skip any such symlinks. function old new delta file_action_grep 80 161 +81 Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-31ntpd: mention in help text that -d can be repeatedDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-31ntpd: improve treatment of DNS resolution failuresDenys Vlasenko
function old new delta ntpd_main 1106 1177 +71 resolve_peer_hostname 122 127 +5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 76/0) Total: 76 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-30udp_io, traceroute: Standardise IPv6 PKTINFO handling to be portableJames Clarke
The current standard (RFC 3542) is for IPV6_RECVPKTINFO to be given to setsockopt, and IPV6_PKTINFO to be used as the packet type. Previously, RFC 2292 required IPV6_PKTINFO to be used for both, but RFC 3542 re-purposed IPV6_PKTINFO when given to setsockopt. The special Linux-specific IPV6_2292PKTINFO has the same semantics as IPV6_PKTINFO in RFC 2292, but was introduced at the same time as IPV6_RECVPKTINFO. Therefore, if we have IPV6_RECVPKTINFO available, we can use the RFC 3542 style, and if not, we assume that only the RFC 2292 API is available, using IPV6_PKTINFO for both. Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-30df: Use statvfs instead of non-standard statfsJames Clarke
Platforms differ on what their implementations of statfs include. Importantly, FreeBSD's does not include a f_frsize member inside struct statfs. However, statvfs is specified by POSIX and includes everything we need, so we can just use that instead. Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-30xfuncs: Handle missing non-POSIX termios constantsJames Clarke
Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-30blkdiscard: Only build on LinuxJames Clarke
Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-30networking: Fall back on IPPROTO_RAW when SOL_RAW is not definedJames Clarke
Signed-off-by: James Clarke <jrtc27@jrtc27.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-28ntpd: perform DNS resolution out of send/receive loop - closes 10466Denys Vlasenko
Bad case: send request to server1good.com; then try to resolve server2bad.com - this fails, and failure takes ~5 secs; then receive server1's response 5 seconds later. We'll never sync up in this case... function old new delta ntpd_main 1079 1106 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-10-27iproute/iprule: support toolchains without RTA_TABLE routing attributeEugene Rudoy
iproute.c: In function 'print_route': iproute.c:85:9: error: 'RTA_TABLE' undeclared (first use in this function) iproute.c:85:9: note: each undeclared identifier is reported only once for each function it appears in iproute.c: In function 'iproute_modify': iproute.c:467:36: error: 'RTA_TABLE' undeclared (first use in this function) Fix it by partially #ifdef'ing the code added in b42107f21538e39d9a344376372f8261aed589b2 Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>