*: 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 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);
|
char *path = concat_subpath_file(dir_name, de->d_name);
|
||||||
/* path is NULL if de->d_name is "." or "..", else... */
|
/* 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 */
|
/* Iterate a function on each entry of a directory */
|
||||||
int iterate_on_dir(const char *dir_name,
|
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)
|
void *private)
|
||||||
{
|
{
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent *de, *dep;
|
struct dirent *de;
|
||||||
int max_len, len;
|
|
||||||
|
|
||||||
max_len = PATH_MAX + sizeof(struct dirent);
|
|
||||||
de = xmalloc(max_len+1);
|
|
||||||
memset(de, 0, max_len+1);
|
|
||||||
|
|
||||||
dir = opendir(dir_name);
|
dir = opendir(dir_name);
|
||||||
if (dir == NULL) {
|
if (dir == NULL) {
|
||||||
free(de);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
while ((dep = readdir(dir))) {
|
while ((de = readdir(dir)) != NULL) {
|
||||||
len = sizeof(struct dirent);
|
|
||||||
if (len < dep->d_reclen)
|
|
||||||
len = dep->d_reclen;
|
|
||||||
if (len > max_len)
|
|
||||||
len = max_len;
|
|
||||||
memcpy(de, dep, len);
|
|
||||||
func(dir_name, de, private);
|
func(dir_name, de, private);
|
||||||
}
|
}
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
free(de);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
|
|||||||
|
|
||||||
/* Iterate a function on each entry of a directory */
|
/* Iterate a function on each entry of a directory */
|
||||||
int iterate_on_dir(const char *dir_name,
|
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);
|
void *private);
|
||||||
|
|
||||||
/* Get/set a file version on an ext2 file system */
|
/* Get/set a file version on an ext2 file system */
|
||||||
|
@ -57,7 +57,8 @@ static void list_attributes(const char *name)
|
|||||||
bb_perror_msg("reading %s", name);
|
bb_perror_msg("reading %s", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lsattr_dir_proc(const char *dir_name, struct dirent *de,
|
static int FAST_FUNC lsattr_dir_proc(const char *dir_name,
|
||||||
|
struct dirent *de,
|
||||||
void *private UNUSED_PARAM)
|
void *private UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
IF_FEATURE_FIND_XDEV(static dev_t *xdev_dev;)
|
IF_FEATURE_FIND_XDEV(static dev_t *xdev_dev;)
|
||||||
IF_FEATURE_FIND_XDEV(static int xdev_count;)
|
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 {
|
typedef struct {
|
||||||
action_fp f;
|
action_fp f;
|
||||||
@ -73,10 +73,13 @@ typedef struct {
|
|||||||
bool invert;
|
bool invert;
|
||||||
#endif
|
#endif
|
||||||
} action;
|
} action;
|
||||||
|
|
||||||
#define ACTS(name, arg...) typedef struct { action a; arg; } action_##name;
|
#define ACTS(name, arg...) typedef struct { action a; arg; } action_##name;
|
||||||
#define ACTF(name) static int func_##name(const char *fileName UNUSED_PARAM, \
|
#define ACTF(name) \
|
||||||
|
static int FAST_FUNC func_##name(const char *fileName UNUSED_PARAM, \
|
||||||
struct stat *statbuf UNUSED_PARAM, \
|
struct stat *statbuf UNUSED_PARAM, \
|
||||||
action_##name* ap UNUSED_PARAM)
|
action_##name* ap UNUSED_PARAM)
|
||||||
|
|
||||||
ACTS(print)
|
ACTS(print)
|
||||||
ACTS(name, const char *pattern; bool iname;)
|
ACTS(name, const char *pattern; bool iname;)
|
||||||
IF_FEATURE_FIND_PATH( ACTS(path, const char *pattern;))
|
IF_FEATURE_FIND_PATH( ACTS(path, const char *pattern;))
|
||||||
|
@ -92,8 +92,8 @@
|
|||||||
#define DEVFS_PATHLEN 1024
|
#define DEVFS_PATHLEN 1024
|
||||||
/* Never change this otherwise the binary interface will change */
|
/* Never change this otherwise the binary interface will change */
|
||||||
|
|
||||||
struct devfsd_notify_struct
|
struct devfsd_notify_struct {
|
||||||
{ /* Use native C types to ensure same types in kernel and user space */
|
/* Use native C types to ensure same types in kernel and user space */
|
||||||
unsigned int type; /* DEVFSD_NOTIFY_* value */
|
unsigned int type; /* DEVFSD_NOTIFY_* value */
|
||||||
unsigned int mode; /* Mode of the inode or device entry */
|
unsigned int mode; /* Mode of the inode or device entry */
|
||||||
unsigned int major; /* Major number of device entry */
|
unsigned int major; /* Major number of device entry */
|
||||||
@ -151,32 +151,27 @@ struct devfsd_notify_struct
|
|||||||
#define AC_RMNEWCOMPAT 10
|
#define AC_RMNEWCOMPAT 10
|
||||||
#define AC_RESTORE 11
|
#define AC_RESTORE 11
|
||||||
|
|
||||||
struct permissions_type
|
struct permissions_type {
|
||||||
{
|
|
||||||
mode_t mode;
|
mode_t mode;
|
||||||
uid_t uid;
|
uid_t uid;
|
||||||
gid_t gid;
|
gid_t gid;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct execute_type
|
struct execute_type {
|
||||||
{
|
|
||||||
char *argv[MAX_ARGS + 1]; /* argv[0] must always be the programme */
|
char *argv[MAX_ARGS + 1]; /* argv[0] must always be the programme */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct copy_type
|
struct copy_type {
|
||||||
{
|
|
||||||
const char *source;
|
const char *source;
|
||||||
const char *destination;
|
const char *destination;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct action_type
|
struct action_type {
|
||||||
{
|
|
||||||
unsigned int what;
|
unsigned int what;
|
||||||
unsigned int when;
|
unsigned int when;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct config_entry_struct
|
struct config_entry_struct {
|
||||||
{
|
|
||||||
struct action_type action;
|
struct action_type action;
|
||||||
regex_t preg;
|
regex_t preg;
|
||||||
union
|
union
|
||||||
@ -189,8 +184,7 @@ struct config_entry_struct
|
|||||||
struct config_entry_struct *next;
|
struct config_entry_struct *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct get_variable_info
|
struct get_variable_info {
|
||||||
{
|
|
||||||
const struct devfsd_notify_struct *info;
|
const struct devfsd_notify_struct *info;
|
||||||
const char *devname;
|
const char *devname;
|
||||||
char devpath[STRING_LENGTH];
|
char devpath[STRING_LENGTH];
|
||||||
@ -1336,8 +1330,7 @@ static void expand_regexp(char *output, size_t outsize, const char *input,
|
|||||||
|
|
||||||
/* from compat_name.c */
|
/* from compat_name.c */
|
||||||
|
|
||||||
struct translate_struct
|
struct translate_struct {
|
||||||
{
|
|
||||||
const char *match; /* The string to match to(up to length) */
|
const char *match; /* The string to match to(up to length) */
|
||||||
const char *format; /* Format of output, "%s" takes data past match string,
|
const char *format; /* Format of output, "%s" takes data past match string,
|
||||||
NULL is effectively "%s"(just more efficient) */
|
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_string_patch;
|
||||||
struct obj_symbol_patch;
|
struct obj_symbol_patch;
|
||||||
|
|
||||||
struct obj_section
|
struct obj_section {
|
||||||
{
|
|
||||||
ElfW(Shdr) header;
|
ElfW(Shdr) header;
|
||||||
const char *name;
|
const char *name;
|
||||||
char *contents;
|
char *contents;
|
||||||
@ -520,8 +519,7 @@ struct obj_section
|
|||||||
int idx;
|
int idx;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct obj_symbol
|
struct obj_symbol {
|
||||||
{
|
|
||||||
struct obj_symbol *next; /* hash table link */
|
struct obj_symbol *next; /* hash table link */
|
||||||
const char *name;
|
const char *name;
|
||||||
unsigned long value;
|
unsigned long value;
|
||||||
@ -546,8 +544,8 @@ struct obj_file {
|
|||||||
struct obj_section **load_order_search_start;
|
struct obj_section **load_order_search_start;
|
||||||
struct obj_string_patch *string_patches;
|
struct obj_string_patch *string_patches;
|
||||||
struct obj_symbol_patch *symbol_patches;
|
struct obj_symbol_patch *symbol_patches;
|
||||||
int (*symbol_cmp)(const char *, const char *);
|
int (*symbol_cmp)(const char *, const char *); /* cant be FAST_FUNC */
|
||||||
unsigned long (*symbol_hash)(const char *);
|
unsigned long (*symbol_hash)(const char *) FAST_FUNC;
|
||||||
unsigned long local_symtab_size;
|
unsigned long local_symtab_size;
|
||||||
struct obj_symbol **local_symtab;
|
struct obj_symbol **local_symtab;
|
||||||
struct obj_symbol *symtab[HASH_BUCKETS];
|
struct obj_symbol *symtab[HASH_BUCKETS];
|
||||||
@ -577,7 +575,7 @@ struct obj_symbol_patch {
|
|||||||
|
|
||||||
/* Generic object manipulation routines. */
|
/* 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 unsigned long obj_elf_hash_n(const char *, unsigned long len);
|
||||||
|
|
||||||
@ -590,7 +588,7 @@ static ElfW(Addr) obj_symbol_final_value(struct obj_file *f,
|
|||||||
#if ENABLE_FEATURE_INSMOD_VERSION_CHECKING
|
#if ENABLE_FEATURE_INSMOD_VERSION_CHECKING
|
||||||
static void obj_set_symbol_compare(struct obj_file *f,
|
static void obj_set_symbol_compare(struct obj_file *f,
|
||||||
int (*cmp)(const char *, const char *),
|
int (*cmp)(const char *, const char *),
|
||||||
unsigned long (*hash)(const char *));
|
unsigned long (*hash)(const char *) FAST_FUNC);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct obj_section *obj_find_section(struct obj_file *f,
|
static struct obj_section *obj_find_section(struct obj_file *f,
|
||||||
@ -679,8 +677,7 @@ enum { STRVERSIONLEN = 64 };
|
|||||||
|
|
||||||
#if defined(USE_LIST)
|
#if defined(USE_LIST)
|
||||||
|
|
||||||
struct arch_list_entry
|
struct arch_list_entry {
|
||||||
{
|
|
||||||
struct arch_list_entry *next;
|
struct arch_list_entry *next;
|
||||||
LIST_ARCHTYPE addend;
|
LIST_ARCHTYPE addend;
|
||||||
int offset;
|
int offset;
|
||||||
@ -691,8 +688,7 @@ struct arch_list_entry
|
|||||||
|
|
||||||
#if defined(USE_SINGLE)
|
#if defined(USE_SINGLE)
|
||||||
|
|
||||||
struct arch_single_entry
|
struct arch_single_entry {
|
||||||
{
|
|
||||||
int offset;
|
int offset;
|
||||||
int inited : 1;
|
int inited : 1;
|
||||||
int allocated : 1;
|
int allocated : 1;
|
||||||
@ -701,8 +697,7 @@ struct arch_single_entry
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__mips__)
|
#if defined(__mips__)
|
||||||
struct mips_hi16
|
struct mips_hi16 {
|
||||||
{
|
|
||||||
struct mips_hi16 *next;
|
struct mips_hi16 *next;
|
||||||
ElfW(Addr) *addr;
|
ElfW(Addr) *addr;
|
||||||
ElfW(Addr) value;
|
ElfW(Addr) value;
|
||||||
@ -1916,7 +1911,7 @@ static unsigned long obj_elf_hash_n(const char *name, unsigned long n)
|
|||||||
return h;
|
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));
|
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
|
/* String hashing for non-co-versioned kernel and module. Here
|
||||||
we are simply forced to drop the crc from the hash. */
|
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);
|
size_t len = strlen(str);
|
||||||
if (len > 10 && str[len - 10] == '_' && str[len - 9] == 'R')
|
if (len > 10 && str[len - 10] == '_' && str[len - 9] == 'R')
|
||||||
@ -1950,7 +1945,7 @@ static unsigned long ncv_symbol_hash(const char *str)
|
|||||||
static void
|
static void
|
||||||
obj_set_symbol_compare(struct obj_file *f,
|
obj_set_symbol_compare(struct obj_file *f,
|
||||||
int (*cmp) (const char *, const char *),
|
int (*cmp) (const char *, const char *),
|
||||||
unsigned long (*hash) (const char *))
|
unsigned long (*hash) (const char *) FAST_FUNC)
|
||||||
{
|
{
|
||||||
if (cmp)
|
if (cmp)
|
||||||
f->symbol_cmp = cmp;
|
f->symbol_cmp = cmp;
|
||||||
@ -1963,7 +1958,7 @@ obj_set_symbol_compare(struct obj_file *f,
|
|||||||
memcpy(tmptab, f->symtab, sizeof(tmptab));
|
memcpy(tmptab, f->symtab, sizeof(tmptab));
|
||||||
memset(f->symtab, 0, sizeof(f->symtab));
|
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) {
|
for (sym = tmptab[i]; sym; sym = next) {
|
||||||
unsigned long h = hash(sym->name) % HASH_BUCKETS;
|
unsigned long h = hash(sym->name) % HASH_BUCKETS;
|
||||||
next = sym->next;
|
next = sym->next;
|
||||||
@ -1972,6 +1967,7 @@ obj_set_symbol_compare(struct obj_file *f,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* FEATURE_INSMOD_VERSION_CHECKING */
|
#endif /* FEATURE_INSMOD_VERSION_CHECKING */
|
||||||
|
|
||||||
@ -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"
|
#define TAINT_URL "http://www.tux.org/lkml/#export-tainted"
|
||||||
|
|
||||||
static void set_tainted(int fd, const char *m_name,
|
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;
|
static smallint printed_info;
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ typedef int execfn(char *command);
|
|||||||
|
|
||||||
struct method_t {
|
struct method_t {
|
||||||
const char *name;
|
const char *name;
|
||||||
int (*up)(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);
|
int (*down)(struct interface_defn_t *ifd, execfn *e) FAST_FUNC;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct address_family_t {
|
struct address_family_t {
|
||||||
@ -325,7 +325,7 @@ static int execute(const char *command, struct interface_defn_t *ifd, execfn *ex
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_IPV6
|
#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
|
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
int result;
|
int result;
|
||||||
@ -337,7 +337,7 @@ static int loopback_up6(struct interface_defn_t *ifd, execfn *exec)
|
|||||||
#endif
|
#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
|
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
return execute("ip link set %iface% down", ifd, exec);
|
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
|
#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;
|
int result;
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
#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);
|
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
|
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
return execute("ip link set %iface% down", ifd, exec);
|
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
|
#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;
|
int result;
|
||||||
result = execute("ip tunnel add %iface% mode sit remote "
|
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);
|
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);
|
return execute("ip tunnel del %iface%", ifd, exec);
|
||||||
}
|
}
|
||||||
@ -405,7 +405,7 @@ static const struct address_family_t addr_inet6 = {
|
|||||||
#endif /* FEATURE_IFUPDOWN_IPV6 */
|
#endif /* FEATURE_IFUPDOWN_IPV6 */
|
||||||
|
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_IPV4
|
#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
|
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
int result;
|
int result;
|
||||||
@ -417,7 +417,7 @@ static int loopback_up(struct interface_defn_t *ifd, execfn *exec)
|
|||||||
#endif
|
#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
|
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
int result;
|
int result;
|
||||||
@ -429,7 +429,7 @@ static int loopback_down(struct interface_defn_t *ifd, execfn *exec)
|
|||||||
#endif
|
#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;
|
int result;
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
@ -451,7 +451,7 @@ static int static_up(struct interface_defn_t *ifd, execfn *exec)
|
|||||||
#endif
|
#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;
|
int result;
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
#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
|
#if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP
|
||||||
struct dhcp_client_t
|
struct dhcp_client_t {
|
||||||
{
|
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *startcmd;
|
const char *startcmd;
|
||||||
const char *stopcmd;
|
const char *stopcmd;
|
||||||
@ -497,7 +496,7 @@ static const struct dhcp_client_t ext_dhcp_clients[] = {
|
|||||||
#endif /* ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCPC */
|
#endif /* ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCPC */
|
||||||
|
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP
|
#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;
|
unsigned i;
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_IP
|
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
@ -517,7 +516,7 @@ static int dhcp_up(struct interface_defn_t *ifd, execfn *exec)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#elif ENABLE_APP_UDHCPC
|
#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
|
#if ENABLE_FEATURE_IFUPDOWN_IP
|
||||||
/* ip doesn't up iface when it configures it (unlike ifconfig) */
|
/* 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);
|
ifd, exec);
|
||||||
}
|
}
|
||||||
#else
|
#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)
|
execfn *exec UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
return 0; /* no dhcp support */
|
return 0; /* no dhcp support */
|
||||||
@ -541,7 +540,7 @@ static int dhcp_up(struct interface_defn_t *ifd UNUSED_PARAM,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLE_FEATURE_IFUPDOWN_EXTERNAL_DHCP
|
#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;
|
int result = 0;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
@ -564,7 +563,7 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
|||||||
return ((result == 3) ? 3 : 0);
|
return ((result == 3) ? 3 : 0);
|
||||||
}
|
}
|
||||||
#elif ENABLE_APP_UDHCPC
|
#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;
|
int result;
|
||||||
result = execute("kill "
|
result = execute("kill "
|
||||||
@ -579,42 +578,42 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
|||||||
return ((result == 3) ? 3 : 0);
|
return ((result == 3) ? 3 : 0);
|
||||||
}
|
}
|
||||||
#else
|
#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)
|
execfn *exec UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
return 0; /* no dhcp support */
|
return 0; /* no dhcp support */
|
||||||
}
|
}
|
||||||
#endif
|
#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;
|
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%"
|
return execute("bootpc[[ --bootfile %bootfile%]] --dev %iface%"
|
||||||
"[[ --server %server%]][[ --hwaddr %hwaddr%]]"
|
"[[ --server %server%]][[ --hwaddr %hwaddr%]]"
|
||||||
" --returniffail --serverbcast", ifd, exec);
|
" --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);
|
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);
|
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 "
|
return execute("start-stop-daemon --start -x wvdial "
|
||||||
"-p /var/run/wvdial.%iface% -b -m --[[ %provider%]]", ifd, exec);
|
"-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 "
|
return execute("start-stop-daemon --stop -x wvdial "
|
||||||
"-p /var/run/wvdial.%iface% -s 2", ifd, exec);
|
"-p /var/run/wvdial.%iface% -s 2", ifd, exec);
|
||||||
|
@ -239,36 +239,36 @@ typedef struct servtab_t {
|
|||||||
#ifdef INETD_BUILTINS_ENABLED
|
#ifdef INETD_BUILTINS_ENABLED
|
||||||
/* Echo received data */
|
/* Echo received data */
|
||||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
|
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
|
||||||
static void echo_stream(int, servtab_t *);
|
static void FAST_FUNC echo_stream(int, servtab_t *);
|
||||||
static void echo_dg(int, servtab_t *);
|
static void FAST_FUNC echo_dg(int, servtab_t *);
|
||||||
#endif
|
#endif
|
||||||
/* Internet /dev/null */
|
/* Internet /dev/null */
|
||||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
|
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
|
||||||
static void discard_stream(int, servtab_t *);
|
static void FAST_FUNC discard_stream(int, servtab_t *);
|
||||||
static void discard_dg(int, servtab_t *);
|
static void FAST_FUNC discard_dg(int, servtab_t *);
|
||||||
#endif
|
#endif
|
||||||
/* Return 32 bit time since 1900 */
|
/* Return 32 bit time since 1900 */
|
||||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_TIME
|
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_TIME
|
||||||
static void machtime_stream(int, servtab_t *);
|
static void FAST_FUNC machtime_stream(int, servtab_t *);
|
||||||
static void machtime_dg(int, servtab_t *);
|
static void FAST_FUNC machtime_dg(int, servtab_t *);
|
||||||
#endif
|
#endif
|
||||||
/* Return human-readable time */
|
/* Return human-readable time */
|
||||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
|
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
|
||||||
static void daytime_stream(int, servtab_t *);
|
static void FAST_FUNC daytime_stream(int, servtab_t *);
|
||||||
static void daytime_dg(int, servtab_t *);
|
static void FAST_FUNC daytime_dg(int, servtab_t *);
|
||||||
#endif
|
#endif
|
||||||
/* Familiar character generator */
|
/* Familiar character generator */
|
||||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN
|
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN
|
||||||
static void chargen_stream(int, servtab_t *);
|
static void FAST_FUNC chargen_stream(int, servtab_t *);
|
||||||
static void chargen_dg(int, servtab_t *);
|
static void FAST_FUNC chargen_dg(int, servtab_t *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct builtin {
|
struct builtin {
|
||||||
/* NB: not necessarily NUL terminated */
|
/* NB: not necessarily NUL terminated */
|
||||||
char bi_service7[7]; /* internally provided service name */
|
char bi_service7[7]; /* internally provided service name */
|
||||||
uint8_t bi_fork; /* 1 if stream fn should run in child */
|
uint8_t bi_fork; /* 1 if stream fn should run in child */
|
||||||
void (*bi_stream_fn)(int, servtab_t *);
|
void (*bi_stream_fn)(int, servtab_t *) FAST_FUNC;
|
||||||
void (*bi_dgram_fn)(int, servtab_t *);
|
void (*bi_dgram_fn)(int, servtab_t *) FAST_FUNC;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct builtin builtins[] = {
|
static const struct builtin builtins[] = {
|
||||||
@ -1386,7 +1386,7 @@ static const char *const cat_args[] = { "cat", NULL };
|
|||||||
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
|
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_ECHO
|
||||||
/* Echo service -- echo data back. */
|
/* Echo service -- echo data back. */
|
||||||
/* ARGSUSED */
|
/* 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
|
#if BB_MMU
|
||||||
while (1) {
|
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) */
|
/* on failure we return to main, which does exit(EXIT_FAILURE) */
|
||||||
#endif
|
#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! :) */
|
enum { BUFSIZE = 12*1024 }; /* for jumbo sized packets! :) */
|
||||||
char *buf = xmalloc(BUFSIZE); /* too big for stack */
|
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
|
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD
|
||||||
/* Discard service -- ignore data. */
|
/* Discard service -- ignore data. */
|
||||||
/* ARGSUSED */
|
/* 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
|
#if BB_MMU
|
||||||
while (safe_read(s, line, LINE_SIZE) > 0)
|
while (safe_read(s, line, LINE_SIZE) > 0)
|
||||||
@ -1446,7 +1446,7 @@ static void discard_stream(int s, servtab_t *sep UNUSED_PARAM)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/* ARGSUSED */
|
/* 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! */
|
/* dgram builtins are non-forking - DONT BLOCK! */
|
||||||
recv(s, line, LINE_SIZE, MSG_DONTWAIT);
|
recv(s, line, LINE_SIZE, MSG_DONTWAIT);
|
||||||
@ -1467,7 +1467,7 @@ static void init_ring(void)
|
|||||||
}
|
}
|
||||||
/* Character generator. MMU arches only. */
|
/* Character generator. MMU arches only. */
|
||||||
/* ARGSUSED */
|
/* 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;
|
char *rs;
|
||||||
int len;
|
int len;
|
||||||
@ -1495,7 +1495,7 @@ static void chargen_stream(int s, servtab_t *sep UNUSED_PARAM)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* ARGSUSED */
|
/* ARGSUSED */
|
||||||
static void chargen_dg(int s, servtab_t *sep)
|
static void FAST_FUNC chargen_dg(int s, servtab_t *sep)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
char text[LINESIZ + 2];
|
char text[LINESIZ + 2];
|
||||||
@ -1544,14 +1544,14 @@ static uint32_t machtime(void)
|
|||||||
return htonl((uint32_t)(tv.tv_sec + 2208988800));
|
return htonl((uint32_t)(tv.tv_sec + 2208988800));
|
||||||
}
|
}
|
||||||
/* ARGSUSED */
|
/* 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;
|
uint32_t result;
|
||||||
|
|
||||||
result = machtime();
|
result = machtime();
|
||||||
full_write(s, &result, sizeof(result));
|
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;
|
uint32_t result;
|
||||||
len_and_sockaddr *lsa = alloca(LSA_LEN_SIZE + sep->se_lsa->len);
|
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
|
#if ENABLE_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME
|
||||||
/* Return human-readable time of day */
|
/* Return human-readable time of day */
|
||||||
/* ARGSUSED */
|
/* 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;
|
time_t t;
|
||||||
|
|
||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
fdprintf(s, "%.24s\r\n", ctime(&t));
|
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;
|
time_t t;
|
||||||
len_and_sockaddr *lsa = alloca(LSA_LEN_SIZE + sep->se_lsa->len);
|
len_and_sockaddr *lsa = alloca(LSA_LEN_SIZE + sep->se_lsa->len);
|
||||||
|
@ -196,7 +196,7 @@ static int flush_update(void)
|
|||||||
return 0;
|
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 nlmsghdr *n, void *arg UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
struct ifaddrmsg *ifa = NLMSG_DATA(n);
|
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 nlmsg_list *next;
|
||||||
struct nlmsghdr h;
|
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 **linfo = (struct nlmsg_list**)arg;
|
||||||
struct nlmsg_list *h;
|
struct nlmsg_list *h;
|
||||||
|
@ -78,7 +78,7 @@ static unsigned get_hz(void)
|
|||||||
return hz_internal;
|
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 nlmsghdr *n, void *arg UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
struct rtmsg *r = NLMSG_DATA(n);
|
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 nlmsghdr *n, void *arg UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
struct rtmsg *r = NLMSG_DATA(n);
|
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,
|
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/*,
|
void *arg1/*,
|
||||||
int (*junk)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
|
int (*junk)(struct sockaddr_nl *, struct nlmsghdr *n, void *),
|
||||||
void *arg2*/)
|
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 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)
|
void *arg1)
|
||||||
{
|
{
|
||||||
int ret = rtnl_dump_filter(rth, filter, arg1/*, NULL, NULL*/);
|
int ret = rtnl_dump_filter(rth, filter, arg1/*, NULL, NULL*/);
|
||||||
|
@ -23,7 +23,7 @@ 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 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 rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len) FAST_FUNC;
|
||||||
extern int xrtnl_dump_filter(struct rtnl_handle *rth,
|
extern int xrtnl_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) FAST_FUNC;
|
void *arg1) FAST_FUNC;
|
||||||
|
|
||||||
/* bbox doesn't use parameters no. 3, 4, 6, 7, stub them out */
|
/* bbox doesn't use parameters no. 3, 4, 6, 7, stub them out */
|
||||||
|
@ -39,7 +39,7 @@ static struct idxmap *find_by_index(int idx)
|
|||||||
return NULL;
|
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,
|
struct nlmsghdr *n,
|
||||||
void *arg UNUSED_PARAM)
|
void *arg UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
@ -86,7 +86,7 @@ int ll_remember_index(const struct sockaddr_nl *who UNUSED_PARAM,
|
|||||||
return 0;
|
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;
|
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];
|
static char nbuf[16];
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ int ll_index_to_type(int idx)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned ll_index_to_flags(int idx)
|
unsigned FAST_FUNC ll_index_to_flags(int idx)
|
||||||
{
|
{
|
||||||
struct idxmap *im;
|
struct idxmap *im;
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ unsigned ll_index_to_flags(int idx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int xll_name_to_index(const char *name)
|
int FAST_FUNC xll_name_to_index(const char *name)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int sock_fd;
|
int sock_fd;
|
||||||
@ -192,7 +192,7 @@ int xll_name_to_index(const char *name)
|
|||||||
return ret;
|
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_wilddump_request(rth, AF_UNSPEC, RTM_GETLINK);
|
||||||
xrtnl_dump_filter(rth, ll_remember_index, &idxmap);
|
xrtnl_dump_filter(rth, ll_remember_index, &idxmap);
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
|
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
|
||||||
|
|
||||||
int ll_remember_index(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
|
int ll_remember_index(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) FAST_FUNC;
|
||||||
int ll_init_map(struct rtnl_handle *rth);
|
int ll_init_map(struct rtnl_handle *rth) FAST_FUNC;
|
||||||
int xll_name_to_index(const char *name);
|
int xll_name_to_index(const char *name) FAST_FUNC;
|
||||||
const char *ll_index_to_name(int idx);
|
const char *ll_index_to_name(int idx) FAST_FUNC;
|
||||||
const char *ll_idx_n2a(int idx, char *buf);
|
const char *ll_idx_n2a(int idx, char *buf) FAST_FUNC;
|
||||||
/* int ll_index_to_type(int idx); */
|
/* 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
|
POP_SAVED_FUNCTION_VISIBILITY
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ static inline uint64_t hton64(uint64_t v)
|
|||||||
|
|
||||||
|
|
||||||
/* on these functions, make sure your datatype matches */
|
/* 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;
|
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);
|
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;
|
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);
|
*(uint32_t*)arg = bb_strtou32(line, NULL, 10);
|
||||||
return errno == 0;
|
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;
|
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 */
|
/* 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;
|
struct option_set **opt_list = arg;
|
||||||
char *opt, *val, *endptr;
|
char *opt, *val, *endptr;
|
||||||
@ -251,7 +251,7 @@ static int read_opt(const char *const_line, void *arg)
|
|||||||
return retval;
|
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 *line;
|
||||||
char *mac_string;
|
char *mac_string;
|
||||||
@ -278,7 +278,7 @@ static int read_staticlease(const char *const_line, void *arg)
|
|||||||
|
|
||||||
struct config_keyword {
|
struct config_keyword {
|
||||||
const char *keyword;
|
const char *keyword;
|
||||||
int (*handler)(const char *line, void *var);
|
int (*handler)(const char *line, void *var) FAST_FUNC;
|
||||||
void *var;
|
void *var;
|
||||||
const char *def;
|
const char *def;
|
||||||
};
|
};
|
||||||
|
@ -281,14 +281,14 @@ static void scale(ullong ul)
|
|||||||
#define S_STAT(a) \
|
#define S_STAT(a) \
|
||||||
typedef struct a { \
|
typedef struct a { \
|
||||||
struct s_stat *next; \
|
struct s_stat *next; \
|
||||||
void (*collect)(struct a *s); \
|
void (*collect)(struct a *s) FAST_FUNC; \
|
||||||
const char *label;
|
const char *label;
|
||||||
#define S_STAT_END(a) } a;
|
#define S_STAT_END(a) } a;
|
||||||
|
|
||||||
S_STAT(s_stat)
|
S_STAT(s_stat)
|
||||||
S_STAT_END(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)
|
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 };
|
ullong data[CPU_FIELDCNT] = { 0, 0, 0, 0, 0, 0, 0 };
|
||||||
unsigned frac[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;
|
int no;
|
||||||
S_STAT_END(int_stat)
|
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 data[1];
|
||||||
ullong old;
|
ullong old;
|
||||||
@ -433,7 +433,7 @@ S_STAT(ctx_stat)
|
|||||||
ullong old;
|
ullong old;
|
||||||
S_STAT_END(ctx_stat)
|
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 data[1];
|
||||||
ullong old;
|
ullong old;
|
||||||
@ -462,7 +462,7 @@ S_STAT(blk_stat)
|
|||||||
ullong old[2];
|
ullong old[2];
|
||||||
S_STAT_END(blk_stat)
|
S_STAT_END(blk_stat)
|
||||||
|
|
||||||
static void collect_blk(blk_stat *s)
|
static void FAST_FUNC collect_blk(blk_stat *s)
|
||||||
{
|
{
|
||||||
ullong data[2];
|
ullong data[2];
|
||||||
int i;
|
int i;
|
||||||
@ -504,7 +504,7 @@ S_STAT(fork_stat)
|
|||||||
ullong old;
|
ullong old;
|
||||||
S_STAT_END(fork_stat)
|
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];
|
ullong data[1];
|
||||||
|
|
||||||
@ -515,7 +515,7 @@ static void collect_thread_nr(fork_stat *s UNUSED_PARAM)
|
|||||||
scale(data[0]);
|
scale(data[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void collect_fork(fork_stat *s)
|
static void FAST_FUNC collect_fork(fork_stat *s)
|
||||||
{
|
{
|
||||||
ullong data[1];
|
ullong data[1];
|
||||||
ullong old;
|
ullong old;
|
||||||
@ -549,7 +549,7 @@ S_STAT(if_stat)
|
|||||||
char *device_colon;
|
char *device_colon;
|
||||||
S_STAT_END(if_stat)
|
S_STAT_END(if_stat)
|
||||||
|
|
||||||
static void collect_if(if_stat *s)
|
static void FAST_FUNC collect_if(if_stat *s)
|
||||||
{
|
{
|
||||||
ullong data[4];
|
ullong data[4];
|
||||||
int i;
|
int i;
|
||||||
@ -624,7 +624,7 @@ S_STAT_END(mem_stat)
|
|||||||
//HugePages_Total: 0
|
//HugePages_Total: 0
|
||||||
//HugePages_Free: 0
|
//HugePages_Free: 0
|
||||||
//Hugepagesize: 4096 kB
|
//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_total = 0;
|
||||||
ullong m_free = 0;
|
ullong m_free = 0;
|
||||||
@ -671,7 +671,7 @@ static s_stat* init_mem(const char *param)
|
|||||||
S_STAT(swp_stat)
|
S_STAT(swp_stat)
|
||||||
S_STAT_END(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_total[1];
|
||||||
ullong s_free[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(fd_stat)
|
||||||
S_STAT_END(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];
|
ullong data[2];
|
||||||
|
|
||||||
@ -720,7 +720,7 @@ S_STAT(time_stat)
|
|||||||
int scale;
|
int scale;
|
||||||
S_STAT_END(time_stat)
|
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")];
|
char buf[sizeof("12:34:56.123456")];
|
||||||
struct tm* tm;
|
struct tm* tm;
|
||||||
@ -755,7 +755,7 @@ static s_stat* init_time(const char *param)
|
|||||||
return (s_stat*)s;
|
return (s_stat*)s;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void collect_info(s_stat *s)
|
static void FAST_FUNC collect_info(s_stat *s)
|
||||||
{
|
{
|
||||||
gen ^= 1;
|
gen ^= 1;
|
||||||
while (s) {
|
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)
|
shcmd(union node *cmd, FILE *fp)
|
||||||
{
|
{
|
||||||
union node *np;
|
union node *np;
|
||||||
@ -1686,14 +1686,14 @@ freeparam(volatile struct shparam *param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_ASH_GETOPTS
|
#if ENABLE_ASH_GETOPTS
|
||||||
static void getoptsreset(const char *value);
|
static void FAST_FUNC getoptsreset(const char *value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct var {
|
struct var {
|
||||||
struct var *next; /* next entry in hash list */
|
struct var *next; /* next entry in hash list */
|
||||||
int flags; /* flags are defined above */
|
int flags; /* flags are defined above */
|
||||||
const char *text; /* name=value */
|
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 */
|
/* the variable gets set/unset */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1745,17 +1745,17 @@ change_lc_ctype(const char *value)
|
|||||||
#endif
|
#endif
|
||||||
#if ENABLE_ASH_MAIL
|
#if ENABLE_ASH_MAIL
|
||||||
static void chkmail(void);
|
static void chkmail(void);
|
||||||
static void changemail(const char *);
|
static void changemail(const char *) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
static void changepath(const char *);
|
static void changepath(const char *) FAST_FUNC;
|
||||||
#if ENABLE_ASH_RANDOM_SUPPORT
|
#if ENABLE_ASH_RANDOM_SUPPORT
|
||||||
static void change_random(const char *);
|
static void change_random(const char *) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
int flags;
|
int flags;
|
||||||
const char *text;
|
const char *text;
|
||||||
void (*func)(const char *);
|
void (*func)(const char *) FAST_FUNC;
|
||||||
} varinit_data[] = {
|
} varinit_data[] = {
|
||||||
#ifdef IFS_BROKEN
|
#ifdef IFS_BROKEN
|
||||||
{ VSTRFIXED|VTEXTFIXED , defifsvar , NULL },
|
{ 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)))
|
#define is_in_name(c) ((c) == '_' || isalnum((unsigned char)(c)))
|
||||||
|
|
||||||
#if ENABLE_ASH_GETOPTS
|
#if ENABLE_ASH_GETOPTS
|
||||||
static void
|
static void FAST_FUNC
|
||||||
getoptsreset(const char *value)
|
getoptsreset(const char *value)
|
||||||
{
|
{
|
||||||
shellparam.optind = number(value);
|
shellparam.optind = number(value);
|
||||||
@ -2492,7 +2492,7 @@ docd(const char *dest, int flags)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
const char *dest;
|
const char *dest;
|
||||||
@ -2556,7 +2556,7 @@ cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
int flags;
|
int flags;
|
||||||
@ -3161,7 +3161,7 @@ printalias(const struct alias *ap)
|
|||||||
/*
|
/*
|
||||||
* TODO - sort output
|
* TODO - sort output
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
aliascmd(int argc UNUSED_PARAM, char **argv)
|
aliascmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
char *n, *v;
|
char *n, *v;
|
||||||
@ -3196,7 +3196,7 @@ aliascmd(int argc UNUSED_PARAM, char **argv)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
unaliascmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -3680,7 +3680,7 @@ setjobctl(int on)
|
|||||||
doing_jobctl = on;
|
doing_jobctl = on;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
killcmd(int argc, char **argv)
|
killcmd(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
@ -3745,7 +3745,7 @@ restartjob(struct job *jp, int mode)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
fg_bgcmd(int argc UNUSED_PARAM, char **argv)
|
fg_bgcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
struct job *jp;
|
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)
|
jobscmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
int mode, m;
|
int mode, m;
|
||||||
@ -4053,7 +4053,7 @@ getstatus(struct job *job)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
waitcmd(int argc UNUSED_PARAM, char **argv)
|
waitcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
struct job *job;
|
struct job *job;
|
||||||
@ -5587,9 +5587,9 @@ struct backcmd { /* result of evalbackcmd */
|
|||||||
/* These forward decls are needed to use "eval" code for backticks handling: */
|
/* These forward decls are needed to use "eval" code for backticks handling: */
|
||||||
static uint8_t back_exitstatus; /* exit status of backquoted command */
|
static uint8_t back_exitstatus; /* exit status of backquoted command */
|
||||||
#define EV_EXIT 01 /* exit after evaluating tree */
|
#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)
|
evalbackcmd(union node *n, struct backcmd *result)
|
||||||
{
|
{
|
||||||
int saveherefd;
|
int saveherefd;
|
||||||
@ -7018,7 +7018,7 @@ casematch(union node *pattern, char *val)
|
|||||||
|
|
||||||
struct builtincmd {
|
struct builtincmd {
|
||||||
const char *name;
|
const char *name;
|
||||||
int (*builtin)(int, char **);
|
int (*builtin)(int, char **) FAST_FUNC;
|
||||||
/* unsigned flags; */
|
/* unsigned flags; */
|
||||||
};
|
};
|
||||||
#define IS_BUILTIN_SPECIAL(b) ((b)->name[0] & 1)
|
#define IS_BUILTIN_SPECIAL(b) ((b)->name[0] & 1)
|
||||||
@ -7312,7 +7312,7 @@ addcmdentry(char *name, struct cmdentry *entry)
|
|||||||
cmdp->rehash = 0;
|
cmdp->rehash = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
hashcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
hashcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
struct tblentry **pp;
|
struct tblentry **pp;
|
||||||
@ -7382,7 +7382,7 @@ hashcd(void)
|
|||||||
* pathval() still returns the old value at this point.
|
* pathval() still returns the old value at this point.
|
||||||
* Called with interrupts off.
|
* Called with interrupts off.
|
||||||
*/
|
*/
|
||||||
static void
|
static void FAST_FUNC
|
||||||
changepath(const char *new)
|
changepath(const char *new)
|
||||||
{
|
{
|
||||||
const char *old;
|
const char *old;
|
||||||
@ -7614,7 +7614,7 @@ describe_command(char *command, int describe_command_verbose)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
typecmd(int argc UNUSED_PARAM, char **argv)
|
typecmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
@ -7633,7 +7633,7 @@ typecmd(int argc UNUSED_PARAM, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_ASH_CMDCMD
|
#if ENABLE_ASH_CMDCMD
|
||||||
static int
|
static int FAST_FUNC
|
||||||
commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
commandcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
@ -8018,13 +8018,13 @@ dotrap(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* forward declarations - evaluation is fairly recursive business... */
|
/* forward declarations - evaluation is fairly recursive business... */
|
||||||
static void evalloop(union node *, int);
|
static void FAST_FUNC evalloop(union node *, int);
|
||||||
static void evalfor(union node *, int);
|
static void FAST_FUNC evalfor(union node *, int);
|
||||||
static void evalcase(union node *, int);
|
static void FAST_FUNC evalcase(union node *, int);
|
||||||
static void evalsubshell(union node *, int);
|
static void FAST_FUNC evalsubshell(union node *, int);
|
||||||
static void expredir(union node *);
|
static void expredir(union node *);
|
||||||
static void evalpipe(union node *, int);
|
static void FAST_FUNC evalpipe(union node *, int);
|
||||||
static void evalcommand(union node *, int);
|
static void FAST_FUNC evalcommand(union node *, int);
|
||||||
static int evalbltin(const struct builtincmd *, int, char **);
|
static int evalbltin(const struct builtincmd *, int, char **);
|
||||||
static void prehash(union node *);
|
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
|
* Evaluate a parse tree. The value is left in the global variable
|
||||||
* exitstatus.
|
* exitstatus.
|
||||||
*/
|
*/
|
||||||
static void
|
static void FAST_FUNC
|
||||||
evaltree(union node *n, int flags)
|
evaltree(union node *n, int flags)
|
||||||
{
|
{
|
||||||
struct jmploc *volatile savehandler = exception_handler;
|
struct jmploc *volatile savehandler = exception_handler;
|
||||||
struct jmploc jmploc;
|
struct jmploc jmploc;
|
||||||
int checkexit = 0;
|
int checkexit = 0;
|
||||||
void (*evalfn)(union node *, int);
|
void (*evalfn)(union node *, int) FAST_FUNC;
|
||||||
int status;
|
int status;
|
||||||
int int_level;
|
int int_level;
|
||||||
|
|
||||||
@ -8182,7 +8182,7 @@ static
|
|||||||
#endif
|
#endif
|
||||||
void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__));
|
void evaltreenr(union node *, int) __attribute__ ((alias("evaltree"),__noreturn__));
|
||||||
|
|
||||||
static void
|
static void FAST_FUNC
|
||||||
evalloop(union node *n, int flags)
|
evalloop(union node *n, int flags)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
@ -8218,7 +8218,7 @@ evalloop(union node *n, int flags)
|
|||||||
exitstatus = status;
|
exitstatus = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void FAST_FUNC
|
||||||
evalfor(union node *n, int flags)
|
evalfor(union node *n, int flags)
|
||||||
{
|
{
|
||||||
struct arglist arglist;
|
struct arglist arglist;
|
||||||
@ -8258,7 +8258,7 @@ evalfor(union node *n, int flags)
|
|||||||
popstackmark(&smark);
|
popstackmark(&smark);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void FAST_FUNC
|
||||||
evalcase(union node *n, int flags)
|
evalcase(union node *n, int flags)
|
||||||
{
|
{
|
||||||
union node *cp;
|
union node *cp;
|
||||||
@ -8288,7 +8288,7 @@ evalcase(union node *n, int flags)
|
|||||||
/*
|
/*
|
||||||
* Kick off a subshell to evaluate a tree.
|
* Kick off a subshell to evaluate a tree.
|
||||||
*/
|
*/
|
||||||
static void
|
static void FAST_FUNC
|
||||||
evalsubshell(union node *n, int flags)
|
evalsubshell(union node *n, int flags)
|
||||||
{
|
{
|
||||||
struct job *jp;
|
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 the shell, which make the last process in a pipeline the parent
|
||||||
* of all the rest.)
|
* of all the rest.)
|
||||||
*/
|
*/
|
||||||
static void
|
static void FAST_FUNC
|
||||||
evalpipe(union node *n, int flags)
|
evalpipe(union node *n, int flags)
|
||||||
{
|
{
|
||||||
struct job *jp;
|
struct job *jp;
|
||||||
@ -8644,7 +8644,7 @@ mklocal(char *name)
|
|||||||
/*
|
/*
|
||||||
* The "local" command.
|
* The "local" command.
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
localcmd(int argc UNUSED_PARAM, char **argv)
|
localcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
@ -8656,19 +8656,19 @@ localcmd(int argc UNUSED_PARAM, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
falsecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
falsecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
truecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
truecmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
execcmd(int argc UNUSED_PARAM, char **argv)
|
execcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
if (argv[1]) {
|
if (argv[1]) {
|
||||||
@ -8683,7 +8683,7 @@ execcmd(int argc UNUSED_PARAM, char **argv)
|
|||||||
/*
|
/*
|
||||||
* The return command.
|
* The return command.
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
returncmd(int argc UNUSED_PARAM, char **argv)
|
returncmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -8695,28 +8695,28 @@ returncmd(int argc UNUSED_PARAM, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Forward declarations for builtintab[] */
|
/* Forward declarations for builtintab[] */
|
||||||
static int breakcmd(int, char **);
|
static int breakcmd(int, char **) FAST_FUNC;
|
||||||
static int dotcmd(int, char **);
|
static int dotcmd(int, char **) FAST_FUNC;
|
||||||
static int evalcmd(int, char **);
|
static int evalcmd(int, char **) FAST_FUNC;
|
||||||
static int exitcmd(int, char **);
|
static int exitcmd(int, char **) FAST_FUNC;
|
||||||
static int exportcmd(int, char **);
|
static int exportcmd(int, char **) FAST_FUNC;
|
||||||
#if ENABLE_ASH_GETOPTS
|
#if ENABLE_ASH_GETOPTS
|
||||||
static int getoptscmd(int, char **);
|
static int getoptscmd(int, char **) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
#if !ENABLE_FEATURE_SH_EXTRA_QUIET
|
#if !ENABLE_FEATURE_SH_EXTRA_QUIET
|
||||||
static int helpcmd(int, char **);
|
static int helpcmd(int, char **) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_SH_MATH_SUPPORT
|
#if ENABLE_SH_MATH_SUPPORT
|
||||||
static int letcmd(int, char **);
|
static int letcmd(int, char **) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
static int readcmd(int, char **);
|
static int readcmd(int, char **) FAST_FUNC;
|
||||||
static int setcmd(int, char **);
|
static int setcmd(int, char **) FAST_FUNC;
|
||||||
static int shiftcmd(int, char **);
|
static int shiftcmd(int, char **) FAST_FUNC;
|
||||||
static int timescmd(int, char **);
|
static int timescmd(int, char **) FAST_FUNC;
|
||||||
static int trapcmd(int, char **);
|
static int trapcmd(int, char **) FAST_FUNC;
|
||||||
static int umaskcmd(int, char **);
|
static int umaskcmd(int, char **) FAST_FUNC;
|
||||||
static int unsetcmd(int, char **);
|
static int unsetcmd(int, char **) FAST_FUNC;
|
||||||
static int ulimitcmd(int, char **);
|
static int ulimitcmd(int, char **) FAST_FUNC;
|
||||||
|
|
||||||
#define BUILTIN_NOSPEC "0"
|
#define BUILTIN_NOSPEC "0"
|
||||||
#define BUILTIN_SPECIAL "1"
|
#define BUILTIN_SPECIAL "1"
|
||||||
@ -8739,9 +8739,10 @@ static int ulimitcmd(int, char **);
|
|||||||
* Apart from the above, [[ expr ]] should work as [ expr ]
|
* Apart from the above, [[ expr ]] should work as [ expr ]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define echocmd echo_main
|
/* Stubs for calling non-FAST_FUNC's */
|
||||||
#define printfcmd printf_main
|
static int FAST_FUNC echocmd(int argc, char **argv) { return echo_main(argc, argv); }
|
||||||
#define testcmd test_main
|
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() */
|
/* Keep these in proper order since it is searched via bsearch() */
|
||||||
static const struct builtincmd builtintab[] = {
|
static const struct builtincmd builtintab[] = {
|
||||||
@ -8864,14 +8865,14 @@ isassignment(const char *p)
|
|||||||
return 0;
|
return 0;
|
||||||
return *q == '=';
|
return *q == '=';
|
||||||
}
|
}
|
||||||
static int
|
static int FAST_FUNC
|
||||||
bltincmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
bltincmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
/* Preserve exitstatus of a previous possible redirection
|
/* Preserve exitstatus of a previous possible redirection
|
||||||
* as POSIX mandates */
|
* as POSIX mandates */
|
||||||
return back_exitstatus;
|
return back_exitstatus;
|
||||||
}
|
}
|
||||||
static void
|
static void FAST_FUNC
|
||||||
evalcommand(union node *cmd, int flags)
|
evalcommand(union node *cmd, int flags)
|
||||||
{
|
{
|
||||||
static const struct builtincmd null_bltin = {
|
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
|
* 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.
|
* 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)
|
breakcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
int n = argv[1] ? number(argv[1]) : 1;
|
int n = argv[1] ? number(argv[1]) : 1;
|
||||||
@ -9734,7 +9735,7 @@ chkmail(void)
|
|||||||
popstackmark(&smark);
|
popstackmark(&smark);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void FAST_FUNC
|
||||||
changemail(const char *val UNUSED_PARAM)
|
changemail(const char *val UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
mail_var_path_changed = 1;
|
mail_var_path_changed = 1;
|
||||||
@ -9890,7 +9891,7 @@ options(int cmdline)
|
|||||||
/*
|
/*
|
||||||
* The shift builtin command.
|
* The shift builtin command.
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
shiftcmd(int argc UNUSED_PARAM, char **argv)
|
shiftcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
@ -9952,7 +9953,7 @@ showvars(const char *sep_prefix, int on, int off)
|
|||||||
/*
|
/*
|
||||||
* The set command builtin.
|
* The set command builtin.
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
@ -9973,7 +9974,7 @@ setcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_ASH_RANDOM_SUPPORT
|
#if ENABLE_ASH_RANDOM_SUPPORT
|
||||||
static void
|
static void FAST_FUNC
|
||||||
change_random(const char *value)
|
change_random(const char *value)
|
||||||
{
|
{
|
||||||
/* Galois LFSR parameter */
|
/* 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,
|
* be processed in the current argument. If shellparam.optnext is NULL,
|
||||||
* then it's the first time getopts has been called.
|
* then it's the first time getopts has been called.
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
getoptscmd(int argc, char **argv)
|
getoptscmd(int argc, char **argv)
|
||||||
{
|
{
|
||||||
char **optbase;
|
char **optbase;
|
||||||
@ -11792,7 +11793,7 @@ evalstring(char *s, int mask)
|
|||||||
/*
|
/*
|
||||||
* The eval command.
|
* The eval command.
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
evalcmd(int argc UNUSED_PARAM, char **argv)
|
evalcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
@ -11917,7 +11918,7 @@ find_dot_file(char *name)
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
dotcmd(int argc, char **argv)
|
dotcmd(int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct strlist *sp;
|
struct strlist *sp;
|
||||||
@ -11952,7 +11953,7 @@ dotcmd(int argc, char **argv)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
exitcmd(int argc UNUSED_PARAM, char **argv)
|
exitcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
if (stoppedjobs())
|
if (stoppedjobs())
|
||||||
@ -12176,7 +12177,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
|
|||||||
/*
|
/*
|
||||||
* The trap builtin.
|
* The trap builtin.
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
char *action;
|
char *action;
|
||||||
@ -12226,7 +12227,7 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
|||||||
/*
|
/*
|
||||||
* Lists available builtins
|
* Lists available builtins
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
unsigned col;
|
unsigned col;
|
||||||
@ -12264,7 +12265,7 @@ helpcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
|||||||
/*
|
/*
|
||||||
* The export and readonly commands.
|
* The export and readonly commands.
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
exportcmd(int argc UNUSED_PARAM, char **argv)
|
exportcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
struct var *vp;
|
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
|
* variable to allow a function to be unset when there is a readonly variable
|
||||||
* with the same name.
|
* with the same name.
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
unsetcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
unsetcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
char **ap;
|
char **ap;
|
||||||
@ -12353,7 +12354,7 @@ static const unsigned char timescmd_str[] ALIGN1 = {
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
timescmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
long clk_tck, s, t;
|
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>
|
* Copyright (C) 2003 Vladimir Oleynik <dzo@simtreas.ru>
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
letcmd(int argc UNUSED_PARAM, char **argv)
|
letcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
arith_t i;
|
arith_t i;
|
||||||
@ -12425,7 +12426,7 @@ typedef enum __rlimit_resource rlim_t;
|
|||||||
* -d DELIM End on DELIM char, not newline
|
* -d DELIM End on DELIM char, not newline
|
||||||
* -e Use line editing (tty only)
|
* -e Use line editing (tty only)
|
||||||
*/
|
*/
|
||||||
static int
|
static int FAST_FUNC
|
||||||
readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
static const char *const arg_REPLY[] = { "REPLY", NULL };
|
static const char *const arg_REPLY[] = { "REPLY", NULL };
|
||||||
@ -12635,7 +12636,7 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int FAST_FUNC
|
||||||
umaskcmd(int argc UNUSED_PARAM, char **argv)
|
umaskcmd(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
static const char permuser[3] ALIGN1 = "ugo";
|
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)
|
ulimitcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
118
shell/hush.c
118
shell/hush.c
@ -256,8 +256,8 @@ typedef struct in_str {
|
|||||||
smallint promptmode; /* 0: PS1, 1: PS2 */
|
smallint promptmode; /* 0: PS1, 1: PS2 */
|
||||||
#endif
|
#endif
|
||||||
FILE *file;
|
FILE *file;
|
||||||
int (*get) (struct in_str *);
|
int (*get) (struct in_str *) FAST_FUNC;
|
||||||
int (*peek) (struct in_str *);
|
int (*peek) (struct in_str *) FAST_FUNC;
|
||||||
} in_str;
|
} in_str;
|
||||||
#define i_getch(input) ((input)->get(input))
|
#define i_getch(input) ((input)->get(input))
|
||||||
#define i_peek(input) ((input)->peek(input))
|
#define i_peek(input) ((input)->peek(input))
|
||||||
@ -537,43 +537,43 @@ struct globals {
|
|||||||
|
|
||||||
|
|
||||||
/* Function prototypes for builtins */
|
/* Function prototypes for builtins */
|
||||||
static int builtin_cd(char **argv);
|
static int builtin_cd(char **argv) FAST_FUNC;
|
||||||
static int builtin_echo(char **argv);
|
static int builtin_echo(char **argv) FAST_FUNC;
|
||||||
static int builtin_eval(char **argv);
|
static int builtin_eval(char **argv) FAST_FUNC;
|
||||||
static int builtin_exec(char **argv);
|
static int builtin_exec(char **argv) FAST_FUNC;
|
||||||
static int builtin_exit(char **argv);
|
static int builtin_exit(char **argv) FAST_FUNC;
|
||||||
static int builtin_export(char **argv);
|
static int builtin_export(char **argv) FAST_FUNC;
|
||||||
#if ENABLE_HUSH_JOB
|
#if ENABLE_HUSH_JOB
|
||||||
static int builtin_fg_bg(char **argv);
|
static int builtin_fg_bg(char **argv) FAST_FUNC;
|
||||||
static int builtin_jobs(char **argv);
|
static int builtin_jobs(char **argv) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_HUSH_HELP
|
#if ENABLE_HUSH_HELP
|
||||||
static int builtin_help(char **argv);
|
static int builtin_help(char **argv) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_HUSH_LOCAL
|
#if ENABLE_HUSH_LOCAL
|
||||||
static int builtin_local(char **argv);
|
static int builtin_local(char **argv) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
#if HUSH_DEBUG
|
#if HUSH_DEBUG
|
||||||
static int builtin_memleak(char **argv);
|
static int builtin_memleak(char **argv) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
static int builtin_pwd(char **argv);
|
static int builtin_pwd(char **argv) FAST_FUNC;
|
||||||
static int builtin_read(char **argv);
|
static int builtin_read(char **argv) FAST_FUNC;
|
||||||
static int builtin_set(char **argv);
|
static int builtin_set(char **argv) FAST_FUNC;
|
||||||
static int builtin_shift(char **argv);
|
static int builtin_shift(char **argv) FAST_FUNC;
|
||||||
static int builtin_source(char **argv);
|
static int builtin_source(char **argv) FAST_FUNC;
|
||||||
static int builtin_test(char **argv);
|
static int builtin_test(char **argv) FAST_FUNC;
|
||||||
static int builtin_trap(char **argv);
|
static int builtin_trap(char **argv) FAST_FUNC;
|
||||||
static int builtin_type(char **argv);
|
static int builtin_type(char **argv) FAST_FUNC;
|
||||||
static int builtin_true(char **argv);
|
static int builtin_true(char **argv) FAST_FUNC;
|
||||||
static int builtin_umask(char **argv);
|
static int builtin_umask(char **argv) FAST_FUNC;
|
||||||
static int builtin_unset(char **argv);
|
static int builtin_unset(char **argv) FAST_FUNC;
|
||||||
static int builtin_wait(char **argv);
|
static int builtin_wait(char **argv) FAST_FUNC;
|
||||||
#if ENABLE_HUSH_LOOPS
|
#if ENABLE_HUSH_LOOPS
|
||||||
static int builtin_break(char **argv);
|
static int builtin_break(char **argv) FAST_FUNC;
|
||||||
static int builtin_continue(char **argv);
|
static int builtin_continue(char **argv) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_HUSH_FUNCTIONS
|
#if ENABLE_HUSH_FUNCTIONS
|
||||||
static int builtin_return(char **argv);
|
static int builtin_return(char **argv) FAST_FUNC;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Table of built-in functions. They can be forked or not, depending on
|
/* 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. */
|
* still be set at the end. */
|
||||||
struct built_in_command {
|
struct built_in_command {
|
||||||
const char *cmd;
|
const char *cmd;
|
||||||
int (*function)(char **argv);
|
int (*function)(char **argv) FAST_FUNC;
|
||||||
#if ENABLE_HUSH_HELP
|
#if ENABLE_HUSH_HELP
|
||||||
const char *descr;
|
const char *descr;
|
||||||
# define BLTIN(cmd, func, help) { cmd, func, help }
|
# 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
|
* 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++;
|
int ch = *i->p++;
|
||||||
if (ch != '\0')
|
if (ch != '\0')
|
||||||
@ -1550,7 +1550,7 @@ static int static_get(struct in_str *i)
|
|||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int static_peek(struct in_str *i)
|
static int FAST_FUNC static_peek(struct in_str *i)
|
||||||
{
|
{
|
||||||
return *i->p;
|
return *i->p;
|
||||||
}
|
}
|
||||||
@ -1629,7 +1629,7 @@ static void get_user_input(struct in_str *i)
|
|||||||
|
|
||||||
/* This is the magic location that prints prompts
|
/* This is the magic location that prints prompts
|
||||||
* and gets data back from the user */
|
* 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;
|
int ch;
|
||||||
|
|
||||||
@ -1668,7 +1668,7 @@ static int file_get(struct in_str *i)
|
|||||||
/* All callers guarantee this routine will never
|
/* All callers guarantee this routine will never
|
||||||
* be used right after a newline, so prompting is not needed.
|
* 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;
|
int ch;
|
||||||
if (i->p && *i->p) {
|
if (i->p && *i->p) {
|
||||||
@ -6560,12 +6560,12 @@ int lash_main(int argc, char **argv)
|
|||||||
/*
|
/*
|
||||||
* Built-ins
|
* Built-ins
|
||||||
*/
|
*/
|
||||||
static int builtin_true(char **argv UNUSED_PARAM)
|
static int FAST_FUNC builtin_true(char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_test(char **argv)
|
static int FAST_FUNC builtin_test(char **argv)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
while (*argv) {
|
while (*argv) {
|
||||||
@ -6575,7 +6575,7 @@ static int builtin_test(char **argv)
|
|||||||
return test_main(argc, argv - argc);
|
return test_main(argc, argv - argc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_echo(char **argv)
|
static int FAST_FUNC builtin_echo(char **argv)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
while (*argv) {
|
while (*argv) {
|
||||||
@ -6585,7 +6585,7 @@ static int builtin_echo(char **argv)
|
|||||||
return echo_main(argc, argv - argc);
|
return echo_main(argc, argv - argc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_eval(char **argv)
|
static int FAST_FUNC builtin_eval(char **argv)
|
||||||
{
|
{
|
||||||
int rcode = EXIT_SUCCESS;
|
int rcode = EXIT_SUCCESS;
|
||||||
|
|
||||||
@ -6602,7 +6602,7 @@ static int builtin_eval(char **argv)
|
|||||||
return rcode;
|
return rcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_cd(char **argv)
|
static int FAST_FUNC builtin_cd(char **argv)
|
||||||
{
|
{
|
||||||
const char *newdir = argv[1];
|
const char *newdir = argv[1];
|
||||||
if (newdir == NULL) {
|
if (newdir == NULL) {
|
||||||
@ -6621,7 +6621,7 @@ static int builtin_cd(char **argv)
|
|||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_exec(char **argv)
|
static int FAST_FUNC builtin_exec(char **argv)
|
||||||
{
|
{
|
||||||
if (*++argv == NULL)
|
if (*++argv == NULL)
|
||||||
return EXIT_SUCCESS; /* bash does this */
|
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__);
|
debug_printf_exec("%s()\n", __func__);
|
||||||
|
|
||||||
@ -6730,7 +6730,7 @@ static void helper_export_local(char **argv, int exp, int lvl)
|
|||||||
} while (*++argv);
|
} while (*++argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_export(char **argv)
|
static int FAST_FUNC builtin_export(char **argv)
|
||||||
{
|
{
|
||||||
unsigned opt_unexport;
|
unsigned opt_unexport;
|
||||||
|
|
||||||
@ -6778,7 +6778,7 @@ static int builtin_export(char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_HUSH_LOCAL
|
#if ENABLE_HUSH_LOCAL
|
||||||
static int builtin_local(char **argv)
|
static int FAST_FUNC builtin_local(char **argv)
|
||||||
{
|
{
|
||||||
if (G.func_nest_level == 0) {
|
if (G.func_nest_level == 0) {
|
||||||
bb_error_msg("%s: not in a function", argv[0]);
|
bb_error_msg("%s: not in a function", argv[0]);
|
||||||
@ -6789,7 +6789,7 @@ static int builtin_local(char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int builtin_trap(char **argv)
|
static int FAST_FUNC builtin_trap(char **argv)
|
||||||
{
|
{
|
||||||
int sig;
|
int sig;
|
||||||
char *new_cmd;
|
char *new_cmd;
|
||||||
@ -6879,7 +6879,7 @@ static int builtin_trap(char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* http://www.opengroup.org/onlinepubs/9699919799/utilities/type.html */
|
/* 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;
|
int ret = EXIT_SUCCESS;
|
||||||
|
|
||||||
@ -6913,7 +6913,7 @@ static int builtin_type(char **argv)
|
|||||||
|
|
||||||
#if ENABLE_HUSH_JOB
|
#if ENABLE_HUSH_JOB
|
||||||
/* built-in 'fg' and 'bg' handler */
|
/* 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;
|
int i, jobnum;
|
||||||
struct pipe *pi;
|
struct pipe *pi;
|
||||||
@ -6976,7 +6976,7 @@ static int builtin_fg_bg(char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLE_HUSH_HELP
|
#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;
|
const struct built_in_command *x;
|
||||||
|
|
||||||
@ -6992,7 +6992,7 @@ static int builtin_help(char **argv UNUSED_PARAM)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLE_HUSH_JOB
|
#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;
|
struct pipe *job;
|
||||||
const char *status_string;
|
const char *status_string;
|
||||||
@ -7010,7 +7010,7 @@ static int builtin_jobs(char **argv UNUSED_PARAM)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HUSH_DEBUG
|
#if HUSH_DEBUG
|
||||||
static int builtin_memleak(char **argv UNUSED_PARAM)
|
static int FAST_FUNC builtin_memleak(char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
void *p;
|
void *p;
|
||||||
unsigned long l;
|
unsigned long l;
|
||||||
@ -7039,13 +7039,13 @@ static int builtin_memleak(char **argv UNUSED_PARAM)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int builtin_pwd(char **argv UNUSED_PARAM)
|
static int FAST_FUNC builtin_pwd(char **argv UNUSED_PARAM)
|
||||||
{
|
{
|
||||||
puts(set_cwd());
|
puts(set_cwd());
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_read(char **argv)
|
static int FAST_FUNC builtin_read(char **argv)
|
||||||
{
|
{
|
||||||
char *string;
|
char *string;
|
||||||
const char *name = "REPLY";
|
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.
|
* 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;
|
int n;
|
||||||
char **pp, **g_argv;
|
char **pp, **g_argv;
|
||||||
@ -7147,7 +7147,7 @@ static int builtin_set(char **argv)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_shift(char **argv)
|
static int FAST_FUNC builtin_shift(char **argv)
|
||||||
{
|
{
|
||||||
int n = 1;
|
int n = 1;
|
||||||
if (argv[1]) {
|
if (argv[1]) {
|
||||||
@ -7167,7 +7167,7 @@ static int builtin_shift(char **argv)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_source(char **argv)
|
static int FAST_FUNC builtin_source(char **argv)
|
||||||
{
|
{
|
||||||
char *arg_path;
|
char *arg_path;
|
||||||
FILE *input;
|
FILE *input;
|
||||||
@ -7208,7 +7208,7 @@ static int builtin_source(char **argv)
|
|||||||
return G.last_exitcode;
|
return G.last_exitcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int builtin_umask(char **argv)
|
static int FAST_FUNC builtin_umask(char **argv)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
mode_t mask;
|
mode_t mask;
|
||||||
@ -7240,7 +7240,7 @@ static int builtin_umask(char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#unset */
|
/* 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;
|
int ret;
|
||||||
unsigned opts;
|
unsigned opts;
|
||||||
@ -7277,7 +7277,7 @@ static int builtin_unset(char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* http://www.opengroup.org/onlinepubs/9699919799/utilities/wait.html */
|
/* 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 ret = EXIT_SUCCESS;
|
||||||
int status, sig;
|
int status, sig;
|
||||||
@ -7361,7 +7361,7 @@ static unsigned parse_numeric_argv1(char **argv, unsigned def, unsigned def_min)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLE_HUSH_LOOPS
|
#if ENABLE_HUSH_LOOPS
|
||||||
static int builtin_break(char **argv)
|
static int FAST_FUNC builtin_break(char **argv)
|
||||||
{
|
{
|
||||||
unsigned depth;
|
unsigned depth;
|
||||||
if (G.depth_of_loop == 0) {
|
if (G.depth_of_loop == 0) {
|
||||||
@ -7379,7 +7379,7 @@ static int builtin_break(char **argv)
|
|||||||
return EXIT_SUCCESS;
|
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 */
|
G.flag_break_continue = 1; /* BC_CONTINUE = 2 = 1+1 */
|
||||||
return builtin_break(argv);
|
return builtin_break(argv);
|
||||||
@ -7387,7 +7387,7 @@ static int builtin_continue(char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLE_HUSH_FUNCTIONS
|
#if ENABLE_HUSH_FUNCTIONS
|
||||||
static int builtin_return(char **argv)
|
static int FAST_FUNC builtin_return(char **argv)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
#define SYSV_NICINOD 100
|
#define SYSV_NICINOD 100
|
||||||
#define SYSV_NICFREE 50
|
#define SYSV_NICFREE 50
|
||||||
|
|
||||||
struct sysv_super
|
struct sysv_super {
|
||||||
{
|
|
||||||
uint16_t s_isize;
|
uint16_t s_isize;
|
||||||
uint16_t s_pad0;
|
uint16_t s_pad0;
|
||||||
uint32_t s_fsize;
|
uint32_t s_fsize;
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
|
|
||||||
#include "volume_id_internal.h"
|
#include "volume_id_internal.h"
|
||||||
|
|
||||||
struct hpfs_super
|
struct hpfs_super {
|
||||||
{
|
|
||||||
uint8_t magic[4];
|
uint8_t magic[4];
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
} __attribute__((__packed__));
|
} __attribute__((__packed__));
|
||||||
|
Loading…
Reference in New Issue
Block a user