diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-04-06 05:17:57 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-04-06 05:17:57 +0000 |
commit | fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1 (patch) | |
tree | b692176a654613bb68ca37c42f88201aeb48d8ba | |
parent | 50e4d660ace54d8da2cb09d537138447a92c68bd (diff) | |
download | busybox-w32-fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1.tar.gz busybox-w32-fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1.tar.bz2 busybox-w32-fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1.zip |
Apply lash_patch35 from vodz, which brings several nice size_optimizations.
-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; | |||
18 | * this should be consistent w/ the enum, busybox.h::Location, | 18 | * this should be consistent w/ the enum, busybox.h::Location, |
19 | * or else... | 19 | * or else... |
20 | */ | 20 | */ |
21 | static char* install_dir[] = { | 21 | static const char usr_bin [] ="/usr/bin"; |
22 | "/", | 22 | static const char usr_sbin[] ="/usr/sbin"; |
23 | "/bin", | 23 | |
24 | "/sbin", | 24 | static const char* const install_dir[] = { |
25 | "/usr/bin", | 25 | &usr_bin [8], /* "", equivalent to "/" for concat_path_file() */ |
26 | "/usr/sbin", | 26 | &usr_bin [4], /* "/bin" */ |
27 | &usr_sbin[4], /* "/sbin" */ | ||
28 | usr_bin, | ||
29 | usr_sbin | ||
27 | }; | 30 | }; |
28 | 31 | ||
29 | /* abstract link() */ | 32 | /* abstract link() */ |
@@ -35,7 +38,7 @@ typedef int (*__link_f)(const char *, const char *); | |||
35 | * malloc'd string w/ full pathname of busybox's location | 38 | * malloc'd string w/ full pathname of busybox's location |
36 | * NULL on failure | 39 | * NULL on failure |
37 | */ | 40 | */ |
38 | static char *busybox_fullpath(void) | 41 | static inline char *busybox_fullpath(void) |
39 | { | 42 | { |
40 | return xreadlink("/proc/self/exe"); | 43 | return xreadlink("/proc/self/exe"); |
41 | } | 44 | } |
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) | |||
119 | status = EXIT_FAILURE; | 119 | status = EXIT_FAILURE; |
120 | optind++; | 120 | optind++; |
121 | } | 121 | } |
122 | exit(status); | 122 | return status; |
123 | } | 123 | } |
124 | 124 | ||
125 | /* | 125 | /* |
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 | |||
20 | bool 'Support image in kernel memory optimization (uClinux only)' CONFIG_FEATURE_INSMOD_LOADINKMEM | 20 | bool 'Support image in kernel memory optimization (uClinux only)' CONFIG_FEATURE_INSMOD_LOADINKMEM |
21 | fi | 21 | fi |
22 | 22 | ||
23 | if [ "$CONFIG_LSMOD" = "y" ]; then | ||
24 | if [ "$CONFIG_FEATURE_NEW_MODULE_INTERFACE" = "y" ]; then | ||
25 | bool 'Support lsmod query_module interface (add 638 bytes)' CONFIG_FEATURE_QUERY_MODULE_INTERFACE | ||
26 | fi | ||
27 | fi | ||
28 | |||
23 | endmenu | 29 | endmenu |
24 | 30 | ||
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 @@ | |||
41 | 41 | ||
42 | 42 | ||
43 | 43 | ||
44 | #ifdef CONFIG_FEATURE_NEW_MODULE_INTERFACE | 44 | #ifdef CONFIG_FEATURE_QUERY_MODULE_INTERFACE |
45 | 45 | ||
46 | struct module_info | 46 | struct module_info |
47 | { | 47 | { |
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 { | |||
81 | unsigned int badpages[1]; | 81 | unsigned int badpages[1]; |
82 | } *p; | 82 | } *p; |
83 | 83 | ||
84 | static void init_signature_page(void) | 84 | static inline void init_signature_page(void) |
85 | { | 85 | { |
86 | pagesize = getpagesize(); | 86 | pagesize = getpagesize(); |
87 | 87 | ||
@@ -94,7 +94,7 @@ static void init_signature_page(void) | |||
94 | p = (struct swap_header_v1 *) signature_page; | 94 | p = (struct swap_header_v1 *) signature_page; |
95 | } | 95 | } |
96 | 96 | ||
97 | static void write_signature(char *sig) | 97 | static inline void write_signature(char *sig) |
98 | { | 98 | { |
99 | char *sp = (char *) signature_page; | 99 | char *sp = (char *) signature_page; |
100 | 100 | ||
@@ -147,7 +147,7 @@ It is roughly 2GB on i386, PPC, m68k, ARM, 1GB on sparc, 512MB on mips, | |||
147 | 147 | ||
148 | #define MAX_BADPAGES ((pagesize-1024-128*sizeof(int)-10)/sizeof(int)) | 148 | #define MAX_BADPAGES ((pagesize-1024-128*sizeof(int)-10)/sizeof(int)) |
149 | 149 | ||
150 | static void bit_set(unsigned int *addr, unsigned int nr) | 150 | static inline void bit_set(unsigned int *addr, unsigned int nr) |
151 | { | 151 | { |
152 | unsigned int r, m; | 152 | unsigned int r, m; |
153 | 153 | ||
@@ -179,7 +179,7 @@ static void page_ok(int page) | |||
179 | bit_set(signature_page, page); | 179 | bit_set(signature_page, page); |
180 | } | 180 | } |
181 | 181 | ||
182 | static void page_bad(int page) | 182 | static inline void page_bad(int page) |
183 | { | 183 | { |
184 | if (version == 0) | 184 | if (version == 0) |
185 | bit_test_and_clear(signature_page, page); | 185 | 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: | |||
469 | string_flags = xstrdup(string_flags); | 469 | string_flags = xstrdup(string_flags); |
470 | rc = EXIT_SUCCESS; | 470 | rc = EXIT_SUCCESS; |
471 | #ifdef CONFIG_NFSMOUNT | 471 | #ifdef CONFIG_NFSMOUNT |
472 | if (strchr(device, ':') != NULL) | 472 | if (strchr(device, ':') != NULL) { |
473 | filesystemType = "nfs"; | 473 | filesystemType = "nfs"; |
474 | if (strcmp(filesystemType, "nfs") == 0) { | ||
475 | if (nfsmount (device, directory, &flags, &extra_opts, | 474 | if (nfsmount (device, directory, &flags, &extra_opts, |
476 | &string_flags, 1)) { | 475 | &string_flags, 1)) { |
477 | perror_msg("nfsmount failed"); | 476 | perror_msg("nfsmount failed"); |