Commit Graph

5 Commits

Author SHA1 Message Date
Denys Vlasenko
25d9b91d94 shell/read: check that variable names are sane
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>
2010-01-13 18:22:35 +01:00
Denys Vlasenko
03d81ef43a builtin_read: note about better implementation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-13 14:53:49 +01:00
Denys Vlasenko
03dad22f8a hush: use ash's read builtin
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>
2010-01-12 23:29:57 +01:00
Denys Vlasenko
045f4ad92c shell/read: fix "'read' without parameters" bash compat thingy
previous change:

function                                             old     new   delta
builtin_read                                          82    1074    +992
popstring                                            134     140      +6
readcmd                                             1034     148    -886
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 998/-886)          Total: 112 bytes

this change:

builtin_read                                        1074    1096     +22
static.arg_REPLY                                       8       -      -8
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 22/-8)              Total: 14 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 22:12:10 +01:00
Denys Vlasenko
7306727d1b shell: split read builtin from ash
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 22:11:24 +01:00