diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-05 12:06:05 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-05 12:06:05 +0200 |
commit | d5f1b1bbe0a881f66b6bb6951fa54e553002c24d (patch) | |
tree | a3da20d19fa86c77e63c08f01d052b196cb1b192 /shell | |
parent | 8507e1f10927bc6498cf38eb8324a53bde8e0a61 (diff) | |
download | busybox-w32-d5f1b1bbe0a881f66b6bb6951fa54e553002c24d.tar.gz busybox-w32-d5f1b1bbe0a881f66b6bb6951fa54e553002c24d.tar.bz2 busybox-w32-d5f1b1bbe0a881f66b6bb6951fa54e553002c24d.zip |
*: add FAST_FUNC to function ptrs where it makes sense
function old new delta
evalcommand 1195 1209 +14
testcmd - 10 +10
printfcmd - 10 +10
echocmd - 10 +10
func_exec 270 276 +6
echo_dg 104 109 +5
store_nlmsg 85 89 +4
pseudo_exec_argv 195 198 +3
dotcmd 287 290 +3
machtime_stream 29 31 +2
discard_stream 24 26 +2
argstr 1299 1301 +2
killcmd 108 109 +1
evalfor 226 227 +1
daytime_stream 43 44 +1
run_list 2544 2543 -1
lookupvar 62 61 -1
ipaddr_modify 1310 1309 -1
...
parse_stream 2254 2245 -9
evalpipe 356 347 -9
collect_if 210 197 -13
read_opt 869 851 -18
handle_dollar 681 658 -23
print_addrinfo 1342 1303 -39
iterate_on_dir 156 59 -97
print_route 1709 1609 -100
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 12/130 up/down: 74/-767) Total: -693 bytes
text data bss dec hex filename
841748 467 7872 850087 cf8a7 busybox_old
841061 467 7872 849400 cf5f8 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 161 | ||||
-rw-r--r-- | shell/hush.c | 120 |
2 files changed, 141 insertions, 140 deletions
diff --git a/shell/ash.c b/shell/ash.c index b27b2777e..1e7429cb1 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -900,7 +900,7 @@ sharg(union node *arg, FILE *fp) | |||
900 | } | 900 | } |
901 | } | 901 | } |
902 | 902 | ||
903 | static void | 903 | static void FAST_FUNC |
904 | shcmd(union node *cmd, FILE *fp) | 904 | shcmd(union node *cmd, FILE *fp) |
905 | { | 905 | { |
906 | union node *np; | 906 | union node *np; |
@@ -1686,14 +1686,14 @@ freeparam(volatile struct shparam *param) | |||
1686 | } | 1686 | } |
1687 | 1687 | ||
1688 | #if ENABLE_ASH_GETOPTS | 1688 | #if ENABLE_ASH_GETOPTS |
1689 | static void getoptsreset(const char *value); | 1689 | static void FAST_FUNC getoptsreset(const char *value); |
1690 | #endif | 1690 | #endif |
1691 | 1691 | ||
1692 | struct var { | 1692 | struct var { |
1693 | struct var *next; /* next entry in hash list */ | 1693 | struct var *next; /* next entry in hash list */ |
1694 | int flags; /* flags are defined above */ | 1694 | int flags; /* flags are defined above */ |
1695 | const char *text; /* name=value */ | 1695 | const char *text; /* name=value */ |
1696 | void (*func)(const char *); /* function to be called when */ | 1696 | void (*func)(const char *) FAST_FUNC; /* function to be called when */ |
1697 | /* the variable gets set/unset */ | 1697 | /* the variable gets set/unset */ |
1698 | }; | 1698 | }; |
1699 | 1699 | ||
@@ -1745,17 +1745,17 @@ change_lc_ctype(const char *value) | |||
1745 | #endif | 1745 | #endif |
1746 | #if ENABLE_ASH_MAIL | 1746 | #if ENABLE_ASH_MAIL |
1747 | static void chkmail(void); | 1747 | static void chkmail(void); |
1748 | static void changemail(const char *); | 1748 | static void changemail(const char *) FAST_FUNC; |
1749 | #endif | 1749 | #endif |
1750 | static void changepath(const char *); | 1750 | static void changepath(const char *) FAST_FUNC; |
1751 | #if ENABLE_ASH_RANDOM_SUPPORT | 1751 | #if ENABLE_ASH_RANDOM_SUPPORT |
1752 | static void change_random(const char *); | 1752 | static void change_random(const char *) FAST_FUNC; |
1753 | #endif | 1753 | #endif |
1754 | 1754 | ||
1755 | static const struct { | 1755 | static const struct { |
1756 | int flags; | 1756 | int flags; |
1757 | const char *text; | 1757 | const char *text; |
1758 | void (*func)(const char *); | 1758 | void (*func)(const char *) FAST_FUNC; |
1759 | } varinit_data[] = { | 1759 | } varinit_data[] = { |
1760 | #ifdef IFS_BROKEN | 1760 | #ifdef IFS_BROKEN |
1761 | { VSTRFIXED|VTEXTFIXED , defifsvar , NULL }, | 1761 | { VSTRFIXED|VTEXTFIXED , defifsvar , NULL }, |
@@ -1861,7 +1861,7 @@ extern struct globals_var *const ash_ptr_to_globals_var; | |||
1861 | #define is_in_name(c) ((c) == '_' || isalnum((unsigned char)(c))) | 1861 | #define is_in_name(c) ((c) == '_' || isalnum((unsigned char)(c))) |
1862 | 1862 | ||
1863 | #if ENABLE_ASH_GETOPTS | 1863 | #if ENABLE_ASH_GETOPTS |
1864 | static void | 1864 | static void FAST_FUNC |
1865 | getoptsreset(const char *value) | 1865 | getoptsreset(const char *value) |
1866 | { | 1866 | { |
1867 | shellparam.optind = number(value); | 1867 | shellparam.optind = number(value); |
@@ -2492,7 +2492,7 @@ docd(const char *dest, int flags) | |||
2492 | return err; | 2492 | return err; |
2493 | } | 2493 | } |
2494 | 2494 | ||
2495 | static int | 2495 | static int FAST_FUNC |
2496 | cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 2496 | cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
2497 | { | 2497 | { |
2498 | const char *dest; | 2498 | const char *dest; |
@@ -2556,7 +2556,7 @@ cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
2556 | return 0; | 2556 | return 0; |
2557 | } | 2557 | } |
2558 | 2558 | ||
2559 | static int | 2559 | static int FAST_FUNC |
2560 | pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 2560 | pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
2561 | { | 2561 | { |
2562 | int flags; | 2562 | int flags; |
@@ -3161,7 +3161,7 @@ printalias(const struct alias *ap) | |||
3161 | /* | 3161 | /* |
3162 | * TODO - sort output | 3162 | * TODO - sort output |
3163 | */ | 3163 | */ |
3164 | static int | 3164 | static int FAST_FUNC |
3165 | aliascmd(int argc UNUSED_PARAM, char **argv) | 3165 | aliascmd(int argc UNUSED_PARAM, char **argv) |
3166 | { | 3166 | { |
3167 | char *n, *v; | 3167 | char *n, *v; |
@@ -3196,7 +3196,7 @@ aliascmd(int argc UNUSED_PARAM, char **argv) | |||
3196 | return ret; | 3196 | return ret; |
3197 | } | 3197 | } |
3198 | 3198 | ||
3199 | static int | 3199 | static int FAST_FUNC |
3200 | unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 3200 | unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
3201 | { | 3201 | { |
3202 | int i; | 3202 | int i; |
@@ -3680,7 +3680,7 @@ setjobctl(int on) | |||
3680 | doing_jobctl = on; | 3680 | doing_jobctl = on; |
3681 | } | 3681 | } |
3682 | 3682 | ||
3683 | static int | 3683 | static int FAST_FUNC |
3684 | killcmd(int argc, char **argv) | 3684 | killcmd(int argc, char **argv) |
3685 | { | 3685 | { |
3686 | int i = 1; | 3686 | int i = 1; |
@@ -3745,7 +3745,7 @@ restartjob(struct job *jp, int mode) | |||
3745 | return status; | 3745 | return status; |
3746 | } | 3746 | } |
3747 | 3747 | ||
3748 | static int | 3748 | static int FAST_FUNC |
3749 | fg_bgcmd(int argc UNUSED_PARAM, char **argv) | 3749 | fg_bgcmd(int argc UNUSED_PARAM, char **argv) |
3750 | { | 3750 | { |
3751 | struct job *jp; | 3751 | struct job *jp; |
@@ -4000,7 +4000,7 @@ showjobs(FILE *out, int mode) | |||
4000 | } | 4000 | } |
4001 | } | 4001 | } |
4002 | 4002 | ||
4003 | static int | 4003 | static int FAST_FUNC |
4004 | jobscmd(int argc UNUSED_PARAM, char **argv) | 4004 | jobscmd(int argc UNUSED_PARAM, char **argv) |
4005 | { | 4005 | { |
4006 | int mode, m; | 4006 | int mode, m; |
@@ -4053,7 +4053,7 @@ getstatus(struct job *job) | |||
4053 | return retval; | 4053 | return retval; |
4054 | } | 4054 | } |
4055 | 4055 | ||
4056 | static int | 4056 | static int FAST_FUNC |
4057 | waitcmd(int argc UNUSED_PARAM, char **argv) | 4057 | waitcmd(int argc UNUSED_PARAM, char **argv) |
4058 | { | 4058 | { |
4059 | struct job *job; | 4059 | struct job *job; |
@@ -5587,9 +5587,9 @@ struct backcmd { /* result of evalbackcmd */ | |||
5587 | /* These forward decls are needed to use "eval" code for backticks handling: */ | 5587 | /* These forward decls are needed to use "eval" code for backticks handling: */ |
5588 | static uint8_t back_exitstatus; /* exit status of backquoted command */ | 5588 | static uint8_t back_exitstatus; /* exit status of backquoted command */ |
5589 | #define EV_EXIT 01 /* exit after evaluating tree */ | 5589 | #define EV_EXIT 01 /* exit after evaluating tree */ |
5590 | static void evaltree(union node *, int); | 5590 | static void FAST_FUNC evaltree(union node *, int); |
5591 | 5591 | ||
5592 | static void | 5592 | static void FAST_FUNC |
5593 | evalbackcmd(union node *n, struct backcmd *result) | 5593 | evalbackcmd(union node *n, struct backcmd *result) |
5594 | { | 5594 | { |
5595 | int saveherefd; | 5595 | int saveherefd; |
@@ -7018,7 +7018,7 @@ casematch(union node *pattern, char *val) | |||
7018 | 7018 | ||
7019 | struct builtincmd { | 7019 | struct builtincmd { |
7020 | const char *name; | 7020 | const char *name; |
7021 | int (*builtin)(int, char **); | 7021 | int (*builtin)(int, char **) FAST_FUNC; |
7022 | /* unsigned flags; */ | 7022 | /* unsigned flags; */ |
7023 | }; | 7023 | }; |
7024 | #define IS_BUILTIN_SPECIAL(b) ((b)->name[0] & 1) | 7024 | #define IS_BUILTIN_SPECIAL(b) ((b)->name[0] & 1) |
@@ -7312,7 +7312,7 @@ addcmdentry(char *name, struct cmdentry *entry) | |||
7312 | cmdp->rehash = 0; | 7312 | cmdp->rehash = 0; |
7313 | } | 7313 | } |
7314 | 7314 | ||
7315 | static int | 7315 | static int FAST_FUNC |
7316 | hashcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 7316 | hashcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
7317 | { | 7317 | { |
7318 | struct tblentry **pp; | 7318 | struct tblentry **pp; |
@@ -7382,7 +7382,7 @@ hashcd(void) | |||
7382 | * pathval() still returns the old value at this point. | 7382 | * pathval() still returns the old value at this point. |
7383 | * Called with interrupts off. | 7383 | * Called with interrupts off. |
7384 | */ | 7384 | */ |
7385 | static void | 7385 | static void FAST_FUNC |
7386 | changepath(const char *new) | 7386 | changepath(const char *new) |
7387 | { | 7387 | { |
7388 | const char *old; | 7388 | const char *old; |
@@ -7614,7 +7614,7 @@ describe_command(char *command, int describe_command_verbose) | |||
7614 | return 0; | 7614 | return 0; |
7615 | } | 7615 | } |
7616 | 7616 | ||
7617 | static int | 7617 | static int FAST_FUNC |
7618 | typecmd(int argc UNUSED_PARAM, char **argv) | 7618 | typecmd(int argc UNUSED_PARAM, char **argv) |
7619 | { | 7619 | { |
7620 | int i = 1; | 7620 | int i = 1; |
@@ -7633,7 +7633,7 @@ typecmd(int argc UNUSED_PARAM, char **argv) | |||
7633 | } | 7633 | } |
7634 | 7634 | ||
7635 | #if ENABLE_ASH_CMDCMD | 7635 | #if ENABLE_ASH_CMDCMD |
7636 | static int | 7636 | static int FAST_FUNC |
7637 | commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 7637 | commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
7638 | { | 7638 | { |
7639 | int c; | 7639 | int c; |
@@ -8018,13 +8018,13 @@ dotrap(void) | |||
8018 | } | 8018 | } |
8019 | 8019 | ||
8020 | /* forward declarations - evaluation is fairly recursive business... */ | 8020 | /* forward declarations - evaluation is fairly recursive business... */ |
8021 | static void evalloop(union node *, int); | 8021 | static void FAST_FUNC evalloop(union node *, int); |
8022 | static void evalfor(union node *, int); | 8022 | static void FAST_FUNC evalfor(union node *, int); |
8023 | static void evalcase(union node *, int); | 8023 | static void FAST_FUNC evalcase(union node *, int); |
8024 | static void evalsubshell(union node *, int); | 8024 | static void FAST_FUNC evalsubshell(union node *, int); |
8025 | static void expredir(union node *); | 8025 | static void expredir(union node *); |
8026 | static void evalpipe(union node *, int); | 8026 | static void FAST_FUNC evalpipe(union node *, int); |
8027 | static void evalcommand(union node *, int); | 8027 | static void FAST_FUNC evalcommand(union node *, int); |
8028 | static int evalbltin(const struct builtincmd *, int, char **); | 8028 | static int evalbltin(const struct builtincmd *, int, char **); |
8029 | static void prehash(union node *); | 8029 | static void prehash(union node *); |
8030 | 8030 | ||
@@ -8032,13 +8032,13 @@ static void prehash(union node *); | |||
8032 | * Evaluate a parse tree. The value is left in the global variable | 8032 | * Evaluate a parse tree. The value is left in the global variable |
8033 | * exitstatus. | 8033 | * exitstatus. |
8034 | */ | 8034 | */ |
8035 | static void | 8035 | static void FAST_FUNC |
8036 | evaltree(union node *n, int flags) | 8036 | evaltree(union node *n, int flags) |
8037 | { | 8037 | { |
8038 | struct jmploc *volatile savehandler = exception_handler; | 8038 | struct jmploc *volatile savehandler = exception_handler; |
8039 | struct jmploc jmploc; | 8039 | struct jmploc jmploc; |
8040 | int checkexit = 0; | 8040 | int checkexit = 0; |
8041 | void (*evalfn)(union node *, int); | 8041 | void (*evalfn)(union node *, int) FAST_FUNC; |
8042 | int status; | 8042 | int status; |
8043 | int int_level; | 8043 | int int_level; |
8044 | 8044 | ||
@@ -8182,7 +8182,7 @@ static | |||
8182 | #endif | 8182 | #endif |
8183 | void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__)); | 8183 | void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__)); |
8184 | 8184 | ||
8185 | static void | 8185 | static void FAST_FUNC |
8186 | evalloop(union node *n, int flags) | 8186 | evalloop(union node *n, int flags) |
8187 | { | 8187 | { |
8188 | int status; | 8188 | int status; |
@@ -8218,7 +8218,7 @@ evalloop(union node *n, int flags) | |||
8218 | exitstatus = status; | 8218 | exitstatus = status; |
8219 | } | 8219 | } |
8220 | 8220 | ||
8221 | static void | 8221 | static void FAST_FUNC |
8222 | evalfor(union node *n, int flags) | 8222 | evalfor(union node *n, int flags) |
8223 | { | 8223 | { |
8224 | struct arglist arglist; | 8224 | struct arglist arglist; |
@@ -8258,7 +8258,7 @@ evalfor(union node *n, int flags) | |||
8258 | popstackmark(&smark); | 8258 | popstackmark(&smark); |
8259 | } | 8259 | } |
8260 | 8260 | ||
8261 | static void | 8261 | static void FAST_FUNC |
8262 | evalcase(union node *n, int flags) | 8262 | evalcase(union node *n, int flags) |
8263 | { | 8263 | { |
8264 | union node *cp; | 8264 | union node *cp; |
@@ -8288,7 +8288,7 @@ evalcase(union node *n, int flags) | |||
8288 | /* | 8288 | /* |
8289 | * Kick off a subshell to evaluate a tree. | 8289 | * Kick off a subshell to evaluate a tree. |
8290 | */ | 8290 | */ |
8291 | static void | 8291 | static void FAST_FUNC |
8292 | evalsubshell(union node *n, int flags) | 8292 | evalsubshell(union node *n, int flags) |
8293 | { | 8293 | { |
8294 | struct job *jp; | 8294 | struct job *jp; |
@@ -8375,7 +8375,7 @@ expredir(union node *n) | |||
8375 | * of the shell, which make the last process in a pipeline the parent | 8375 | * of the shell, which make the last process in a pipeline the parent |
8376 | * of all the rest.) | 8376 | * of all the rest.) |
8377 | */ | 8377 | */ |
8378 | static void | 8378 | static void FAST_FUNC |
8379 | evalpipe(union node *n, int flags) | 8379 | evalpipe(union node *n, int flags) |
8380 | { | 8380 | { |
8381 | struct job *jp; | 8381 | struct job *jp; |
@@ -8644,7 +8644,7 @@ mklocal(char *name) | |||
8644 | /* | 8644 | /* |
8645 | * The "local" command. | 8645 | * The "local" command. |
8646 | */ | 8646 | */ |
8647 | static int | 8647 | static int FAST_FUNC |
8648 | localcmd(int argc UNUSED_PARAM, char **argv) | 8648 | localcmd(int argc UNUSED_PARAM, char **argv) |
8649 | { | 8649 | { |
8650 | char *name; | 8650 | char *name; |
@@ -8656,19 +8656,19 @@ localcmd(int argc UNUSED_PARAM, char **argv) | |||
8656 | return 0; | 8656 | return 0; |
8657 | } | 8657 | } |
8658 | 8658 | ||
8659 | static int | 8659 | static int FAST_FUNC |
8660 | falsecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 8660 | falsecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
8661 | { | 8661 | { |
8662 | return 1; | 8662 | return 1; |
8663 | } | 8663 | } |
8664 | 8664 | ||
8665 | static int | 8665 | static int FAST_FUNC |
8666 | truecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 8666 | truecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
8667 | { | 8667 | { |
8668 | return 0; | 8668 | return 0; |
8669 | } | 8669 | } |
8670 | 8670 | ||
8671 | static int | 8671 | static int FAST_FUNC |
8672 | execcmd(int argc UNUSED_PARAM, char **argv) | 8672 | execcmd(int argc UNUSED_PARAM, char **argv) |
8673 | { | 8673 | { |
8674 | if (argv[1]) { | 8674 | if (argv[1]) { |
@@ -8683,7 +8683,7 @@ execcmd(int argc UNUSED_PARAM, char **argv) | |||
8683 | /* | 8683 | /* |
8684 | * The return command. | 8684 | * The return command. |
8685 | */ | 8685 | */ |
8686 | static int | 8686 | static int FAST_FUNC |
8687 | returncmd(int argc UNUSED_PARAM, char **argv) | 8687 | returncmd(int argc UNUSED_PARAM, char **argv) |
8688 | { | 8688 | { |
8689 | /* | 8689 | /* |
@@ -8695,28 +8695,28 @@ returncmd(int argc UNUSED_PARAM, char **argv) | |||
8695 | } | 8695 | } |
8696 | 8696 | ||
8697 | /* Forward declarations for builtintab[] */ | 8697 | /* Forward declarations for builtintab[] */ |
8698 | static int breakcmd(int, char **); | 8698 | static int breakcmd(int, char **) FAST_FUNC; |
8699 | static int dotcmd(int, char **); | 8699 | static int dotcmd(int, char **) FAST_FUNC; |
8700 | static int evalcmd(int, char **); | 8700 | static int evalcmd(int, char **) FAST_FUNC; |
8701 | static int exitcmd(int, char **); | 8701 | static int exitcmd(int, char **) FAST_FUNC; |
8702 | static int exportcmd(int, char **); | 8702 | static int exportcmd(int, char **) FAST_FUNC; |
8703 | #if ENABLE_ASH_GETOPTS | 8703 | #if ENABLE_ASH_GETOPTS |
8704 | static int getoptscmd(int, char **); | 8704 | static int getoptscmd(int, char **) FAST_FUNC; |
8705 | #endif | 8705 | #endif |
8706 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET | 8706 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET |
8707 | static int helpcmd(int, char **); | 8707 | static int helpcmd(int, char **) FAST_FUNC; |
8708 | #endif | 8708 | #endif |
8709 | #if ENABLE_SH_MATH_SUPPORT | 8709 | #if ENABLE_SH_MATH_SUPPORT |
8710 | static int letcmd(int, char **); | 8710 | static int letcmd(int, char **) FAST_FUNC; |
8711 | #endif | 8711 | #endif |
8712 | static int readcmd(int, char **); | 8712 | static int readcmd(int, char **) FAST_FUNC; |
8713 | static int setcmd(int, char **); | 8713 | static int setcmd(int, char **) FAST_FUNC; |
8714 | static int shiftcmd(int, char **); | 8714 | static int shiftcmd(int, char **) FAST_FUNC; |
8715 | static int timescmd(int, char **); | 8715 | static int timescmd(int, char **) FAST_FUNC; |
8716 | static int trapcmd(int, char **); | 8716 | static int trapcmd(int, char **) FAST_FUNC; |
8717 | static int umaskcmd(int, char **); | 8717 | static int umaskcmd(int, char **) FAST_FUNC; |
8718 | static int unsetcmd(int, char **); | 8718 | static int unsetcmd(int, char **) FAST_FUNC; |
8719 | static int ulimitcmd(int, char **); | 8719 | static int ulimitcmd(int, char **) FAST_FUNC; |
8720 | 8720 | ||
8721 | #define BUILTIN_NOSPEC "0" | 8721 | #define BUILTIN_NOSPEC "0" |
8722 | #define BUILTIN_SPECIAL "1" | 8722 | #define BUILTIN_SPECIAL "1" |
@@ -8739,9 +8739,10 @@ static int ulimitcmd(int, char **); | |||
8739 | * Apart from the above, [[ expr ]] should work as [ expr ] | 8739 | * Apart from the above, [[ expr ]] should work as [ expr ] |
8740 | */ | 8740 | */ |
8741 | 8741 | ||
8742 | #define echocmd echo_main | 8742 | /* Stubs for calling non-FAST_FUNC's */ |
8743 | #define printfcmd printf_main | 8743 | static int FAST_FUNC echocmd(int argc, char **argv) { return echo_main(argc, argv); } |
8744 | #define testcmd test_main | 8744 | static int FAST_FUNC printfcmd(int argc, char **argv) { return printf_main(argc, argv); } |
8745 | static int FAST_FUNC testcmd(int argc, char **argv) { return test_main(argc, argv); } | ||
8745 | 8746 | ||
8746 | /* Keep these in proper order since it is searched via bsearch() */ | 8747 | /* Keep these in proper order since it is searched via bsearch() */ |
8747 | static const struct builtincmd builtintab[] = { | 8748 | static const struct builtincmd builtintab[] = { |
@@ -8864,14 +8865,14 @@ isassignment(const char *p) | |||
8864 | return 0; | 8865 | return 0; |
8865 | return *q == '='; | 8866 | return *q == '='; |
8866 | } | 8867 | } |
8867 | static int | 8868 | static int FAST_FUNC |
8868 | bltincmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 8869 | bltincmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
8869 | { | 8870 | { |
8870 | /* Preserve exitstatus of a previous possible redirection | 8871 | /* Preserve exitstatus of a previous possible redirection |
8871 | * as POSIX mandates */ | 8872 | * as POSIX mandates */ |
8872 | return back_exitstatus; | 8873 | return back_exitstatus; |
8873 | } | 8874 | } |
8874 | static void | 8875 | static void FAST_FUNC |
8875 | evalcommand(union node *cmd, int flags) | 8876 | evalcommand(union node *cmd, int flags) |
8876 | { | 8877 | { |
8877 | static const struct builtincmd null_bltin = { | 8878 | static const struct builtincmd null_bltin = { |
@@ -9189,7 +9190,7 @@ prehash(union node *n) | |||
9189 | * be an error to break out of more loops than exist, but it isn't | 9190 | * be an error to break out of more loops than exist, but it isn't |
9190 | * in the standard shell so we don't make it one here. | 9191 | * in the standard shell so we don't make it one here. |
9191 | */ | 9192 | */ |
9192 | static int | 9193 | static int FAST_FUNC |
9193 | breakcmd(int argc UNUSED_PARAM, char **argv) | 9194 | breakcmd(int argc UNUSED_PARAM, char **argv) |
9194 | { | 9195 | { |
9195 | int n = argv[1] ? number(argv[1]) : 1; | 9196 | int n = argv[1] ? number(argv[1]) : 1; |
@@ -9734,7 +9735,7 @@ chkmail(void) | |||
9734 | popstackmark(&smark); | 9735 | popstackmark(&smark); |
9735 | } | 9736 | } |
9736 | 9737 | ||
9737 | static void | 9738 | static void FAST_FUNC |
9738 | changemail(const char *val UNUSED_PARAM) | 9739 | changemail(const char *val UNUSED_PARAM) |
9739 | { | 9740 | { |
9740 | mail_var_path_changed = 1; | 9741 | mail_var_path_changed = 1; |
@@ -9890,7 +9891,7 @@ options(int cmdline) | |||
9890 | /* | 9891 | /* |
9891 | * The shift builtin command. | 9892 | * The shift builtin command. |
9892 | */ | 9893 | */ |
9893 | static int | 9894 | static int FAST_FUNC |
9894 | shiftcmd(int argc UNUSED_PARAM, char **argv) | 9895 | shiftcmd(int argc UNUSED_PARAM, char **argv) |
9895 | { | 9896 | { |
9896 | int n; | 9897 | int n; |
@@ -9952,7 +9953,7 @@ showvars(const char *sep_prefix, int on, int off) | |||
9952 | /* | 9953 | /* |
9953 | * The set command builtin. | 9954 | * The set command builtin. |
9954 | */ | 9955 | */ |
9955 | static int | 9956 | static int FAST_FUNC |
9956 | setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 9957 | setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
9957 | { | 9958 | { |
9958 | int retval; | 9959 | int retval; |
@@ -9973,7 +9974,7 @@ setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
9973 | } | 9974 | } |
9974 | 9975 | ||
9975 | #if ENABLE_ASH_RANDOM_SUPPORT | 9976 | #if ENABLE_ASH_RANDOM_SUPPORT |
9976 | static void | 9977 | static void FAST_FUNC |
9977 | change_random(const char *value) | 9978 | change_random(const char *value) |
9978 | { | 9979 | { |
9979 | /* Galois LFSR parameter */ | 9980 | /* Galois LFSR parameter */ |
@@ -10103,7 +10104,7 @@ getopts(char *optstr, char *optvar, char **optfirst, int *param_optind, int *opt | |||
10103 | * be processed in the current argument. If shellparam.optnext is NULL, | 10104 | * be processed in the current argument. If shellparam.optnext is NULL, |
10104 | * then it's the first time getopts has been called. | 10105 | * then it's the first time getopts has been called. |
10105 | */ | 10106 | */ |
10106 | static int | 10107 | static int FAST_FUNC |
10107 | getoptscmd(int argc, char **argv) | 10108 | getoptscmd(int argc, char **argv) |
10108 | { | 10109 | { |
10109 | char **optbase; | 10110 | char **optbase; |
@@ -11792,7 +11793,7 @@ evalstring(char *s, int mask) | |||
11792 | /* | 11793 | /* |
11793 | * The eval command. | 11794 | * The eval command. |
11794 | */ | 11795 | */ |
11795 | static int | 11796 | static int FAST_FUNC |
11796 | evalcmd(int argc UNUSED_PARAM, char **argv) | 11797 | evalcmd(int argc UNUSED_PARAM, char **argv) |
11797 | { | 11798 | { |
11798 | char *p; | 11799 | char *p; |
@@ -11917,7 +11918,7 @@ find_dot_file(char *name) | |||
11917 | /* NOTREACHED */ | 11918 | /* NOTREACHED */ |
11918 | } | 11919 | } |
11919 | 11920 | ||
11920 | static int | 11921 | static int FAST_FUNC |
11921 | dotcmd(int argc, char **argv) | 11922 | dotcmd(int argc, char **argv) |
11922 | { | 11923 | { |
11923 | struct strlist *sp; | 11924 | struct strlist *sp; |
@@ -11952,7 +11953,7 @@ dotcmd(int argc, char **argv) | |||
11952 | return status; | 11953 | return status; |
11953 | } | 11954 | } |
11954 | 11955 | ||
11955 | static int | 11956 | static int FAST_FUNC |
11956 | exitcmd(int argc UNUSED_PARAM, char **argv) | 11957 | exitcmd(int argc UNUSED_PARAM, char **argv) |
11957 | { | 11958 | { |
11958 | if (stoppedjobs()) | 11959 | if (stoppedjobs()) |
@@ -12176,7 +12177,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) | |||
12176 | /* | 12177 | /* |
12177 | * The trap builtin. | 12178 | * The trap builtin. |
12178 | */ | 12179 | */ |
12179 | static int | 12180 | static int FAST_FUNC |
12180 | trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 12181 | trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
12181 | { | 12182 | { |
12182 | char *action; | 12183 | char *action; |
@@ -12226,7 +12227,7 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
12226 | /* | 12227 | /* |
12227 | * Lists available builtins | 12228 | * Lists available builtins |
12228 | */ | 12229 | */ |
12229 | static int | 12230 | static int FAST_FUNC |
12230 | helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 12231 | helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
12231 | { | 12232 | { |
12232 | unsigned col; | 12233 | unsigned col; |
@@ -12264,7 +12265,7 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
12264 | /* | 12265 | /* |
12265 | * The export and readonly commands. | 12266 | * The export and readonly commands. |
12266 | */ | 12267 | */ |
12267 | static int | 12268 | static int FAST_FUNC |
12268 | exportcmd(int argc UNUSED_PARAM, char **argv) | 12269 | exportcmd(int argc UNUSED_PARAM, char **argv) |
12269 | { | 12270 | { |
12270 | struct var *vp; | 12271 | struct var *vp; |
@@ -12315,7 +12316,7 @@ unsetfunc(const char *name) | |||
12315 | * variable to allow a function to be unset when there is a readonly variable | 12316 | * variable to allow a function to be unset when there is a readonly variable |
12316 | * with the same name. | 12317 | * with the same name. |
12317 | */ | 12318 | */ |
12318 | static int | 12319 | static int FAST_FUNC |
12319 | unsetcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 12320 | unsetcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
12320 | { | 12321 | { |
12321 | char **ap; | 12322 | char **ap; |
@@ -12353,7 +12354,7 @@ static const unsigned char timescmd_str[] ALIGN1 = { | |||
12353 | 0 | 12354 | 0 |
12354 | }; | 12355 | }; |
12355 | 12356 | ||
12356 | static int | 12357 | static int FAST_FUNC |
12357 | timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 12358 | timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
12358 | { | 12359 | { |
12359 | long clk_tck, s, t; | 12360 | long clk_tck, s, t; |
@@ -12383,7 +12384,7 @@ timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
12383 | * | 12384 | * |
12384 | * Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru> | 12385 | * Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru> |
12385 | */ | 12386 | */ |
12386 | static int | 12387 | static int FAST_FUNC |
12387 | letcmd(int argc UNUSED_PARAM, char **argv) | 12388 | letcmd(int argc UNUSED_PARAM, char **argv) |
12388 | { | 12389 | { |
12389 | arith_t i; | 12390 | arith_t i; |
@@ -12425,7 +12426,7 @@ typedef enum __rlimit_resource rlim_t; | |||
12425 | * -d DELIM End on DELIM char, not newline | 12426 | * -d DELIM End on DELIM char, not newline |
12426 | * -e Use line editing (tty only) | 12427 | * -e Use line editing (tty only) |
12427 | */ | 12428 | */ |
12428 | static int | 12429 | static int FAST_FUNC |
12429 | readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 12430 | readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
12430 | { | 12431 | { |
12431 | static const char *const arg_REPLY[] = { "REPLY", NULL }; | 12432 | static const char *const arg_REPLY[] = { "REPLY", NULL }; |
@@ -12635,7 +12636,7 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
12635 | return status; | 12636 | return status; |
12636 | } | 12637 | } |
12637 | 12638 | ||
12638 | static int | 12639 | static int FAST_FUNC |
12639 | umaskcmd(int argc UNUSED_PARAM, char **argv) | 12640 | umaskcmd(int argc UNUSED_PARAM, char **argv) |
12640 | { | 12641 | { |
12641 | static const char permuser[3] ALIGN1 = "ugo"; | 12642 | static const char permuser[3] ALIGN1 = "ugo"; |
@@ -12811,7 +12812,7 @@ printlim(enum limtype how, const struct rlimit *limit, | |||
12811 | } | 12812 | } |
12812 | } | 12813 | } |
12813 | 12814 | ||
12814 | static int | 12815 | static int FAST_FUNC |
12815 | ulimitcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 12816 | ulimitcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
12816 | { | 12817 | { |
12817 | int c; | 12818 | int c; |
diff --git a/shell/hush.c b/shell/hush.c index a6db16c35..f34fdd402 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -256,8 +256,8 @@ typedef struct in_str { | |||
256 | smallint promptmode; /* 0: PS1, 1: PS2 */ | 256 | smallint promptmode; /* 0: PS1, 1: PS2 */ |
257 | #endif | 257 | #endif |
258 | FILE *file; | 258 | FILE *file; |
259 | int (*get) (struct in_str *); | 259 | int (*get) (struct in_str *) FAST_FUNC; |
260 | int (*peek) (struct in_str *); | 260 | int (*peek) (struct in_str *) FAST_FUNC; |
261 | } in_str; | 261 | } in_str; |
262 | #define i_getch(input) ((input)->get(input)) | 262 | #define i_getch(input) ((input)->get(input)) |
263 | #define i_peek(input) ((input)->peek(input)) | 263 | #define i_peek(input) ((input)->peek(input)) |
@@ -537,43 +537,43 @@ struct globals { | |||
537 | 537 | ||
538 | 538 | ||
539 | /* Function prototypes for builtins */ | 539 | /* Function prototypes for builtins */ |
540 | static int builtin_cd(char **argv); | 540 | static int builtin_cd(char **argv) FAST_FUNC; |
541 | static int builtin_echo(char **argv); | 541 | static int builtin_echo(char **argv) FAST_FUNC; |
542 | static int builtin_eval(char **argv); | 542 | static int builtin_eval(char **argv) FAST_FUNC; |
543 | static int builtin_exec(char **argv); | 543 | static int builtin_exec(char **argv) FAST_FUNC; |
544 | static int builtin_exit(char **argv); | 544 | static int builtin_exit(char **argv) FAST_FUNC; |
545 | static int builtin_export(char **argv); | 545 | static int builtin_export(char **argv) FAST_FUNC; |
546 | #if ENABLE_HUSH_JOB | 546 | #if ENABLE_HUSH_JOB |
547 | static int builtin_fg_bg(char **argv); | 547 | static int builtin_fg_bg(char **argv) FAST_FUNC; |
548 | static int builtin_jobs(char **argv); | 548 | static int builtin_jobs(char **argv) FAST_FUNC; |
549 | #endif | 549 | #endif |
550 | #if ENABLE_HUSH_HELP | 550 | #if ENABLE_HUSH_HELP |
551 | static int builtin_help(char **argv); | 551 | static int builtin_help(char **argv) FAST_FUNC; |
552 | #endif | 552 | #endif |
553 | #if ENABLE_HUSH_LOCAL | 553 | #if ENABLE_HUSH_LOCAL |
554 | static int builtin_local(char **argv); | 554 | static int builtin_local(char **argv) FAST_FUNC; |
555 | #endif | 555 | #endif |
556 | #if HUSH_DEBUG | 556 | #if HUSH_DEBUG |
557 | static int builtin_memleak(char **argv); | 557 | static int builtin_memleak(char **argv) FAST_FUNC; |
558 | #endif | 558 | #endif |
559 | static int builtin_pwd(char **argv); | 559 | static int builtin_pwd(char **argv) FAST_FUNC; |
560 | static int builtin_read(char **argv); | 560 | static int builtin_read(char **argv) FAST_FUNC; |
561 | static int builtin_set(char **argv); | 561 | static int builtin_set(char **argv) FAST_FUNC; |
562 | static int builtin_shift(char **argv); | 562 | static int builtin_shift(char **argv) FAST_FUNC; |
563 | static int builtin_source(char **argv); | 563 | static int builtin_source(char **argv) FAST_FUNC; |
564 | static int builtin_test(char **argv); | 564 | static int builtin_test(char **argv) FAST_FUNC; |
565 | static int builtin_trap(char **argv); | 565 | static int builtin_trap(char **argv) FAST_FUNC; |
566 | static int builtin_type(char **argv); | 566 | static int builtin_type(char **argv) FAST_FUNC; |
567 | static int builtin_true(char **argv); | 567 | static int builtin_true(char **argv) FAST_FUNC; |
568 | static int builtin_umask(char **argv); | 568 | static int builtin_umask(char **argv) FAST_FUNC; |
569 | static int builtin_unset(char **argv); | 569 | static int builtin_unset(char **argv) FAST_FUNC; |
570 | static int builtin_wait(char **argv); | 570 | static int builtin_wait(char **argv) FAST_FUNC; |
571 | #if ENABLE_HUSH_LOOPS | 571 | #if ENABLE_HUSH_LOOPS |
572 | static int builtin_break(char **argv); | 572 | static int builtin_break(char **argv) FAST_FUNC; |
573 | static int builtin_continue(char **argv); | 573 | static int builtin_continue(char **argv) FAST_FUNC; |
574 | #endif | 574 | #endif |
575 | #if ENABLE_HUSH_FUNCTIONS | 575 | #if ENABLE_HUSH_FUNCTIONS |
576 | static int builtin_return(char **argv); | 576 | static int builtin_return(char **argv) FAST_FUNC; |
577 | #endif | 577 | #endif |
578 | 578 | ||
579 | /* Table of built-in functions. They can be forked or not, depending on | 579 | /* Table of built-in functions. They can be forked or not, depending on |
@@ -584,7 +584,7 @@ static int builtin_return(char **argv); | |||
584 | * still be set at the end. */ | 584 | * still be set at the end. */ |
585 | struct built_in_command { | 585 | struct built_in_command { |
586 | const char *cmd; | 586 | const char *cmd; |
587 | int (*function)(char **argv); | 587 | int (*function)(char **argv) FAST_FUNC; |
588 | #if ENABLE_HUSH_HELP | 588 | #if ENABLE_HUSH_HELP |
589 | const char *descr; | 589 | const char *descr; |
590 | # define BLTIN(cmd, func, help) { cmd, func, help } | 590 | # define BLTIN(cmd, func, help) { cmd, func, help } |
@@ -1541,7 +1541,7 @@ static struct variable *set_vars_and_save_old(char **strings) | |||
1541 | /* | 1541 | /* |
1542 | * in_str support | 1542 | * in_str support |
1543 | */ | 1543 | */ |
1544 | static int static_get(struct in_str *i) | 1544 | static int FAST_FUNC static_get(struct in_str *i) |
1545 | { | 1545 | { |
1546 | int ch = *i->p++; | 1546 | int ch = *i->p++; |
1547 | if (ch != '\0') | 1547 | if (ch != '\0') |
@@ -1550,7 +1550,7 @@ static int static_get(struct in_str *i) | |||
1550 | return EOF; | 1550 | return EOF; |
1551 | } | 1551 | } |
1552 | 1552 | ||
1553 | static int static_peek(struct in_str *i) | 1553 | static int FAST_FUNC static_peek(struct in_str *i) |
1554 | { | 1554 | { |
1555 | return *i->p; | 1555 | return *i->p; |
1556 | } | 1556 | } |
@@ -1629,7 +1629,7 @@ static void get_user_input(struct in_str *i) | |||
1629 | 1629 | ||
1630 | /* This is the magic location that prints prompts | 1630 | /* This is the magic location that prints prompts |
1631 | * and gets data back from the user */ | 1631 | * and gets data back from the user */ |
1632 | static int file_get(struct in_str *i) | 1632 | static int FAST_FUNC file_get(struct in_str *i) |
1633 | { | 1633 | { |
1634 | int ch; | 1634 | int ch; |
1635 | 1635 | ||
@@ -1668,7 +1668,7 @@ static int file_get(struct in_str *i) | |||
1668 | /* All callers guarantee this routine will never | 1668 | /* All callers guarantee this routine will never |
1669 | * be used right after a newline, so prompting is not needed. | 1669 | * be used right after a newline, so prompting is not needed. |
1670 | */ | 1670 | */ |
1671 | static int file_peek(struct in_str *i) | 1671 | static int FAST_FUNC file_peek(struct in_str *i) |
1672 | { | 1672 | { |
1673 | int ch; | 1673 | int ch; |
1674 | if (i->p && *i->p) { | 1674 | if (i->p && *i->p) { |
@@ -6560,12 +6560,12 @@ int lash_main(int argc, char **argv) | |||
6560 | /* | 6560 | /* |
6561 | * Built-ins | 6561 | * Built-ins |
6562 | */ | 6562 | */ |
6563 | static int builtin_true(char **argv UNUSED_PARAM) | 6563 | static int FAST_FUNC builtin_true(char **argv UNUSED_PARAM) |
6564 | { | 6564 | { |
6565 | return 0; | 6565 | return 0; |
6566 | } | 6566 | } |
6567 | 6567 | ||
6568 | static int builtin_test(char **argv) | 6568 | static int FAST_FUNC builtin_test(char **argv) |
6569 | { | 6569 | { |
6570 | int argc = 0; | 6570 | int argc = 0; |
6571 | while (*argv) { | 6571 | while (*argv) { |
@@ -6575,7 +6575,7 @@ static int builtin_test(char **argv) | |||
6575 | return test_main(argc, argv - argc); | 6575 | return test_main(argc, argv - argc); |
6576 | } | 6576 | } |
6577 | 6577 | ||
6578 | static int builtin_echo(char **argv) | 6578 | static int FAST_FUNC builtin_echo(char **argv) |
6579 | { | 6579 | { |
6580 | int argc = 0; | 6580 | int argc = 0; |
6581 | while (*argv) { | 6581 | while (*argv) { |
@@ -6585,7 +6585,7 @@ static int builtin_echo(char **argv) | |||
6585 | return echo_main(argc, argv - argc); | 6585 | return echo_main(argc, argv - argc); |
6586 | } | 6586 | } |
6587 | 6587 | ||
6588 | static int builtin_eval(char **argv) | 6588 | static int FAST_FUNC builtin_eval(char **argv) |
6589 | { | 6589 | { |
6590 | int rcode = EXIT_SUCCESS; | 6590 | int rcode = EXIT_SUCCESS; |
6591 | 6591 | ||
@@ -6602,7 +6602,7 @@ static int builtin_eval(char **argv) | |||
6602 | return rcode; | 6602 | return rcode; |
6603 | } | 6603 | } |
6604 | 6604 | ||
6605 | static int builtin_cd(char **argv) | 6605 | static int FAST_FUNC builtin_cd(char **argv) |
6606 | { | 6606 | { |
6607 | const char *newdir = argv[1]; | 6607 | const char *newdir = argv[1]; |
6608 | if (newdir == NULL) { | 6608 | if (newdir == NULL) { |
@@ -6621,7 +6621,7 @@ static int builtin_cd(char **argv) | |||
6621 | return EXIT_SUCCESS; | 6621 | return EXIT_SUCCESS; |
6622 | } | 6622 | } |
6623 | 6623 | ||
6624 | static int builtin_exec(char **argv) | 6624 | static int FAST_FUNC builtin_exec(char **argv) |
6625 | { | 6625 | { |
6626 | if (*++argv == NULL) | 6626 | if (*++argv == NULL) |
6627 | return EXIT_SUCCESS; /* bash does this */ | 6627 | return EXIT_SUCCESS; /* bash does this */ |
@@ -6635,7 +6635,7 @@ static int builtin_exec(char **argv) | |||
6635 | } | 6635 | } |
6636 | } | 6636 | } |
6637 | 6637 | ||
6638 | static int builtin_exit(char **argv) | 6638 | static int FAST_FUNC builtin_exit(char **argv) |
6639 | { | 6639 | { |
6640 | debug_printf_exec("%s()\n", __func__); | 6640 | debug_printf_exec("%s()\n", __func__); |
6641 | 6641 | ||
@@ -6730,7 +6730,7 @@ static void helper_export_local(char **argv, int exp, int lvl) | |||
6730 | } while (*++argv); | 6730 | } while (*++argv); |
6731 | } | 6731 | } |
6732 | 6732 | ||
6733 | static int builtin_export(char **argv) | 6733 | static int FAST_FUNC builtin_export(char **argv) |
6734 | { | 6734 | { |
6735 | unsigned opt_unexport; | 6735 | unsigned opt_unexport; |
6736 | 6736 | ||
@@ -6778,7 +6778,7 @@ static int builtin_export(char **argv) | |||
6778 | } | 6778 | } |
6779 | 6779 | ||
6780 | #if ENABLE_HUSH_LOCAL | 6780 | #if ENABLE_HUSH_LOCAL |
6781 | static int builtin_local(char **argv) | 6781 | static int FAST_FUNC builtin_local(char **argv) |
6782 | { | 6782 | { |
6783 | if (G.func_nest_level == 0) { | 6783 | if (G.func_nest_level == 0) { |
6784 | bb_error_msg("%s: not in a function", argv[0]); | 6784 | bb_error_msg("%s: not in a function", argv[0]); |
@@ -6789,7 +6789,7 @@ static int builtin_local(char **argv) | |||
6789 | } | 6789 | } |
6790 | #endif | 6790 | #endif |
6791 | 6791 | ||
6792 | static int builtin_trap(char **argv) | 6792 | static int FAST_FUNC builtin_trap(char **argv) |
6793 | { | 6793 | { |
6794 | int sig; | 6794 | int sig; |
6795 | char *new_cmd; | 6795 | char *new_cmd; |
@@ -6879,7 +6879,7 @@ static int builtin_trap(char **argv) | |||
6879 | } | 6879 | } |
6880 | 6880 | ||
6881 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/type.html */ | 6881 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/type.html */ |
6882 | static int builtin_type(char **argv) | 6882 | static int FAST_FUNC builtin_type(char **argv) |
6883 | { | 6883 | { |
6884 | int ret = EXIT_SUCCESS; | 6884 | int ret = EXIT_SUCCESS; |
6885 | 6885 | ||
@@ -6913,7 +6913,7 @@ static int builtin_type(char **argv) | |||
6913 | 6913 | ||
6914 | #if ENABLE_HUSH_JOB | 6914 | #if ENABLE_HUSH_JOB |
6915 | /* built-in 'fg' and 'bg' handler */ | 6915 | /* built-in 'fg' and 'bg' handler */ |
6916 | static int builtin_fg_bg(char **argv) | 6916 | static int FAST_FUNC builtin_fg_bg(char **argv) |
6917 | { | 6917 | { |
6918 | int i, jobnum; | 6918 | int i, jobnum; |
6919 | struct pipe *pi; | 6919 | struct pipe *pi; |
@@ -6976,7 +6976,7 @@ static int builtin_fg_bg(char **argv) | |||
6976 | #endif | 6976 | #endif |
6977 | 6977 | ||
6978 | #if ENABLE_HUSH_HELP | 6978 | #if ENABLE_HUSH_HELP |
6979 | static int builtin_help(char **argv UNUSED_PARAM) | 6979 | static int FAST_FUNC builtin_help(char **argv UNUSED_PARAM) |
6980 | { | 6980 | { |
6981 | const struct built_in_command *x; | 6981 | const struct built_in_command *x; |
6982 | 6982 | ||
@@ -6992,7 +6992,7 @@ static int builtin_help(char **argv UNUSED_PARAM) | |||
6992 | #endif | 6992 | #endif |
6993 | 6993 | ||
6994 | #if ENABLE_HUSH_JOB | 6994 | #if ENABLE_HUSH_JOB |
6995 | static int builtin_jobs(char **argv UNUSED_PARAM) | 6995 | static int FAST_FUNC builtin_jobs(char **argv UNUSED_PARAM) |
6996 | { | 6996 | { |
6997 | struct pipe *job; | 6997 | struct pipe *job; |
6998 | const char *status_string; | 6998 | const char *status_string; |
@@ -7010,7 +7010,7 @@ static int builtin_jobs(char **argv UNUSED_PARAM) | |||
7010 | #endif | 7010 | #endif |
7011 | 7011 | ||
7012 | #if HUSH_DEBUG | 7012 | #if HUSH_DEBUG |
7013 | static int builtin_memleak(char **argv UNUSED_PARAM) | 7013 | static int FAST_FUNC builtin_memleak(char **argv UNUSED_PARAM) |
7014 | { | 7014 | { |
7015 | void *p; | 7015 | void *p; |
7016 | unsigned long l; | 7016 | unsigned long l; |
@@ -7039,13 +7039,13 @@ static int builtin_memleak(char **argv UNUSED_PARAM) | |||
7039 | } | 7039 | } |
7040 | #endif | 7040 | #endif |
7041 | 7041 | ||
7042 | static int builtin_pwd(char **argv UNUSED_PARAM) | 7042 | static int FAST_FUNC builtin_pwd(char **argv UNUSED_PARAM) |
7043 | { | 7043 | { |
7044 | puts(set_cwd()); | 7044 | puts(set_cwd()); |
7045 | return EXIT_SUCCESS; | 7045 | return EXIT_SUCCESS; |
7046 | } | 7046 | } |
7047 | 7047 | ||
7048 | static int builtin_read(char **argv) | 7048 | static int FAST_FUNC builtin_read(char **argv) |
7049 | { | 7049 | { |
7050 | char *string; | 7050 | char *string; |
7051 | const char *name = "REPLY"; | 7051 | const char *name = "REPLY"; |
@@ -7088,7 +7088,7 @@ static int builtin_read(char **argv) | |||
7088 | * | 7088 | * |
7089 | * So far, we only support "set -- [argument...]" and some of the short names. | 7089 | * So far, we only support "set -- [argument...]" and some of the short names. |
7090 | */ | 7090 | */ |
7091 | static int builtin_set(char **argv) | 7091 | static int FAST_FUNC builtin_set(char **argv) |
7092 | { | 7092 | { |
7093 | int n; | 7093 | int n; |
7094 | char **pp, **g_argv; | 7094 | char **pp, **g_argv; |
@@ -7147,7 +7147,7 @@ static int builtin_set(char **argv) | |||
7147 | return EXIT_FAILURE; | 7147 | return EXIT_FAILURE; |
7148 | } | 7148 | } |
7149 | 7149 | ||
7150 | static int builtin_shift(char **argv) | 7150 | static int FAST_FUNC builtin_shift(char **argv) |
7151 | { | 7151 | { |
7152 | int n = 1; | 7152 | int n = 1; |
7153 | if (argv[1]) { | 7153 | if (argv[1]) { |
@@ -7167,7 +7167,7 @@ static int builtin_shift(char **argv) | |||
7167 | return EXIT_FAILURE; | 7167 | return EXIT_FAILURE; |
7168 | } | 7168 | } |
7169 | 7169 | ||
7170 | static int builtin_source(char **argv) | 7170 | static int FAST_FUNC builtin_source(char **argv) |
7171 | { | 7171 | { |
7172 | char *arg_path; | 7172 | char *arg_path; |
7173 | FILE *input; | 7173 | FILE *input; |
@@ -7208,7 +7208,7 @@ static int builtin_source(char **argv) | |||
7208 | return G.last_exitcode; | 7208 | return G.last_exitcode; |
7209 | } | 7209 | } |
7210 | 7210 | ||
7211 | static int builtin_umask(char **argv) | 7211 | static int FAST_FUNC builtin_umask(char **argv) |
7212 | { | 7212 | { |
7213 | int rc; | 7213 | int rc; |
7214 | mode_t mask; | 7214 | mode_t mask; |
@@ -7240,7 +7240,7 @@ static int builtin_umask(char **argv) | |||
7240 | } | 7240 | } |
7241 | 7241 | ||
7242 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#unset */ | 7242 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#unset */ |
7243 | static int builtin_unset(char **argv) | 7243 | static int FAST_FUNC builtin_unset(char **argv) |
7244 | { | 7244 | { |
7245 | int ret; | 7245 | int ret; |
7246 | unsigned opts; | 7246 | unsigned opts; |
@@ -7277,7 +7277,7 @@ static int builtin_unset(char **argv) | |||
7277 | } | 7277 | } |
7278 | 7278 | ||
7279 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/wait.html */ | 7279 | /* http://www.opengroup.org/onlinepubs/9699919799/utilities/wait.html */ |
7280 | static int builtin_wait(char **argv) | 7280 | static int FAST_FUNC builtin_wait(char **argv) |
7281 | { | 7281 | { |
7282 | int ret = EXIT_SUCCESS; | 7282 | int ret = EXIT_SUCCESS; |
7283 | int status, sig; | 7283 | int status, sig; |
@@ -7361,7 +7361,7 @@ static unsigned parse_numeric_argv1(char **argv, unsigned def, unsigned def_min) | |||
7361 | #endif | 7361 | #endif |
7362 | 7362 | ||
7363 | #if ENABLE_HUSH_LOOPS | 7363 | #if ENABLE_HUSH_LOOPS |
7364 | static int builtin_break(char **argv) | 7364 | static int FAST_FUNC builtin_break(char **argv) |
7365 | { | 7365 | { |
7366 | unsigned depth; | 7366 | unsigned depth; |
7367 | if (G.depth_of_loop == 0) { | 7367 | if (G.depth_of_loop == 0) { |
@@ -7379,7 +7379,7 @@ static int builtin_break(char **argv) | |||
7379 | return EXIT_SUCCESS; | 7379 | return EXIT_SUCCESS; |
7380 | } | 7380 | } |
7381 | 7381 | ||
7382 | static int builtin_continue(char **argv) | 7382 | static int FAST_FUNC builtin_continue(char **argv) |
7383 | { | 7383 | { |
7384 | G.flag_break_continue = 1; /* BC_CONTINUE = 2 = 1+1 */ | 7384 | G.flag_break_continue = 1; /* BC_CONTINUE = 2 = 1+1 */ |
7385 | return builtin_break(argv); | 7385 | return builtin_break(argv); |
@@ -7387,7 +7387,7 @@ static int builtin_continue(char **argv) | |||
7387 | #endif | 7387 | #endif |
7388 | 7388 | ||
7389 | #if ENABLE_HUSH_FUNCTIONS | 7389 | #if ENABLE_HUSH_FUNCTIONS |
7390 | static int builtin_return(char **argv) | 7390 | static int FAST_FUNC builtin_return(char **argv) |
7391 | { | 7391 | { |
7392 | int rc; | 7392 | int rc; |
7393 | 7393 | ||