aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* ash: document where we accept invalid syntax. no code changesDenys Vlasenko2009-10-041-1/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: code shrinkDenys Vlasenko2009-10-041-11/+9
| | | | | | | function old new delta ulimitcmd 489 415 -74 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: share stringDenys Vlasenko2009-09-291-4/+5
| | | | | | | | | | | | | function old new delta optschanged 133 139 +6 hush_main 997 982 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 6/-15) Total: -9 bytes text data bss dec hexfilename 823160 445 7668 831273 caf29busybox_old 823102 445 7668 831215 caeefbusybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/lineedit: fix the case when we configured history to have 0 linesDenys Vlasenko2009-09-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: make trap output short signal names, without SIG prefixDenys Vlasenko2009-09-271-3/+6
| | | | | | | | | function old new delta evalvar 1373 1371 -2 builtin_trap 457 441 -16 trapcmd 260 236 -24 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: better comment. no code changesDenys Vlasenko2009-09-251-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: even smaller `trap` codeDenys Vlasenko2009-09-251-4/+7
| | | | | | | | function old new delta evalvar 1371 1373 +2 trapcmd 347 260 -87 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: slightly better (more correct) code for "trap hack"Denys Vlasenko2009-09-251-4/+4
| | | | | | | | | function old new delta changepath 194 195 +1 evalvar 1373 1371 -2 forkchild 602 590 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: better handling of EXIT trap in `trap` hackDenys Vlasenko2009-09-251-5/+18
| | | | | | | | | | | | | | function old new delta forkchild - 602 +602 trapcmd 255 347 +92 ash_main 1362 1375 +13 evalvar 1371 1373 +2 popstring 140 134 -6 forkshell 835 248 -587 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/2 up/down: 709/-593) Total: 116 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: do not let EXIT trap to fire in `trap`Denys Vlasenko2009-09-241-1/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: fix trap reporting: s/SIGEXIT/EXIT/Denys Vlasenko2009-09-241-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: more portability fixes by Dan FandrichDenys Vlasenko2009-09-231-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: optimize code size in strtoul callsDenys Vlasenko2009-09-231-1/+1
| | | | | | | | | | | | function old new delta bb_parse_mode 433 431 -2 rtnl_rtntype_a2n 202 198 -4 ParseField 511 498 -13 bb_init_module_24 4730 4675 -55 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-74) Total: -74 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix `trap`Denys Vlasenko2009-09-231-3/+54
| | | | | | | | | | | | function old new delta forkshell 738 810 +72 popstring 134 140 +6 parse_command 1460 1463 +3 evalvar 1373 1371 -2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 81/-2) Total: 79 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix bug 585 (>"$VAR_WITH_UNICODE_CHARS" problem)Denys Vlasenko2009-09-161-2/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: preparatory cleanup. The only real changes are (unsigned char) castsDenys Vlasenko2009-09-161-50/+55
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: export PWDDenys Vlasenko2009-09-051-2/+2
| | | | | | | | | | | | | function old new delta set_pwd_var - 36 +36 hush_main 941 951 +10 evalvar 1365 1363 -2 ash_main 1364 1362 -2 builtin_cd 75 72 -3 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/3 up/down: 46/-7) Total: 39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: better comment. no code changesDenys Vlasenko2009-08-301-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: revent one place where number() doesn't workDenys Vlasenko2009-08-301-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: deal with some TODOs (mostly trivial)Denys Vlasenko2009-08-291-63/+55
| | | | | | | | | | | | function old new delta msg_illnum - 19 +19 evalvar 1365 1364 -1 illnum 19 - -19 subevalvar 1182 1158 -24 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 19/-44) Total: -25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix handling of Unicode chars in redirects. Fixes bug 585Denys Vlasenko2009-08-291-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: trivial simplifications and optimizationsDenys Vlasenko2009-08-291-19/+20
| | | | | | | | | | | | function old new delta rmescapes - 256 +256 memtodest 94 103 +9 evalvar 1363 1365 +2 _rmescapes 256 - -256 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 2/0 up/down: 267/-256) Total: 11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: make "jobs -l" more similar to bash. By Earl Chew. Fixes bug 481Denys Vlasenko2009-08-231-25/+31
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix bug 571 (jobs %string misbehaving)Denys Vlasenko2009-08-171-5/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: further fixes to debug machinery (closes bug 485)Denys Vlasenko2009-07-241-6/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: make "jobs" work even in subshellsDenys Vlasenko2009-07-241-2/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fix debug machinery a bitDenys Vlasenko2009-07-231-12/+18
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: fixes in debug printoutsDenys Vlasenko2009-07-111-8/+9
| | | | | Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>