aboutsummaryrefslogtreecommitdiff
path: root/shell
AgeCommit message (Collapse)Author
2010-01-12hush: fix potential buffer overflow on NOMMUDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12hush: fix subshell.tests failure on NOMMUDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12hush: two NOMMU fixes for bugs 877 and 883Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12libbb: introduce and use monotonic_msDenys Vlasenko
function old new delta monotonic_ms - 60 +60 process_stdin 433 443 +10 display_speed 85 90 +5 nmeter_main 672 674 +2 builtin_type 114 116 +2 bb__parsespent 117 119 +2 ifplugd_main 1110 1109 -1 acpid_main 441 440 -1 chat_main 1361 1359 -2 doCommands 2458 2449 -9 arpping 466 450 -16 run_command 268 234 -34 readcmd 1072 1034 -38 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 5/7 up/down: 81/-101) Total: -20 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12hush: plug a memory leakDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-08ash: fix for read $IFS splitting. Closes bug 235Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-08ash: fix mishandling of bash-style redirectsChris Metcalf
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04*: remove some uses of argcDenys Vlasenko
function old new delta whoami_main 34 37 +3 logname_main 60 63 +3 hostid_main 35 38 +3 ttysize_main 136 135 -1 nmeter_main 673 672 -1 logger_main 387 386 -1 uuencode_main 330 328 -2 ifupdown_main 2125 2123 -2 mesg_main 158 155 -3 free_main 333 330 -3 cal_main 902 899 -3 acpid_main 443 440 -3 ar_main 196 189 -7 find_main 476 467 -9 ifconfig_main 1235 1221 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/12 up/down: 9/-49) Total: -40 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04hush: fix exitcodes of killed processesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-10ash: trivial optimization -6 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-05ash: fix double comma in initializerDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-04ash: implement set -o pipefail (conditional on bash compat). +39 bytesMichael Abbott
Signed-off-by: Michael Abbott <michael@araneidae.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-04ash: preparatory work for pipefail and code shrink. -44 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-04ash: re-enable SIGHUP on entry. Closes bug 771.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-30ash: straighten up a bit of code in varvalue()Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-29ash: more cosmetics and cleanupsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-29ash: cosmetics, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-29ash: remove last "signed char"; make SIT() clearer. -12 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-29ash: randmconfig fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-28ash: remake strange signed char machinery to be unsigned. -57 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-27ntpd: make it NOMMU-safe; ash: exclude it on NOMMU buildsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-20fix fallout from isprint() changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-17hush: improve HUSH_BRACE_EXP code (still disabled). ~0 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-16tweak in commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-16hush: initial stab at brace expansion supportDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-16hush: fix handling of words with braces. +65 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-16hush: fix exit code propagation from `cmd`. +45 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15libbb: added xfdopen_for_read/writeDenys Vlasenko
function old new delta xfdopen_helper - 40 +40 logdir_open 1163 1184 +21 process_stdin 433 443 +10 xfdopen_for_write - 9 +9 doCommands 2465 2474 +9 patch_main 1214 1222 +8 bbunpack 457 465 +8 xfdopen_for_read - 7 +7 scan_tree 258 262 +4 xstrtoul_range_sfx 230 231 +1 sendmail_main 957 955 -2 passwd_main 1027 1023 -4 parse 969 964 -5 test_main 253 247 -6 sed_main 655 649 -6 dos2unix_main 437 429 -8 fbsplash_main 950 938 -12 handle_dir_common 371 354 -17 expand_vars_to_list 2197 2169 -28 update_passwd 1275 1246 -29 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 7/10 up/down: 117/-117) Total: 0 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15hush: wait for `cmd` to complete, and immediately store its exitcode in $?Denys Vlasenko
function old new delta expand_vars_to_list 2129 2197 +68 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-06removed SuSv3 doc tarball - potential licensing problemDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02*: introduce and use ffulsh_all()Denys Vlasenko
function old new delta buffer_fill_and_print 179 196 +17 fflush_all - 9 +9 spawn 87 92 +5 rtcwake_main 455 453 -2 ... alarm_intr 93 84 -9 readcmd 1072 1062 -10 bb_ask 345 333 -12 more_main 845 832 -13 flush_stdout_stderr 42 23 -19 xfflush_stdout 27 - -27 flush_stderr 30 - -30 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23*: optimize most of isXXXXX() macrosDenys Vlasenko
text data bss dec hex filename 824164 453 6812 831429 cafc5 busybox_old 823730 453 6812 830995 cae13 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23build failure fix and some cosmeticsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22*: remove last function calls to isspaceDenys Vlasenko
function old new delta xstrtoul_range_sfx 232 231 -1 xstrtoull_range_sfx 295 293 -2 trim 82 80 -2 trim_trailing_spaces_and_print 57 52 -5 isspace 18 - -18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-19hush: fix exec builtin in a better way (+ "glob in exec" bug fixed)Denys Vlasenko
function old new delta execvp_or_die - 50 +50 static.pseudo_null_str 3 - -3 builtin_exec 83 57 -26 pseudo_exec_argv 200 163 -37 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 50/-66) Total: -16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-19hush: use configured max line length, not BUFSIZE from libcDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-19randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-19hush: remove superfluous assignmentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-19hush: make it compile again :/Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-19hush: cosmetics. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-18hush: fix handling of empty argumentsDenys Vlasenko
function old new delta builtin_exec 25 83 +58 parse_stream 2242 2261 +19 run_pipe 1782 1787 +5 static.pseudo_null_str - 3 +3 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 85/0) Total: 85 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-18hush: handle empty execsMike Frysinger
Sometimes variable expansions yield empty strings, and if they happen to be a command someone wants to run like `$foo`, then hush currently segfaults. So handle `` and $(). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-15hush: add a printf builtinMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-15hush: unify handling of builtin appletsMike Frysinger
Saves about 10 bytes for each additional builtin applet. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-12ash,hush: fix $RANDOM in children being repeatedDenys Vlasenko
function old new delta next_random 46 68 +22 forkshell 248 263 +15 expand_vars_to_list 2118 2131 +13 run_pipe 1775 1782 +7 popstring 134 140 +6 builtin_umask 123 121 -2 ash_main 1356 1336 -20 get_local_var_value 125 104 -21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/3 up/down: 63/-43) Total: 20 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-11hush: shrink $RANDOM supportDenys Vlasenko
function old new delta get_local_var_value 104 125 +21 hush_main 1024 983 -41 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-11ash: use bbox wrappers for malloc etc instead of homegrown onesDenys Vlasenko
function old new delta popstring 134 140 +6 ckmalloc 9 - -9 ckstrdup 22 - -22 ckrealloc 24 - -24 ckzalloc 28 - -28 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 1/0 up/down: 6/-83) Total: -77 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-11ash: trivial shrink by using smaller intDenys Vlasenko
function old new delta copynode 197 196 -1 calcsize 127 126 -1 nodesize 54 27 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-29) Total: -29 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-09laguage and copyright date corrections, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-09ash: make one testsuite entry more robustDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>