Change BB_FEATURE_USE_DEVPS_N_DEVMTAB to the simpler 0_43pre1
authorErik Andersen <andersen@codepoet.org>
Wed, 8 Mar 2000 14:50:47 +0000 (14:50 -0000)
committerErik Andersen <andersen@codepoet.org>
Wed, 8 Mar 2000 14:50:47 +0000 (14:50 -0000)
BB_FEATURE_USE_DEVPS_PATCH.
 -Erik

Changelog
busybox.def.h
lsmod.c
modutils/lsmod.c
mount.c
procps/ps.c
ps.c
util-linux/mount.c
utility.c

index ebc69bd37898cffc5fa1db5673bd02202f5475ac..5678f60c2eceaeb082b8f5fefeea6b4b0f812bf1 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,9 +1,11 @@
 0.43
        * Busybox can now work perfectly when /proc is disabled, thereby 
-           saving a bunch of memory (kernel /proc support is not thin).
-           This is done by making use of some nice kernel patches I 
-           wrote up to support the features that busybox requires and
-           that /proc usually provides.
+           saving a bunch of memory (kernel /proc support is not thin).  This
+           is done by making use of some nice kernel patches I wrote up to
+           support the features that busybox requires and that /proc usually
+           provides.  To enable this, turn on BB_FEATURE_USE_DEVPS_PATCH and
+           patch your kernel with the devps patch in the kernel-patches/
+           directory. 
        * Wrote basename, killall, and uptime.
        * Added freeramdisk, which will free up all memory associated
            with a ram disk.  Contributed by Emanuele Caratti <wiz@iol.it>
index 561c2ed4b3cf16a41a11fd2135e5dd512974b89f..fdbb6fed63d6dfeee3ba87db09d41c5c78e892f4 100644 (file)
 // the /proc filesystem and thereby saving lots and lots 
 // memory for more important things.
 // You can't use this and USE_PROCFS at the same time...
-//#define BB_FEATURE_USE_DEVPS_N_DEVMTAB
+//#define BB_FEATURE_USE_DEVPS_PATCH
 //
 //
 // enable features that use the /proc filesystem (apps that 
