Apply a patch from Larry Doolittle to add "-all" and "-none" switches
to multibuild.pl. I did a little formatting adjustments to make it _very_ obvious when things stop working. I also removed the USE_PROCFS config option -- just do the right thing when USE_DEVPS_PATCH is enabled. -Erik
This commit is contained in:
parent
b5c29850e3
commit
af4ac77d9d
129
Config.h
129
Config.h
@ -7,118 +7,7 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
// BusyBox Applications
|
// BusyBox Applications
|
||||||
//#define BB_AR
|
|
||||||
#define BB_BASENAME
|
|
||||||
#define BB_CAT
|
|
||||||
#define BB_CHMOD_CHOWN_CHGRP
|
|
||||||
#define BB_CHROOT
|
|
||||||
#define BB_CHVT
|
|
||||||
#define BB_CLEAR
|
|
||||||
//#define BB_CMP
|
|
||||||
#define BB_CP_MV
|
|
||||||
#define BB_CUT
|
|
||||||
#define BB_DATE
|
|
||||||
//#define BB_DC
|
|
||||||
#define BB_DD
|
|
||||||
//#define BB_DEALLOCVT
|
|
||||||
#define BB_DF
|
|
||||||
#define BB_DIRNAME
|
|
||||||
#define BB_DMESG
|
|
||||||
//#define BB_DOS2UNIX
|
|
||||||
//#define BB_DPKG_DEB
|
|
||||||
//#define BB_DUTMP
|
|
||||||
#define BB_DU
|
|
||||||
//#define BB_DUMPKMAP
|
|
||||||
#define BB_ECHO
|
|
||||||
//#define BB_EXPR
|
|
||||||
//#define BB_FBSET
|
|
||||||
//#define BB_FDFLUSH
|
|
||||||
#define BB_FIND
|
|
||||||
#define BB_FREE
|
|
||||||
//#define BB_FREERAMDISK
|
|
||||||
//#define BB_FSCK_MINIX
|
|
||||||
//#define BB_GETOPT
|
|
||||||
#define BB_GREP
|
|
||||||
#define BB_GUNZIP
|
|
||||||
#define BB_GZIP
|
|
||||||
#define BB_HALT
|
|
||||||
#define BB_HEAD
|
|
||||||
//#define BB_HOSTID
|
|
||||||
//#define BB_HOSTNAME
|
|
||||||
#define BB_ID
|
|
||||||
#define BB_INIT
|
|
||||||
//#define BB_INSMOD
|
|
||||||
#define BB_KILL
|
|
||||||
#define BB_KILLALL
|
|
||||||
//#define BB_LENGTH
|
|
||||||
#define BB_LN
|
|
||||||
//#define BB_LOADACM
|
|
||||||
//#define BB_LOADFONT
|
|
||||||
//#define BB_LOADKMAP
|
|
||||||
#define BB_LOGGER
|
|
||||||
//#define BB_LOGNAME
|
|
||||||
#define BB_LS
|
|
||||||
#define BB_LSMOD
|
|
||||||
//#define BB_MAKEDEVS
|
|
||||||
//#define BB_MD5SUM
|
|
||||||
#define BB_MKDIR
|
|
||||||
//#define BB_MKFIFO
|
|
||||||
//#define BB_MKFS_MINIX
|
|
||||||
#define BB_MKNOD
|
|
||||||
#define BB_MKSWAP
|
|
||||||
//#define BB_MKTEMP
|
|
||||||
//#define BB_NC
|
|
||||||
#define BB_MORE
|
|
||||||
#define BB_MOUNT
|
|
||||||
//#define BB_MT
|
|
||||||
//#define BB_NSLOOKUP
|
|
||||||
//#define BB_PING
|
|
||||||
#define BB_POWEROFF
|
|
||||||
//#define BB_PRINTF
|
|
||||||
#define BB_PS
|
|
||||||
#define BB_PWD
|
|
||||||
//#define BB_RDATE
|
|
||||||
//#define BB_READLINK
|
|
||||||
#define BB_REBOOT
|
|
||||||
//#define BB_RENICE
|
|
||||||
#define BB_RESET
|
|
||||||
#define BB_RM
|
|
||||||
#define BB_RMDIR
|
|
||||||
//#define BB_RMMOD
|
|
||||||
//#define BB_RPMUNPACK
|
|
||||||
#define BB_SED
|
|
||||||
//#define BB_SETKEYCODES
|
|
||||||
#define BB_SH
|
#define BB_SH
|
||||||
#define BB_SLEEP
|
|
||||||
#define BB_SORT
|
|
||||||
#define BB_SWAPONOFF
|
|
||||||
#define BB_SYNC
|
|
||||||
#define BB_SYSLOGD
|
|
||||||
#define BB_TAIL
|
|
||||||
#define BB_TAR
|
|
||||||
//#define BB_TEE
|
|
||||||
//#define BB_TEST
|
|
||||||
//#define BB_TELNET
|
|
||||||
#define BB_TOUCH
|
|
||||||
//#define BB_TR
|
|
||||||
#define BB_TRUE_FALSE
|
|
||||||
#define BB_TTY
|
|
||||||
//#define BB_UUENCODE
|
|
||||||
//#define BB_UUDECODE
|
|
||||||
#define BB_UMOUNT
|
|
||||||
#define BB_UNIQ
|
|
||||||
#define BB_UNAME
|
|
||||||
//#define BB_UNIX2DOS
|
|
||||||
//#define BB_UPDATE
|
|
||||||
#define BB_UPTIME
|
|
||||||
//#define BB_USLEEP
|
|
||||||
//#define BB_WATCHDOG
|
|
||||||
#define BB_WC
|
|
||||||
//#define BB_WGET
|
|
||||||
#define BB_WHICH
|
|
||||||
#define BB_WHOAMI
|
|
||||||
#define BB_XARGS
|
|
||||||
#define BB_YES
|
|
||||||
// End of Applications List
|
// End of Applications List
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@ -255,22 +144,26 @@
|
|||||||
//busybox. Some systems want this, others do not. Choose wisely. :-) This
|
//busybox. Some systems want this, others do not. Choose wisely. :-) This
|
||||||
//only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled.
|
//only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled.
|
||||||
// Only relevant if BB_SH is enabled.
|
// Only relevant if BB_SH is enabled.
|
||||||
//BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||||
//
|
//
|
||||||
// Enable tab completion in the shell (not yet
|
// Enable tab completion in the shell (not yet
|
||||||
// working very well -- so don't turn this on)
|
// working very well -- so don't turn this on)
|
||||||
// Only relevant if BB_SH is enabled.
|
// Only relevant if BB_SH is enabled.
|
||||||
#define BB_FEATURE_SH_TAB_COMPLETION
|
#define BB_FEATURE_SH_TAB_COMPLETION
|
||||||
//
|
//
|
||||||
// Enable a simpler shell prompt of the form "path #" instead of the default
|
// Enable a simpler shell prompt of the form "path #"
|
||||||
// "[username@hostname path]#". Some deeply embedded systems don't have
|
// instead of the default "[username@hostname path]#"
|
||||||
// usernames or even hostnames and the default prompt can look rather hideous
|
//
|
||||||
// on them. Uncomment this option for a simpler, path-only prompt (which was
|
// Some deeply embedded systems don't have usernames or even hostnames,
|
||||||
// the default until around BusyBox-0.48):
|
// and the default prompt can look rather hideous on them. Uncomment
|
||||||
|
// this option for a simpler, path-only prompt (which was the default until
|
||||||
|
// around BusyBox-0.48):
|
||||||
|
//
|
||||||
#define BB_FEATURE_SH_SIMPLE_PROMPT
|
#define BB_FEATURE_SH_SIMPLE_PROMPT
|
||||||
//
|
//
|
||||||
// Attempts to match usernames in a ~-prefixed path
|
// Attempts to match usernames in a ~-prefixed path
|
||||||
//#define BB_FEATURE_USERNAME_COMPLETION
|
// XXX: Doesn't work without NSS, off by default
|
||||||
|
#define BB_FEATURE_USERNAME_COMPLETION /* require NSS */
|
||||||
//
|
//
|
||||||
//Turn on extra fbset options
|
//Turn on extra fbset options
|
||||||
//#define BB_FEATURE_FBSET_FANCY
|
//#define BB_FEATURE_FBSET_FANCY
|
||||||
|
3
Makefile
3
Makefile
@ -248,7 +248,6 @@ busybox.links: Config.h applets.h
|
|||||||
|
|
||||||
nfsmount.o cmdedit.o: %.o: %.h
|
nfsmount.o cmdedit.o: %.o: %.h
|
||||||
$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
|
$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
|
||||||
$(CC) $(CFLAGS) -c $*.c -o $*.o
|
|
||||||
|
|
||||||
utility.o: loop.h
|
utility.o: loop.h
|
||||||
|
|
||||||
@ -265,7 +264,7 @@ clean:
|
|||||||
docs/busybox.lineo.com/BusyBox.html
|
docs/busybox.lineo.com/BusyBox.html
|
||||||
- rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
|
- rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
|
||||||
docs/busybox.pdf docs/busybox.lineo.com/busybox.html
|
docs/busybox.pdf docs/busybox.lineo.com/busybox.html
|
||||||
- rm -f Config.h.ORG bb.def.h busybox.REGRESS.sh.results bb.OptionsAndFeatures
|
- rm -f multibuild.log Config.h.orig
|
||||||
- rm -rf docs/busybox _install
|
- rm -rf docs/busybox _install
|
||||||
- rm -f busybox.links loop.h *~ *.o core
|
- rm -f busybox.links loop.h *~ *.o core
|
||||||
|
|
||||||
|
@ -54,6 +54,9 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "pwd_grp/pwd.h"
|
||||||
|
|
||||||
|
|
||||||
static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */
|
static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
4
init.c
4
init.c
@ -666,10 +666,6 @@ static void reboot_signal(int sig)
|
|||||||
#warning pivot root instead. Do not even bother till this work is done...
|
#warning pivot root instead. Do not even bother till this work is done...
|
||||||
#warning You have been warned.
|
#warning You have been warned.
|
||||||
|
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
|
||||||
#error Sorry, I depend on the /proc filesystem right now.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void check_chroot(int sig)
|
static void check_chroot(int sig)
|
||||||
{
|
{
|
||||||
char *argv_init[2] = { "init", NULL, };
|
char *argv_init[2] = { "init", NULL, };
|
||||||
|
@ -666,10 +666,6 @@ static void reboot_signal(int sig)
|
|||||||
#warning pivot root instead. Do not even bother till this work is done...
|
#warning pivot root instead. Do not even bother till this work is done...
|
||||||
#warning You have been warned.
|
#warning You have been warned.
|
||||||
|
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
|
||||||
#error Sorry, I depend on the /proc filesystem right now.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void check_chroot(int sig)
|
static void check_chroot(int sig)
|
||||||
{
|
{
|
||||||
char *argv_init[2] = { "init", NULL, };
|
char *argv_init[2] = { "init", NULL, };
|
||||||
|
2
lash.c
2
lash.c
@ -1371,7 +1371,7 @@ static int pseudo_exec(struct child_prog *child)
|
|||||||
struct built_in_command *x;
|
struct built_in_command *x;
|
||||||
#ifdef BB_FEATURE_SH_STANDALONE_SHELL
|
#ifdef BB_FEATURE_SH_STANDALONE_SHELL
|
||||||
struct BB_applet *applet;
|
struct BB_applet *applet;
|
||||||
const char *name;
|
char *name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check if the command matches any of the non-forking builtins.
|
/* Check if the command matches any of the non-forking builtins.
|
||||||
|
4
lsmod.c
4
lsmod.c
@ -130,10 +130,6 @@ extern int lsmod_main(int argc, char **argv)
|
|||||||
|
|
||||||
#else /*BB_FEATURE_OLD_MODULE_INTERFACE*/
|
#else /*BB_FEATURE_OLD_MODULE_INTERFACE*/
|
||||||
|
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
|
||||||
#error Sorry, I depend on the /proc filesystem right now.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int lsmod_main(int argc, char **argv)
|
extern int lsmod_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int fd, i;
|
int fd, i;
|
||||||
|
@ -130,10 +130,6 @@ extern int lsmod_main(int argc, char **argv)
|
|||||||
|
|
||||||
#else /*BB_FEATURE_OLD_MODULE_INTERFACE*/
|
#else /*BB_FEATURE_OLD_MODULE_INTERFACE*/
|
||||||
|
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
|
||||||
#error Sorry, I depend on the /proc filesystem right now.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int lsmod_main(int argc, char **argv)
|
extern int lsmod_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int fd, i;
|
int fd, i;
|
||||||
|
1
more.c
1
more.c
@ -1,3 +1,4 @@
|
|||||||
|
#error Foo
|
||||||
/* vi: set sw=4 ts=4: */
|
/* vi: set sw=4 ts=4: */
|
||||||
/*
|
/*
|
||||||
* Mini more implementation for busybox
|
* Mini more implementation for busybox
|
||||||
|
7
mount.c
7
mount.c
@ -232,13 +232,9 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
|
|||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
#if defined BB_FEATURE_USE_PROCFS
|
|
||||||
char buf[255];
|
char buf[255];
|
||||||
if (strcmp(filesystemType, "auto") == 0) {
|
if (strcmp(filesystemType, "auto") == 0) {
|
||||||
FILE *f = fopen("/proc/filesystems", "r");
|
FILE *f = xfopen("/proc/filesystems", "r");
|
||||||
|
|
||||||
if (f == NULL)
|
|
||||||
return (FALSE);
|
|
||||||
|
|
||||||
while (fgets(buf, sizeof(buf), f) != NULL) {
|
while (fgets(buf, sizeof(buf), f) != NULL) {
|
||||||
filesystemType = buf;
|
filesystemType = buf;
|
||||||
@ -261,7 +257,6 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
|
|||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
#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;
|
||||||
|
6
mtab.c
6
mtab.c
@ -21,12 +21,8 @@ void erase_mtab(const char *name)
|
|||||||
|
|
||||||
/* Check if reading the mtab file failed */
|
/* Check if reading the mtab file failed */
|
||||||
if (mountTable == 0
|
if (mountTable == 0
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
|
||||||
) {
|
|
||||||
#else
|
|
||||||
/* Bummer. fall back on trying the /proc filesystem */
|
/* Bummer. fall back on trying the /proc filesystem */
|
||||||
&& (mountTable = setmntent("/proc/mounts", "r")) == 0) {
|
&& (mountTable = setmntent("/proc/mounts", "r")) == 0) {
|
||||||
#endif
|
|
||||||
perror_msg("%s", mtab_file);
|
perror_msg("%s", mtab_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -74,14 +70,12 @@ void write_mtab(char *blockDevice, char *directory,
|
|||||||
if (length > 1 && directory[length - 1] == '/')
|
if (length > 1 && directory[length - 1] == '/')
|
||||||
directory[length - 1] = '\0';
|
directory[length - 1] = '\0';
|
||||||
|
|
||||||
#ifdef BB_FEATURE_USE_PROCFS
|
|
||||||
if (filesystemType == 0) {
|
if (filesystemType == 0) {
|
||||||
struct mntent *p = find_mount_point(blockDevice, "/proc/mounts");
|
struct mntent *p = find_mount_point(blockDevice, "/proc/mounts");
|
||||||
|
|
||||||
if (p && p->mnt_type)
|
if (p && p->mnt_type)
|
||||||
filesystemType = p->mnt_type;
|
filesystemType = p->mnt_type;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
m.mnt_fsname = blockDevice;
|
m.mnt_fsname = blockDevice;
|
||||||
m.mnt_dir = directory;
|
m.mnt_dir = directory;
|
||||||
m.mnt_type = filesystemType ? filesystemType : "default";
|
m.mnt_type = filesystemType ? filesystemType : "default";
|
||||||
|
@ -52,10 +52,6 @@ static const int TERMINAL_WIDTH = 79; /* not 80 in case terminal has linefo
|
|||||||
* the one using the /proc virtual filesystem.
|
* the one using the /proc virtual filesystem.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
|
||||||
#error Sorry, I depend on the /proc filesystem right now.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct proc_s {
|
typedef struct proc_s {
|
||||||
char
|
char
|
||||||
cmd[16]; /* basename of executable file in call to exec(2) */
|
cmd[16]; /* basename of executable file in call to exec(2) */
|
||||||
|
4
ps.c
4
ps.c
@ -52,10 +52,6 @@ static const int TERMINAL_WIDTH = 79; /* not 80 in case terminal has linefo
|
|||||||
* the one using the /proc virtual filesystem.
|
* the one using the /proc virtual filesystem.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
|
||||||
#error Sorry, I depend on the /proc filesystem right now.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct proc_s {
|
typedef struct proc_s {
|
||||||
char
|
char
|
||||||
cmd[16]; /* basename of executable file in call to exec(2) */
|
cmd[16]; /* basename of executable file in call to exec(2) */
|
||||||
|
2
sh.c
2
sh.c
@ -1371,7 +1371,7 @@ static int pseudo_exec(struct child_prog *child)
|
|||||||
struct built_in_command *x;
|
struct built_in_command *x;
|
||||||
#ifdef BB_FEATURE_SH_STANDALONE_SHELL
|
#ifdef BB_FEATURE_SH_STANDALONE_SHELL
|
||||||
struct BB_applet *applet;
|
struct BB_applet *applet;
|
||||||
const char *name;
|
char *name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check if the command matches any of the non-forking builtins.
|
/* Check if the command matches any of the non-forking builtins.
|
||||||
|
@ -54,6 +54,9 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "pwd_grp/pwd.h"
|
||||||
|
|
||||||
|
|
||||||
static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */
|
static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -1371,7 +1371,7 @@ static int pseudo_exec(struct child_prog *child)
|
|||||||
struct built_in_command *x;
|
struct built_in_command *x;
|
||||||
#ifdef BB_FEATURE_SH_STANDALONE_SHELL
|
#ifdef BB_FEATURE_SH_STANDALONE_SHELL
|
||||||
struct BB_applet *applet;
|
struct BB_applet *applet;
|
||||||
const char *name;
|
char *name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check if the command matches any of the non-forking builtins.
|
/* Check if the command matches any of the non-forking builtins.
|
||||||
|
Binary file not shown.
@ -5,9 +5,18 @@
|
|||||||
# properly on its own. The most likely problems this will
|
# properly on its own. The most likely problems this will
|
||||||
# flush out are those involving preprocessor instructions in
|
# flush out are those involving preprocessor instructions in
|
||||||
# utility.c.
|
# utility.c.
|
||||||
|
#
|
||||||
|
# TODO: some time it might be nice to list absolute and
|
||||||
|
# differential object sizes for each option...
|
||||||
|
#
|
||||||
|
|
||||||
$logfile = "multibuild.log";
|
$logfile = "multibuild.log";
|
||||||
|
|
||||||
|
# How to handle all the BB_FEATURE_FOO lines
|
||||||
|
if ($ARGV[0] eq "-all" ) { shift(@ARGV); $choice="all"; }
|
||||||
|
if ($ARGV[0] eq "-none") { shift(@ARGV); $choice="none"; }
|
||||||
|
# neither means, leave that part of Config.h alone
|
||||||
|
|
||||||
# Support building from pristine source
|
# Support building from pristine source
|
||||||
$make_opt = "-f $ARGV[0]/Makefile BB_SRC_DIR=$ARGV[0]" if ($ARGV[0] ne "");
|
$make_opt = "-f $ARGV[0]/Makefile BB_SRC_DIR=$ARGV[0]" if ($ARGV[0] ne "");
|
||||||
|
|
||||||
@ -21,6 +30,11 @@ unlink($logfile);
|
|||||||
open(C,"<Config.h.orig") || die;
|
open(C,"<Config.h.orig") || die;
|
||||||
while (<C>) {
|
while (<C>) {
|
||||||
if ($in_trailer) {
|
if ($in_trailer) {
|
||||||
|
if (!$in_olympus) {
|
||||||
|
s/^\/\/#/#/ if ($choice eq "all" && !/USE_DEVPS_PATCH/);
|
||||||
|
s/^#/\/\/#/ if ($choice eq "none");
|
||||||
|
}
|
||||||
|
$in_olympus=1 if /End of Features List/;
|
||||||
$trailer .= $_;
|
$trailer .= $_;
|
||||||
} else {
|
} else {
|
||||||
$in_trailer=1 if /End of Applications List/;
|
$in_trailer=1 if /End of Applications List/;
|
||||||
@ -32,6 +46,7 @@ while (<C>) {
|
|||||||
close C;
|
close C;
|
||||||
|
|
||||||
# Do the real work ...
|
# Do the real work ...
|
||||||
|
$failed_tests=0;
|
||||||
for $a (@apps) {
|
for $a (@apps) {
|
||||||
# print "Testing build of applet $a ...\n";
|
# print "Testing build of applet $a ...\n";
|
||||||
open (O, ">Config.h") || die;
|
open (O, ">Config.h") || die;
|
||||||
@ -40,12 +55,17 @@ for $a (@apps) {
|
|||||||
system("echo -e '\n***\n$a\n***' >>$logfile");
|
system("echo -e '\n***\n$a\n***' >>$logfile");
|
||||||
# todo: figure out why the "rm -f *.o" is needed
|
# todo: figure out why the "rm -f *.o" is needed
|
||||||
$result{$a} = system("rm -f *.o; make $make_opt busybox >>$logfile 2>&1");
|
$result{$a} = system("rm -f *.o; make $make_opt busybox >>$logfile 2>&1");
|
||||||
$flag = $result{$a} ? "FAIL" : "OK";
|
$flag = $result{$a} ? "FAILED!!!" : "ok";
|
||||||
print "Applet $a: $flag\n";
|
printf("Applet %-20s: %s\n", $a, $flag);
|
||||||
|
$total_tests++;
|
||||||
|
$failed_tests++ if $flag eq "FAILED!!!";
|
||||||
|
# pause long enough to let user stop us with a ^C
|
||||||
|
select(undef, undef, undef, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clean up our mess
|
# Clean up our mess
|
||||||
system("mv -f Config.h.orig Config.h");
|
system("mv -f Config.h.orig Config.h");
|
||||||
|
|
||||||
|
print "$total_tests applets tested, $failed_tests failures\n";
|
||||||
print "See $logfile for details.\n";
|
print "See $logfile for details.\n";
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#error Foo
|
||||||
/* vi: set sw=4 ts=4: */
|
/* vi: set sw=4 ts=4: */
|
||||||
/*
|
/*
|
||||||
* Mini more implementation for busybox
|
* Mini more implementation for busybox
|
||||||
|
@ -232,13 +232,9 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
|
|||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
#if defined BB_FEATURE_USE_PROCFS
|
|
||||||
char buf[255];
|
char buf[255];
|
||||||
if (strcmp(filesystemType, "auto") == 0) {
|
if (strcmp(filesystemType, "auto") == 0) {
|
||||||
FILE *f = fopen("/proc/filesystems", "r");
|
FILE *f = xfopen("/proc/filesystems", "r");
|
||||||
|
|
||||||
if (f == NULL)
|
|
||||||
return (FALSE);
|
|
||||||
|
|
||||||
while (fgets(buf, sizeof(buf), f) != NULL) {
|
while (fgets(buf, sizeof(buf), f) != NULL) {
|
||||||
filesystemType = buf;
|
filesystemType = buf;
|
||||||
@ -261,7 +257,6 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
|
|||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
} else
|
} else
|
||||||
#endif
|
|
||||||
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
#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;
|
||||||
|
20
utility.c
20
utility.c
@ -63,24 +63,14 @@
|
|||||||
|
|
||||||
/* 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_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
|
|
||||||
|
|
||||||
|
|
||||||
#if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF
|
#if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF
|
||||||
# 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_PROCFS
|
|
||||||
const char mtab_file[] = "/proc/mounts";
|
|
||||||
# else
|
|
||||||
# if defined BB_FEATURE_USE_DEVPS_PATCH
|
# 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_PATCH)
|
const char mtab_file[] = "/proc/mounts";
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@ -1271,9 +1261,6 @@ extern pid_t* find_pid_by_name( char* pidName)
|
|||||||
return pidList;
|
return pidList;
|
||||||
}
|
}
|
||||||
#else /* BB_FEATURE_USE_DEVPS_PATCH */
|
#else /* BB_FEATURE_USE_DEVPS_PATCH */
|
||||||
#if ! defined BB_FEATURE_USE_PROCFS
|
|
||||||
#error Sorry, I depend on the /proc filesystem right now.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* find_pid_by_name()
|
/* find_pid_by_name()
|
||||||
*
|
*
|
||||||
@ -1634,7 +1621,7 @@ char process_escape_sequence(char **ptr)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined BB_BASENAME || defined BB_LN || defined BB_SH || defined BB_INIT || \
|
#if defined BB_BASENAME || defined BB_LN || defined BB_SH || defined BB_INIT || \
|
||||||
defined BB_FEATURE_USE_PROCFS || defined BB_WGET
|
! defined BB_FEATURE_USE_DEVPS_PATCH || defined BB_WGET
|
||||||
char *get_last_path_component(char *path)
|
char *get_last_path_component(char *path)
|
||||||
{
|
{
|
||||||
char *s=path+strlen(path)-1;
|
char *s=path+strlen(path)-1;
|
||||||
@ -1681,7 +1668,8 @@ FILE *wfopen(const char *path, const char *mode)
|
|||||||
|
|
||||||
#if defined BB_HOSTNAME || defined BB_LOADACM || defined BB_MORE \
|
#if defined BB_HOSTNAME || defined BB_LOADACM || defined BB_MORE \
|
||||||
|| defined BB_SED || defined BB_SH || defined BB_TAR || defined BB_UNIQ \
|
|| defined BB_SED || defined BB_SH || defined BB_TAR || defined BB_UNIQ \
|
||||||
|| defined BB_WC || defined BB_CMP || defined BB_SORT || defined BB_WGET
|
|| defined BB_WC || defined BB_CMP || defined BB_SORT || defined BB_WGET \
|
||||||
|
|| defined BB_MOUNT
|
||||||
FILE *xfopen(const char *path, const char *mode)
|
FILE *xfopen(const char *path, const char *mode)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
Loading…
Reference in New Issue
Block a user