aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* hush: fix raw ^C handlisg in single-quoted stringsDenys Vlasenko2018-01-139-12/+15
| | | | | | | function old new delta parse_stream 2719 2754 +35 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: add command2.tests from ash testsDenys Vlasenko2018-01-122-0/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: tweak command -vV printing code, no logic changesDenys Vlasenko2018-01-121-3/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: implement "command -v -V"Denys Vlasenko2018-01-121-31/+84
| | | | | | | | | | | function old new delta pseudo_exec_argv 231 374 +143 if_command_vV_print_and_exit - 127 +127 builtin_set 267 273 +6 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 276/0) Total: 276 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* which: fix TODO with NOFORK+malloc_failure misbehavingDenys Vlasenko2018-01-124-26/+28
| | | | | | | | | | | function old new delta find_executable 86 104 +18 which_main 202 194 -8 executable_exists 66 51 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 18/-23) Total: -5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: implement "command" builtin (no options are supported yet)Denys Vlasenko2018-01-111-1/+16
| | | | | | | function old new delta pseudo_exec_argv 194 231 +37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix handling of ^C in evalDenys Vlasenko2018-01-115-4/+36
| | | | | | | | | | | function old new delta run_list 1044 1259 +215 builtin_eval 45 126 +81 expand_strvec_to_string 91 - -91 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 2/0 up/down: 296/-91) Total: 205 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix handling of raw ^C in scripts: "echo ^C"Denys Vlasenko2018-01-115-4/+27
| | | | | | | | function old new delta expand_vars_to_list 1133 1187 +54 parse_stream 2690 2719 +29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: remove dead codeDenys Vlasenko2018-01-111-15/+0
| | | | | | | function old new delta done_word 761 711 -50 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: ALWAYS_INLINE grabstackblock()Denys Vlasenko2018-01-101-1/+1
| | | | | | | function old new delta grabstackblock 5 - -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* init: stop using static dataDenys Vlasenko2018-01-101-16/+24
| | | | | | | | | | | | | function old new delta init_action_list 4 - -4 new_init_action 148 142 -6 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-10) Total: -10 bytes text data bss dec hex filename 927839 481 6832 935152 e44f0 busybox_old 927833 481 6824 935138 e44e2 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: make ${v:N:M} more robust for very large M by clamping to MIN/MAX_INTDenys Vlasenko2018-01-101-13/+25
| | | | | | | | | | | Before this patch, "${v:2:0x100000001}" = "${v:2:1}", and similarly, constructs like "${v:2:9999999999}" may give wrong result due to int overflows. function old new delta substr_atoi - 43 +43 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dd: fixed partial count logicDenys Vlasenko2018-01-101-1/+3
| | | | | | | | | | | | | $ 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>
* dd: exit with 1 if last write was incompleteDenys Vlasenko2018-01-101-5/+7
| | | | | | | | | | | | | $ 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>
* ash: add comment explaining last changeDenys Vlasenko2018-01-091-6/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix var_bash5.tests - ${VAR/pattern/repl} constructDenys Vlasenko2018-01-091-25/+72
| | | | | | | | | | | | | | | 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>
* umount: ignore -cShawn Landden2018-01-081-2/+2
| | | | | | | | | | | | "-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>
* mknod: better --help, much clearer codeDenys Vlasenko2018-01-081-28/+28
| | | | | | | | function old new delta packed_usage 32066 32091 +25 mknod_main 173 174 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* less: code shrinkDenys Vlasenko2018-01-081-3/+1
| | | | | | | function old new delta less_main 2471 2464 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dhcprelay: code shrinkDenys Vlasenko2018-01-081-4/+4
| | | | | | | function old new delta dhcprelay_main 961 958 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nice: code shrinkDenys Vlasenko2018-01-081-9/+12
| | | | | | | function old new delta nice_main 157 152 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make "argc UNUSED_PARAM" consistentDenys Vlasenko2018-01-082-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: code shrinkDenys Vlasenko2018-01-071-4/+3
| | | | | | | function old new delta awk_main 955 948 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fail if 'shift' operand is out of rangeIngo van Lil2018-01-071-1/+1
| | | | | | | | | | | | | | | | 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>
* awk: fix 'delete array[var--]' decrementing var twiceDenys Vlasenko2018-01-072-23/+50
| | | | | | | function old new delta evaluate 3395 3390 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: compile obscure() only if FEATURE_PASSWD_WEAK_CHECK=yDenys Vlasenko2018-01-041-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: add rule to install without cloberring existing utilitiesYann E. MORIN2018-01-041-0/+3
| | | | | Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* applets/install: accept more than one install optionYann E. MORIN2018-01-041-12/+16
| | | | | | | | 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>
* applets/install: respect noclobber for script wrappers tooYann E. MORIN2018-01-041-12/+8
| | | | | | | | 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>
* tc: enables this appletDenys Vlasenko2018-01-041-31/+75
| | | | | | | | | | | | | | | | | | | | | | 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>
* Start 1.29.0 development cycleDenys Vlasenko2018-01-021-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Bump version to 1.28.01_28_0Denys Vlasenko2018-01-021-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* scripts/randomtest: do not try building static libbysuboxDenys Vlasenko2017-12-311-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* chown: fix a mistake in opt_complementary changeDenys Vlasenko2017-12-311-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* randomconfig fixesDenys Vlasenko2017-12-3113-21/+42
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: do run the script at leat once in 11 minutesDenys Vlasenko2017-12-261-1/+3
| | | | | | | function old new delta ntpd_main 1197 1226 +29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* env: -u option fails due to typoRon Yorston2017-12-251-1/+1
| | | | | | | | | | 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>
* tar: code shrinkDenys Vlasenko2017-11-131-20/+19
| | | | | | | | | | 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>
* tar: code shrink, better help textDenys Vlasenko2017-11-131-62/+68
| | | | | | | | | | | 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>
* tar: improve help textDenys Vlasenko2017-11-101-7/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* inetd: fix for running by non-rootDenys Vlasenko2017-11-091-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unshare: -r should map root to user, not the other way aroundDenys Vlasenko2017-11-091-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unshare: -r implies -U, not -uDenys Vlasenko2017-11-091-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: add missing -j to trivial usageEugene Rudoy2017-11-091-1/+1
| | | | | Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unzip: fix content listing and filtering when -j is usedEugene Rudoy2017-11-091-7/+8
| | | | | | | | | | | | | | | | | | | | 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>
* lineedit: get terminal width before printing promptDenys Vlasenko2017-11-081-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: do not tab-complete any strings which have control charactersDenys Vlasenko2017-11-081-0/+12
| | | | | | | function old new delta add_match 41 68 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix nofork bug where environment is not properly passed to a commandDenys Vlasenko2017-11-035-5/+88
| | | | | | | | | | | | 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>
* init: reduce the window when init can lose reboot/poweroff signalsDenys Vlasenko2017-11-021-23/+8
| | | | | | | function old new delta init_main 695 712 +17 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: retain envvars with bad names in initial environment. Closes 10231Denys Vlasenko2017-11-021-4/+22
| | | | | | | Reworks "ash: [VAR] Sanitise environment variable names on entry" commit. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>