oweals/busybox.git
15 years agohush: strip NULs from file input, they are PITA/impossible to handle correctly
Denis Vlasenko [Sun, 5 Apr 2009 22:17:04 +0000 (22:17 -0000)]
hush: strip NULs from file input, they are PITA/impossible to handle correctly

function                                             old     new   delta
file_peek                                             89      93      +4
file_get                                             260     264      +4

15 years agodrop HUSH_VER_STR since it has no relevance anymore -- just use BB_VER
Mike Frysinger [Sun, 5 Apr 2009 21:19:43 +0000 (21:19 -0000)]
drop HUSH_VER_STR since it has no relevance anymore -- just use BB_VER

15 years agohush: fix trap clearing in subshells on MMU; simplify NOMMU a bit:
Denis Vlasenko [Sun, 5 Apr 2009 20:33:27 +0000 (20:33 -0000)]
hush: fix trap clearing in subshells on MMU; simplify NOMMU a bit:

function                                             old     new   delta
parse_stream_dquoted                                 335     324     -11
handle_dollar                                        849     800     -49
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-60)             Total: -60 bytes

15 years agohush: audit and fix "interactive shell" setup code.
Denis Vlasenko [Sun, 5 Apr 2009 19:13:39 +0000 (19:13 -0000)]
hush: audit and fix "interactive shell" setup code.

function                                             old     new   delta
block_signals                                          -     139    +139
maybe_set_to_sigexit                                   -      47     +47
run_list                                            2018    2030     +12
expand_variables                                    2155    2165     +10
maybe_set_sighandler                                  47       -     -47
hush_main                                            992     918     -74
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/1 up/down: 208/-121)           Total: 87 bytes

15 years agohush: pass $! thru re-execution; try harder on re-exec; give error
Denis Vlasenko [Sun, 5 Apr 2009 10:39:03 +0000 (10:39 -0000)]
hush: pass $! thru re-execution; try harder on re-exec; give error
 msg if re-exec didn't work; other tweaks in main()

function                                             old     new   delta
hush_main                                           1144    1199     +55
re_execute_shell                                     237     286     +49
file_get                                             240     260     +20
clean_up_after_re_execute                             58      66      +8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 132/0)             Total: 132 bytes

15 years agohush: suppress bogus warning from 4.2.1
Denis Vlasenko [Sun, 5 Apr 2009 09:16:00 +0000 (09:16 -0000)]
hush: suppress bogus warning from 4.2.1

15 years agobuild system tweaks to account for latest hush changes
Denis Vlasenko [Sun, 5 Apr 2009 09:02:11 +0000 (09:02 -0000)]
build system tweaks to account for latest hush changes

15 years agohush: randomconfig fixes
Denis Vlasenko [Sun, 5 Apr 2009 08:43:57 +0000 (08:43 -0000)]
hush: randomconfig fixes

15 years agohush: plug the leak on NOMMU re-execute path
Denis Vlasenko [Sun, 5 Apr 2009 07:38:48 +0000 (07:38 -0000)]
hush: plug the leak on NOMMU re-execute path

function                                             old     new   delta
clean_up_after_re_execute                              -      58     +58
re_execute_shell                                     226     244     +18
run_pipe                                            1271    1276      +5
generate_stream_from_string                          133     138      +5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 86/0)               Total: 86 bytes

15 years agofixing mode on hush-leak/leak_argv1.tests
Denis Vlasenko [Sun, 5 Apr 2009 02:14:59 +0000 (02:14 -0000)]
fixing mode on hush-leak/leak_argv1.tests

15 years agofixing mode on hush-leak/leak_argv1.tests
Denis Vlasenko [Sun, 5 Apr 2009 02:14:37 +0000 (02:14 -0000)]
fixing mode on hush-leak/leak_argv1.tests

15 years agohush: fix passing of $n on NOMMU
Denis Vlasenko [Sun, 5 Apr 2009 02:10:39 +0000 (02:10 -0000)]
hush: fix passing of $n on NOMMU

