Apply lash_patch35 from vodz, which brings several nice size_optimizations.
authorEric Andersen <andersen@codepoet.org>
Sat, 6 Apr 2002 05:17:57 +0000 (05:17 -0000)
committerEric Andersen <andersen@codepoet.org>
Sat, 6 Apr 2002 05:17:57 +0000 (05:17 -0000)
applets/busybox.c
coreutils/ln.c
modutils/config.in
modutils/lsmod.c
util-linux/mkswap.c
util-linux/mount.c

index 85835817564a4d5ba38ec28c9508b0789a5a72ae..4f1ef26617b169128ebe825ec7527ecb24a61f9d 100644 (file)
@@ -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");
 }
index 213db9b72f26a403f9b857d5e769f75bb5cf9671..1eb853d2fd23bbe893e59c55de4250c0c698eedf 100644 (file)
@@ -119,7 +119,7 @@ extern int ln_main(int argc, char **argv)
                        status = EXIT_FAILURE;
                optind++;
        }
-       exit(status);
+       return status;
 }
 
 /*
index 802bcc1e08d7f62aabfbc6c5546e8d98d8df04f6..f5256bb1f5a686ad9b610144d1d1487203d40920 100644 (file)
@@ -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
 
index 7b6ad14c6b6d3189f08b53a435d6c5a02ab5dc5f..5cb585babc50bdf734470dbc55685c4db86d10a5 100644 (file)
@@ -41,7 +41,7 @@
 
 
 
-#ifdef CONFIG_FEATURE_NEW_MODULE_INTERFACE
+#ifdef CONFIG_FEATURE_QUERY_MODULE_INTERFACE
 
 struct module_info
 {
index c773ecef92f6f024fe854dac442002e454d43d10..de10ba71fbd724f7dff22661196e429223c172d2 100644 (file)
@@ -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);
index ae4417cb89504adc85c39c165ba01b179c126683..74ce4e1169d34f7746c7757a9e894c6eb99fd879 100644 (file)
@@ -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");