diff options
-rw-r--r-- | applets/busybox.c | 17 | ||||
-rw-r--r-- | coreutils/ln.c | 2 | ||||
-rw-r--r-- | modutils/config.in | 6 | ||||
-rw-r--r-- | modutils/lsmod.c | 2 | ||||
-rw-r--r-- | util-linux/mkswap.c | 8 | ||||
-rw-r--r-- | util-linux/mount.c | 3 |
6 files changed, 23 insertions, 15 deletions
diff --git a/applets/busybox.c b/applets/busybox.c index 858358175..4f1ef2661 100644 --- a/applets/busybox.c +++ b/applets/busybox.c @@ -18,12 +18,15 @@ const char *applet_name; * this should be consistent w/ the enum, busybox.h::Location, * or else... */ -static char* install_dir[] = { - "/", - "/bin", - "/sbin", - "/usr/bin", - "/usr/sbin", +static const char usr_bin [] ="/usr/bin"; +static const char usr_sbin[] ="/usr/sbin"; + +static const char* const install_dir[] = { + &usr_bin [8], /* "", equivalent to "/" for concat_path_file() */ + &usr_bin [4], /* "/bin" */ + &usr_sbin[4], /* "/sbin" */ + usr_bin, + usr_sbin }; /* abstract link() */ @@ -35,7 +38,7 @@ typedef int (*__link_f)(const char *, const char *); * malloc'd string w/ full pathname of busybox's location * NULL on failure */ -static char *busybox_fullpath(void) +static inline char *busybox_fullpath(void) { return xreadlink("/proc/self/exe"); } diff --git a/coreutils/ln.c b/coreutils/ln.c index 213db9b72..1eb853d2f 100644 --- a/coreutils/ln.c +++ b/coreutils/ln.c @@ -119,7 +119,7 @@ extern int ln_main(int argc, char **argv) status = EXIT_FAILURE; optind++; } - exit(status); + return status; } /* diff --git a/modutils/config.in b/modutils/config.in index 802bcc1e0..f5256bb1f 100644 --- a/modutils/config.in +++ b/modutils/config.in @@ -20,5 +20,11 @@ if [ "$CONFIG_INSMOD" = "y" ]; then bool 'Support image in kernel memory optimization (uClinux only)' CONFIG_FEATURE_INSMOD_LOADINKMEM fi +if [ "$CONFIG_LSMOD" = "y" ]; then + if [ "$CONFIG_FEATURE_NEW_MODULE_INTERFACE" = "y" ]; then + bool 'Support lsmod query_module interface (add 638 bytes)' CONFIG_FEATURE_QUERY_MODULE_INTERFACE + fi +fi + endmenu diff --git a/modutils/lsmod.c b/modutils/lsmod.c index 7b6ad14c6..5cb585bab 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -41,7 +41,7 @@ -#ifdef CONFIG_FEATURE_NEW_MODULE_INTERFACE +#ifdef CONFIG_FEATURE_QUERY_MODULE_INTERFACE struct module_info { diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index c773ecef9..de10ba71f 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c @@ -81,7 +81,7 @@ static struct swap_header_v1 { unsigned int badpages[1]; } *p; -static void init_signature_page(void) +static inline void init_signature_page(void) { pagesize = getpagesize(); @@ -94,7 +94,7 @@ static void init_signature_page(void) p = (struct swap_header_v1 *) signature_page; } -static void write_signature(char *sig) +static inline void write_signature(char *sig) { char *sp = (char *) signature_page; @@ -147,7 +147,7 @@ It is roughly 2GB on i386, PPC, m68k, ARM, 1GB on sparc, 512MB on mips, #define MAX_BADPAGES ((pagesize-1024-128*sizeof(int)-10)/sizeof(int)) -static void bit_set(unsigned int *addr, unsigned int nr) +static inline void bit_set(unsigned int *addr, unsigned int nr) { unsigned int r, m; @@ -179,7 +179,7 @@ static void page_ok(int page) bit_set(signature_page, page); } -static void page_bad(int page) +static inline void page_bad(int page) { if (version == 0) bit_test_and_clear(signature_page, page); diff --git a/util-linux/mount.c b/util-linux/mount.c index ae4417cb8..74ce4e116 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -469,9 +469,8 @@ singlemount: string_flags = xstrdup(string_flags); rc = EXIT_SUCCESS; #ifdef CONFIG_NFSMOUNT - if (strchr(device, ':') != NULL) + if (strchr(device, ':') != NULL) { filesystemType = "nfs"; - if (strcmp(filesystemType, "nfs") == 0) { if (nfsmount (device, directory, &flags, &extra_opts, &string_flags, 1)) { perror_msg("nfsmount failed"); |