15 years agohush: fix hush-misc/break5.tests NOMMU failure
Denis Vlasenko [Sun, 5 Apr 2009 01:46:59 +0000 (01:46 -0000)]
hush: fix hush-misc/break5.tests NOMMU failure

function                                             old     new   delta
hush_main                                           1118    1144     +26
re_execute_shell                                     188     204     +16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 42/0)               Total: 42 bytes

15 years agohush: fix all testsuite failures on NOMMU except memory leak.
Denis Vlasenko [Sun, 5 Apr 2009 01:42:59 +0000 (01:42 -0000)]
hush: fix all testsuite failures on NOMMU except memory leak.
 known TODOs: we do not pass traps and positional args yet.

15 years agohush: enable NOMMU re-execution logic. Some testsuite entries
Denis Vlasenko [Sat, 4 Apr 2009 23:15:14 +0000 (23:15 -0000)]
hush: enable NOMMU re-execution logic. Some testsuite entries
 fail on NOMMU. Before it was much worse.
 No regressions on MMU, size:

function                                             old     new   delta
handle_dollar                                        626     632      +6
run_list                                            2018    2022      +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 10/0)               Total: 10 bytes

15 years agohush: preparatory patch for NOMMU-safe { list } handling.
Denis Vlasenko [Sat, 4 Apr 2009 22:47:50 +0000 (22:47 -0000)]
hush: preparatory patch for NOMMU-safe { list } handling.

function                                             old     new   delta
o_addblock                                             -      58     +58
o_addstr_with_NUL                                      -      27     +27
builtin_exit                                          47      49      +2
run_list                                            2020    2018      -2
o_addstrauto                                          27       -     -27
parse_stream                                        1508    1461     -47
o_addstr                                              58       -     -58
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 1/2 up/down: 87/-134)           Total: -47 bytes

15 years agoftpd: s/CONFIG_BUSYBOX_EXEC_PATH/bb_busybox_exec_path/
Denis Vlasenko [Sat, 4 Apr 2009 20:34:22 +0000 (20:34 -0000)]
ftpd: s/CONFIG_BUSYBOX_EXEC_PATH/bb_busybox_exec_path/

15 years agohush: fix NOMMU hangs in pseudo_exec_argv. Add forgotted setting
Denis Vlasenko [Sat, 4 Apr 2009 20:24:37 +0000 (20:24 -0000)]
hush: fix NOMMU hangs in pseudo_exec_argv. Add forgotted setting
 of signal mask. Reuse same help string in all shells.

function                                             old     new   delta
builtin_exit                                          49      47      -2
pseudo_exec_argv                                     149     145      -4
builtin_help                                          74      63     -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-17)             Total: -17 bytes
   text    data     bss     dec     hex filename
 825379     476    7616  833471   cb7bf busybox_old
 825341     476    7616  833433   cb799 busybox_unstripped

15 years agohush: fix "var=val >file" not creating file
Denis Vlasenko [Sat, 4 Apr 2009 19:29:21 +0000 (19:29 -0000)]
hush: fix "var=val >file" not creating file

function                                             old     new   delta
static.null_ptr                                        -       4      +4
run_list                                            2018    2020      +2
handle_dollar                                        667     626     -41
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 6/-41)             Total: -35 bytes

15 years agohush: remove code which errors out on $- and $_, it's useless;
Denis Vlasenko [Sat, 4 Apr 2009 15:24:40 +0000 (15:24 -0000)]
hush: remove code which errors out on $- and $_, it's useless;
 wrap some longish lines

function                                             old     new   delta
handle_dollar                                        667     626     -41

15 years agohush: remove CHAR_xxx constants
Denis Vlasenko [Sat, 4 Apr 2009 12:15:42 +0000 (12:15 -0000)]
hush: remove CHAR_xxx constants

15 years agohush: get rid of charmap[]
Denis Vlasenko [Sat, 4 Apr 2009 12:12:58 +0000 (12:12 -0000)]
hush: get rid of charmap[]

