aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-21libbb: move capability names code to libbbDenys Vlasenko
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>
2017-08-20setpriv: code shrinkDenys Vlasenko
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>
2017-08-18nuke: shorten help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-18klibc-utils: new applets: resume, nuke, minipsDenys Vlasenko
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>
2017-08-18setpriv: accept any case in capability namesDenys Vlasenko
This should work: setpriv --inh-caps -SyS_ReSOuRCE sh Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-17ash: stage backported LINENO support as a separate patchDenys Vlasenko
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>
2017-08-17telnet: "-a" + "-l USER" should respect USERDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-17hush: trivial code shrink in builtin_getoptsDenys Vlasenko
function old new delta builtin_getopts 368 363 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-16awk: stop on first non-option, closes 9861Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-16*: stop using atexit in non-debug build: saves ~260 in bss with muslDenys Vlasenko
"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>
2017-08-16syslogd,logger: code shrink for muslDenys Vlasenko
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>
2017-08-16fsck_minix,mkfs_minix: fix "strict-aliasing" warningsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-16uevent: placate gccDenys Vlasenko
How sizeof() can be an aliasing problem? Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-16top: switch to malloced "globals".Denys Vlasenko
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>
2017-08-15ash: unset OPTARG if getopts exits 1, support OPTERR=0 behaviorDenys Vlasenko
function old new delta getoptscmd 522 547 +25 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-15ash,hush: comment and debug tweaks, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-14ash: one "current line = 1" might be missing, fix thatDenys Vlasenko
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>
2017-08-14ash: update testsuite (we now error out on ${#=})Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-14ash: [PARSER] Catch variable length expansions on non-existant specialsDenys Vlasenko
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>
2017-08-14build system: remove unused CONFIG_FEATURE_HAVE_RPCDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-13shell: tweak getopts tests, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-11hush: implement "silent" optstrings of ":opts"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-11hush: add a test which fails due to uclibc bug in getopt()Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-11hush: fix redirect code (was using uninitialized variables)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-11shell: add OPTARG poisoning to getopt_optarg.testsDenys Vlasenko
ash fails this! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-11hush: teach getopts to set/unset OPTARGDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-11hush: getopts builtinDenys Vlasenko
function old new delta builtin_getopts - 271 +271 bltins1 372 384 +12 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 283/0) Total: 283 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-11ash: fix "unset OPTIND" throwing an error messageDenys Vlasenko
Added test was failing quite severely. Now only one subtest fails (OPTERR=0 has no effect). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10hush: optional times builtinDenys Vlasenko
function old new delta builtin_times - 108 +108 bltins1 360 372 +12 static.times_tbl - 9 +9 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 1/0 up/down: 129/0) Total: 129 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10fdisk: typo fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10ps: improve TIME column for large times: showing "14453:50" is not goodDenys Vlasenko
function old new delta format_time - 110 +110 func_time 59 50 -9 func_etime 67 53 -14 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 110/-23) Total: 87 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10ps: make it NOEXECDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10ps: stop using AT_CLKTCK, there are more standard waysDenys Vlasenko
function old new delta ps_main 537 558 +21 func_time 66 59 -7 get_kernel_HZ 102 - -102 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/1 up/down: 21/-109) Total: -88 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10rpm,rpm2cpio: INIT_G() was missing (it is a nop here so far)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10Hopefully fix "will break strict-aliasing rules" warning for get_le32Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10libarchive: do not extract unsafe symlinks unless $EXTRACT_UNSAFE_SYMLINKS=1Denys Vlasenko
function old new delta unsafe_symlink_target - 147 +147 unzip_main 2711 2732 +21 copy_file 1657 1678 +21 tar_main 999 971 -28 data_extract_all 1038 984 -54 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/2 up/down: 189/-82) Total: 107 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10rpm2cpio: handle LZMA compressed rpms. closes 10166Denys Vlasenko
function old new delta rpm2cpio_main 78 120 +42 setup_lzma_on_fd - 29 +29 fork_transformer_and_free - 28 +28 ... setup_unzip_on_fd 56 32 -24 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/5 up/down: 104/-67) Total: 37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10rpm2cpio: use rpm_gettagsDenys Vlasenko
function old new delta rpm_gettags - 451 +451 rpm2cpio_main 140 78 -62 skip_header 92 - -92 rpm_main 1477 1049 -428 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 451/-582) Total: -131 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10rpm: prepare rpm_gettags for reuse in rpm2cpioDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-10rpm,rpm2cpio: put both sources into one file, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09Update NOFORK_NOEXEC.lstDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09ipcs: tweak output orer to match util-linux 2.28Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09ipcrm,ipcs: make them NOEXECDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09ipcrm: code shrinkDenys Vlasenko
function old new delta ipcrm_main 698 663 -35 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09vconfig: make it NOEXECDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09rpm: code shrinkDenys Vlasenko
function old new delta rpm_getstr0 - 7 +7 rpm_getstr 112 110 -2 rpm_getint 120 118 -2 bsearch_rpmtag 15 13 -2 shell_builtin_read 1334 1320 -14 rpm_main 1548 1474 -74 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/5 up/down: 7/-94) Total: -87 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09shell: more efficient check for EOL in readDenys Vlasenko
function old new delta shell_builtin_read 1334 1320 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09hush: implement -d DELIM option for 'read'Denys Vlasenko
The POSIX standard only requires the 'read' builtin to handle '-r': http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html However, Bash introduced the option '-d <DELIM>' to override IFS for just one invocation, and it is quite useful. We already support this in ash, let's add it to hush, too. function old new delta builtin_read 263 284 +21 .rodata 163587 163589 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 23/0) Total: 23 bytes Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09ash: implement -d DELIM option for readJohannes Schindelin
The POSIX standard only requires the read builtin to handle -r: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html However, Bash introduced the option -d <DELIM> to override IFS for just one invocation, and it is quite useful. It is also super easy to implement in BusyBox' ash, so let's do that. The motivation: This option is used by Git's test suite. function old new delta .rodata 163505 163587 +82 shell_builtin_read 1244 1289 +45 readcmd 233 259 +26 builtin_read 258 263 +5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 158/0) Total: 158 bytes Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-09chcon: show '--reference' in help text only if LONG_OPTS=yXabier Oneca
Signed-off-by: Xabier Oneca <xoneca@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>