*: 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>
This commit is contained in:
parent
8507e1f109
commit
d5f1b1bbe0
@ -67,7 +67,7 @@ static int decode_arg(const char *arg, struct globals *gp)
|
||||
|
||||
static void change_attributes(const char *name, struct globals *gp);
|
||||
|
||||
static int chattr_dir_proc(const char *dir_name, struct dirent *de, void *gp)
|
||||
static int FAST_FUNC chattr_dir_proc(const char *dir_name, struct dirent *de, void *gp)
|
||||
{
|
||||
char *path = concat_subpath_file(dir_name, de->d_name);
|
||||
/* path is NULL if de->d_name is "." or "..", else... */
|
||||
|
@ -28,33 +28,20 @@ static void close_silently(int fd)
|
||||
|
||||
/* Iterate a function on each entry of a directory */
|
||||
int iterate_on_dir(const char *dir_name,
|
||||
int (*func)(const char *, struct dirent *, void *),
|
||||
void * private)
|
||||
int FAST_FUNC (*func)(const char *, struct dirent *, void *),
|
||||
void *private)
|
||||
{
|
||||
DIR *dir;
|
||||
struct dirent *de, *dep;
|
||||
int max_len, len;
|
||||
|
||||
max_len = PATH_MAX + sizeof(struct dirent);
|
||||
de = xmalloc(max_len+1);
|
||||
memset(de, 0, max_len+1);
|
||||
struct dirent *de;
|
||||
|
||||
dir = opendir(dir_name);
|
||||
if (dir == NULL) {
|
||||
free(de);
|
||||
return -1;
|
||||
}
|
||||
while ((dep = readdir(dir))) {
|
||||
len = sizeof(struct dirent);
|
||||
if (len < dep->d_reclen)
|
||||
len = dep->d_reclen;
|
||||
if (len > max_len)
|
||||
len = max_len;
|
||||
memcpy(de, dep, len);
|
||||
while ((de = readdir(dir)) != NULL) {
|
||||
func(dir_name, de, private);
|
||||
}
|
||||
closedir(dir);
|
||||
free(de);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
|
||||
|
||||
/* Iterate a function on each entry of a directory */
|
||||
int iterate_on_dir(const char *dir_name,
|
||||
int (*func)(const char *, struct dirent *, void *),
|
||||
int FAST_FUNC (*func)(const char *, struct dirent *, void *),
|
||||
void *private);
|
||||
|
||||
/* Get/set a file version on an ext2 file system */
|
||||
|
@ -57,8 +57,9 @@ static void list_attributes(const char *name)
|
||||
bb_perror_msg("reading %s", name);
|
||||
}
|
||||
|
||||
static int lsattr_dir_proc(const char *dir_name, struct dirent *de,
|
||||
void *private UNUSED_PARAM)
|
||||
static int FAST_FUNC lsattr_dir_proc(const char *dir_name,
|
||||
struct dirent *de,
|
||||
void *private UNUSED_PARAM)
|
||||
{
|
||||
struct stat st;
|
||||
char *path;
|
||||
|
@ -65,7 +65,7 @@
|
||||
IF_FEATURE_FIND_XDEV(static dev_t *xdev_dev;)
|
||||
IF_FEATURE_FIND_XDEV(static int xdev_count;)
|
||||
|
||||
typedef int (*action_fp)(const char *fileName, struct stat *statbuf, void *);
|
||||
typedef int (*action_fp)(const char *fileName, struct stat *statbuf, void *) FAST_FUNC;
|
||||
|
||||
typedef struct {
|
||||
action_fp f;
|
||||
@ -73,12 +73,15 @@ typedef struct {
|
||||
bool invert;
|
||||
#endif
|
||||
} action;
|
||||
|
||||
#define ACTS(name, arg...) typedef struct { action a; arg; } action_##name;
|
||||
#define ACTF(name) static int func_##name(const char *fileName UNUSED_PARAM, \
|
||||
struct stat *statbuf UNUSED_PARAM, \
|
||||
action_##name* ap UNUSED_PARAM)
|
||||
ACTS(print)
|
||||
ACTS(name, const char *pattern; bool iname;)
|
||||
#define ACTF(name) \
|
||||
static int FAST_FUNC func_##name(const char *fileName UNUSED_PARAM, \
|
||||
struct stat *statbuf UNUSED_PARAM, \
|
||||
action_##name* ap UNUSED_PARAM)
|
||||
|
||||
ACTS(print)
|
||||
ACTS(name, const char *pattern; bool iname;)
|
||||
IF_FEATURE_FIND_PATH( ACTS(path, const char *pattern;))
|
||||
IF_FEATURE_FIND_REGEX( ACTS(regex, regex_t compiled_pattern;))
|
||||
IF_FEATURE_FIND_PRINT0( ACTS(print0))
|
||||
|
@ -92,8 +92,8 @@
|
||||
#define DEVFS_PATHLEN 1024
|
||||
/* Never change this otherwise the binary interface will change */
|
||||
|
||||
struct devfsd_notify_struct
|
||||
{ /* Use native C types to ensure same types in kernel and user space */
|
||||
struct devfsd_notify_struct {
|
||||
/* Use native C types to ensure same types in kernel and user space */
|
||||
unsigned int type; /* DEVFSD_NOTIFY_* value */
|
||||
unsigned int mode; /* Mode of the inode or device entry */
|
||||
unsigned int major; /* Major number of device entry */
|
||||
@ -151,32 +151,27 @@ struct devfsd_notify_struct
|
||||
#define AC_RMNEWCOMPAT 10
|
||||
#define AC_RESTORE 11
|
||||
|
||||
struct permissions_type
|
||||
{
|
||||
struct permissions_type {
|
||||
mode_t mode;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
};
|
||||
|
||||
struct execute_type
|
||||
{
|
||||
struct execute_type {
|
||||
char *argv[MAX_ARGS + 1]; /* argv[0] must always be the programme */
|
||||
};
|
||||
|
||||
struct copy_type
|
||||
{
|
||||
struct copy_type {
|
||||
const char *source;
|
||||
const char *destination;
|
||||
};
|
||||
|
||||
struct action_type
|
||||
{
|
||||
struct action_type {
|
||||
unsigned int what;
|
||||
unsigned int when;
|
||||
};
|
||||
|
||||
struct config_entry_struct
|
||||
{
|
||||
struct config_entry_struct {
|
||||
struct action_type action;
|
||||
regex_t preg;
|
||||
union
|
||||
@ -189,8 +184,7 @@ struct config_entry_struct
|
||||
struct config_entry_struct *next;
|
||||
};
|
||||
|
||||
struct get_variable_info
|
||||
{
|
||||
struct get_variable_info {
|
||||
const struct devfsd_notify_struct *info;
|
||||
const char *devname;
|
||||
char devpath[STRING_LENGTH];
|
||||
@ -1336,8 +1330,7 @@ static void expand_regexp(char *output, size_t outsize, const char *input,
|
||||
|
||||
/* from compat_name.c */
|
||||
|
||||
struct translate_struct
|
||||
{
|
||||
struct translate_struct {
|
||||
const char *match; /* The string to match to(up to length) */
|
||||
const char *format; /* Format of output, "%s" takes data past match string,
|
||||
NULL is effectively "%s"(just more efficient) */
|
||||
|
@ -511,8 +511,7 @@ int delete_module(const char *module, unsigned int flags);
|
||||
struct obj_string_patch;
|
||||
struct obj_symbol_patch;
|
||||
|
||||
struct obj_section
|
||||
{
|
||||
struct obj_section {
|
||||
ElfW(Shdr) header;
|
||||
const char *name;
|
||||
char *contents;
|
||||
@ -520,8 +519,7 @@ struct obj_section
|
||||
int idx;
|
||||
};
|
||||
|
||||
struct obj_symbol
|
||||
{
|
||||
struct obj_symbol {
|
||||
struct obj_symbol *next; /* hash table link */
|
||||
const char *name;
|
||||
unsigned long value;
|
||||
@ -546,8 +544,8 @@ struct obj_file {
|
||||
struct obj_section **load_order_search_start;
|
||||
struct obj_string_patch *string_patches;
|
||||
struct obj_symbol_patch *symbol_patches;
|
||||
int (*symbol_cmp)(const char *, const char *);
|
||||
unsigned long (*symbol_hash)(const char *);
|
||||
int (*symbol_cmp)(const char *, const char *); /* cant be FAST_FUNC */
|
||||
unsigned long (*symbol_hash)(const char *) FAST_FUNC;
|
||||
unsigned long local_symtab_size;
|
||||
struct obj_symbol **local_symtab;
|
||||
struct obj_symbol *symtab[HASH_BUCKETS];
|
||||
@ -577,45 +575,45 @@ struct obj_symbol_patch {
|
||||
|
||||
/* Generic object manipulation routines. */
|
||||
|
||||
static unsigned long obj_elf_hash(const char *);
|
||||
static unsigned long FAST_FUNC obj_elf_hash(const char *);
|
||||
|
||||
static unsigned long obj_elf_hash_n(const char *, unsigned long len);
|
||||
|
||||
static struct obj_symbol *obj_find_symbol(struct obj_file *f,
|
||||
const char *name);
|
||||
const char *name);
|
||||
|
||||
static ElfW(Addr) obj_symbol_final_value(struct obj_file *f,
|
||||
struct obj_symbol *sym);
|
||||
struct obj_symbol *sym);
|
||||
|
||||
#if ENABLE_FEATURE_INSMOD_VERSION_CHECKING
|
||||
static void obj_set_symbol_compare(struct obj_file *f,
|
||||
int (*cmp)(const char *, const char *),
|
||||
unsigned long (*hash)(const char *));
|
||||
int (*cmp)(const char *, const char *),
|
||||
unsigned long (*hash)(const char *) FAST_FUNC);
|
||||
#endif
|
||||
|
||||
static struct obj_section *obj_find_section(struct obj_file *f,
|
||||
const char *name);
|
||||
const char *name);
|
||||
|
||||
static void obj_insert_section_load_order(struct obj_file *f,
|
||||
struct obj_section *sec);
|
||||
struct obj_section *sec);
|
||||
|
||||
static struct obj_section *obj_create_alloced_section(struct obj_file *f,
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size);
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size);
|
||||
|
||||
static struct obj_section *obj_create_alloced_section_first(struct obj_file *f,
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size);
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size);
|
||||
|
||||
static void *obj_extend_section(struct obj_section *sec, unsigned long more);
|
||||
|
||||
static void obj_string_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,
|
||||
const char *string);
|
||||
const char *string);
|
||||
|
||||
static void obj_symbol_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,
|
||||
struct obj_symbol *sym);
|
||||
struct obj_symbol *sym);
|
||||
|
||||
static void obj_check_undefineds(struct obj_file *f);
|
||||
|
||||
@ -642,10 +640,10 @@ static struct obj_section *arch_new_section(void);
|
||||
static struct obj_symbol *arch_new_symbol(void);
|
||||
|
||||
static enum obj_reloc arch_apply_relocation(struct obj_file *f,
|
||||
struct obj_section *targsec,
|
||||
/*struct obj_section *symsec,*/
|
||||
struct obj_symbol *sym,
|
||||
ElfW(RelM) *rel, ElfW(Addr) value);
|
||||
struct obj_section *targsec,
|
||||
/*struct obj_section *symsec,*/
|
||||
struct obj_symbol *sym,
|
||||
ElfW(RelM) *rel, ElfW(Addr) value);
|
||||
|
||||
static void arch_create_got(struct obj_file *f);
|
||||
#if ENABLE_FEATURE_CHECK_TAINTED_MODULE
|
||||
@ -679,8 +677,7 @@ enum { STRVERSIONLEN = 64 };
|
||||
|
||||
#if defined(USE_LIST)
|
||||
|
||||
struct arch_list_entry
|
||||
{
|
||||
struct arch_list_entry {
|
||||
struct arch_list_entry *next;
|
||||
LIST_ARCHTYPE addend;
|
||||
int offset;
|
||||
@ -691,8 +688,7 @@ struct arch_list_entry
|
||||
|
||||
#if defined(USE_SINGLE)
|
||||
|
||||
struct arch_single_entry
|
||||
{
|
||||
struct arch_single_entry {
|
||||
int offset;
|
||||
int inited : 1;
|
||||
int allocated : 1;
|
||||
@ -701,8 +697,7 @@ struct arch_single_entry
|
||||
#endif
|
||||
|
||||
#if defined(__mips__)
|
||||
struct mips_hi16
|
||||
{
|
||||
struct mips_hi16 {
|
||||
struct mips_hi16 *next;
|
||||
ElfW(Addr) *addr;
|
||||
ElfW(Addr) value;
|
||||
@ -776,10 +771,10 @@ static struct obj_symbol *arch_new_symbol(void)
|
||||
|
||||
static enum obj_reloc
|
||||
arch_apply_relocation(struct obj_file *f,
|
||||
struct obj_section *targsec,
|
||||
/*struct obj_section *symsec,*/
|
||||
struct obj_symbol *sym,
|
||||
ElfW(RelM) *rel, ElfW(Addr) v)
|
||||
struct obj_section *targsec,
|
||||
/*struct obj_section *symsec,*/
|
||||
struct obj_symbol *sym,
|
||||
ElfW(RelM) *rel, ElfW(Addr) v)
|
||||
{
|
||||
#if defined(__arm__) || defined(__i386__) || defined(__mc68000__) \
|
||||
|| defined(__sh__) || defined(__s390__) || defined(__x86_64__) \
|
||||
@ -1707,7 +1702,7 @@ static int arch_list_add(ElfW(RelM) *rel, struct arch_list_entry **list,
|
||||
#if defined(USE_SINGLE)
|
||||
|
||||
static int arch_single_init(/*ElfW(RelM) *rel,*/ struct arch_single_entry *single,
|
||||
int offset, int size)
|
||||
int offset, int size)
|
||||
{
|
||||
if (single->allocated == 0) {
|
||||
single->allocated = 1;
|
||||
@ -1723,7 +1718,7 @@ static int arch_single_init(/*ElfW(RelM) *rel,*/ struct arch_single_entry *singl
|
||||
#if defined(USE_GOT_ENTRIES) || defined(USE_PLT_ENTRIES)
|
||||
|
||||
static struct obj_section *arch_xsect_init(struct obj_file *f, const char *name,
|
||||
int offset, int size)
|
||||
int offset, int size)
|
||||
{
|
||||
struct obj_section *myrelsec = obj_find_section(f, name);
|
||||
|
||||
@ -1916,7 +1911,7 @@ static unsigned long obj_elf_hash_n(const char *name, unsigned long n)
|
||||
return h;
|
||||
}
|
||||
|
||||
static unsigned long obj_elf_hash(const char *name)
|
||||
static unsigned long FAST_FUNC obj_elf_hash(const char *name)
|
||||
{
|
||||
return obj_elf_hash_n(name, strlen(name));
|
||||
}
|
||||
@ -1939,7 +1934,7 @@ static int ncv_strcmp(const char *a, const char *b)
|
||||
/* String hashing for non-co-versioned kernel and module. Here
|
||||
we are simply forced to drop the crc from the hash. */
|
||||
|
||||
static unsigned long ncv_symbol_hash(const char *str)
|
||||
static unsigned long FAST_FUNC ncv_symbol_hash(const char *str)
|
||||
{
|
||||
size_t len = strlen(str);
|
||||
if (len > 10 && str[len - 10] == '_' && str[len - 9] == 'R')
|
||||
@ -1949,8 +1944,8 @@ static unsigned long ncv_symbol_hash(const char *str)
|
||||
|
||||
static void
|
||||
obj_set_symbol_compare(struct obj_file *f,
|
||||
int (*cmp) (const char *, const char *),
|
||||
unsigned long (*hash) (const char *))
|
||||
int (*cmp) (const char *, const char *),
|
||||
unsigned long (*hash) (const char *) FAST_FUNC)
|
||||
{
|
||||
if (cmp)
|
||||
f->symbol_cmp = cmp;
|
||||
@ -1963,13 +1958,14 @@ obj_set_symbol_compare(struct obj_file *f,
|
||||
memcpy(tmptab, f->symtab, sizeof(tmptab));
|
||||
memset(f->symtab, 0, sizeof(f->symtab));
|
||||
|
||||
for (i = 0; i < HASH_BUCKETS; ++i)
|
||||
for (i = 0; i < HASH_BUCKETS; ++i) {
|
||||
for (sym = tmptab[i]; sym; sym = next) {
|
||||
unsigned long h = hash(sym->name) % HASH_BUCKETS;
|
||||
next = sym->next;
|
||||
sym->next = f->symtab[h];
|
||||
f->symtab[h] = sym;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1977,9 +1973,9 @@ obj_set_symbol_compare(struct obj_file *f,
|
||||
|
||||
static struct obj_symbol *
|
||||
obj_add_symbol(struct obj_file *f, const char *name,
|
||||
unsigned long symidx, int info,
|
||||
int secidx, ElfW(Addr) value,
|
||||
unsigned long size)
|
||||
unsigned long symidx, int info,
|
||||
int secidx, ElfW(Addr) value,
|
||||
unsigned long size)
|
||||
{
|
||||
struct obj_symbol *sym;
|
||||
unsigned long hash = f->symbol_hash(name) % HASH_BUCKETS;
|
||||
@ -2140,9 +2136,9 @@ obj_insert_section_load_order(struct obj_file *f, struct obj_section *sec)
|
||||
}
|
||||
|
||||
static struct obj_section *helper_create_alloced_section(struct obj_file *f,
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size)
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size)
|
||||
{
|
||||
int newidx = f->header.e_shnum++;
|
||||
struct obj_section *sec;
|
||||
@ -2163,9 +2159,9 @@ static struct obj_section *helper_create_alloced_section(struct obj_file *f,
|
||||
}
|
||||
|
||||
static struct obj_section *obj_create_alloced_section(struct obj_file *f,
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size)
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size)
|
||||
{
|
||||
struct obj_section *sec;
|
||||
|
||||
@ -2175,9 +2171,9 @@ static struct obj_section *obj_create_alloced_section(struct obj_file *f,
|
||||
}
|
||||
|
||||
static struct obj_section *obj_create_alloced_section_first(struct obj_file *f,
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size)
|
||||
const char *name,
|
||||
unsigned long align,
|
||||
unsigned long size)
|
||||
{
|
||||
struct obj_section *sec;
|
||||
|
||||
@ -2205,9 +2201,9 @@ static void *obj_extend_section(struct obj_section *sec, unsigned long more)
|
||||
new module. */
|
||||
|
||||
static int add_symbols_from(struct obj_file *f,
|
||||
int idx,
|
||||
struct new_module_symbol *syms,
|
||||
size_t nsyms)
|
||||
int idx,
|
||||
struct new_module_symbol *syms,
|
||||
size_t nsyms)
|
||||
{
|
||||
struct new_module_symbol *s;
|
||||
size_t i;
|
||||
@ -2885,7 +2881,7 @@ obj_string_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,
|
||||
|
||||
static void
|
||||
obj_symbol_patch(struct obj_file *f, int secidx, ElfW(Addr) offset,
|
||||
struct obj_symbol *sym)
|
||||
struct obj_symbol *sym)
|
||||
{
|
||||
struct obj_symbol_patch *p;
|
||||
|
||||
@ -3491,7 +3487,8 @@ static int obj_gpl_license(struct obj_file *f, const char **license)
|
||||
#define TAINT_URL "http://www.tux.org/lkml/#export-tainted"
|
||||
|
||||
static void set_tainted(int fd, const char *m_name,
|
||||
int kernel_has_tainted, int taint, const char *text1, const char *text2)
|
||||
int kernel_has_tainted, int taint,
|
||||
const char *text1, const char *text2)
|
||||
{
|
||||
static smallint printed_info;
|
||||
|
||||
@ -3586,7 +3583,7 @@ get_module_version(struct obj_file *f, char str[STRVERSIONLEN])
|
||||
*/
|
||||
static void
|
||||
add_ksymoops_symbols(struct obj_file *f, const char *filename,
|
||||
const char *m_name)
|
||||
const char *m_name)
|
||||
{
|
||||
static const char symprefix[] ALIGN1 = "__insmod_";
|
||||
static const char section_names[][8] = {
|
||||
|
@ -42,8 +42,8 @@ typedef int execfn(char *command);
|
||||
|
||||
struct method_t {
|
||||
const char *name;
|
||||
int (*up)(struct interface_defn_t *ifd, execfn *e);
|
||||
int (*down)(struct interface_defn_t *ifd, execfn *e);
|
||||
int (*up)(struct interface_defn_t *ifd, execfn *e) FAST_FUNC;
|
||||
int (*down)(struct interface_defn_t *ifd, execfn *e) FAST_FUNC;
|
||||
};
|
||||
|
||||
struct address_family_t {
|
||||
@ -325,7 +325,7 @@ static int execute(const char *command, struct interface_defn_t *ifd, execfn *ex
|
||||
#endif
|
||||
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IPV6
|
||||
static int loopback_up6(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC loopback_up6(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
int result;
|
||||
@ -337,7 +337,7 @@ static int loopback_up6(struct interface_defn_t *ifd, execfn *exec)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int loopback_down6(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC loopback_down6(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
return execute("ip link set %iface% down", ifd, exec);
|
||||
@ -346,7 +346,7 @@ static int loopback_down6(struct interface_defn_t *ifd, execfn *exec)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int static_up6(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
int result;
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
@ -362,7 +362,7 @@ static int static_up6(struct interface_defn_t *ifd, execfn *exec)
|
||||
return ((result == 3) ? 3 : 0);
|
||||
}
|
||||
|
||||
static int static_down6(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC static_down6(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
return execute("ip link set %iface% down", ifd, exec);
|
||||
@ -372,7 +372,7 @@ static int static_down6(struct interface_defn_t *ifd, execfn *exec)
|
||||
}
|
||||
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
static int v4tunnel_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC v4tunnel_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
int result;
|
||||
result = execute("ip tunnel add %iface% mode sit remote "
|
||||
@ -383,7 +383,7 @@ static int v4tunnel_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
return ((result == 4) ? 4 : 0);
|
||||
}
|
||||
|
||||
static int v4tunnel_down(struct interface_defn_t * ifd, execfn * exec)
|
||||
static int FAST_FUNC v4tunnel_down(struct interface_defn_t * ifd, execfn * exec)
|
||||
{
|
||||
return execute("ip tunnel del %iface%", ifd, exec);
|
||||
}
|
||||
@ -405,7 +405,7 @@ static const struct address_family_t addr_inet6 = {
|
||||
#endif /* FEATURE_IFUPDOWN_IPV6 */
|
||||
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IPV4
|
||||
static int loopback_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC loopback_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
int result;
|
||||
@ -417,7 +417,7 @@ static int loopback_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int loopback_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC loopback_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
int result;
|
||||
@ -429,7 +429,7 @@ static int loopback_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int static_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC static_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
int result;
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
@ -451,7 +451,7 @@ static int static_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int static_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC static_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
int result;
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
@ -468,8 +468,7 @@ static int static_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
}
|
||||
|
||||
#if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP
|
||||
struct dhcp_client_t
|
||||
{
|
||||
struct dhcp_client_t {
|
||||
const char *name;
|
||||
const char *startcmd;
|
||||
const char *stopcmd;
|
||||
@ -497,7 +496,7 @@ static const struct dhcp_client_t ext_dhcp_clients[] = {
|
||||
#endif /* ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCPC */
|
||||
|
||||
#if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP
|
||||
static int dhcp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC dhcp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
unsigned i;
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
@ -517,7 +516,7 @@ static int dhcp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
return 0;
|
||||
}
|
||||
#elif ENABLE_APP_UDHCPC
|
||||
static int dhcp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC dhcp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||
/* ip doesn't up iface when it configures it (unlike ifconfig) */
|
||||
@ -533,7 +532,7 @@ static int dhcp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
ifd, exec);
|
||||
}
|
||||
#else
|
||||
static int dhcp_up(struct interface_defn_t *ifd UNUSED_PARAM,
|
||||
static int FAST_FUNC dhcp_up(struct interface_defn_t *ifd UNUSED_PARAM,
|
||||
execfn *exec UNUSED_PARAM)
|
||||
{
|
||||
return 0; /* no dhcp support */
|
||||
@ -541,7 +540,7 @@ static int dhcp_up(struct interface_defn_t *ifd UNUSED_PARAM,
|
||||
#endif
|
||||
|
||||
#if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP
|
||||
static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
int result = 0;
|
||||
unsigned i;
|
||||
@ -564,7 +563,7 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
return ((result == 3) ? 3 : 0);
|
||||
}
|
||||
#elif ENABLE_APP_UDHCPC
|
||||
static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
int result;
|
||||
result = execute("kill "
|
||||
@ -579,42 +578,42 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
return ((result == 3) ? 3 : 0);
|
||||
}
|
||||
#else
|
||||
static int dhcp_down(struct interface_defn_t *ifd UNUSED_PARAM,
|
||||
static int FAST_FUNC dhcp_down(struct interface_defn_t *ifd UNUSED_PARAM,
|
||||
execfn *exec UNUSED_PARAM)
|
||||
{
|
||||
return 0; /* no dhcp support */
|
||||
}
|
||||
#endif
|
||||
|
||||
static int manual_up_down(struct interface_defn_t *ifd UNUSED_PARAM, execfn *exec UNUSED_PARAM)
|
||||
static int FAST_FUNC manual_up_down(struct interface_defn_t *ifd UNUSED_PARAM, execfn *exec UNUSED_PARAM)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int bootp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC bootp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
return execute("bootpc[[ --bootfile %bootfile%]] --dev %iface%"
|
||||
"[[ --server %server%]][[ --hwaddr %hwaddr%]]"
|
||||
" --returniffail --serverbcast", ifd, exec);
|
||||
}
|
||||
|
||||
static int ppp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC ppp_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
return execute("pon[[ %provider%]]", ifd, exec);
|
||||
}
|
||||
|
||||
static int ppp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC ppp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
return execute("poff[[ %provider%]]", ifd, exec);
|
||||
}
|
||||
|
||||
static int wvdial_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC wvdial_up(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
return execute("start-stop-daemon --start -x wvdial "
|
||||
"-p /var/run/wvdial.%iface% -b -m --[[ %provider%]]", ifd, exec);
|
||||
}
|
||||
|
||||
static int wvdial_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int FAST_FUNC wvdial_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
return execute("start-stop-daemon --stop -x wvdial "
|
||||
"-p /var/run/wvdial.%iface% -s 2", ifd, exec);
|
||||
|
@ -239,36 +239,36 @@ typedef struct servtab_t {
|
||||
#ifdef INETD_BUILTINS_ENABLED
|
||||
/* Echo received data */
|
||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
|
||||
static void echo_stream(int, servtab_t *);
|
||||
static void echo_dg(int, servtab_t *);
|
||||
static void FAST_FUNC echo_stream(int, servtab_t *);
|
||||
static void FAST_FUNC echo_dg(int, servtab_t *);
|
||||
#endif
|
||||
/* Internet /dev/null */
|
||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
|
||||
static void discard_stream(int, servtab_t *);
|
||||
static void discard_dg(int, servtab_t *);
|
||||
static void FAST_FUNC discard_stream(int, servtab_t *);
|
||||
static void FAST_FUNC discard_dg(int, servtab_t *);
|
||||
#endif
|
||||
/* Return 32 bit time since 1900 */
|
||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_TIME
|
||||
static void machtime_stream(int, servtab_t *);
|
||||
static void machtime_dg(int, servtab_t *);
|
||||
static void FAST_FUNC machtime_stream(int, servtab_t *);
|
||||
static void FAST_FUNC machtime_dg(int, servtab_t *);
|
||||
#endif
|
||||
/* Return human-readable time */
|
||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
|
||||
static void daytime_stream(int, servtab_t *);
|
||||
static void daytime_dg(int, servtab_t *);
|
||||
static void FAST_FUNC daytime_stream(int, servtab_t *);
|
||||
static void FAST_FUNC daytime_dg(int, servtab_t *);
|
||||
#endif
|
||||
/* Familiar character generator */
|
||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN
|
||||
static void chargen_stream(int, servtab_t *);
|
||||
static void chargen_dg(int, servtab_t *);
|
||||
static void FAST_FUNC chargen_stream(int, servtab_t *);
|
||||
static void FAST_FUNC chargen_dg(int, servtab_t *);
|
||||
#endif
|
||||
|
||||
struct builtin {
|
||||
/* NB: not necessarily NUL terminated */
|
||||
char bi_service7[7]; /* internally provided service name */
|
||||
uint8_t bi_fork; /* 1 if stream fn should run in child */
|
||||
void (*bi_stream_fn)(int, servtab_t *);
|
||||
void (*bi_dgram_fn)(int, servtab_t *);
|
||||
void (*bi_stream_fn)(int, servtab_t *) FAST_FUNC;
|
||||
void (*bi_dgram_fn)(int, servtab_t *) FAST_FUNC;
|
||||
};
|
||||
|
||||
static const struct builtin builtins[] = {
|
||||
@ -1386,7 +1386,7 @@ static const char *const cat_args[] = { "cat", NULL };
|
||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
|
||||
/* Echo service -- echo data back. */
|
||||
/* ARGSUSED */
|
||||
static void echo_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
static void FAST_FUNC echo_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
{
|
||||
#if BB_MMU
|
||||
while (1) {
|
||||
@ -1407,7 +1407,7 @@ static void echo_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
/* on failure we return to main, which does exit(EXIT_FAILURE) */
|
||||
#endif
|
||||
}
|
||||
static void echo_dg(int s, servtab_t *sep)
|
||||
static void FAST_FUNC echo_dg(int s, servtab_t *sep)
|
||||
{
|
||||
enum { BUFSIZE = 12*1024 }; /* for jumbo sized packets! :) */
|
||||
char *buf = xmalloc(BUFSIZE); /* too big for stack */
|
||||
@ -1427,7 +1427,7 @@ static void echo_dg(int s, servtab_t *sep)
|
||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
|
||||
/* Discard service -- ignore data. */
|
||||
/* ARGSUSED */
|
||||
static void discard_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
static void FAST_FUNC discard_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
{
|
||||
#if BB_MMU
|
||||
while (safe_read(s, line, LINE_SIZE) > 0)
|
||||
@ -1446,7 +1446,7 @@ static void discard_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
#endif
|
||||
}
|
||||
/* ARGSUSED */
|
||||
static void discard_dg(int s, servtab_t *sep UNUSED_PARAM)
|
||||
static void FAST_FUNC discard_dg(int s, servtab_t *sep UNUSED_PARAM)
|
||||
{
|
||||
/* dgram builtins are non-forking - DONT BLOCK! */
|
||||
recv(s, line, LINE_SIZE, MSG_DONTWAIT);
|
||||
@ -1467,7 +1467,7 @@ static void init_ring(void)
|
||||
}
|
||||
/* Character generator. MMU arches only. */
|
||||
/* ARGSUSED */
|
||||
static void chargen_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
static void FAST_FUNC chargen_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
{
|
||||
char *rs;
|
||||
int len;
|
||||
@ -1495,7 +1495,7 @@ static void chargen_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
}
|
||||
}
|
||||
/* ARGSUSED */
|
||||
static void chargen_dg(int s, servtab_t *sep)
|
||||
static void FAST_FUNC chargen_dg(int s, servtab_t *sep)
|
||||
{
|
||||
int len;
|
||||
char text[LINESIZ + 2];
|
||||
@ -1544,14 +1544,14 @@ static uint32_t machtime(void)
|
||||
return htonl((uint32_t)(tv.tv_sec + 2208988800));
|
||||
}
|
||||
/* ARGSUSED */
|
||||
static void machtime_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
static void FAST_FUNC machtime_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
{
|
||||
uint32_t result;
|
||||
|
||||
result = machtime();
|
||||
full_write(s, &result, sizeof(result));
|
||||
}
|
||||
static void machtime_dg(int s, servtab_t *sep)
|
||||
static void FAST_FUNC machtime_dg(int s, servtab_t *sep)
|
||||
{
|
||||
uint32_t result;
|
||||
len_and_sockaddr *lsa = alloca(LSA_LEN_SIZE + sep->se_lsa->len);
|
||||
@ -1569,14 +1569,14 @@ static void machtime_dg(int s, servtab_t *sep)
|
||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
|
||||
/* Return human-readable time of day */
|
||||
/* ARGSUSED */
|
||||
static void daytime_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
static void FAST_FUNC daytime_stream(int s, servtab_t *sep UNUSED_PARAM)
|
||||
{
|
||||
time_t t;
|
||||
|
||||
t = time(NULL);
|
||||
fdprintf(s, "%.24s\r\n", ctime(&t));
|
||||
}
|
||||
static void daytime_dg(int s, servtab_t *sep)
|
||||
static void FAST_FUNC daytime_dg(int s, servtab_t *sep)
|
||||
{
|
||||
time_t t;
|
||||
len_and_sockaddr *lsa = alloca(LSA_LEN_SIZE + sep->se_lsa->len);
|
||||
|
@ -196,7 +196,7 @@ static int flush_update(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int print_addrinfo(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
static int FAST_FUNC print_addrinfo(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
struct nlmsghdr *n, void *arg UNUSED_PARAM)
|
||||
{
|
||||
struct ifaddrmsg *ifa = NLMSG_DATA(n);
|
||||
@ -349,8 +349,7 @@ static int print_addrinfo(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
}
|
||||
|
||||
|
||||
struct nlmsg_list
|
||||
{
|
||||
struct nlmsg_list {
|
||||
struct nlmsg_list *next;
|
||||
struct nlmsghdr h;
|
||||
};
|
||||
@ -377,7 +376,7 @@ static int print_selected_addrinfo(int ifindex, struct nlmsg_list *ainfo)
|
||||
}
|
||||
|
||||
|
||||
static int store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
|
||||
static int FAST_FUNC store_nlmsg(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
|
||||
{
|
||||
struct nlmsg_list **linfo = (struct nlmsg_list**)arg;
|
||||
struct nlmsg_list *h;
|
||||
|
@ -78,7 +78,7 @@ static unsigned get_hz(void)
|
||||
return hz_internal;
|
||||
}
|
||||
|
||||
static int print_route(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
struct nlmsghdr *n, void *arg UNUSED_PARAM)
|
||||
{
|
||||
struct rtmsg *r = NLMSG_DATA(n);
|
||||
|
@ -40,7 +40,7 @@ static void usage(void)
|
||||
}
|
||||
*/
|
||||
|
||||
static int print_rule(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
static int FAST_FUNC print_rule(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
struct nlmsghdr *n, void *arg UNUSED_PARAM)
|
||||
{
|
||||
struct rtmsg *r = NLMSG_DATA(n);
|
||||
|
@ -104,7 +104,7 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
|
||||
}
|
||||
|
||||
static int rtnl_dump_filter(struct rtnl_handle *rth,
|
||||
int (*filter)(const struct sockaddr_nl *, struct nlmsghdr *n, void *),
|
||||
int (*filter)(const struct sockaddr_nl *, struct nlmsghdr *n, void *) FAST_FUNC,
|
||||
void *arg1/*,
|
||||
int (*junk)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
|
||||
void *arg2*/)
|
||||
@ -196,7 +196,7 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
|
||||
}
|
||||
|
||||
int FAST_FUNC xrtnl_dump_filter(struct rtnl_handle *rth,
|
||||
int (*filter)(const struct sockaddr_nl *, struct nlmsghdr *, void *),
|
||||
int (*filter)(const struct sockaddr_nl *, struct nlmsghdr *, void *) FAST_FUNC,
|
||||
void *arg1)
|
||||
{
|
||||
int ret = rtnl_dump_filter(rth, filter, arg1/*, NULL, NULL*/);
|
||||
@ -206,10 +206,10 @@ int FAST_FUNC xrtnl_dump_filter(struct rtnl_handle *rth,
|
||||
}
|
||||
|
||||
int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
|
||||
pid_t peer, unsigned groups,
|
||||
struct nlmsghdr *answer,
|
||||
int (*junk)(struct sockaddr_nl *, struct nlmsghdr *, void *),
|
||||
void *jarg)
|
||||
pid_t peer, unsigned groups,
|
||||
struct nlmsghdr *answer,
|
||||
int (*junk)(struct sockaddr_nl *, struct nlmsghdr *, void *),
|
||||
void *jarg)
|
||||
{
|
||||
/* bbox doesn't use parameters no. 3, 4, 6, 7, they are stubbed out */
|
||||
#define peer 0
|
||||
|
@ -23,16 +23,16 @@ extern void rtnl_close(struct rtnl_handle *rth) FAST_FUNC;
|
||||
extern int xrtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type) FAST_FUNC;
|
||||
extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len) FAST_FUNC;
|
||||
extern int xrtnl_dump_filter(struct rtnl_handle *rth,
|
||||
int (*filter)(const struct sockaddr_nl*, struct nlmsghdr *n, void*),
|
||||
void *arg1) FAST_FUNC;
|
||||
int (*filter)(const struct sockaddr_nl*, struct nlmsghdr *n, void*) FAST_FUNC,
|
||||
void *arg1) FAST_FUNC;
|
||||
|
||||
/* bbox doesn't use parameters no. 3, 4, 6, 7, stub them out */
|
||||
#define rtnl_talk(rtnl, n, peer, groups, answer, junk, jarg) \
|
||||
rtnl_talk(rtnl, n, answer)
|
||||
extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer,
|
||||
unsigned groups, struct nlmsghdr *answer,
|
||||
int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
|
||||
void *jarg) FAST_FUNC;
|
||||
unsigned groups, struct nlmsghdr *answer,
|
||||
int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
|
||||
void *jarg) FAST_FUNC;
|
||||
|
||||
extern int rtnl_send(struct rtnl_handle *rth, char *buf, int) FAST_FUNC;
|
||||
|
||||
|
@ -39,7 +39,7 @@ static struct idxmap *find_by_index(int idx)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int ll_remember_index(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
int FAST_FUNC ll_remember_index(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
struct nlmsghdr *n,
|
||||
void *arg UNUSED_PARAM)
|
||||
{
|
||||
@ -86,7 +86,7 @@ int ll_remember_index(const struct sockaddr_nl *who UNUSED_PARAM,
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *ll_idx_n2a(int idx, char *buf)
|
||||
const char FAST_FUNC *ll_idx_n2a(int idx, char *buf)
|
||||
{
|
||||
struct idxmap *im;
|
||||
|
||||
@ -100,7 +100,7 @@ const char *ll_idx_n2a(int idx, char *buf)
|
||||
}
|
||||
|
||||
|
||||
const char *ll_index_to_name(int idx)
|
||||
const char FAST_FUNC *ll_index_to_name(int idx)
|
||||
{
|
||||
static char nbuf[16];
|
||||
|
||||
@ -121,7 +121,7 @@ int ll_index_to_type(int idx)
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned ll_index_to_flags(int idx)
|
||||
unsigned FAST_FUNC ll_index_to_flags(int idx)
|
||||
{
|
||||
struct idxmap *im;
|
||||
|
||||
@ -133,7 +133,7 @@ unsigned ll_index_to_flags(int idx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xll_name_to_index(const char *name)
|
||||
int FAST_FUNC xll_name_to_index(const char *name)
|
||||
{
|
||||
int ret = 0;
|
||||
int sock_fd;
|
||||
@ -192,7 +192,7 @@ int xll_name_to_index(const char *name)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ll_init_map(struct rtnl_handle *rth)
|
||||
int FAST_FUNC ll_init_map(struct rtnl_handle *rth)
|
||||
{
|
||||
xrtnl_wilddump_request(rth, AF_UNSPEC, RTM_GETLINK);
|
||||
xrtnl_dump_filter(rth, ll_remember_index, &idxmap);
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
|
||||
|
||||
int ll_remember_index(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
|
||||
int ll_init_map(struct rtnl_handle *rth);
|
||||
int xll_name_to_index(const char *name);
|
||||
const char *ll_index_to_name(int idx);
|
||||
const char *ll_idx_n2a(int idx, char *buf);
|
||||
int ll_remember_index(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) FAST_FUNC;
|
||||
int ll_init_map(struct rtnl_handle *rth) FAST_FUNC;
|
||||
int xll_name_to_index(const char *name) FAST_FUNC;
|
||||
const char *ll_index_to_name(int idx) FAST_FUNC;
|
||||
const char *ll_idx_n2a(int idx, char *buf) FAST_FUNC;
|
||||
/* int ll_index_to_type(int idx); */
|
||||
unsigned ll_index_to_flags(int idx);
|
||||
unsigned ll_index_to_flags(int idx) FAST_FUNC;
|
||||
|
||||
POP_SAVED_FUNCTION_VISIBILITY
|
||||
|
||||
|
@ -24,7 +24,7 @@ static inline uint64_t hton64(uint64_t v)
|
||||
|
||||
|
||||
/* on these functions, make sure your datatype matches */
|
||||
static int read_ip(const char *line, void *arg)
|
||||
static int FAST_FUNC read_ip(const char *line, void *arg)
|
||||
{
|
||||
len_and_sockaddr *lsa;
|
||||
|
||||
@ -37,13 +37,13 @@ static int read_ip(const char *line, void *arg)
|
||||
}
|
||||
|
||||
|
||||
static int read_mac(const char *line, void *arg)
|
||||
static int FAST_FUNC read_mac(const char *line, void *arg)
|
||||
{
|
||||
return NULL == ether_aton_r(line, (struct ether_addr *)arg);
|
||||
}
|
||||
|
||||
|
||||
static int read_str(const char *line, void *arg)
|
||||
static int FAST_FUNC read_str(const char *line, void *arg)
|
||||
{
|
||||
char **dest = arg;
|
||||
|
||||
@ -53,14 +53,14 @@ static int read_str(const char *line, void *arg)
|
||||
}
|
||||
|
||||
|
||||
static int read_u32(const char *line, void *arg)
|
||||
static int FAST_FUNC read_u32(const char *line, void *arg)
|
||||
{
|
||||
*(uint32_t*)arg = bb_strtou32(line, NULL, 10);
|
||||
return errno == 0;
|
||||
}
|
||||
|
||||
|
||||
static int read_yn(const char *line, void *arg)
|
||||
static int FAST_FUNC read_yn(const char *line, void *arg)
|
||||
{
|
||||
char *dest = arg;
|
||||
|
||||
@ -156,7 +156,7 @@ static void attach_option(struct option_set **opt_list,
|
||||
|
||||
|
||||
/* read a dhcp option and add it to opt_list */
|
||||
static int read_opt(const char *const_line, void *arg)
|
||||
static int FAST_FUNC read_opt(const char *const_line, void *arg)
|
||||
{
|
||||
struct option_set **opt_list = arg;
|
||||
char *opt, *val, *endptr;
|
||||
@ -251,7 +251,7 @@ static int read_opt(const char *const_line, void *arg)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int read_staticlease(const char *const_line, void *arg)
|
||||
static int FAST_FUNC read_staticlease(const char *const_line, void *arg)
|
||||
{
|
||||
char *line;
|
||||
char *mac_string;
|
||||
@ -278,7 +278,7 @@ static int read_staticlease(const char *const_line, void *arg)
|
||||
|
||||
struct config_keyword {
|
||||
const char *keyword;
|
||||
int (*handler)(const char *line, void *var);
|
||||
int (*handler)(const char *line, void *var) FAST_FUNC;
|
||||
void *var;
|
||||
const char *def;
|
||||
};
|
||||
|
@ -281,14 +281,14 @@ static void scale(ullong ul)
|
||||
#define S_STAT(a) \
|
||||
typedef struct a { \
|
||||
struct s_stat *next; \
|
||||
void (*collect)(struct a *s); \
|
||||
void (*collect)(struct a *s) FAST_FUNC; \
|
||||
const char *label;
|
||||
#define S_STAT_END(a) } a;
|
||||
|
||||
S_STAT(s_stat)
|
||||
S_STAT_END(s_stat)
|
||||
|
||||
static void collect_literal(s_stat *s UNUSED_PARAM)
|
||||
static void FAST_FUNC collect_literal(s_stat *s UNUSED_PARAM)
|
||||
{
|
||||
}
|
||||
|
||||
@ -325,7 +325,7 @@ S_STAT(cpu_stat)
|
||||
S_STAT_END(cpu_stat)
|
||||
|
||||
|
||||
static void collect_cpu(cpu_stat *s)
|
||||
static void FAST_FUNC collect_cpu(cpu_stat *s)
|
||||
{
|
||||
ullong data[CPU_FIELDCNT] = { 0, 0, 0, 0, 0, 0, 0 };
|
||||
unsigned frac[CPU_FIELDCNT] = { 0, 0, 0, 0, 0, 0, 0 };
|
||||
@ -399,7 +399,7 @@ S_STAT(int_stat)
|
||||
int no;
|
||||
S_STAT_END(int_stat)
|
||||
|
||||
static void collect_int(int_stat *s)
|
||||
static void FAST_FUNC collect_int(int_stat *s)
|
||||
{
|
||||
ullong data[1];
|
||||
ullong old;
|
||||
@ -433,7 +433,7 @@ S_STAT(ctx_stat)
|
||||
ullong old;
|
||||
S_STAT_END(ctx_stat)
|
||||
|
||||
static void collect_ctx(ctx_stat *s)
|
||||
static void FAST_FUNC collect_ctx(ctx_stat *s)
|
||||
{
|
||||
ullong data[1];
|
||||
ullong old;
|
||||
@ -462,7 +462,7 @@ S_STAT(blk_stat)
|
||||
ullong old[2];
|
||||
S_STAT_END(blk_stat)
|
||||
|
||||
static void collect_blk(blk_stat *s)
|
||||
static void FAST_FUNC collect_blk(blk_stat *s)
|
||||
{
|
||||
ullong data[2];
|
||||
int i;
|
||||
@ -504,7 +504,7 @@ S_STAT(fork_stat)
|
||||
ullong old;
|
||||
S_STAT_END(fork_stat)
|
||||
|
||||
static void collect_thread_nr(fork_stat *s UNUSED_PARAM)
|
||||
static void FAST_FUNC collect_thread_nr(fork_stat *s UNUSED_PARAM)
|
||||
{
|
||||
ullong data[1];
|
||||
|
||||
@ -515,7 +515,7 @@ static void collect_thread_nr(fork_stat *s UNUSED_PARAM)
|
||||
scale(data[0]);
|
||||
}
|
||||
|
||||
static void collect_fork(fork_stat *s)
|
||||
static void FAST_FUNC collect_fork(fork_stat *s)
|
||||
{
|
||||
ullong data[1];
|
||||
ullong old;
|
||||
@ -549,7 +549,7 @@ S_STAT(if_stat)
|
||||
char *device_colon;
|
||||
S_STAT_END(if_stat)
|
||||
|
||||
static void collect_if(if_stat *s)
|
||||
static void FAST_FUNC collect_if(if_stat *s)
|
||||
{
|
||||
ullong data[4];
|
||||
int i;
|
||||
@ -624,7 +624,7 @@ S_STAT_END(mem_stat)
|
||||
//HugePages_Total: 0
|
||||
//HugePages_Free: 0
|
||||
//Hugepagesize: 4096 kB
|
||||
static void collect_mem(mem_stat *s)
|
||||
static void FAST_FUNC collect_mem(mem_stat *s)
|
||||
{
|
||||
ullong m_total = 0;
|
||||
ullong m_free = 0;
|
||||
@ -671,7 +671,7 @@ static s_stat* init_mem(const char *param)
|
||||
S_STAT(swp_stat)
|
||||
S_STAT_END(swp_stat)
|
||||
|
||||
static void collect_swp(swp_stat *s UNUSED_PARAM)
|
||||
static void FAST_FUNC collect_swp(swp_stat *s UNUSED_PARAM)
|
||||
{
|
||||
ullong s_total[1];
|
||||
ullong s_free[1];
|
||||
@ -695,7 +695,7 @@ static s_stat* init_swp(const char *param UNUSED_PARAM)
|
||||
S_STAT(fd_stat)
|
||||
S_STAT_END(fd_stat)
|
||||
|
||||
static void collect_fd(fd_stat *s UNUSED_PARAM)
|
||||
static void FAST_FUNC collect_fd(fd_stat *s UNUSED_PARAM)
|
||||
{
|
||||
ullong data[2];
|
||||
|
||||
@ -720,7 +720,7 @@ S_STAT(time_stat)
|
||||
int scale;
|
||||
S_STAT_END(time_stat)
|
||||
|
||||
static void collect_time(time_stat *s)
|
||||
static void FAST_FUNC collect_time(time_stat *s)
|
||||
{
|
||||
char buf[sizeof("12:34:56.123456")];
|
||||
struct tm* tm;
|
||||
@ -755,7 +755,7 @@ static s_stat* init_time(const char *param)
|
||||
return (s_stat*)s;
|
||||
}
|
||||
|
||||
static void collect_info(s_stat *s)
|
||||
static void FAST_FUNC collect_info(s_stat *s)
|
||||
{
|
||||
gen ^= 1;
|
||||
while (s) {
|
||||
|
161
shell/ash.c
161
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;
|
||||
|
118
shell/hush.c
118
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);
|
||||
static int builtin_memleak(char **argv) FAST_FUNC;
|
||||
#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_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;
|
||||
|
||||
|
@ -23,8 +23,7 @@
|
||||
#define SYSV_NICINOD 100
|
||||
#define SYSV_NICFREE 50
|
||||
|
||||
struct sysv_super
|
||||
{
|
||||
struct sysv_super {
|
||||
uint16_t s_isize;
|
||||
uint16_t s_pad0;
|
||||
uint32_t s_fsize;
|
||||
|
@ -20,8 +20,7 @@
|
||||
|
||||
#include "volume_id_internal.h"
|
||||
|
||||
struct hpfs_super
|
||||
{
|
||||
struct hpfs_super {
|
||||
uint8_t magic[4];
|
||||
uint8_t version;
|
||||
} __attribute__((__packed__));
|
||||
|
Loading…
Reference in New Issue
Block a user