aboutsummaryrefslogtreecommitdiff
path: root/shell
Commit message (Collapse)AuthorAgeFilesLines
* randomconfig fixesGravatar Denys Vlasenko2010-07-051-5/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: introduce and use xfork() and xvfork()Gravatar Pascal Bellard2010-07-041-11/+4
| | | | | | | | | | | | | | | | function old new delta launch_helper 170 169 -1 setup_heredoc 312 302 -10 handle_dir_common 367 354 -13 expand_vars_to_list 2456 2443 -13 open_transformer 89 74 -15 data_extract_to_command 439 423 -16 do_ipaddr 1406 1389 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85) Total: -85 bytes Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use BB_EXECVP_or_die()Gravatar Pascal Bellard2010-07-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta BB_EXECVP_or_die - 47 +47 time_main 1042 1043 +1 chrt_main 371 364 -7 ionice_main 292 282 -10 setsid_main 69 56 -13 nohup_main 236 223 -13 cttyhack_main 266 253 -13 chroot_main 94 81 -13 chpst_main 746 733 -13 timeout_main 297 279 -18 taskset_main 541 522 -19 vfork_child 67 45 -22 parse 975 953 -22 lpd_main 770 748 -22 launch_helper 192 170 -22 tcpudpsvd_main 1810 1782 -28 nice_main 190 156 -34 env_main 242 206 -36 run_command 221 174 -47 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/17 up/down: 48/-352) Total: -304 bytes Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix obscure case of replacing + globbing + backslashesGravatar Denys Vlasenko2010-06-263-21/+52
| | | | | | | | | | | | | | | function old new delta subevalvar 1152 1178 +26 readtoken1 3267 3275 +8 redirect 1284 1286 +2 expandarg 957 958 +1 expdir 4 - -4 evalcommand 1219 1209 -10 expmeta 481 469 -12 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 4/2 up/down: 37/-26) Total: 11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: do not rebuild ash and hush on any change to any .c fileGravatar Denys Vlasenko2010-06-262-6/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: <> redir should not truncateGravatar Andreas Bühmann2010-06-243-1/+7
| | | | | Signed-off-by: Andreas Bühmann <buehmann@users.berlios.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* A few minor portability improvementsGravatar Dan Fandrich2010-06-191-1/+1
| | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: times builtin: use unsigned type; take free-of-charge moduloGravatar Denys Vlasenko2010-06-181-4/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: stop defining _GNU_SOURCE in source files, it's in CFLAGS anywayGravatar Denys Vlasenko2010-06-181-6/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix unset in standalone modeGravatar Denys Vlasenko2010-06-183-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: cosmetics, no code changesGravatar Denys Vlasenko2010-06-181-23/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add INSERTs to *.src files where appropriateGravatar Denys Vlasenko2010-06-082-0/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bbconfig: make it independent from printf functionsGravatar Denys Vlasenko2010-06-071-1/+1
| | | | | | | | | | | | | | function old new delta full_write2_str - 25 +25 full_write1_str - 25 +25 clear_main 21 20 -1 telnet_main 1488 1477 -11 getty_main 1932 1918 -14 full_write22_str 25 - -25 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 0/3 up/down: 50/-51) Total: -1 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixGravatar Denys Vlasenko2010-06-071-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix allnoconfigGravatar Denys Vlasenko2010-06-061-52/+55
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix a few goofs uncovered by "make allnoconfig" testingGravatar Denys Vlasenko2010-06-061-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove defconfig. Now "make defconfig" simply uses defaults from Config.inGravatar Denys Vlasenko2010-06-061-24/+24
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mass renaming Kbuild -> Kbuild.src, Config.in -> Config.srcGravatar Denys Vlasenko2010-06-042-0/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: rename parsefile->fd to ->pf_fdGravatar Denys Vlasenko2010-06-031-15/+15
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix redirection of fd 0 in scripts are sourced from interactive ashGravatar Denys Vlasenko2010-06-033-13/+28
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: better string sharingGravatar Denys Vlasenko2010-06-021-8/+6
| | | | | | | | text data bss dec hex filename 849427 441 7556 857424 d1550 busybox_old 849355 441 7556 857352 d1508 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: remove one redundant function, improve string sharing, better field namesGravatar Denys Vlasenko2010-06-021-55/+57
| | | | | | | | | | | | | | | function old new delta var_end - 15 +15 changepath 194 192 -2 setvareq 222 218 -4 lookupvar 57 51 -6 bltinlookup 57 51 -6 evalfun 452 443 -9 varequal 14 - -14 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/5 up/down: 15/-41) Total: -26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shell: consolidate builtin_foo.? into shell_common.?; delete obsolete shellsGravatar Denys Vlasenko2010-05-2311-7436/+442
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: trivial code shrinkGravatar Denys Vlasenko2010-05-221-20/+21
| | | | | | | function old new delta static_get 26 22 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: reduce #ifdef forest a bit, rename handle_dollar -> parse_dollarGravatar Denys Vlasenko2010-05-221-25/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix hush -c 'echo $0' - was showing empty stringGravatar Denys Vlasenko2010-05-221-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix segfault in ${?:N:M}Gravatar Denys Vlasenko2010-05-225-37/+78
| | | | | | | | | | | function old new delta expand_vars_to_list 2374 2409 +35 builtin_umask 132 133 +1 builtin_exit 47 48 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 37/0) Total: 37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix "hush -c 'echo $#'" showing -1Gravatar Denys Vlasenko2010-05-223-2/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: support ${var:EXPR:EXPR}!Gravatar Denys Vlasenko2010-05-223-86/+152
| | | | | | | | | | | | | function old new delta handle_dollar 574 681 +107 expand_and_evaluate_arith - 77 +77 expand_vars_to_list 2302 2374 +72 add_till_closing_bracket 359 368 +9 builtin_exit 48 47 -1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/1 up/down: 265/-1) Total: 264 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix a nommu todo in recent commitsGravatar Denys Vlasenko2010-05-221-25/+37
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix more obscure ${var%...} casesGravatar Denys Vlasenko2010-05-225-24/+45
| | | | | | | | function old new delta add_till_closing_paren 313 359 +46 builtin_exit 48 47 -1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix a=abc; c=c; echo ${a%${c}}Gravatar Denys Vlasenko2010-05-214-60/+75
| | | | | | | | | | | function old new delta expand_vars_to_list 2229 2302 +73 add_till_closing_paren 286 313 +27 handle_dollar 623 574 -49 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 100/-49) Total: 51 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: handle expansions in ${var?expanded_word} constructsGravatar Denys Vlasenko2010-05-213-15/+62
| | | | | | | function old new delta expand_vars_to_list 2209 2229 +20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: reorganized TODO comment at topGravatar Denys Vlasenko2010-05-211-14/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: add a list of unsupported builtinsGravatar Denys Vlasenko2010-05-211-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: handle ${var:NUM:} tooGravatar Denys Vlasenko2010-05-213-2/+32
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: remove extra comparison from prev commitGravatar Denys Vlasenko2010-05-211-4/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: optional support for ${var:N:M} bashismGravatar Denys Vlasenko2010-05-213-39/+120
| | | | | | | | function old new delta expand_vars_to_list 1999 2183 +184 handle_dollar 682 623 -59 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: explain various parameter expansion ops in commentsGravatar Denys Vlasenko2010-05-201-8/+36
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: small code shrinkGravatar Denys Vlasenko2010-05-201-7/+6
| | | | | | | function old new delta expand_vars_to_list 2012 1999 -13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: shrink variable expansion codeGravatar Denys Vlasenko2010-05-201-20/+19
| | | | | | | function old new delta expand_vars_to_list 2164 2012 -152 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix var=`exit 2` not setting $? to 2Gravatar Denys Vlasenko2010-05-203-5/+59
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* update shell/READMEGravatar Denys Vlasenko2010-05-201-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: eliminate 16 bytes in bssGravatar Denys Vlasenko2010-05-201-26/+22
| | | | | | | | text data bss dec hexfilename 841423 441 7572 849436 cf61cbusybox_old 841430 441 7556 849427 cf613busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: code shrinkGravatar Denys Vlasenko2010-05-201-1/+1
| | | | | | | | text data bss dec hex filename 843121 453 6828 850402 cf9e2 busybox_old 843108 453 6828 850389 cf9d5 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: support "cd -- DIR" and suchGravatar Denys Vlasenko2010-05-201-14/+32
| | | | | | | | | | | | | | | | | function old new delta skip_dash_dash - 33 +33 builtin_exit 43 48 +5 builtin_umask 121 125 +4 builtin_shift 115 119 +4 builtin_cd 71 75 +4 builtin_wait 271 274 +3 builtin_source 171 174 +3 builtin_exec 57 60 +3 builtin_eval 46 45 -1 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 7/1 up/down: 59/-1) Total: 58 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shell: make it possible to alias one of shells to "bash"Gravatar Denys Vlasenko2010-05-201-10/+33
| | | | | | | | | | | | | function old new delta packed_usage 27047 27054 +7 applet_names 2227 2232 +5 applet_main 1304 1308 +4 applet_nameofs 652 654 +2 applet_install_loc 163 164 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 19/0) Total: 19 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix var_leak.tests so that it actually catches the NOFORK bugGravatar Denys Vlasenko2010-05-183-9/+21
| | | | | | + document the bug better Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixGravatar Denys Vlasenko2010-05-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix bug which causes signal6.tests to failGravatar Denys Vlasenko2010-05-182-8/+15
| | | | | | | | function old new delta trapcmd 271 277 +6 localcmd 277 275 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>