diff --git a/lsmod.c b/lsmod.c
index b8834d3046cfea116f33ba02e572e622a17c2028..27fabc1feee08c760ec8d1fe02fa777dcbe5249a 100644 (file)
--- a/lsmod.c
+++ b/lsmod.c
@@ -27,7 +27,7 @@
 
 extern int lsmod_main(int argc, char **argv)
 {
-#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_DEVPS_PATCH
        char *cmd[] = { "cat", "/dev/modules", "\0" };
 #else
 #if ! defined BB_FEATURE_USE_PROCFS
index b8834d3046cfea116f33ba02e572e622a17c2028..27fabc1feee08c760ec8d1fe02fa777dcbe5249a 100644 (file)
@@ -27,7 +27,7 @@
 
 extern int lsmod_main(int argc, char **argv)
 {
-#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_DEVPS_PATCH
        char *cmd[] = { "cat", "/dev/modules", "\0" };
 #else
 #if ! defined BB_FEATURE_USE_PROCFS
diff --git a/mount.c b/mount.c
index f46664bf4f3b86945d875ac3c7f760db95176605..c29be5106e1eb8a9c37567d82e65b07915e6e7d9 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -46,7 +46,7 @@
 #include <sys/mount.h>
 #include <ctype.h>
 #include <fstab.h>
-#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_DEVPS_PATCH
 #include <linux/devmtab.h>
 #endif
 
@@ -255,7 +255,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
                fclose(f);
        } else
 #endif
-#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_DEVPS_PATCH
        if (strcmp(filesystemType, "auto") == 0) {
                int fd, i, numfilesystems;
                char device[] = "/dev/mtab";
@@ -325,7 +325,7 @@ extern int mount_main(int argc, char **argv)
        /* Only compiled in if BB_MTAB is not defined */
        whine_if_fstab_is_missing();
 
-#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_DEVPS_PATCH
        if (argc == 1) {
                int fd, i, numfilesystems;
                char device[] = "/dev/mtab";
index b9ff5bd0bc1ce5db29091e306256241ca159429b..f01cf99e49718ef2bdbf5f3b8c741b5b7c2b2e31 100644 (file)
@@ -38,7 +38,7 @@
 #include <sys/ioctl.h>
 
 
-#if ! defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if ! defined BB_FEATURE_USE_DEVPS_PATCH
 
 /* The following is the first ps implementation --
  * the one using the /proc virtual filesystem.
@@ -184,7 +184,7 @@ extern int ps_main(int argc, char **argv)
 }
 
 
-#else /* BB_FEATURE_USE_DEVPS_N_DEVMTAB */
+#else /* BB_FEATURE_USE_DEVPS_PATCH */
 
 
 /* The following is the second ps implementation --
@@ -284,5 +284,5 @@ extern int ps_main(int argc, char **argv)
        exit (0);
 }
 
-#endif /* BB_FEATURE_USE_DEVPS_N_DEVMTAB */
+#endif /* BB_FEATURE_USE_DEVPS_PATCH */
 
diff --git a/ps.c b/ps.c
index b9ff5bd0bc1ce5db29091e306256241ca159429b..f01cf99e49718ef2bdbf5f3b8c741b5b7c2b2e31 100644 (file)
--- a/ps.c
+++ b/ps.c
@@ -38,7 +38,7 @@
 #include <sys/ioctl.h>
 
 
-#if ! defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if ! defined BB_FEATURE_USE_DEVPS_PATCH
 
 /* The following is the first ps implementation --
  * the one using the /proc virtual filesystem.
@@ -184,7 +184,7 @@ extern int ps_main(int argc, char **argv)
 }
 
 
-#else /* BB_FEATURE_USE_DEVPS_N_DEVMTAB */
+#else /* BB_FEATURE_USE_DEVPS_PATCH */
 
 
 /* The following is the second ps implementation --
@@ -284,5 +284,5 @@ extern int ps_main(int argc, char **argv)
        exit (0);
 }
 
-#endif /* BB_FEATURE_USE_DEVPS_N_DEVMTAB */
+#endif /* BB_FEATURE_USE_DEVPS_PATCH */
 
index f46664bf4f3b86945d875ac3c7f760db95176605..c29be5106e1eb8a9c37567d82e65b07915e6e7d9 100644 (file)
@@ -46,7 +46,7 @@
 #include <sys/mount.h>
 #include <ctype.h>
 #include <fstab.h>
-#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_DEVPS_PATCH
 #include <linux/devmtab.h>
 #endif
 
@@ -255,7 +255,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
                fclose(f);
        } else
 #endif
-#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_DEVPS_PATCH
        if (strcmp(filesystemType, "auto") == 0) {
                int fd, i, numfilesystems;
                char device[] = "/dev/mtab";
@@ -325,7 +325,7 @@ extern int mount_main(int argc, char **argv)
        /* Only compiled in if BB_MTAB is not defined */
        whine_if_fstab_is_missing();
 
-#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_DEVPS_PATCH
        if (argc == 1) {
                int fd, i, numfilesystems;
                char device[] = "/dev/mtab";
index c3f9947c51e0f0175de84cdf2f2a16b2f23bf03b..cdf1c03797f6619c421213c274ef283dbc30f1c3 100644 (file)
--- a/utility.c
+++ b/utility.c
@@ -58,7 +58,7 @@
 
 /* Busybox mount uses either /proc/filesystems or /dev/mtab to get the 
  * list of available filesystems used for the -t auto option */ 
-#if defined BB_FEATURE_USE_PROCFS && defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_PROCFS && defined BB_FEATURE_USE_DEVPS_PATCH
 //#error Sorry, but busybox can't use both /proc and /dev/ps at the same time -- Pick one and try again.
 #error "Sorry, but busybox can't use both /proc and /dev/ps at the same time -- Pick one and try again."
 #endif
@@ -71,10 +71,10 @@ const char mtab_file[] = "/proc/mounts";
 #    if defined BB_MTAB
 const char mtab_file[] = "/etc/mtab";
 #    else
-#      if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#      if defined BB_FEATURE_USE_DEVPS_PATCH
 const char mtab_file[] = "/dev/mtab";
 #    else
-#        error With (BB_MOUNT||BB_UMOUNT||BB_DF) defined, you must define either BB_MTAB or ( BB_FEATURE_USE_PROCFS | BB_FEATURE_USE_DEVPS_N_DEVMTAB)
+#        error With (BB_MOUNT||BB_UMOUNT||BB_DF) defined, you must define either BB_MTAB or ( BB_FEATURE_USE_PROCFS | BB_FEATURE_USE_DEVPS_PATCH)
 #    endif
 #  endif
 #  endif
@@ -1249,11 +1249,11 @@ extern int device_open(char *device, int mode)
 
 #if defined BB_KILLALL || defined BB_FEATURE_LINUXRC && ( defined BB_HALT || defined BB_REBOOT || defined BB_POWEROFF )
 
-#ifdef BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#ifdef BB_FEATURE_USE_DEVPS_PATCH
 #include <linux/devps.h>
 #endif
 
-#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
+#if defined BB_FEATURE_USE_DEVPS_PATCH
 /* findPidByName()
  *  
  *  This finds the pid of the specified process,
@@ -1314,7 +1314,7 @@ extern pid_t findPidByName( char* pidName)
 
        return thePid;
 }
-#else          /* BB_FEATURE_USE_DEVPS_N_DEVMTAB */
+#else          /* BB_FEATURE_USE_DEVPS_PATCH */
 #if ! defined BB_FEATURE_USE_PROCFS
 #error Sorry, I depend on the /proc filesystem right now.
 #endif
@@ -1362,7 +1362,7 @@ extern pid_t findPidByName( char* pidName)
        }
        return 0;
 }
-#endif                                                 /* BB_FEATURE_USE_DEVPS_N_DEVMTAB */
+#endif                                                 /* BB_FEATURE_USE_DEVPS_PATCH */
 #endif                                                 /* BB_INIT || BB_HALT || BB_REBOOT || BB_KILLALL || BB_POWEROFF */
 
 #if defined BB_GUNZIP \