aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* klibc-utils: add ipconfig.c work-in-progressDenys Vlasenko2017-09-011-0/+316
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* xargs: fix a thinko in last commitDenys Vlasenko2017-08-301-1/+1
| | | | | | | | IF_FEATURE_XARGS_SUPPORT_PARALLEL(char *opt_a = NULL;) is replaced with IF_FEATURE_XARGS_SUPPORT_ARGS_FILE Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* xargs: support -a FILEJohannes Schindelin2017-08-291-1/+17
| | | | | | | | | | | | | | | The GNU-specific option -a lets xargs read the arguments from a file rather than from stdin. This is particularly convenient when debugging in gdb interactively, and it might be of more general use. function old new delta xargs_main 788 823 +35 packed_usage 31683 31671 -12 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* klibc-utils: remove accidental "or later" licensing wording.Denys Vlasenko2017-08-292-2/+2
| | | | | | I (slightly) prefer my code to be under "GPLv2 only" license. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: show only short opts in --help textDenys Vlasenko2017-08-291-39/+0
| | | | | | | function old new delta packed_usage 31615 31501 -114 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* i2c_tools: tweak --help textDenys Vlasenko2017-08-291-33/+36
| | | | | | | function old new delta packed_usage 31624 31615 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setpriv: placete "declaration of 'index' shadows a global declaration" warningDenys Vlasenko2017-08-291-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix false positive in unset.testsDenys Vlasenko2017-08-291-0/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: GETOPT_RESET() _after_ getopts too.Denys Vlasenko2017-08-294-5/+6
| | | | | | | | | NOEXEC'ed applets which use getopt() need this. function old new delta builtin_getopts 403 413 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: reuse "OPTIND=..." stringDenys Vlasenko2017-08-291-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix "getopts" builtin to not be upset by other builtins calling getopt()Denys Vlasenko2017-08-295-15/+133
| | | | | | | | | | | | | | | | function old new delta builtin_getopts 363 403 +40 unset_local_var_len 185 215 +30 set_local_var 440 466 +26 reset_traps_to_defaults 151 157 +6 pseudo_exec_argv 320 326 +6 install_special_sighandlers 52 58 +6 pick_sighandler 62 65 +3 execvp_or_die 85 88 +3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/0 up/down: 120/0) Total: 120 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* i2c-tools: don't include linux/i2c-dev.hBartosz Golaszewski2017-08-291-13/+30
| | | | | | | | | | | | | | | Installing headers from upstream i2c-tools makes it impossible to build the busybox version due to redefined symbols. This is caused by the fact that linux/i2c-dev.h from i2c-tools overwrites the one from linux uapi and defines symbols already defined by linux' linux/i2c.h. Drop this include and simply re-implement the relevant defines from linux/i2c-dev.h in miscutils/i2c-tools.c. Tested by building on systems with and without i2c-tools headers. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* i2c-tools: remove unneeded includeBartosz Golaszewski2017-08-281-1/+0
| | | | | | | | | We no longer use common_bufsiz1 in i2c-tools. Don't include common_bufsiz.h. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* kill: add '--' option to separate options from argumentsRon Yorston2017-08-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using a negative pid to send TERM to a process group results in an obscure error: $ ./busybox kill -12345 kill: bad signal name '12345' This is intended. Manpage says: ARGUMENTS pid Each pid can be one of four things: ... -n where n is larger than 1. All processes in process group n are signaled. When an argument of the form '-n' is given, and it is meant to denote a process group, either a signal must be specified first, or the argument must be preceded by a '--' option, otherwise it will be taken as the signal to send. However, we did not support "--". Add this capability to BusyBox. function old new delta kill_main 993 999 +6 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* xargs: optional support for -P NUM. Closes 9511Denys Vlasenko2017-08-241-18/+117
| | | | | | | | | | | | | Based on patch by Johannes Schindelin <johannes.schindelin@gmx.de> function old new delta xargs_exec - 294 +294 packed_usage 31757 31772 +15 xargs_main 787 719 -68 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 309/-68) Total: 241 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* xargs: code shrinkDenys Vlasenko2017-08-241-14/+11
| | | | | | | function old new delta xargs_main 827 787 -40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sed: in '/regexp/cmd1;//cmd2', cmd2 should use the same regexp as cmd1Denys Vlasenko2017-08-232-4/+16
| | | | | | | function old new delta get_address 165 211 +46 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: fix fallout from opt_complementary conversionDenys Vlasenko2017-08-232-7/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: more s/error/perror/ for better error reportingDenys Vlasenko2017-08-231-5/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: when cd fails, say whyJohannes Schindelin2017-08-231-1/+1
| | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: report reason when a script file could not be openedJohannes Schindelin2017-08-231-1/+1
| | | | | | | | It is always nicer to give the user some sort of indication why an operation failed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tar: fix handling of first argument without '-'Ron Yorston2017-08-231-3/+3
| | | | | | | | | | The following no longer works as expected: $ ./busybox tar xfz test.tgz tar: can't open 'z': No such file or directory Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sendmail: fix segfault if "To: email1,email2" is usedDenys Vlasenko2017-08-221-3/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libarchive: fix build failure on NOMMU systemsRon Yorston2017-08-221-1/+1
| | | | | | | | In the old code fd was an argument, now we need to get the file descriptor from the xstate structure. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ps: fix build failure if FEATURE_PS_TIME is disabledRon Yorston2017-08-221-1/+3
| | | | | | | | The global seconds_since_boot is only defined if FEATURE_PS_TIME is enabled. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rpm,rpm2cpio: do not compile not-configurred parts of rpm.cDenys Vlasenko2017-08-221-40/+48
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* run-init: if doing dry run, do not require pid==1Denys Vlasenko2017-08-221-2/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ps: allow ps config options if minips is enabledKang-Che Sung2017-08-221-8/+8
| | | | | | | | | | | Follow-up of commit ab77e81a8527fa11a4f9392d97c2da037d6f4f98 "klibc-utils: new applets: resume, nuke, minips" Also put FEATURE_PS_UNUSUAL_SYSTEMS to under FEATURE_PS_TIME in the menu. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* run-init: implement -n "dry run"Denys Vlasenko2017-08-222-35/+44
| | | | | | | | | | | | | function old new delta switch_root_main 637 706 +69 packed_usage 31743 31757 +14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 83/0) Total: 83 bytes text data bss dec hex filename 915247 563 5844 921654 e1036 busybox_old 915303 563 5844 921710 e106e busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* run-init: new appletDenys Vlasenko2017-08-215-52/+212
| | | | | | | | | | | | | | | | | | function old new delta switch_root_main 354 637 +283 drop_usermodehelper - 157 +157 cap_name_to_number - 77 +77 packed_usage 31707 31743 +36 applet_names 2665 2674 +9 applet_main 1544 1548 +4 applet_install_loc 193 194 +1 setpriv_main 933 928 -5 getcaps 131 122 -9 parse_cap 117 29 -88 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 5/3 up/down: 567/-102) Total: 465 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: move capability names code to libbbDenys Vlasenko2017-08-213-77/+90
| | | | | | | | | | function old new delta cap_name_to_number - 77 +77 parse_cap 117 29 -88 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/1 up/down: 77/-88) Total: -11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setpriv: code shrinkDenys Vlasenko2017-08-201-9/+7
| | | | | | | | | | function old new delta parse_cap 125 117 -8 setpriv_main 949 933 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24) Total: -24 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nuke: shorten help textDenys Vlasenko2017-08-182-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* klibc-utils: new applets: resume, nuke, minipsDenys Vlasenko2017-08-189-1/+201
| | | | | | | | | | | | | | | | | | | | | | minips is a pure alias to ps, just in case someone needs 100% klibc-utils compat. nuke is a primitive version of "rm -rf" without options and error checks. ~30 bytes. resume is a tool for initramfs which resumes from a given block device. function old new delta resume_main - 582 +582 packed_usage 31640 31712 +72 nuke_main - 28 +28 xstrtoull - 24 +24 applet_names 2646 2665 +19 applet_main 1532 1544 +12 applet_suid 96 97 +1 applet_install_loc 192 193 +1 applet_flags 96 97 +1 ------------------------------------------------------------------------------ (add/remove: 5/0 grow/shrink: 6/0 up/down: 740/0) Total: 740 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setpriv: accept any case in capability namesDenys Vlasenko2017-08-181-1/+1
| | | | | | This should work: setpriv --inh-caps -SyS_ReSOuRCE sh Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: stage backported LINENO support as a separate patchDenys Vlasenko2017-08-171-0/+498
| | | | | | | | Looks biggish and not particularly useful, but may be easier to just eat the impact if future backports from dash would be otherwise increasingly difficult. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* telnet: "-a" + "-l USER" should respect USERDenys Vlasenko2017-08-171-2/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: trivial code shrink in builtin_getoptsDenys Vlasenko2017-08-171-4/+5
| | | | | | | function old new delta builtin_getopts 368 363 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: stop on first non-option, closes 9861Denys Vlasenko2017-08-161-1/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: stop using atexit in non-debug build: saves ~260 in bss with muslDenys Vlasenko2017-08-164-22/+16
| | | | | | | | | | | | | | | | | | | | | | | | "builtin" below is atexit's 32-element global array of functions to call. function old new delta top_main 879 889 +10 launch_helper 185 193 +8 powertop_main 1555 1559 +4 sed_main 651 650 -1 slot 4 - -4 call 4 - -4 atexit 23 - -23 kill_helper 31 - -31 __funcs_on_exit 120 - -120 __cxa_atexit 168 - -168 builtin 260 - -260 ------------------------------------------------------------------------------ (add/remove: 0/8 grow/shrink: 3/1 up/down: 22/-611) Total: -589 bytes text data bss dec hex filename 912364 563 6132 919059 e0613 busybox_old 912035 563 5844 918442 e03aa busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* syslogd,logger: code shrink for muslDenys Vlasenko2017-08-163-6/+17
| | | | | | | | | | | | | | | | | | function old new delta syslogd_main 1252 1910 +658 logger_main 277 393 +116 timestamp_and_log 434 542 +108 static.__compound_literal - 104 +104 parse_fac_prio_20 137 - -137 pencode 167 - -167 parse_syslogdcfg 715 - -715 ------------------------------------------------------------------------------ (add/remove: 1/3 grow/shrink: 3/0 up/down: 986/-1019) Total: -33 bytes text data bss dec hex filename 912506 563 6132 919201 e06a1 busybox_old 912364 563 6132 919059 e0613 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fsck_minix,mkfs_minix: fix "strict-aliasing" warningsDenys Vlasenko2017-08-162-7/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* uevent: placate gccDenys Vlasenko2017-08-161-1/+4
| | | | | | How sizeof() can be an aliasing problem? Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* top: switch to malloced "globals".Denys Vlasenko2017-08-161-7/+6
| | | | | | | | | | | | | | | | | | | | | This seems to be more efficient: function old new delta clearmems - 28 +28 display_process_list 1001 1018 +17 read_cpu_jiffy 171 177 +6 do_stats 194 198 +4 reset_term 20 23 +3 topmem_sort 63 65 +2 mult_lvl_cmp 44 45 +1 get_jiffy_counts 247 248 +1 display_topmem_process_list 549 546 -3 top_main 912 879 -33 handle_input 630 549 -81 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 7/3 up/down: 62/-117) Total: -55 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: unset OPTARG if getopts exits 1, support OPTERR=0 behaviorDenys Vlasenko2017-08-151-2/+11
| | | | | | | function old new delta getoptscmd 522 547 +25 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: comment and debug tweaks, no code changesDenys Vlasenko2017-08-152-3/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: one "current line = 1" might be missing, fix thatDenys Vlasenko2017-08-141-4/+5
| | | | | | | I'm not sure this is necessary, but dash has this init here. Just in case, do it too. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: update testsuite (we now error out on ${#=})Denys Vlasenko2017-08-141-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: [PARSER] Catch variable length expansions on non-existant specialsDenys Vlasenko2017-08-141-3/+9
| | | | | | | | | | | | | | | | | | | Upstream commit: Date: Thu, 30 Oct 2014 11:53:35 +0800 [PARSER] Catch variable length expansions on non-existant specials Currently we only check special variable names that follow directly after $ or ${. So errors such as ${#&} are not caught. This patch fixes that by moving the is_special check to just before we print out the special variable name. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> function old new delta readtoken1 2630 2635 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: remove unused CONFIG_FEATURE_HAVE_RPCDenys Vlasenko2017-08-1412-18/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>