aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-05 12:06:05 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-05 12:06:05 +0200
commitd5f1b1bbe0a881f66b6bb6951fa54e553002c24d (patch)
treea3da20d19fa86c77e63c08f01d052b196cb1b192 /shell
parent8507e1f10927bc6498cf38eb8324a53bde8e0a61 (diff)
downloadbusybox-d5f1b1bbe0a881f66b6bb6951fa54e553002c24d.tar.gz
*: 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.c161
-rw-r--r--shell/hush.c120
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)
}
}
-static void
+static void FAST_FUNC
shcmd(union node *cmd, FILE *fp)
{
union node *np;
@@ -1686,14 +1686,14 @@ freeparam(volatile struct shparam *param)
}
#if ENABLE_ASH_GETOPTS
-static void getoptsreset(const char *value);
+static void FAST_FUNC getoptsreset(const char *value);
#endif
struct var {
struct var *next; /* next entry in hash list */
int flags; /* flags are defined above */
const char *text; /* name=value */
- void (*func)(const char *); /* function to be called when */
+ void (*func)(const char *) FAST_FUNC; /* function to be called when */
/* the variable gets set/unset */
};
@@ -1745,17 +1745,17 @@ change_lc_ctype(const char *value)
#endif
#if ENABLE_ASH_MAIL
static void chkmail(void);
-static void changemail(const char *);
+static void changemail(const char *) FAST_FUNC;
#endif
-static void changepath(const char *);
+static void changepath(const char *) FAST_FUNC;
#if ENABLE_ASH_RANDOM_SUPPORT
-static void change_random(const char *);
+static void change_random(const char *) FAST_FUNC;
#endif
static const struct {
int flags;
const char *text;
- void (*func)(const char *);
+ void (*func)(const char *) FAST_FUNC;
} varinit_data[] = {
#ifdef IFS_BROKEN
{ VSTRFIXED|VTEXTFIXED , defifsvar , NULL },
@@ -1861,7 +1861,7 @@ extern struct globals_var *const ash_ptr_to_globals_var;
#define is_in_name(c) ((c) == '_' || isalnum((unsigned char)(c)))
#if ENABLE_ASH_GETOPTS
-static void
+static void FAST_FUNC
getoptsreset(const char *value)
{
shellparam.optind = number(value);
@@ -2492,7 +2492,7 @@ docd(const char *dest, int flags)
return err;
}
-static int
+static int FAST_FUNC
cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
const char *dest;
@@ -2556,7 +2556,7 @@ cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
return 0;
}
-static int
+static int FAST_FUNC
pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int flags;
@@ -3161,7 +3161,7 @@ printalias(const struct alias *ap)
/*
* TODO - sort output
*/
-static int
+static int FAST_FUNC
aliascmd(int argc UNUSED_PARAM, char **argv)
{
char *n, *v;
@@ -3196,7 +3196,7 @@ aliascmd(int argc UNUSED_PARAM, char **argv)
return ret;
}
-static int
+static int FAST_FUNC
unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int i;
@@ -3680,7 +3680,7 @@ setjobctl(int on)
doing_jobctl = on;
}
-static int
+static int FAST_FUNC
killcmd(int argc, char **argv)
{
int i = 1;
@@ -3745,7 +3745,7 @@ restartjob(struct job *jp, int mode)
return status;
}
-static int
+static int FAST_FUNC
fg_bgcmd(int argc UNUSED_PARAM, char **argv)
{
struct job *jp;
@@ -4000,7 +4000,7 @@ showjobs(FILE *out, int mode)
}
}
-static int
+static int FAST_FUNC
jobscmd(int argc UNUSED_PARAM, char **argv)
{
int mode, m;
@@ -4053,7 +4053,7 @@ getstatus(struct job *job)
return retval;
}
-static int
+static int FAST_FUNC
waitcmd(int argc UNUSED_PARAM, char **argv)
{
struct job *job;
@@ -5587,9 +5587,9 @@ struct backcmd { /* result of evalbackcmd */
/* These forward decls are needed to use "eval" code for backticks handling: */
static uint8_t back_exitstatus; /* exit status of backquoted command */
#define EV_EXIT 01 /* exit after evaluating tree */
-static void evaltree(union node *, int);
+static void FAST_FUNC evaltree(union node *, int);
-static void
+static void FAST_FUNC
evalbackcmd(union node *n, struct backcmd *result)
{
int saveherefd;
@@ -7018,7 +7018,7 @@ casematch(union node *pattern, char *val)
struct builtincmd {
const char *name;
- int (*builtin)(int, char **);
+ int (*builtin)(int, char **) FAST_FUNC;
/* unsigned flags; */
};
#define IS_BUILTIN_SPECIAL(b) ((b)->name[0] & 1)
@@ -7312,7 +7312,7 @@ addcmdentry(char *name, struct cmdentry *entry)
cmdp->rehash = 0;
}
-static int
+static int FAST_FUNC
hashcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
struct tblentry **pp;
@@ -7382,7 +7382,7 @@ hashcd(void)
* pathval() still returns the old value at this point.
* Called with interrupts off.
*/
-static void
+static void FAST_FUNC
changepath(const char *new)
{
const char *old;
@@ -7614,7 +7614,7 @@ describe_command(char *command, int describe_command_verbose)
return 0;
}
-static int
+static int FAST_FUNC
typecmd(int argc UNUSED_PARAM, char **argv)
{
int i = 1;
@@ -7633,7 +7633,7 @@ typecmd(int argc UNUSED_PARAM, char **argv)
}
#if ENABLE_ASH_CMDCMD
-static int
+static int FAST_FUNC
commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int c;
@@ -8018,13 +8018,13 @@ dotrap(void)
}
/* forward declarations - evaluation is fairly recursive business... */
-static void evalloop(union node *, int);
-static void evalfor(union node *, int);
-static void evalcase(union node *, int);
-static void evalsubshell(union node *, int);
+static void FAST_FUNC evalloop(union node *, int);
+static void FAST_FUNC evalfor(union node *, int);
+static void FAST_FUNC evalcase(union node *, int);
+static void FAST_FUNC evalsubshell(union node *, int);
static void expredir(union node *);
-static void evalpipe(union node *, int);
-static void evalcommand(union node *, int);
+static void FAST_FUNC evalpipe(union node *, int);
+static void FAST_FUNC evalcommand(union node *, int);
static int evalbltin(const struct builtincmd *, int, char **);
static void prehash(union node *);
@@ -8032,13 +8032,13 @@ static void prehash(union node *);
* Evaluate a parse tree. The value is left in the global variable
* exitstatus.
*/
-static void
+static void FAST_FUNC
evaltree(union node *n, int flags)
{
struct jmploc *volatile savehandler = exception_handler;
struct jmploc jmploc;
int checkexit = 0;
- void (*evalfn)(union node *, int);
+ void (*evalfn)(union node *, int) FAST_FUNC;
int status;
int int_level;
@@ -8182,7 +8182,7 @@ static
#endif
void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__));
-static void
+static void FAST_FUNC
evalloop(union node *n, int flags)
{
int status;
@@ -8218,7 +8218,7 @@ evalloop(union node *n, int flags)
exitstatus = status;
}
-static void
+static void FAST_FUNC
evalfor(union node *n, int flags)
{
struct arglist arglist;
@@ -8258,7 +8258,7 @@ evalfor(union node *n, int flags)
popstackmark(&smark);
}
-static void
+static void FAST_FUNC
evalcase(union node *n, int flags)
{
union node *cp;
@@ -8288,7 +8288,7 @@ evalcase(union node *n, int flags)
/*
* Kick off a subshell to evaluate a tree.
*/
-static void
+static void FAST_FUNC
evalsubshell(union node *n, int flags)
{
struct job *jp;
@@ -8375,7 +8375,7 @@ expredir(union node *n)
* of the shell, which make the last process in a pipeline the parent
* of all the rest.)
*/
-static void
+static void FAST_FUNC
evalpipe(union node *n, int flags)
{
struct job *jp;
@@ -8644,7 +8644,7 @@ mklocal(char *name)
/*
* The "local" command.
*/
-static int
+static int FAST_FUNC
localcmd(int argc UNUSED_PARAM, char **argv)
{
char *name;
@@ -8656,19 +8656,19 @@ localcmd(int argc UNUSED_PARAM, char **argv)
return 0;
}
-static int
+static int FAST_FUNC
falsecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
return 1;
}
-static int
+static int FAST_FUNC
truecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
return 0;
}
-static int
+static int FAST_FUNC
execcmd(int argc UNUSED_PARAM, char **argv)
{
if (argv[1]) {
@@ -8683,7 +8683,7 @@ execcmd(int argc UNUSED_PARAM, char **argv)
/*
* The return command.
*/
-static int
+static int FAST_FUNC
returncmd(int argc UNUSED_PARAM, char **argv)
{
/*
@@ -8695,28 +8695,28 @@ returncmd(int argc UNUSED_PARAM, char **argv)
}
/* Forward declarations for builtintab[] */
-static int breakcmd(int, char **);
-static int dotcmd(int, char **);
-static int evalcmd(int, char **);
-static int exitcmd(int, char **);
-static int exportcmd(int, char **);
+static int breakcmd(int, char **) FAST_FUNC;
+static int dotcmd(int, char **) FAST_FUNC;
+static int evalcmd(int, char **) FAST_FUNC;
+static int exitcmd(int, char **) FAST_FUNC;
+static int exportcmd(int, char **) FAST_FUNC;
#if ENABLE_ASH_GETOPTS
-static int getoptscmd(int, char **);
+static int getoptscmd(int, char **) FAST_FUNC;
#endif
#if !ENABLE_FEATURE_SH_EXTRA_QUIET
-static int helpcmd(int, char **);
+static int helpcmd(int, char **) FAST_FUNC;
#endif
#if ENABLE_SH_MATH_SUPPORT
-static int letcmd(int, char **);
+static int letcmd(int, char **) FAST_FUNC;
#endif
-static int readcmd(int, char **);
-static int setcmd(int, char **);
-static int shiftcmd(int, char **);
-static int timescmd(int, char **);
-static int trapcmd(int, char **);
-static int umaskcmd(int, char **);
-static int unsetcmd(int, char **);
-static int ulimitcmd(int, char **);
+static int readcmd(int, char **) FAST_FUNC;
+static int setcmd(int, char **) FAST_FUNC;
+static int shiftcmd(int, char **) FAST_FUNC;
+static int timescmd(int, char **) FAST_FUNC;
+static int trapcmd(int, char **) FAST_FUNC;
+static int umaskcmd(int, char **) FAST_FUNC;
+static int unsetcmd(int, char **) FAST_FUNC;
+static int ulimitcmd(int, char **) FAST_FUNC;
#define BUILTIN_NOSPEC "0"
#define BUILTIN_SPECIAL "1"
@@ -8739,9 +8739,10 @@ static int ulimitcmd(int, char **);
* Apart from the above, [[ expr ]] should work as [ expr ]
*/
-#define echocmd echo_main
-#define printfcmd printf_main
-#define testcmd test_main
+/* Stubs for calling non-FAST_FUNC's */
+static int FAST_FUNC echocmd(int argc, char **argv) { return echo_main(argc, argv); }
+static int FAST_FUNC printfcmd(int argc, char **argv) { return printf_main(argc, argv); }
+static int FAST_FUNC testcmd(int argc, char **argv) { return test_main(argc, argv); }
/* Keep these in proper order since it is searched via bsearch() */
static const struct builtincmd builtintab[] = {
@@ -8864,14 +8865,14 @@ isassignment(const char *p)
return 0;
return *q == '=';
}
-static int
+static int FAST_FUNC
bltincmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
/* Preserve exitstatus of a previous possible redirection
* as POSIX mandates */
return back_exitstatus;
}
-static void
+static void FAST_FUNC
evalcommand(union node *cmd, int flags)
{
static const struct builtincmd null_bltin = {
@@ -9189,7 +9190,7 @@ prehash(union node *n)
* be an error to break out of more loops than exist, but it isn't
* in the standard shell so we don't make it one here.
*/
-static int
+static int FAST_FUNC
breakcmd(int argc UNUSED_PARAM, char **argv)
{
int n = argv[1] ? number(argv[1]) : 1;
@@ -9734,7 +9735,7 @@ chkmail(void)
popstackmark(&smark);
}
-static void
+static void FAST_FUNC
changemail(const char *val UNUSED_PARAM)
{
mail_var_path_changed = 1;
@@ -9890,7 +9891,7 @@ options(int cmdline)
/*
* The shift builtin command.
*/
-static int
+static int FAST_FUNC
shiftcmd(int argc UNUSED_PARAM, char **argv)
{
int n;
@@ -9952,7 +9953,7 @@ showvars(const char *sep_prefix, int on, int off)
/*
* The set command builtin.
*/
-static int
+static int FAST_FUNC
setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
int retval;
@@ -9973,7 +9974,7 @@ setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
}
#if ENABLE_ASH_RANDOM_SUPPORT
-static void
+static void FAST_FUNC
change_random(const char *value)
{
/* Galois LFSR parameter */
@@ -10103,7 +10104,7 @@ getopts(char *optstr, char *optvar, char **optfirst, int *param_optind, int *opt
* be processed in the current argument. If shellparam.optnext is NULL,
* then it's the first time getopts has been called.
*/
-static int
+static int FAST_FUNC
getoptscmd(int argc, char **argv)
{
char **optbase;
@@ -11792,7 +11793,7 @@ evalstring(char *s, int mask)
/*
* The eval command.
*/
-static int
+static int FAST_FUNC
evalcmd(int argc UNUSED_PARAM, char **argv)
{
char *p;
@@ -11917,7 +11918,7 @@ find_dot_file(char *name)
/* NOTREACHED */
}
-static int
+static int FAST_FUNC
dotcmd(int argc, char **argv)
{
struct strlist *sp;
@@ -11952,7 +11953,7 @@ dotcmd(int argc, char **argv)
return status;
}
-static int
+static int FAST_FUNC
exitcmd(int argc UNUSED_PARAM, char **argv)
{
if (stoppedjobs())
@@ -12176,7 +12177,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
/*
* The trap builtin.
*/
-static int
+static int FAST_FUNC
trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
char *action;
@@ -12226,7 +12227,7 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
/*
* Lists available builtins
*/
-static int
+static int FAST_FUNC
helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
unsigned col;
@@ -12264,7 +12265,7 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
/*
* The export and readonly commands.
*/
-static int
+static int FAST_FUNC
exportcmd(int argc UNUSED_PARAM, char **argv)
{
struct var *vp;
@@ -12315,7 +12316,7 @@ unsetfunc(const char *name)
* variable to allow a function to be unset when there is a readonly variable
* with the same name.
*/
-static int
+static int FAST_FUNC
unsetcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
char **ap;
@@ -12353,7 +12354,7 @@ static const unsigned char timescmd_str[] ALIGN1 = {
0
};
-static int
+static int FAST_FUNC
timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
long clk_tck, s, t;
@@ -12383,7 +12384,7 @@ timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
*
* Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru>
*/
-static int
+static int FAST_FUNC
letcmd(int argc UNUSED_PARAM, char **argv)
{
arith_t i;
@@ -12425,7 +12426,7 @@ typedef enum __rlimit_resource rlim_t;
* -d DELIM End on DELIM char, not newline
* -e Use line editing (tty only)
*/
-static int
+static int FAST_FUNC
readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
static const char *const arg_REPLY[] = { "REPLY", NULL };
@@ -12635,7 +12636,7 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
return status;
}
-static int
+static int FAST_FUNC
umaskcmd(int argc UNUSED_PARAM, char **argv)
{
static const char permuser[3] ALIGN1 = "ugo";
@@ -12811,7 +12812,7 @@ printlim(enum limtype how, const struct rlimit *limit,
}
}
-static int
+static int FAST_FUNC
ulimitcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
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 {
smallint promptmode; /* 0: PS1, 1: PS2 */
#endif
FILE *file;
- int (*get) (struct in_str *);
- int (*peek) (struct in_str *);
+ int (*get) (struct in_str *) FAST_FUNC;
+ int (*peek) (struct in_str *) FAST_FUNC;
} in_str;
#define i_getch(input) ((input)->get(input))
#define i_peek(input) ((input)->peek(input))
@@ -537,43 +537,43 @@ struct globals {
/* Function prototypes for builtins */
-static int builtin_cd(char **argv);
-static int builtin_echo(char **argv);
-static int builtin_eval(char **argv);
-static int builtin_exec(char **argv);
-static int builtin_exit(char **argv);
-static int builtin_export(char **argv);
+static int builtin_cd(char **argv) FAST_FUNC;
+static int builtin_echo(char **argv) FAST_FUNC;
+static int builtin_eval(char **argv) FAST_FUNC;
+static int builtin_exec(char **argv) FAST_FUNC;
+static int builtin_exit(char **argv) FAST_FUNC;
+static int builtin_export(char **argv) FAST_FUNC;
#if ENABLE_HUSH_JOB
-static int builtin_fg_bg(char **argv);
-static int builtin_jobs(char **argv);
+static int builtin_fg_bg(char **argv) FAST_FUNC;
+static int builtin_jobs(char **argv) FAST_FUNC;
#endif
#if ENABLE_HUSH_HELP
-static int builtin_help(char **argv);
+static int builtin_help(char **argv) FAST_FUNC;
#endif
#if ENABLE_HUSH_LOCAL
-static int builtin_local(char **argv);
+static int builtin_local(char **argv) FAST_FUNC;
#endif
#if HUSH_DEBUG
-static int builtin_memleak(char **argv);
-#endif
-static int builtin_pwd(char **argv);
-static int builtin_read(char **argv);
-static int builtin_set(char **argv);
-static int builtin_shift(char **argv);
-static int builtin_source(char **argv);
-static int builtin_test(char **argv);
-static int builtin_trap(char **argv);
-static int builtin_type(char **argv);
-static int builtin_true(char **argv);
-static int builtin_umask(char **argv);
-static int builtin_unset(char **argv);
-static int builtin_wait(char **argv);
+static int builtin_memleak(char **argv) FAST_FUNC;
+#endif
+static int builtin_pwd(char **argv) FAST_FUNC;
+static int builtin_read(char **argv) FAST_FUNC;
+static int builtin_set(char **argv) FAST_FUNC;
+static int builtin_shift(char **argv) FAST_FUNC;
+static int builtin_source(char **argv) FAST_FUNC;
+static int builtin_test(char **argv) FAST_FUNC;
+static int builtin_trap(char **argv) FAST_FUNC;
+static int builtin_type(char **argv) FAST_FUNC;
+static int builtin_true(char **argv) FAST_FUNC;
+static int builtin_umask(char **argv) FAST_FUNC;
+static int builtin_unset(char **argv) FAST_FUNC;
+static int builtin_wait(char **argv) FAST_FUNC;
#if ENABLE_HUSH_LOOPS
-static int builtin_break(char **argv);
-static int builtin_continue(char **argv);
+static int builtin_break(char **argv) FAST_FUNC;
+static int builtin_continue(char **argv) FAST_FUNC;
#endif
#if ENABLE_HUSH_FUNCTIONS
-static int builtin_return(char **argv);
+static int builtin_return(char **argv) FAST_FUNC;
#endif
/* Table of built-in functions. They can be forked or not, depending on
@@ -584,7 +584,7 @@ static int builtin_return(char **argv);
* still be set at the end. */
struct built_in_command {
const char *cmd;
- int (*function)(char **argv);
+ int (*function)(char **argv) FAST_FUNC;
#if ENABLE_HUSH_HELP
const char *descr;
# define BLTIN(cmd, func, help) { cmd, func, help }
@@ -1541,7 +1541,7 @@ static struct variable *set_vars_and_save_old(char **strings)
/*
* in_str support
*/
-static int static_get(struct in_str *i)
+static int FAST_FUNC static_get(struct in_str *i)
{
int ch = *i->p++;
if (ch != '\0')
@@ -1550,7 +1550,7 @@ static int static_get(struct in_str *i)
return EOF;
}
-static int static_peek(struct in_str *i)
+static int FAST_FUNC static_peek(struct in_str *i)
{
return *i->p;
}
@@ -1629,7 +1629,7 @@ static void get_user_input(struct in_str *i)
/* This is the magic location that prints prompts
* and gets data back from the user */
-static int file_get(struct in_str *i)
+static int FAST_FUNC file_get(struct in_str *i)
{
int ch;
@@ -1668,7 +1668,7 @@ static int file_get(struct in_str *i)
/* All callers guarantee this routine will never
* be used right after a newline, so prompting is not needed.
*/
-static int file_peek(struct in_str *i)
+static int FAST_FUNC file_peek(struct in_str *i)
{
int ch;
if (i->p && *i->p) {
@@ -6560,12 +6560,12 @@ int lash_main(int argc, char **argv)
/*
* Built-ins
*/
-static int builtin_true(char **argv UNUSED_PARAM)
+static int FAST_FUNC builtin_true(char **argv UNUSED_PARAM)
{
return 0;
}
-static int builtin_test(char **argv)
+static int FAST_FUNC builtin_test(char **argv)
{
int argc = 0;
while (*argv) {
@@ -6575,7 +6575,7 @@ static int builtin_test(char **argv)
return test_main(argc, argv - argc);
}
-static int builtin_echo(char **argv)
+static int FAST_FUNC builtin_echo(char **argv)
{
int argc = 0;
while (*argv) {
@@ -6585,7 +6585,7 @@ static int builtin_echo(char **argv)
return echo_main(argc, argv - argc);
}
-static int builtin_eval(char **argv)
+static int FAST_FUNC builtin_eval(char **argv)
{
int rcode = EXIT_SUCCESS;
@@ -6602,7 +6602,7 @@ static int builtin_eval(char **argv)
return rcode;
}
-static int builtin_cd(char **argv)
+static int FAST_FUNC builtin_cd(char **argv)
{
const char *newdir = argv[1];
if (newdir == NULL) {
@@ -6621,7 +6621,7 @@ static int builtin_cd(char **argv)
return EXIT_SUCCESS;
}
-static int builtin_exec(char **argv)
+static int FAST_FUNC builtin_exec(char **argv)
{
if (*++argv == NULL)
return EXIT_SUCCESS; /* bash does this */
@@ -6635,7 +6635,7 @@ static int builtin_exec(char **argv)
}
}
-static int builtin_exit(char **argv)
+static int FAST_FUNC builtin_exit(char **argv)
{
debug_printf_exec("%s()\n", __func__);
@@ -6730,7 +6730,7 @@ static void helper_export_local(char **argv, int exp, int lvl)
} while (*++argv);
}
-static int builtin_export(char **argv)
+static int FAST_FUNC builtin_export(char **argv)
{
unsigned opt_unexport;
@@ -6778,7 +6778,7 @@ static int builtin_export(char **argv)
}
#if ENABLE_HUSH_LOCAL
-static int builtin_local(char **argv)
+static int FAST_FUNC builtin_local(char **argv)
{
if (G.func_nest_level == 0) {
bb_error_msg("%s: not in a function", argv[0]);
@@ -6789,7 +6789,7 @@ static int builtin_local(char **argv)
}
#endif
-static int builtin_trap(char **argv)
+static int FAST_FUNC builtin_trap(char **argv)
{
int sig;
char *new_cmd;
@@ -6879,7 +6879,7 @@ static int builtin_trap(char **argv)
}
/* http://www.opengroup.org/onlinepubs/9699919799/utilities/type.html */
-static int builtin_type(char **argv)
+static int FAST_FUNC builtin_type(char **argv)
{
int ret = EXIT_SUCCESS;
@@ -6913,7 +6913,7 @@ static int builtin_type(char **argv)
#if ENABLE_HUSH_JOB
/* built-in 'fg' and 'bg' handler */
-static int builtin_fg_bg(char **argv)
+static int FAST_FUNC builtin_fg_bg(char **argv)
{
int i, jobnum;
struct pipe *pi;
@@ -6976,7 +6976,7 @@ static int builtin_fg_bg(char **argv)
#endif
#if ENABLE_HUSH_HELP
-static int builtin_help(char **argv UNUSED_PARAM)
+static int FAST_FUNC builtin_help(char **argv UNUSED_PARAM)
{
const struct built_in_command *x;
@@ -6992,7 +6992,7 @@ static int builtin_help(char **argv UNUSED_PARAM)
#endif
#if ENABLE_HUSH_JOB
-static int builtin_jobs(char **argv UNUSED_PARAM)
+static int FAST_FUNC builtin_jobs(char **argv UNUSED_PARAM)
{
struct pipe *job;
const char *status_string;
@@ -7010,7 +7010,7 @@ static int builtin_jobs(char **argv UNUSED_PARAM)
#endif
#if HUSH_DEBUG
-static int builtin_memleak(char **argv UNUSED_PARAM)
+static int FAST_FUNC builtin_memleak(char **argv UNUSED_PARAM)
{
void *p;
unsigned long l;
@@ -7039,13 +7039,13 @@ static int builtin_memleak(char **argv UNUSED_PARAM)
}
#endif
-static int builtin_pwd(char **argv UNUSED_PARAM)
+static int FAST_FUNC builtin_pwd(char **argv UNUSED_PARAM)
{
puts(set_cwd());
return EXIT_SUCCESS;
}
-static int builtin_read(char **argv)
+static int FAST_FUNC builtin_read(char **argv)
{
char *string;
const char *name = "REPLY";
@@ -7088,7 +7088,7 @@ static int builtin_read(char **argv)
*
* So far, we only support "set -- [argument...]" and some of the short names.
*/
-static int builtin_set(char **argv)
+static int FAST_FUNC builtin_set(char **argv)
{
int n;
char **pp, **g_argv;
@@ -7147,7 +7147,7 @@ static int builtin_set(char **argv)
return EXIT_FAILURE;
}
-static int builtin_shift(char **argv)
+static int FAST_FUNC builtin_shift(char **argv)
{
int n = 1;
if (argv[1]) {
@@ -7167,7 +7167,7 @@ static int builtin_shift(char **argv)
return EXIT_FAILURE;
}
-static int builtin_source(char **argv)
+static int FAST_FUNC builtin_source(char **argv)
{
char *arg_path;
FILE *input;
@@ -7208,7 +7208,7 @@ static int builtin_source(char **argv)
return G.last_exitcode;
}
-static int builtin_umask(char **argv)
+static int FAST_FUNC builtin_umask(char **argv)
{
int rc;
mode_t mask;
@@ -7240,7 +7240,7 @@ static int builtin_umask(char **argv)
}
/* http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#unset */
-static int builtin_unset(char **argv)
+static int FAST_FUNC builtin_unset(char **argv)
{
int ret;
unsigned opts;
@@ -7277,7 +7277,7 @@ static int builtin_unset(char **argv)
}
/* http://www.opengroup.org/onlinepubs/9699919799/utilities/wait.html */
-static int builtin_wait(char **argv)
+static int FAST_FUNC builtin_wait(char **argv)
{
int ret = EXIT_SUCCESS;
int status, sig;
@@ -7361,7 +7361,7 @@ static unsigned parse_numeric_argv1(char **argv, unsigned def, unsigned def_min)
#endif
#if ENABLE_HUSH_LOOPS
-static int builtin_break(char **argv)
+static int FAST_FUNC builtin_break(char **argv)
{
unsigned depth;
if (G.depth_of_loop == 0) {
@@ -7379,7 +7379,7 @@ static int builtin_break(char **argv)
return EXIT_SUCCESS;
}
-static int builtin_continue(char **argv)
+static int FAST_FUNC builtin_continue(char **argv)
{
G.flag_break_continue = 1; /* BC_CONTINUE = 2 = 1+1 */
return builtin_break(argv);
@@ -7387,7 +7387,7 @@ static int builtin_continue(char **argv)
#endif
#if ENABLE_HUSH_FUNCTIONS
-static int builtin_return(char **argv)
+static int FAST_FUNC builtin_return(char **argv)
{
int rc;