summaryrefslogtreecommitdiff
path: root/shell/ash.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | win32: ash: openredirect(): support /dev/nullNguyễn Thái Ngọc Duy2010-09-101-0/+25
| |
* | win32: ash: copyfd(): work around fcntl(F_DUPFD)Nguyễn Thái Ngọc Duy2010-09-101-0/+12
| |
* | win32: ash: stay away from fcntl(F_DUPFD)Nguyễn Thái Ngọc Duy2010-09-101-2/+2
| |
* | win32: ash: new implementation for updatepwd()Nguyễn Thái Ngọc Duy2010-09-101-0/+93
| |
* | win32: ash: path_advance(): save space for .exe laterNguyễn Thái Ngọc Duy2010-09-101-1/+3
| |
* | win32: ash: path_advance(): support both colon and semicolon as path separatorNguyễn Thái Ngọc Duy2010-09-101-0/+10
| |
* | win32: ash: preadbuffer(): accept \r\n as line endingNguyễn Thái Ngọc Duy2010-09-101-1/+1
| |
* | win32: ash: shellexec(): support both / and \ as dir separatorNguyễn Thái Ngọc Duy2010-09-101-3/+4
| |
* | win32: ash: is_absolute_path()Nguyễn Thái Ngọc Duy2010-09-101-2/+2
| |
* | win32: ash: skip O_APPEND supportNguyễn Thái Ngọc Duy2010-09-101-2/+2
| |
* | win32: ash: exptilde(): do not call (unsupported) getpwnam()Nguyễn Thái Ngọc Duy2010-09-101-0/+2
| |
* | win32: ash: forkshell(): return early, MinGW port will have another way to ↵Nguyễn Thái Ngọc Duy2010-09-101-0/+3
| | | | | | | | "fork"
* | win32: ash: waitcmd(): return early, not supportedNguyễn Thái Ngọc Duy2010-09-101-0/+3
| |
* | win32: ash: setsignal(): return early, signalling is not supportedNguyễn Thái Ngọc Duy2010-09-101-0/+2
| |
* | win32: ash: #ifdefNguyễn Thái Ngọc Duy2010-09-101-0/+11
|/
* ash: line up builtin table. no code changesDenys Vlasenko2010-03-261-45/+45
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: trap with bad signal name should not abortDenys Vlasenko2010-03-261-4/+10
| | | | | | | function old new delta trapcmd 236 271 +35 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: make it possible to build them individuallyDenys Vlasenko2010-03-231-4/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix quadratic matching slowdown is ${v/*foo*/repl} (really bad one)Denys Vlasenko2010-03-131-12/+59
| | | | | | | | | | | | | | | | | It is especially bad with patterns starting with "*". With ASH_OPTIMIZE_FOR_SIZE=y, only those are optimized, +few bytes: text data bss dec hex filename 836337 441 7564 844342 ce236 busybox_old 836341 441 7564 844346 ce23a busybox_unstripped With ASH_OPTIMIZE_FOR_SIZE off, we also optimize patterns _ending_ with "*", which costs about 80 bytes: text data bss dec hex filename 836656 441 7564 844661 ce375 busybox_old 836732 441 7564 844737 ce3c1 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: use ash's ulimit builtin; make it more more bash0like while at itDenys Vlasenko2010-03-061-211/+3
| | | | | | | | | | | | | | | | | | | Based on a patch by Tobias Klauser <tklauser@distanz.ch> function old new delta shell_builtin_ulimit - 498 +498 limits_tbl 33 88 +55 ulimit_opt_string - 38 +38 bltins1 288 300 +12 limits_name 127 - -127 ulimitcmd 415 7 -408 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 2/1 up/down: 603/-535) Total: 68 bytes text data bss dec hex filename 839229 453 6828 846510 ceaae busybox_old 839423 453 6828 846704 ceb70 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: use NULL for null pointersDenys Vlasenko2010-03-051-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Replace __uClinux__ define with !BB_MMUDenys Vlasenko2010-02-211-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix bug 1087. Fix by Leonid (lly.dev AT gmail.com)Denys Vlasenko2010-02-211-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shell/read: check that variable names are saneDenys Vlasenko2010-01-131-4/+0
| | | | | | | | | | function old new delta shell_builtin_read 1000 1055 +55 parse_command 1460 1463 +3 builtin_umask 121 123 +2 is_well_formed_var_name 73 66 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: use ash's read builtinDenys Vlasenko2010-01-121-4/+10
| | | | | | | | | | | | | | | | | function old new delta shell_builtin_read - 1000 +1000 set_local_var_from_halves - 24 +24 setvar2 - 7 +7 ... popstring 140 134 -6 ash_main 1375 1368 -7 setvar 184 174 -10 arith_set_local_var 36 - -36 builtin_read 1096 185 -911 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 5/23 up/down: 1038/-1007) Total: 31 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shell: split read builtin from ashDenys Vlasenko2010-01-121-199/+35
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use monotonic_msDenys Vlasenko2010-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* ash: fix for read $IFS splitting. Closes bug 235Denys Vlasenko2010-01-081-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix mishandling of bash-style redirectsChris Metcalf2010-01-081-1/+1
| | | | | Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: trivial optimization -6 bytesDenys Vlasenko2009-12-101-3/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix double comma in initializerDenys Vlasenko2009-12-051-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: implement set -o pipefail (conditional on bash compat). +39 bytesMichael Abbott2009-12-041-3/+21
| | | | | Signed-off-by: Michael Abbott <michael@araneidae.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: preparatory work for pipefail and code shrink. -44 bytesDenys Vlasenko2009-12-041-64/+65
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: re-enable SIGHUP on entry. Closes bug 771.Denys Vlasenko2009-12-041-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: straighten up a bit of code in varvalue()Denys Vlasenko2009-11-301-13/+18
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: more cosmetics and cleanupsDenys Vlasenko2009-11-291-48/+35
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: cosmetics, no code changesDenys Vlasenko2009-11-291-3/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: remove last "signed char"; make SIT() clearer. -12 bytesDenys Vlasenko2009-11-291-81/+54
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: randmconfig fixDenys Vlasenko2009-11-291-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: remake strange signed char machinery to be unsigned. -57 bytesDenys Vlasenko2009-11-281-387/+378
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: introduce and use ffulsh_all()Denys Vlasenko2009-11-021-13/+4
| | | | | | | | | | | | | | | | | | | | 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>
* randomconfig fixesDenys Vlasenko2009-10-191-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: fix $RANDOM in children being repeatedDenys Vlasenko2009-10-121-13/+4
| | | | | | | | | | | | | | | | 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>
* ash: use bbox wrappers for malloc etc instead of homegrown onesDenys Vlasenko2009-10-111-34/+44
| | | | | | | | | | | | | 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>
* ash: trivial shrink by using smaller intDenys Vlasenko2009-10-111-2/+2
| | | | | | | | | | | 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>
* ash: factor out $RANDOM supportDenys Vlasenko2009-10-091-28/+18
| | | | | | | | | | | function old new delta next_random - 46 +46 ash_main 1361 1356 -5 change_random 132 97 -35 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 46/-40) Total: 6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: a few more NOINLINEsDenys Vlasenko2009-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta print_linkinfo - 815 +815 do_msg - 783 +783 INET_setroute - 757 +757 varvalue - 746 +746 do_sem - 637 +637 inflate_codes - 617 +617 INET6_setroute - 491 +491 edir - 370 +370 sync_cursor - 298 +298 update_utmp - 246 +246 searchLines - 165 +165 setup_alarm - 144 +144 may_wakeup - 101 +101 getNum 566 371 -195 refresh 1166 848 -318 rtcwake_main 809 479 -330 getty_main 2396 1921 -475 chpst_main 1373 746 -627 inflate_unzip_internal 1335 567 -768 evalvar 1384 612 -772 ipaddr_list_or_flush 2160 1246 -914 route_main 1585 245 -1340 ipcs_main 2523 1049 -1474 ------------------------------------------------------------------------------ (add/remove: 13/0 grow/shrink: 0/10 up/down: 6170/-7213) Total: -1043 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: compile breakage fixDenys Vlasenko2009-10-081-6/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: use {i,u}toa() where appropriateDenys Vlasenko2009-10-061-3/+1
| | | | | | | | | | | function old new delta startservice 377 363 -14 setari_u 54 40 -14 ash_main 1375 1361 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-42) Total: -42 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: error out on ${#1#}, ${#$11}, ${#11#}Cristian Ionescu-Idbohrn2009-10-051-0/+2
| | | | | Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>