function                                             old     new   delta
parse_stream                                        1447    1508     +61
get_local_var_value                                    -      31     +31
run_list                                            2018    2020      +2
pseudo_exec_argv                                     151     149      -2
maybe_set_sighandler                                  50      47      -3
hush_exit                                             93      90      -3
builtin_wait                                         275     272      -3
check_and_run_traps                                  169     164      -5
hush_main                                            985     977      -8
file_get                                             260     240     -20
builtin_trap                                         438     414     -24
set_in_charmap                                        30       -     -30
lookup_param                                          31       -     -31
parse_and_run_stream                                 153      54     -99
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/9 up/down: 94/-228)          Total: -134 bytes

15 years agosimplify maybe_die() slightly
Mike Frysinger [Fri, 3 Apr 2009 22:48:10 +0000 (22:48 -0000)]
simplify maybe_die() slightly

15 years agohush: finally make `cmd` safe on NOMMU
Denis Vlasenko [Fri, 3 Apr 2009 22:31:18 +0000 (22:31 -0000)]
hush: finally make `cmd` safe on NOMMU

function                                             old     new   delta
generate_stream_from_string                            -     157    +157
expand_variables                                    2050    2003     -47
generate_stream_from_list                            139       -    -139
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 157/-186)          Total: -29 bytes

15 years agohush: yet another randomconfig fix
Denis Vlasenko [Fri, 3 Apr 2009 21:16:45 +0000 (21:16 -0000)]
hush: yet another randomconfig fix

15 years agoshell/math: randomconfig fix
Denis Vlasenko [Fri, 3 Apr 2009 21:13:31 +0000 (21:13 -0000)]
shell/math: randomconfig fix

15 years agohush: randomconfig fixes
Denis Vlasenko [Fri, 3 Apr 2009 19:14:32 +0000 (19:14 -0000)]
hush: randomconfig fixes

15 years agohush: improve parse_stream: does not require parsing context struct;
Denis Vlasenko [Fri, 3 Apr 2009 16:49:04 +0000 (16:49 -0000)]
hush: improve parse_stream: does not require parsing context struct;
 cleans up on syntax errors (we used to leak memory in this case);
 much simplified interface to the rest of hush.

function                                             old     new   delta
parse_stream                                        1204    1447    +243
done_word                                            658     669     +11
static_get                                            22      28      +6
builtin_source                                        84      89      +5
parse_and_run_file                                    27      30      +3
parse_and_run_string                                  31      27      -4
builtin_eval                                          55      50      -5
hush_main                                            991     985      -6
free_pipe_list                                        39      31      -8
free_pipe                                            210     189     -21
expand_variables                                    2242    2199     -43
parse_and_run_stream                                 289     153    -136
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/7 up/down: 268/-223)           Total: 45 bytes

15 years agohush: simplify parse_stream
Denis Vlasenko [Fri, 3 Apr 2009 03:45:05 +0000 (03:45 -0000)]
hush: simplify parse_stream

function                                             old     new   delta
parse_and_run_stream                                 292     289      -3
parse_stream                                        1218    1204     -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-17)             Total: -17 bytes

15 years agohush: fix bug with local environment vars in pipes; simplify parse_stream()
Denis Vlasenko [Fri, 3 Apr 2009 03:19:15 +0000 (03:19 -0000)]
hush: fix bug with local environment vars in pipes; simplify parse_stream()

function                                             old     new   delta
parse_stream                                        1238    1218     -20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-20)             Total: -20 bytes

15 years agohush: explain parsing context structure
Denis Vlasenko [Fri, 3 Apr 2009 00:07:05 +0000 (00:07 -0000)]
hush: explain parsing context structure
 plug leak in setup_redirect on error path

function                                             old     new   delta
done_command                                          84      86      +2
done_word                                            657     658      +1
done_pipe                                            105     106      +1
initialize_context                                    39      38      -1
setup_redirect                                       219     212      -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 4/-8)               Total: -4 bytes

