Change BB_FEATURE_USE_DEVPS_N_DEVMTAB to the simpler
BB_FEATURE_USE_DEVPS_PATCH. -Erik
This commit is contained in:
parent
47d3bb3b6d
commit
269bba2514
10
Changelog
10
Changelog
@ -1,9 +1,11 @@
|
|||||||
0.43
|
0.43
|
||||||
* Busybox can now work perfectly when /proc is disabled, thereby
|
* Busybox can now work perfectly when /proc is disabled, thereby
|
||||||
saving a bunch of memory (kernel /proc support is not thin).
|
saving a bunch of memory (kernel /proc support is not thin). This
|
||||||
This is done by making use of some nice kernel patches I
|
is done by making use of some nice kernel patches I wrote up to
|
||||||
wrote up to support the features that busybox requires and
|
support the features that busybox requires and that /proc usually
|
||||||
that /proc usually provides.
|
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.
|
* Wrote basename, killall, and uptime.
|
||||||
* Added freeramdisk, which will free up all memory associated
|
* Added freeramdisk, which will free up all memory associated
|
||||||
with a ram disk. Contributed by Emanuele Caratti <wiz@iol.it>
|
with a ram disk. Contributed by Emanuele Caratti <wiz@iol.it>
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
// the /proc filesystem and thereby saving lots and lots
|
// the /proc filesystem and thereby saving lots and lots
|
||||||
// memory for more important things.
|
// memory for more important things.
|
||||||
// You can't use this and USE_PROCFS at the same time...
|
// 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
|
// enable features that use the /proc filesystem (apps that
|
||||||
|
2
lsmod.c
2
lsmod.c
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
extern int lsmod_main(int argc, char **argv)
|
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" };
|
char *cmd[] = { "cat", "/dev/modules", "\0" };
|
||||||
#else
|
#else
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
#if ! defined BB_FEATURE_USE_PROCFS
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
extern int lsmod_main(int argc, char **argv)
|
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" };
|
char *cmd[] = { "cat", "/dev/modules", "\0" };
|
||||||
#else
|
#else
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
#if ! defined BB_FEATURE_USE_PROCFS
|
||||||
|
6
mount.c
6
mount.c
@ -46,7 +46,7 @@
|
|||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <fstab.h>
|
#include <fstab.h>
|
||||||
#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
||||||
#include <linux/devmtab.h>
|
#include <linux/devmtab.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
|
|||||||
fclose(f);
|
fclose(f);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
||||||
if (strcmp(filesystemType, "auto") == 0) {
|
if (strcmp(filesystemType, "auto") == 0) {
|
||||||
int fd, i, numfilesystems;
|
int fd, i, numfilesystems;
|
||||||
char device[] = "/dev/mtab";
|
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 */
|
/* Only compiled in if BB_MTAB is not defined */
|
||||||
whine_if_fstab_is_missing();
|
whine_if_fstab_is_missing();
|
||||||
|
|
||||||
#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
int fd, i, numfilesystems;
|
int fd, i, numfilesystems;
|
||||||
char device[] = "/dev/mtab";
|
char device[] = "/dev/mtab";
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <sys/ioctl.h>
|
#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 following is the first ps implementation --
|
||||||
* the one using the /proc virtual filesystem.
|
* 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 --
|
/* The following is the second ps implementation --
|
||||||
@ -284,5 +284,5 @@ extern int ps_main(int argc, char **argv)
|
|||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* BB_FEATURE_USE_DEVPS_N_DEVMTAB */
|
#endif /* BB_FEATURE_USE_DEVPS_PATCH */
|
||||||
|
|
||||||
|
6
ps.c
6
ps.c
@ -38,7 +38,7 @@
|
|||||||
#include <sys/ioctl.h>
|
#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 following is the first ps implementation --
|
||||||
* the one using the /proc virtual filesystem.
|
* 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 --
|
/* The following is the second ps implementation --
|
||||||
@ -284,5 +284,5 @@ extern int ps_main(int argc, char **argv)
|
|||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* BB_FEATURE_USE_DEVPS_N_DEVMTAB */
|
#endif /* BB_FEATURE_USE_DEVPS_PATCH */
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <fstab.h>
|
#include <fstab.h>
|
||||||
#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
||||||
#include <linux/devmtab.h>
|
#include <linux/devmtab.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
|
|||||||
fclose(f);
|
fclose(f);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
||||||
if (strcmp(filesystemType, "auto") == 0) {
|
if (strcmp(filesystemType, "auto") == 0) {
|
||||||
int fd, i, numfilesystems;
|
int fd, i, numfilesystems;
|
||||||
char device[] = "/dev/mtab";
|
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 */
|
/* Only compiled in if BB_MTAB is not defined */
|
||||||
whine_if_fstab_is_missing();
|
whine_if_fstab_is_missing();
|
||||||
|
|
||||||
#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
int fd, i, numfilesystems;
|
int fd, i, numfilesystems;
|
||||||
char device[] = "/dev/mtab";
|
char device[] = "/dev/mtab";
|
||||||
|
14
utility.c
14
utility.c
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
/* Busybox mount uses either /proc/filesystems or /dev/mtab to get the
|
/* Busybox mount uses either /proc/filesystems or /dev/mtab to get the
|
||||||
* list of available filesystems used for the -t auto option */
|
* 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.
|
||||||
#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
|
#endif
|
||||||
@ -71,10 +71,10 @@ const char mtab_file[] = "/proc/mounts";
|
|||||||
# if defined BB_MTAB
|
# if defined BB_MTAB
|
||||||
const char mtab_file[] = "/etc/mtab";
|
const char mtab_file[] = "/etc/mtab";
|
||||||
# else
|
# else
|
||||||
# if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
# if defined BB_FEATURE_USE_DEVPS_PATCH
|
||||||
const char mtab_file[] = "/dev/mtab";
|
const char mtab_file[] = "/dev/mtab";
|
||||||
# else
|
# 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
|
# 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 )
|
#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>
|
#include <linux/devps.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
||||||
/* findPidByName()
|
/* findPidByName()
|
||||||
*
|
*
|
||||||
* This finds the pid of the specified process,
|
* This finds the pid of the specified process,
|
||||||
@ -1314,7 +1314,7 @@ extern pid_t findPidByName( char* pidName)
|
|||||||
|
|
||||||
return thePid;
|
return thePid;
|
||||||
}
|
}
|
||||||
#else /* BB_FEATURE_USE_DEVPS_N_DEVMTAB */
|
#else /* BB_FEATURE_USE_DEVPS_PATCH */
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
#if ! defined BB_FEATURE_USE_PROCFS
|
||||||
#error Sorry, I depend on the /proc filesystem right now.
|
#error Sorry, I depend on the /proc filesystem right now.
|
||||||
#endif
|
#endif
|
||||||
@ -1362,7 +1362,7 @@ extern pid_t findPidByName( char* pidName)
|
|||||||
}
|
}
|
||||||
return 0;
|
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 */
|
#endif /* BB_INIT || BB_HALT || BB_REBOOT || BB_KILLALL || BB_POWEROFF */
|
||||||
|
|
||||||
#if defined BB_GUNZIP \
|
#if defined BB_GUNZIP \
|
||||||
|
Loading…
Reference in New Issue
Block a user