diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index c7deffd08..31dc59253 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -1884,7 +1884,7 @@ getoptsreset(const char *value) | |||
1884 | * Return of a legal variable name (a letter or underscore followed by zero or | 1884 | * Return of a legal variable name (a letter or underscore followed by zero or |
1885 | * more letters, underscores, and digits). | 1885 | * more letters, underscores, and digits). |
1886 | */ | 1886 | */ |
1887 | static char * | 1887 | static char* FAST_FUNC |
1888 | endofname(const char *name) | 1888 | endofname(const char *name) |
1889 | { | 1889 | { |
1890 | char *p; | 1890 | char *p; |
@@ -1991,7 +1991,7 @@ findvar(struct var **vpp, const char *name) | |||
1991 | /* | 1991 | /* |
1992 | * Find the value of a variable. Returns NULL if not set. | 1992 | * Find the value of a variable. Returns NULL if not set. |
1993 | */ | 1993 | */ |
1994 | static const char * | 1994 | static const char* FAST_FUNC |
1995 | lookupvar(const char *name) | 1995 | lookupvar(const char *name) |
1996 | { | 1996 | { |
1997 | struct var *v; | 1997 | struct var *v; |
@@ -2114,6 +2114,12 @@ setvar(const char *name, const char *val, int flags) | |||
2114 | INT_ON; | 2114 | INT_ON; |
2115 | } | 2115 | } |
2116 | 2116 | ||
2117 | static void FAST_FUNC | ||
2118 | setvar2(const char *name, const char *val) | ||
2119 | { | ||
2120 | setvar(name, val, 0); | ||
2121 | } | ||
2122 | |||
2117 | #if ENABLE_ASH_GETOPTS | 2123 | #if ENABLE_ASH_GETOPTS |
2118 | /* | 2124 | /* |
2119 | * Safe version of setvar, returns 1 on success 0 on failure. | 2125 | * Safe version of setvar, returns 1 on success 0 on failure. |
@@ -5304,7 +5310,7 @@ ash_arith(const char *s) | |||
5304 | int errcode = 0; | 5310 | int errcode = 0; |
5305 | 5311 | ||
5306 | math_hooks.lookupvar = lookupvar; | 5312 | math_hooks.lookupvar = lookupvar; |
5307 | math_hooks.setvar = setvar; | 5313 | math_hooks.setvar = setvar2; |
5308 | math_hooks.endofname = endofname; | 5314 | math_hooks.endofname = endofname; |
5309 | 5315 | ||
5310 | INT_OFF; | 5316 | INT_OFF; |
@@ -12526,7 +12532,7 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
12526 | } | 12532 | } |
12527 | } | 12533 | } |
12528 | 12534 | ||
12529 | r = builtin_read(setvar, | 12535 | r = shell_builtin_read(setvar2, |
12530 | argptr, | 12536 | argptr, |
12531 | bltinlookup("IFS"), /* can be NULL */ | 12537 | bltinlookup("IFS"), /* can be NULL */ |
12532 | read_flags, | 12538 | read_flags, |