15 years agohush: straighten parse_stream() API a bit
Denis Vlasenko [Thu, 2 Apr 2009 22:50:40 +0000 (22:50 -0000)]
hush: straighten parse_stream() API a bit

function                                             old     new   delta
parse_stream                                        1240    1238      -2
expand_variables                                    2272    2242     -30
parse_and_run_stream                                 338     292     -46
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-78)             Total: -78 bytes

15 years agotrim trailing slashes from specified subdir so we output to the right place
Mike Frysinger [Thu, 2 Apr 2009 22:46:52 +0000 (22:46 -0000)]
trim trailing slashes from specified subdir so we output to the right place

15 years agohush: rename ->o_quote to ->o_escape
Denis Vlasenko [Thu, 2 Apr 2009 20:17:49 +0000 (20:17 -0000)]
hush: rename ->o_quote to ->o_escape
hush_test/hush-arith/*: new tests for arithmetic evaluation

15 years agoArithmetic Expansion is supported now in hush, so drop from TODO
Mike Frysinger [Thu, 2 Apr 2009 17:06:35 +0000 (17:06 -0000)]
Arithmetic Expansion is supported now in hush, so drop from TODO

15 years agohush: do not inadvertently parse $((1 + "22")) as ok.
Denis Vlasenko [Thu, 2 Apr 2009 16:55:38 +0000 (16:55 -0000)]
hush: do not inadvertently parse $((1 + "22")) as ok.
 -20 bytes code size

15 years agohush: make
Denis Vlasenko [Thu, 2 Apr 2009 16:31:29 +0000 (16:31 -0000)]
hush: make
 a=55; echo $(($a + 1)) $((1 + $((2)) + `echo $a`))
 work as expected

function                                             old     new   delta
handle_dollar                                          -     667    +667
parse_stream_dquoted                                   -     316    +316
expand_variables                                    2124    2272    +148
is_assignment                                        134     215     +81
parse_stream                                        2038    1240    -798
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/1 up/down: 1212/-798)         Total: 414 bytes

15 years agoshells: do not need to have math state global
Denis Vlasenko [Thu, 2 Apr 2009 13:46:27 +0000 (13:46 -0000)]
shells: do not need to have math state global

function                                             old     new   delta
ash_arith                                              -     143    +143
expand_variables                                    2102    2124     +22
popstring                                            134     140      +6
parse_command                                       1460    1463      +3
trapcmd                                              236     238      +2
changepath                                           197     196      -1
raise_interrupt                                       86      83      -3
hush_main                                           1012     991     -21
ash_main                                            1388    1364     -24
arith_set_local_var                                   73      34     -39
dash_arith                                           117       -    -117
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 4/5 up/down: 176/-205)          Total: -29 bytes

15 years agofix ash-alias/alias.tests failure
Denis Vlasenko [Thu, 2 Apr 2009 12:57:38 +0000 (12:57 -0000)]
fix ash-alias/alias.tests failure

15 years agosplit math code out of ash and into a standalone library so we can use it in any...
Mike Frysinger [Thu, 2 Apr 2009 10:02:37 +0000 (10:02 -0000)]
split math code out of ash and into a standalone library so we can use it in any shell (like hush!)

15 years agomore of pointless whitespace fixes
Denis Vlasenko [Wed, 1 Apr 2009 19:48:05 +0000 (19:48 -0000)]
more of pointless whitespace fixes

15 years agodhcpd: remember and record hostnames; optimize get_option
Denis Vlasenko [Wed, 1 Apr 2009 12:36:09 +0000 (12:36 -0000)]
dhcpd: remember and record hostnames; optimize get_option
dumpleases: show hostnames

function                                             old     new   delta
add_lease                                            230     292     +62
send_offer                                           403     421     +18
send_ACK                                             232     249     +17
read_leases                                          249     258      +9
dumpleases_main                                      604     609      +5
nobody_responds_to_arp                                84      86      +2
udhcp_end_option                                      32      30      -2
udhcp_get_option                                     222     171     -51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/2 up/down: 113/-53)            Total: 60 bytes

15 years agotrailing whitespace removal
Denis Vlasenko [Wed, 1 Apr 2009 11:24:04 +0000 (11:24 -0000)]
trailing whitespace removal

15 years agosendmail: update by Vladimir
Denis Vlasenko [Tue, 31 Mar 2009 23:41:53 +0000 (23:41 -0000)]
sendmail: update by Vladimir
build system: tweak for rare case where include/autoconf.h
  does not get updated

function                                             old     new   delta
packed_usage                                       26238   26242      +4
sendmail_main                                       1353     897    -456
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-456)           Total: -452 bytes

15 years agohust_test/*: use "$THIS_SH" instead of hush
Denis Vlasenko [Tue, 31 Mar 2009 22:14:32 +0000 (22:14 -0000)]
hust_test/*: use "$THIS_SH" instead of hush

15 years agovolumeid: fix bug 249 "findfs finds the wrong partition"
Denis Vlasenko [Tue, 31 Mar 2009 19:47:34 +0000 (19:47 -0000)]
volumeid: fix bug 249 "findfs finds the wrong partition"

15 years agoash: add/improve comments, no code changes
Denis Vlasenko [Tue, 31 Mar 2009 19:36:58 +0000 (19:36 -0000)]
ash: add/improve comments, no code changes

15 years agoash: fix $IFS handling in read. closes bug 235
Denis Vlasenko [Tue, 31 Mar 2009 19:18:17 +0000 (19:18 -0000)]
ash: fix $IFS handling in read. closes bug 235

15 years agohush: fix wait builtin
Denis Vlasenko [Tue, 31 Mar 2009 17:24:49 +0000 (17:24 -0000)]
hush: fix wait builtin

function                                             old     new   delta
builtin_wait                                         174     275    +101
sigwaitinfo                                            -      48     +48
__GI_sigwaitinfo                                       -      48     +48
check_and_run_traps                                  133     169     +36
checkjobs                                            349     380     +31
hush_main                                            971     991     +20
static.zero_timespec                                   -       8      +8
run_list                                            2010    2016      +6
file_get                                             254     260      +6
static.zero_ts                                         8       -      -8
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 6/0 up/down: 304/-8)            Total: 296 bytes

15 years agolibbb: fix typo in comment
Denis Vlasenko [Tue, 31 Mar 2009 13:14:18 +0000 (13:14 -0000)]
libbb: fix typo in comment

15 years agohush: don't lie in comment
Denis Vlasenko [Tue, 31 Mar 2009 13:13:17 +0000 (13:13 -0000)]
hush: don't lie in comment

15 years agohush: fix comments, no code changes
Denis Vlasenko [Tue, 31 Mar 2009 13:05:32 +0000 (13:05 -0000)]
hush: fix comments, no code changes

15 years agohush: make ^C work again, ^Z probably isn't working
Denis Vlasenko [Tue, 31 Mar 2009 12:41:52 +0000 (12:41 -0000)]
hush: make ^C work again, ^Z probably isn't working

function                                             old     new   delta
file_get                                             219     254     +35
check_and_run_traps                                  122     133     +11
run_list                                            2001    2010      +9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 55/0)               Total: 55 bytes

15 years agohush: do not reset sighaldlers after fork - instead, prevent them from doing any...
Denis Vlasenko [Tue, 31 Mar 2009 12:03:40 +0000 (12:03 -0000)]
hush: do not reset sighaldlers after fork - instead, prevent them from doing any harm
 if they will be called. saves many sigaction calls on every fork.

function                                             old     new   delta
hush_main                                            887     971     +84
sigexit                                               54      65     +11
run_list                                            2006    2001      -5
maybe_set_sighandler                                  76      50     -26
set_fatal_sighandler                                 186       -    -186
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/2 up/down: 95/-217)          Total: -122 bytes

15 years agohush: rework signal and trap handling. Some smaller bits are TODO,
Denis Vlasenko [Tue, 31 Mar 2009 11:22:57 +0000 (11:22 -0000)]
hush: rework signal and trap handling. Some smaller bits are TODO,
 expect minor breakage

function                                             old     new   delta
set_fatal_sighandler                                  12     186    +174
check_and_run_traps                                    -     122    +122
maybe_set_sighandler                                   -      76     +76
hush_main                                            831     887     +56
sigtimedwait                                           -      50     +50
__GI_sigtimedwait                                      -      50     +50
hush_exit                                             49      93     +44
set_mode                                             749     777     +28
pseudo_exec_argv                                     131     151     +20
static.zero_ts                                         -       8      +8
expand_variables                                    1962    1970      +8
builtin_wait                                         172     174      +2
set_misc_sighandler                                   12       -     -12
set_jobctrl_sighandler                                12       -     -12
handler_ctrl_c                                        16       -     -16
builtin_set_mode                                      28       -     -28
handle_trap                                           97       -     -97
handler_ctrl_z                                       107       -    -107
builtin_trap                                         545     438    -107
run_list                                            2149    2006    -143
------------------------------------------------------------------------------
(add/remove: 5/6 grow/shrink: 7/2 up/down: 638/-522)          Total: 116 bytes

15 years agoimplement `unset` semantics as required by POSIX
Mike Frysinger [Mon, 30 Mar 2009 06:50:54 +0000 (06:50 -0000)]
implement `unset` semantics as required by POSIX

15 years agofix DOC build output to be like kbuild standard
Mike Frysinger [Mon, 30 Mar 2009 05:26:34 +0000 (05:26 -0000)]
fix DOC build output to be like kbuild standard

15 years agoupdate `trap` poisx link
Mike Frysinger [Mon, 30 Mar 2009 03:50:07 +0000 (03:50 -0000)]
update `trap` poisx link

15 years agodo not automatically display job information when the shell is not interactive
Mike Frysinger [Mon, 30 Mar 2009 00:19:30 +0000 (00:19 -0000)]
do not automatically display job information when the shell is not interactive

15 years agoenable trap tests
Mike Frysinger [Sun, 29 Mar 2009 23:49:46 +0000 (23:49 -0000)]
enable trap tests

15 years agofirst pass at `trap` support in hush
Mike Frysinger [Sun, 29 Mar 2009 23:49:37 +0000 (23:49 -0000)]
first pass at `trap` support in hush

15 years agomodutils: dont pass NULL options to init_module()
Denis Vlasenko [Sun, 29 Mar 2009 17:25:14 +0000 (17:25 -0000)]
modutils: dont pass NULL options to init_module()

15 years agobuild system: hdparm -d is not that dangerous, remove warning
Denis Vlasenko [Sun, 29 Mar 2009 17:13:20 +0000 (17:13 -0000)]
build system: hdparm -d is not that dangerous, remove warning

15 years agosendmail: add more example in usage text
Denis Vlasenko [Sun, 29 Mar 2009 16:53:25 +0000 (16:53 -0000)]
sendmail: add more example in usage text

15 years agomodule loading for 2.4: use fd-based io instead of FILE based;
Denis Vlasenko [Sun, 29 Mar 2009 16:38:59 +0000 (16:38 -0000)]
module loading for 2.4: use fd-based io instead of FILE based;
 use xlseek and xread; simpler check for ELF signature.

   text    data     bss     dec     hex filename
 824460     476    7616  832552   cb428 busybox_old
 824333     476    7616  832425   cb3a9 busybox_unstripped

15 years agoadd test cases for `trap` ... but disabled for now until trap support is committed
Mike Frysinger [Sun, 29 Mar 2009 09:54:40 +0000 (09:54 -0000)]
add test cases for `trap` ... but disabled for now until trap support is committed

15 years agosysctl: move code around to get rid of forward references.
Denis Vlasenko [Sun, 29 Mar 2009 02:23:16 +0000 (02:23 -0000)]
sysctl: move code around to get rid of forward references.
 (incidentally it helps gcc to make code smaller)

15 years agosysctl: fix broken -p [file] - close bug 231
Denis Vlasenko [Sun, 29 Mar 2009 02:22:19 +0000 (02:22 -0000)]
sysctl: fix broken -p [file] - close bug 231

15 years agomark msh as deprecated
Mike Frysinger [Sun, 29 Mar 2009 00:52:41 +0000 (00:52 -0000)]
mark msh as deprecated

15 years agouse bb_strtou() in umask/wait and check errno to see if there was a problem rather...
Mike Frysinger [Sun, 29 Mar 2009 00:50:30 +0000 (00:50 -0000)]
use bb_strtou() in umask/wait and check errno to see if there was a problem rather than using endp

15 years agomake sure we check job status whenever updating the prompt
Mike Frysinger [Sun, 29 Mar 2009 00:45:26 +0000 (00:45 -0000)]
make sure we check job status whenever updating the prompt

15 years agotest for invalid named variables
Mike Frysinger [Sat, 28 Mar 2009 21:06:38 +0000 (21:06 -0000)]
test for invalid named variables

15 years agodo not let handle_dollar() accept vars that start with a digit
Mike Frysinger [Sat, 28 Mar 2009 21:06:22 +0000 (21:06 -0000)]
do not let handle_dollar() accept vars that start with a digit

15 years agoimplement `wait` builtin
Mike Frysinger [Sat, 28 Mar 2009 20:01:58 +0000 (20:01 -0000)]
implement `wait` builtin

15 years agoremove ((expr)) bash'ism
Denis Vlasenko [Sat, 28 Mar 2009 19:31:34 +0000 (19:31 -0000)]
remove ((expr)) bash'ism

15 years agorandomconfig fix
Denis Vlasenko [Sat, 28 Mar 2009 19:22:08 +0000 (19:22 -0000)]
randomconfig fix

15 years agoupdate the normally disabled debug code around the syntax() func to use new maybe_die()
Mike Frysinger [Sat, 28 Mar 2009 19:09:04 +0000 (19:09 -0000)]
update the normally disabled debug code around the syntax() func to use new maybe_die()

15 years agorandomtest fixes
Denis Vlasenko [Sat, 28 Mar 2009 19:08:23 +0000 (19:08 -0000)]
randomtest fixes

15 years agoadd hush tests for parameter expansion
Mike Frysinger [Sat, 28 Mar 2009 18:55:34 +0000 (18:55 -0000)]
add hush tests for parameter expansion

15 years agoimplement most POSIX parameter expansions (~+500bytes)
Mike Frysinger [Sat, 28 Mar 2009 18:55:03 +0000 (18:55 -0000)]
implement most POSIX parameter expansions (~+500bytes)

15 years agomake sure we exit based on test failure rather than always exiting with 0
Mike Frysinger [Sat, 28 Mar 2009 15:43:47 +0000 (15:43 -0000)]
make sure we exit based on test failure rather than always exiting with 0

15 years agosplit up feature todo by posix/bash
Mike Frysinger [Sat, 28 Mar 2009 13:59:26 +0000 (13:59 -0000)]
split up feature todo by posix/bash

15 years agounify `set` handling with command line processing, fixup `set` argv processing so...
Mike Frysinger [Sat, 28 Mar 2009 13:44:51 +0000 (13:44 -0000)]
unify `set` handling with command line processing, fixup `set` argv processing so it doesnt clobber argv when setting options, and barf on unhandled set options

15 years agohandle the "-s" command line option that POSIX requires
Mike Frysinger [Sat, 28 Mar 2009 13:02:11 +0000 (13:02 -0000)]
handle the "-s" command line option that POSIX requires

15 years agorename "-f" (fake) option to "-n" to match POSIX
Mike Frysinger [Sat, 28 Mar 2009 12:57:54 +0000 (12:57 -0000)]
rename "-f" (fake) option to "-n" to match POSIX

15 years agotweak format modifier in debug code to fixup gcc warning
Mike Frysinger [Sat, 28 Mar 2009 12:43:53 +0000 (12:43 -0000)]
tweak format modifier in debug code to fixup gcc warning

15 years agoconvert some of the ENABLE_FEATURE_EDITING from CPP if to C if
Mike Frysinger [Sat, 28 Mar 2009 12:24:44 +0000 (12:24 -0000)]
convert some of the ENABLE_FEATURE_EDITING from CPP if to C if

15 years agostop lying about [[ test support
Mike Frysinger [Sat, 28 Mar 2009 12:21:57 +0000 (12:21 -0000)]
stop lying about [[ test support

15 years agomkfs.vfat: fix a problem with over-estimating FAT size
Denis Vlasenko [Sat, 28 Mar 2009 12:17:20 +0000 (12:17 -0000)]
mkfs.vfat: fix a problem with over-estimating FAT size

15 years agomake lash deprecation more prominent
Mike Frysinger [Sat, 28 Mar 2009 12:12:58 +0000 (12:12 -0000)]
make lash deprecation more prominent

15 years agomkfs.vfat: mkdosfs compat with choosing clyster size
Denis Vlasenko [Sat, 28 Mar 2009 03:22:08 +0000 (03:22 -0000)]
mkfs.vfat: mkdosfs compat with choosing clyster size

15 years agomkfs.vfat: more of pointless tweaking
Denis Vlasenko [Sat, 28 Mar 2009 02:28:58 +0000 (02:28 -0000)]
mkfs.vfat: more of pointless tweaking

15 years agomkfs.vfat: small tweak to comments
Denis Vlasenko [Sat, 28 Mar 2009 02:18:49 +0000 (02:18 -0000)]
mkfs.vfat: small tweak to comments

15 years agomkdosfs (aka mkfs.vfat): new applet by Vladimir
Denis Vlasenko [Sat, 28 Mar 2009 02:13:01 +0000 (02:13 -0000)]
mkdosfs (aka mkfs.vfat): new applet by Vladimir

   text    data     bss     dec     hex filename
 821202     476    7616  829294   ca76e busybox_old
 823577     476    7616  831669   cb0b5 busybox_unstripped

15 years agols: warning fix
Denis Vlasenko [Fri, 27 Mar 2009 17:22:00 +0000 (17:22 -0000)]
ls: warning fix
rm: accept and ignore -v (verbose)

15 years agotail: fix tail +N syntax not working. Closes bug 221.
Denis Vlasenko [Fri, 27 Mar 2009 02:36:02 +0000 (02:36 -0000)]
tail: fix tail +N syntax not working. Closes bug 221.

15 years agoenable most job functions on no-mmu systems
Mike Frysinger [Thu, 26 Mar 2009 18:14:16 +0000 (18:14 -0000)]
enable most job functions on no-mmu systems

15 years agotftp: when we infer local name from remote (-r [/]path/path/file),
Denis Vlasenko [Wed, 25 Mar 2009 03:55:53 +0000 (03:55 -0000)]
tftp: when we infer local name from remote (-r [/]path/path/file),
 strip path. This mimics wget and is generally more intuitive.

15 years agodo not make startup banner depend on job support
Mike Frysinger [Mon, 23 Mar 2009 08:44:02 +0000 (08:44 -0000)]
do not make startup banner depend on job support

15 years agolibbb: revent previous version of "concurrent history updating"
Denis Vlasenko [Mon, 23 Mar 2009 06:33:37 +0000 (06:33 -0000)]
libbb: revent previous version of "concurrent history updating"
and replace it with one which does not "snoop" history written
by others. (1) it is what bug 185 needs, and (2) it is less bloaty:

function                                             old     new   delta
load_history                                           -     252    +252
read_line_input                                     3155    3287    +132
next_token                                           914     918      +4
qrealloc                                              36      33      -3
getoptscmd                                           713     708      -5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/2 up/down: 388/-8)            Total: 380 bytes