aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-23Make ping6 and traceroute6 selectable independently from ping/tracerouteDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23ipneigh: add this shortcur similar to other "ip <CMD>" shortcutsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Rename FEATURE_FTP_WRITE and FEATURE_FTP_AUTHENTICATION to *_FTPD_*Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all networking/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all modutils/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Make killall and killall5 selecatable independent from killDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-23Convert all procps/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-22Convert all miscutils/* applets to "new style" applet definitionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-22Split miscutils/Config.src items into miscutils/*.c filesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-22httpd: explain why we use sprintf and why it should be fineDenys Vlasenko
While at it, fix a pathological case where it is not fine: -r REALM with some 8-kbyte long REALM would overflow the buffer. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-18Fix allnoconfig warningsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-17applets.h.sh: a script to check applet names against config optionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-16Make mkfs.vfat and mkdosfs individually selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-16Make mke2fs and mkfs.ext2 individually selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-16Make bzcat, lzcat, xzcat, zcat, lzopcat, unlzop individually selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-14Make ifup and ifdown individually selectable.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-14Make swapon and swapoff individually selectable.Denys Vlasenko
For example, without swapoff, code shrinks by 277 bytes. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-14Make grep/egrep/fgrep independently selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-14Make halt/poweroff/reboot independently selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-13Make setarch/linux32/linux64 independently selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-13dnsdomainname: split it from "hostname", make it independently selectableDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-11tar: handle pax-encoded utf8 filenames and link names. Closes 9406Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-08hush: make getch/peek functions directly calledDenys Vlasenko
Indirect calls are more difficult to predict. Unfortunately, on x64 direct call is 5 bytes while indirect "call (reg+ofs)" is 3 bytes: function old new delta i_getch - 82 +82 i_peek - 63 +63 parse_stream 2531 2579 +48 parse_dollar 771 797 +26 parse_redirect 296 321 +25 add_till_closing_bracket 408 420 +12 encode_string 256 265 +9 i_peek_and_eat_bkslash_nl 93 99 +6 add_till_backquote 110 114 +4 parse_and_run_stream 139 141 +2 expand_vars_to_list 1143 1144 +1 static_peek 6 - -6 setup_string_in_str 39 18 -21 setup_file_in_str 40 19 -21 static_get 27 - -27 file_peek 52 - -52 file_get 65 - -65 ------------------------------------------------------------------------------ (add/remove: 2/4 grow/shrink: 9/2 up/down: 278/-192) Total: 86 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-08hush: renumber PIPE_foo, make PIPE_SEQ = 0Denys Vlasenko
PIPE_SEQ is used most often, having it zero makes code smaller: function old new delta done_word 719 707 -12 parse_stream 2546 2531 -15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-08hush: small optimization in run_listDenys Vlasenko
I thought gcc can detect this itself. It doesn't. function old new delta run_list 1030 1021 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-08hush: deindent large block of code, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-08hush: simplify insert_bg_jobsDenys Vlasenko
function old new delta insert_bg_job 366 281 -85 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-08hush: make "wait %1" less likely to play with signal maskDenys Vlasenko
Was playing with "sleep 3 | exit 3 & wait %1" and noticed that often SIGCHLD arrives even before I get to signal masking. Can avoid it in this case. function old new delta wait_for_child_or_signal 228 265 +37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-08hush: rework "wait %jobspec" to work in non-interactive shells tooDenys Vlasenko
Also add tests. wait5.tests so far fails (but works for ash and dash). function old new delta builtin_wait 305 283 -22 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-07hush: "wait $!; echo $?" should return 127 if $! already exitedDenys Vlasenko
It would be nice to provide bash-like "remember las exitcode" thingy, but it's a bit complex. For now, match ash and dash. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-07hush: implement "wait %jobspec"Denys Vlasenko
function old new delta parse_jobspec - 83 +83 job_exited_or_stopped - 79 +79 builtin_wait 236 302 +66 wait_for_child_or_signal 199 228 +29 checkjobs 142 158 +16 builtin_jobs 59 68 +9 process_wait_result 453 408 -45 builtin_fg_bg 272 203 -69 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 4/2 up/down: 282/-114) Total: 168 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-07hush: factor out %jobspec parsingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-07hush: comment fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-07hush: do not allow sh -c '{ echo boo }'Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-04cpio: add ownership (-R) test casesAaro Koskinen
Add ownership (-R) test cases. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-04hush: case logic for setting $? was still wrongDenys Vlasenko
Resetting to 0 should happen in "esac". Matched branch must still see previous $?. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-04hush: non-matching "case" statement sets $? to 0Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-04hush: allow { cmd } to not be terminated by semicolon in some casesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-04ash: fix "duplicate local" code (forgot to re-enable interrupts)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-04comment and readme updatesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-03su: expand help; simplify passing of -c CMD to run_shell()Denys Vlasenko
Also, added a comment about bug 9401 (TIOCSTI input injection). function old new delta packed_usage 30909 30932 +23 su_main 470 487 +17 sulogin_main 260 258 -2 run_applet_and_exit 681 678 -3 run_shell 166 126 -40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-03loadfont: 32k size limit is not enoughDenys Vlasenko
Since our "read to malloced buf" routines only gradually grow allocations, let's be generous here and allow 128k. Reported by Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-03ash: while (!got_sig) pause() is not reliable, use sigsuspend()Denys Vlasenko
dash was doing it for a reason. Unfortunately, it had no comment why... now I know. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-31man: remove -Tascii from nroff invocationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-31man: make width selection more thorough; explain how to override itDenys Vlasenko
Fedora's "man CMD >file" still uses terminal width, not 80 (but disables formatting), this change mimics that. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-30man: allow nroff and tbl commands be overridden; unmangle writing to filesDenys Vlasenko
Parse this in config files: DEFINE col ... DEFINE tbl ... DEFINE nroff ... Add width options to nroff command line. Use "tbl", not "gtbl", as default tbl command. Export GROFF_NO_SGR=1 and use "col -b -p -x" instead of pager when writing to file. function old new delta man_main 735 863 +128 if_redefined - 64 +64 show_manpage 199 169 -30 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 192/-30) Total: 162 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-30ash: if using libc glob(), skip it if no metachars are in wordDenys Vlasenko
This saves making tons of pointless stat() calls function old new delta expandarg 888 921 +33 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-30ash: fix bit-rotten debug infrastructureDenys Vlasenko
DEBUG = 2 output was a bit messed up Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-30ash: make popfile() anfter popallfiles() safeDenys Vlasenko
In this example: ash -c 'readonly x; echo $(command eval x=2)' evalstring() is called after forkchild(), which calls popallfiles(). On exception, evalstring() will popfile(). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-10-28hush: fix "(sleep 1; exit 3) & sleep 2; echo $?; wait $!; echo $?"Denys Vlasenko
"wait $!" may be just a bit too late: backgrounded $! is gone. Do not bomb out in this case. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>