diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-02-01 22:43:49 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-02-01 22:43:49 +0000 |
commit | af4ac77d9d13f879922ccad8a8535c24aeea0380 (patch) | |
tree | 47dca5ab2df8982ea929c902216bca6bf9c31f44 | |
parent | b5c29850e31ca41ee643cfe62eb8bc5f8682deb1 (diff) | |
download | busybox-w32-af4ac77d9d13f879922ccad8a8535c24aeea0380.tar.gz busybox-w32-af4ac77d9d13f879922ccad8a8535c24aeea0380.tar.bz2 busybox-w32-af4ac77d9d13f879922ccad8a8535c24aeea0380.zip |
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
-rw-r--r-- | Config.h | 129 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | cmdedit.c | 3 | ||||
-rw-r--r-- | init.c | 4 | ||||
-rw-r--r-- | init/init.c | 4 | ||||
-rw-r--r-- | lash.c | 2 | ||||
-rw-r--r-- | lsmod.c | 4 | ||||
-rw-r--r-- | modutils/lsmod.c | 4 | ||||
-rw-r--r-- | more.c | 1 | ||||
-rw-r--r-- | mount.c | 7 | ||||
-rw-r--r-- | mtab.c | 10 | ||||
-rw-r--r-- | procps/ps.c | 4 | ||||
-rw-r--r-- | ps.c | 4 | ||||
-rw-r--r-- | sh.c | 2 | ||||
-rw-r--r-- | shell/cmdedit.c | 3 | ||||
-rw-r--r-- | shell/lash.c | 2 | ||||
-rwxr-xr-x | tests/busybox.REGRESS.sh | bin | 4071 -> 0 bytes | |||
-rwxr-xr-x | tests/multibuild.pl | 24 | ||||
-rw-r--r-- | util-linux/more.c | 1 | ||||
-rw-r--r-- | util-linux/mount.c | 7 | ||||
-rw-r--r-- | utility.c | 20 |
21 files changed, 53 insertions, 185 deletions
@@ -7,118 +7,7 @@ | |||
7 | // | 7 | // |
8 | // | 8 | // |
9 | // BusyBox Applications | 9 | // BusyBox Applications |
10 | //#define BB_AR | ||
11 | #define BB_BASENAME | ||
12 | #define BB_CAT | ||
13 | #define BB_CHMOD_CHOWN_CHGRP | ||
14 | #define BB_CHROOT | ||
15 | #define BB_CHVT | ||
16 | #define BB_CLEAR | ||
17 | //#define BB_CMP | ||
18 | #define BB_CP_MV | ||
19 | #define BB_CUT | ||
20 | #define BB_DATE | ||
21 | //#define BB_DC | ||
22 | #define BB_DD | ||
23 | //#define BB_DEALLOCVT | ||
24 | #define BB_DF | ||
25 | #define BB_DIRNAME | ||
26 | #define BB_DMESG | ||
27 | //#define BB_DOS2UNIX | ||
28 | //#define BB_DPKG_DEB | ||
29 | //#define BB_DUTMP | ||
30 | #define BB_DU | ||
31 | //#define BB_DUMPKMAP | ||
32 | #define BB_ECHO | ||
33 | //#define BB_EXPR | ||
34 | //#define BB_FBSET | ||
35 | //#define BB_FDFLUSH | ||
36 | #define BB_FIND | ||
37 | #define BB_FREE | ||
38 | //#define BB_FREERAMDISK | ||
39 | //#define BB_FSCK_MINIX | ||
40 | //#define BB_GETOPT | ||
41 | #define BB_GREP | ||
42 | #define BB_GUNZIP | ||
43 | #define BB_GZIP | ||
44 | #define BB_HALT | ||
45 | #define BB_HEAD | ||
46 | //#define BB_HOSTID | ||
47 | //#define BB_HOSTNAME | ||
48 | #define BB_ID | ||
49 | #define BB_INIT | ||
50 | //#define BB_INSMOD | ||
51 | #define BB_KILL | ||
52 | #define BB_KILLALL | ||
53 | //#define BB_LENGTH | ||
54 | #define BB_LN | ||
55 | //#define BB_LOADACM | ||
56 | //#define BB_LOADFONT | ||
57 | //#define BB_LOADKMAP | ||
58 | #define BB_LOGGER | ||
59 | //#define BB_LOGNAME | ||
60 | #define BB_LS | ||
61 | #define BB_LSMOD | ||
62 | //#define BB_MAKEDEVS | ||
63 | //#define BB_MD5SUM | ||
64 | #define BB_MKDIR | ||
65 | //#define BB_MKFIFO | ||
66 | //#define BB_MKFS_MINIX | ||
67 | #define BB_MKNOD | ||
68 | #define BB_MKSWAP | ||
69 | //#define BB_MKTEMP | ||
70 | //#define BB_NC | ||
71 | #define BB_MORE | ||
72 | #define BB_MOUNT | ||
73 | //#define BB_MT | ||
74 | //#define BB_NSLOOKUP | ||
75 | //#define BB_PING | ||
76 | #define BB_POWEROFF | ||
77 | //#define BB_PRINTF | ||
78 | #define BB_PS | ||
79 | #define BB_PWD | ||
80 | //#define BB_RDATE | ||
81 | //#define BB_READLINK | ||
82 | #define BB_REBOOT | ||
83 | //#define BB_RENICE | ||
84 | #define BB_RESET | ||
85 | #define BB_RM | ||
86 | #define BB_RMDIR | ||
87 | //#define BB_RMMOD | ||
88 | //#define BB_RPMUNPACK | ||
89 | #define BB_SED | ||
90 | //#define BB_SETKEYCODES | ||
91 | #define BB_SH | 10 | #define BB_SH |
92 | #define BB_SLEEP | ||
93 | #define BB_SORT | ||
94 | #define BB_SWAPONOFF | ||
95 | #define BB_SYNC | ||
96 | #define BB_SYSLOGD | ||
97 | #define BB_TAIL | ||
98 | #define BB_TAR | ||
99 | //#define BB_TEE | ||
100 | //#define BB_TEST | ||
101 | //#define BB_TELNET | ||
102 | #define BB_TOUCH | ||
103 | //#define BB_TR | ||
104 | #define BB_TRUE_FALSE | ||
105 | #define BB_TTY | ||
106 | //#define BB_UUENCODE | ||
107 | //#define BB_UUDECODE | ||
108 | #define BB_UMOUNT | ||
109 | #define BB_UNIQ | ||
110 | #define BB_UNAME | ||
111 | //#define BB_UNIX2DOS | ||
112 | //#define BB_UPDATE | ||
113 | #define BB_UPTIME | ||
114 | //#define BB_USLEEP | ||
115 | //#define BB_WATCHDOG | ||
116 | #define BB_WC | ||
117 | //#define BB_WGET | ||
118 | #define BB_WHICH | ||
119 | #define BB_WHOAMI | ||
120 | #define BB_XARGS | ||
121 | #define BB_YES | ||
122 | // End of Applications List | 11 | // End of Applications List |
123 | // | 12 | // |
124 | // | 13 | // |
@@ -255,22 +144,26 @@ | |||
255 | //busybox. Some systems want this, others do not. Choose wisely. :-) This | 144 | //busybox. Some systems want this, others do not. Choose wisely. :-) This |
256 | //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled. | 145 | //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled. |
257 | // Only relevant if BB_SH is enabled. | 146 | // Only relevant if BB_SH is enabled. |
258 | //BB_FEATURE_SH_APPLETS_ALWAYS_WIN | 147 | #define BB_FEATURE_SH_APPLETS_ALWAYS_WIN |
259 | // | 148 | // |
260 | // Enable tab completion in the shell (not yet | 149 | // Enable tab completion in the shell (not yet |
261 | // working very well -- so don't turn this on) | 150 | // working very well -- so don't turn this on) |
262 | // Only relevant if BB_SH is enabled. | 151 | // Only relevant if BB_SH is enabled. |
263 | #define BB_FEATURE_SH_TAB_COMPLETION | 152 | #define BB_FEATURE_SH_TAB_COMPLETION |
264 | // | 153 | // |
265 | // Enable a simpler shell prompt of the form "path #" instead of the default | 154 | // Enable a simpler shell prompt of the form "path #" |
266 | // "[username@hostname path]#". Some deeply embedded systems don't have | 155 | // instead of the default "[username@hostname path]#" |
267 | // usernames or even hostnames and the default prompt can look rather hideous | 156 | // |
268 | // on them. Uncomment this option for a simpler, path-only prompt (which was | 157 | // Some deeply embedded systems don't have usernames or even hostnames, |
269 | // the default until around BusyBox-0.48): | 158 | // and the default prompt can look rather hideous on them. Uncomment |
159 | // this option for a simpler, path-only prompt (which was the default until | ||
160 | // around BusyBox-0.48): | ||
161 | // | ||
270 | #define BB_FEATURE_SH_SIMPLE_PROMPT | 162 | #define BB_FEATURE_SH_SIMPLE_PROMPT |
271 | // | 163 | // |
272 | // Attempts to match usernames in a ~-prefixed path | 164 | // Attempts to match usernames in a ~-prefixed path |
273 | //#define BB_FEATURE_USERNAME_COMPLETION | 165 | // XXX: Doesn't work without NSS, off by default |
166 | #define BB_FEATURE_USERNAME_COMPLETION /* require NSS */ | ||
274 | // | 167 | // |
275 | //Turn on extra fbset options | 168 | //Turn on extra fbset options |
276 | //#define BB_FEATURE_FBSET_FANCY | 169 | //#define BB_FEATURE_FBSET_FANCY |
@@ -248,7 +248,6 @@ busybox.links: Config.h applets.h | |||
248 | 248 | ||
249 | nfsmount.o cmdedit.o: %.o: %.h | 249 | nfsmount.o cmdedit.o: %.o: %.h |
250 | $(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile | 250 | $(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile |
251 | $(CC) $(CFLAGS) -c $*.c -o $*.o | ||
252 | 251 | ||
253 | utility.o: loop.h | 252 | utility.o: loop.h |
254 | 253 | ||
@@ -265,7 +264,7 @@ clean: | |||
265 | docs/busybox.lineo.com/BusyBox.html | 264 | docs/busybox.lineo.com/BusyBox.html |
266 | - rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \ | 265 | - rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \ |
267 | docs/busybox.pdf docs/busybox.lineo.com/busybox.html | 266 | docs/busybox.pdf docs/busybox.lineo.com/busybox.html |
268 | - rm -f Config.h.ORG bb.def.h busybox.REGRESS.sh.results bb.OptionsAndFeatures | 267 | - rm -f multibuild.log Config.h.orig |
269 | - rm -rf docs/busybox _install | 268 | - rm -rf docs/busybox _install |
270 | - rm -f busybox.links loop.h *~ *.o core | 269 | - rm -f busybox.links loop.h *~ *.o core |
271 | 270 | ||
@@ -54,6 +54,9 @@ | |||
54 | #include <sys/stat.h> | 54 | #include <sys/stat.h> |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #include "pwd_grp/pwd.h" | ||
58 | |||
59 | |||
57 | static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */ | 60 | static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */ |
58 | 61 | ||
59 | enum { | 62 | enum { |
@@ -666,10 +666,6 @@ static void reboot_signal(int sig) | |||
666 | #warning pivot root instead. Do not even bother till this work is done... | 666 | #warning pivot root instead. Do not even bother till this work is done... |
667 | #warning You have been warned. | 667 | #warning You have been warned. |
668 | 668 | ||
669 | #if ! defined BB_FEATURE_USE_PROCFS | ||
670 | #error Sorry, I depend on the /proc filesystem right now. | ||
671 | #endif | ||
672 | |||
673 | static void check_chroot(int sig) | 669 | static void check_chroot(int sig) |
674 | { | 670 | { |
675 | char *argv_init[2] = { "init", NULL, }; | 671 | char *argv_init[2] = { "init", NULL, }; |
diff --git a/init/init.c b/init/init.c index 49951b0fd..a1c6aec3a 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -666,10 +666,6 @@ static void reboot_signal(int sig) | |||
666 | #warning pivot root instead. Do not even bother till this work is done... | 666 | #warning pivot root instead. Do not even bother till this work is done... |
667 | #warning You have been warned. | 667 | #warning You have been warned. |
668 | 668 | ||
669 | #if ! defined BB_FEATURE_USE_PROCFS | ||
670 | #error Sorry, I depend on the /proc filesystem right now. | ||
671 | #endif | ||
672 | |||
673 | static void check_chroot(int sig) | 669 | static void check_chroot(int sig) |
674 | { | 670 | { |
675 | char *argv_init[2] = { "init", NULL, }; | 671 | char *argv_init[2] = { "init", NULL, }; |
@@ -1371,7 +1371,7 @@ static int pseudo_exec(struct child_prog *child) | |||
1371 | struct built_in_command *x; | 1371 | struct built_in_command *x; |
1372 | #ifdef BB_FEATURE_SH_STANDALONE_SHELL | 1372 | #ifdef BB_FEATURE_SH_STANDALONE_SHELL |
1373 | struct BB_applet *applet; | 1373 | struct BB_applet *applet; |
1374 | const char *name; | 1374 | char *name; |
1375 | #endif | 1375 | #endif |
1376 | 1376 | ||
1377 | /* Check if the command matches any of the non-forking builtins. | 1377 | /* Check if the command matches any of the non-forking builtins. |
@@ -130,10 +130,6 @@ extern int lsmod_main(int argc, char **argv) | |||
130 | 130 | ||
131 | #else /*BB_FEATURE_OLD_MODULE_INTERFACE*/ | 131 | #else /*BB_FEATURE_OLD_MODULE_INTERFACE*/ |
132 | 132 | ||
133 | #if ! defined BB_FEATURE_USE_PROCFS | ||
134 | #error Sorry, I depend on the /proc filesystem right now. | ||
135 | #endif | ||
136 | |||
137 | extern int lsmod_main(int argc, char **argv) | 133 | extern int lsmod_main(int argc, char **argv) |
138 | { | 134 | { |
139 | int fd, i; | 135 | int fd, i; |
diff --git a/modutils/lsmod.c b/modutils/lsmod.c index ab8445596..f39cbc08f 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c | |||
@@ -130,10 +130,6 @@ extern int lsmod_main(int argc, char **argv) | |||
130 | 130 | ||
131 | #else /*BB_FEATURE_OLD_MODULE_INTERFACE*/ | 131 | #else /*BB_FEATURE_OLD_MODULE_INTERFACE*/ |
132 | 132 | ||
133 | #if ! defined BB_FEATURE_USE_PROCFS | ||
134 | #error Sorry, I depend on the /proc filesystem right now. | ||
135 | #endif | ||
136 | |||
137 | extern int lsmod_main(int argc, char **argv) | 133 | extern int lsmod_main(int argc, char **argv) |
138 | { | 134 | { |
139 | int fd, i; | 135 | int fd, i; |
@@ -1,3 +1,4 @@ | |||
1 | #error Foo | ||
1 | /* vi: set sw=4 ts=4: */ | 2 | /* vi: set sw=4 ts=4: */ |
2 | /* | 3 | /* |
3 | * Mini more implementation for busybox | 4 | * Mini more implementation for busybox |
@@ -232,13 +232,9 @@ mount_one(char *blockDevice, char *directory, char *filesystemType, | |||
232 | { | 232 | { |
233 | int status = 0; | 233 | int status = 0; |
234 | 234 | ||
235 | #if defined BB_FEATURE_USE_PROCFS | ||
236 | char buf[255]; | 235 | char buf[255]; |
237 | if (strcmp(filesystemType, "auto") == 0) { | 236 | if (strcmp(filesystemType, "auto") == 0) { |
238 | FILE *f = fopen("/proc/filesystems", "r"); | 237 | FILE *f = xfopen("/proc/filesystems", "r"); |
239 | |||
240 | if (f == NULL) | ||
241 | return (FALSE); | ||
242 | 238 | ||
243 | while (fgets(buf, sizeof(buf), f) != NULL) { | 239 | while (fgets(buf, sizeof(buf), f) != NULL) { |
244 | filesystemType = buf; | 240 | filesystemType = buf; |
@@ -261,7 +257,6 @@ mount_one(char *blockDevice, char *directory, char *filesystemType, | |||
261 | } | 257 | } |
262 | fclose(f); | 258 | fclose(f); |
263 | } else | 259 | } else |
264 | #endif | ||
265 | #if defined BB_FEATURE_USE_DEVPS_PATCH | 260 | #if defined BB_FEATURE_USE_DEVPS_PATCH |
266 | if (strcmp(filesystemType, "auto") == 0) { | 261 | if (strcmp(filesystemType, "auto") == 0) { |
267 | int fd, i, numfilesystems; | 262 | int fd, i, numfilesystems; |
@@ -21,12 +21,8 @@ void erase_mtab(const char *name) | |||
21 | 21 | ||
22 | /* Check if reading the mtab file failed */ | 22 | /* Check if reading the mtab file failed */ |
23 | if (mountTable == 0 | 23 | if (mountTable == 0 |
24 | #if ! defined BB_FEATURE_USE_PROCFS | 24 | /* Bummer. fall back on trying the /proc filesystem */ |
25 | ) { | 25 | && (mountTable = setmntent("/proc/mounts", "r")) == 0) { |
26 | #else | ||
27 | /* Bummer. fall back on trying the /proc filesystem */ | ||
28 | && (mountTable = setmntent("/proc/mounts", "r")) == 0) { | ||
29 | #endif | ||
30 | perror_msg("%s", mtab_file); | 26 | perror_msg("%s", mtab_file); |
31 | return; | 27 | return; |
32 | } | 28 | } |
@@ -74,14 +70,12 @@ void write_mtab(char *blockDevice, char *directory, | |||
74 | if (length > 1 && directory[length - 1] == '/') | 70 | if (length > 1 && directory[length - 1] == '/') |
75 | directory[length - 1] = '\0'; | 71 | directory[length - 1] = '\0'; |
76 | 72 | ||
77 | #ifdef BB_FEATURE_USE_PROCFS | ||
78 | if (filesystemType == 0) { | 73 | if (filesystemType == 0) { |
79 | struct mntent *p = find_mount_point(blockDevice, "/proc/mounts"); | 74 | struct mntent *p = find_mount_point(blockDevice, "/proc/mounts"); |
80 | 75 | ||
81 | if (p && p->mnt_type) | 76 | if (p && p->mnt_type) |
82 | filesystemType = p->mnt_type; | 77 | filesystemType = p->mnt_type; |
83 | } | 78 | } |
84 | #endif | ||
85 | m.mnt_fsname = blockDevice; | 79 | m.mnt_fsname = blockDevice; |
86 | m.mnt_dir = directory; | 80 | m.mnt_dir = directory; |
87 | m.mnt_type = filesystemType ? filesystemType : "default"; | 81 | m.mnt_type = filesystemType ? filesystemType : "default"; |
diff --git a/procps/ps.c b/procps/ps.c index 4ff7a8a58..eabdef407 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -52,10 +52,6 @@ static const int TERMINAL_WIDTH = 79; /* not 80 in case terminal has linefo | |||
52 | * the one using the /proc virtual filesystem. | 52 | * the one using the /proc virtual filesystem. |
53 | */ | 53 | */ |
54 | 54 | ||
55 | #if ! defined BB_FEATURE_USE_PROCFS | ||
56 | #error Sorry, I depend on the /proc filesystem right now. | ||
57 | #endif | ||
58 | |||
59 | typedef struct proc_s { | 55 | typedef struct proc_s { |
60 | char | 56 | char |
61 | cmd[16]; /* basename of executable file in call to exec(2) */ | 57 | cmd[16]; /* basename of executable file in call to exec(2) */ |
@@ -52,10 +52,6 @@ static const int TERMINAL_WIDTH = 79; /* not 80 in case terminal has linefo | |||
52 | * the one using the /proc virtual filesystem. | 52 | * the one using the /proc virtual filesystem. |
53 | */ | 53 | */ |
54 | 54 | ||
55 | #if ! defined BB_FEATURE_USE_PROCFS | ||
56 | #error Sorry, I depend on the /proc filesystem right now. | ||
57 | #endif | ||
58 | |||
59 | typedef struct proc_s { | 55 | typedef struct proc_s { |
60 | char | 56 | char |
61 | cmd[16]; /* basename of executable file in call to exec(2) */ | 57 | cmd[16]; /* basename of executable file in call to exec(2) */ |
@@ -1371,7 +1371,7 @@ static int pseudo_exec(struct child_prog *child) | |||
1371 | struct built_in_command *x; | 1371 | struct built_in_command *x; |
1372 | #ifdef BB_FEATURE_SH_STANDALONE_SHELL | 1372 | #ifdef BB_FEATURE_SH_STANDALONE_SHELL |
1373 | struct BB_applet *applet; | 1373 | struct BB_applet *applet; |
1374 | const char *name; | 1374 | char *name; |
1375 | #endif | 1375 | #endif |
1376 | 1376 | ||
1377 | /* Check if the command matches any of the non-forking builtins. | 1377 | /* Check if the command matches any of the non-forking builtins. |
diff --git a/shell/cmdedit.c b/shell/cmdedit.c index ed441d394..2e57b9a34 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c | |||
@@ -54,6 +54,9 @@ | |||
54 | #include <sys/stat.h> | 54 | #include <sys/stat.h> |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #include "pwd_grp/pwd.h" | ||
58 | |||
59 | |||
57 | static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */ | 60 | static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */ |
58 | 61 | ||
59 | enum { | 62 | enum { |
diff --git a/shell/lash.c b/shell/lash.c index 87c37caa9..b1a7b93cf 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -1371,7 +1371,7 @@ static int pseudo_exec(struct child_prog *child) | |||
1371 | struct built_in_command *x; | 1371 | struct built_in_command *x; |
1372 | #ifdef BB_FEATURE_SH_STANDALONE_SHELL | 1372 | #ifdef BB_FEATURE_SH_STANDALONE_SHELL |
1373 | struct BB_applet *applet; | 1373 | struct BB_applet *applet; |
1374 | const char *name; | 1374 | char *name; |
1375 | #endif | 1375 | #endif |
1376 | 1376 | ||
1377 | /* Check if the command matches any of the non-forking builtins. | 1377 | /* Check if the command matches any of the non-forking builtins. |
diff --git a/tests/busybox.REGRESS.sh b/tests/busybox.REGRESS.sh deleted file mode 100755 index c3106419b..000000000 --- a/tests/busybox.REGRESS.sh +++ /dev/null | |||
Binary files differ | |||
diff --git a/tests/multibuild.pl b/tests/multibuild.pl index fb9cdd494..858da360f 100755 --- a/tests/multibuild.pl +++ b/tests/multibuild.pl | |||
@@ -5,9 +5,18 @@ | |||
5 | # properly on its own. The most likely problems this will | 5 | # properly on its own. The most likely problems this will |
6 | # flush out are those involving preprocessor instructions in | 6 | # flush out are those involving preprocessor instructions in |
7 | # utility.c. | 7 | # utility.c. |
8 | # | ||
9 | # TODO: some time it might be nice to list absolute and | ||
10 | # differential object sizes for each option... | ||
11 | # | ||
8 | 12 | ||
9 | $logfile = "multibuild.log"; | 13 | $logfile = "multibuild.log"; |
10 | 14 | ||
15 | # How to handle all the BB_FEATURE_FOO lines | ||
16 | if ($ARGV[0] eq "-all" ) { shift(@ARGV); $choice="all"; } | ||
17 | if ($ARGV[0] eq "-none") { shift(@ARGV); $choice="none"; } | ||
18 | # neither means, leave that part of Config.h alone | ||
19 | |||
11 | # Support building from pristine source | 20 | # Support building from pristine source |
12 | $make_opt = "-f $ARGV[0]/Makefile BB_SRC_DIR=$ARGV[0]" if ($ARGV[0] ne ""); | 21 | $make_opt = "-f $ARGV[0]/Makefile BB_SRC_DIR=$ARGV[0]" if ($ARGV[0] ne ""); |
13 | 22 | ||
@@ -21,6 +30,11 @@ unlink($logfile); | |||
21 | open(C,"<Config.h.orig") || die; | 30 | open(C,"<Config.h.orig") || die; |
22 | while (<C>) { | 31 | while (<C>) { |
23 | if ($in_trailer) { | 32 | if ($in_trailer) { |
33 | if (!$in_olympus) { | ||
34 | s/^\/\/#/#/ if ($choice eq "all" && !/USE_DEVPS_PATCH/); | ||
35 | s/^#/\/\/#/ if ($choice eq "none"); | ||
36 | } | ||
37 | $in_olympus=1 if /End of Features List/; | ||
24 | $trailer .= $_; | 38 | $trailer .= $_; |
25 | } else { | 39 | } else { |
26 | $in_trailer=1 if /End of Applications List/; | 40 | $in_trailer=1 if /End of Applications List/; |
@@ -32,6 +46,7 @@ while (<C>) { | |||
32 | close C; | 46 | close C; |
33 | 47 | ||
34 | # Do the real work ... | 48 | # Do the real work ... |
49 | $failed_tests=0; | ||
35 | for $a (@apps) { | 50 | for $a (@apps) { |
36 | # print "Testing build of applet $a ...\n"; | 51 | # print "Testing build of applet $a ...\n"; |
37 | open (O, ">Config.h") || die; | 52 | open (O, ">Config.h") || die; |
@@ -40,12 +55,17 @@ for $a (@apps) { | |||
40 | system("echo -e '\n***\n$a\n***' >>$logfile"); | 55 | system("echo -e '\n***\n$a\n***' >>$logfile"); |
41 | # todo: figure out why the "rm -f *.o" is needed | 56 | # todo: figure out why the "rm -f *.o" is needed |
42 | $result{$a} = system("rm -f *.o; make $make_opt busybox >>$logfile 2>&1"); | 57 | $result{$a} = system("rm -f *.o; make $make_opt busybox >>$logfile 2>&1"); |
43 | $flag = $result{$a} ? "FAIL" : "OK"; | 58 | $flag = $result{$a} ? "FAILED!!!" : "ok"; |
44 | print "Applet $a: $flag\n"; | 59 | printf("Applet %-20s: %s\n", $a, $flag); |
60 | $total_tests++; | ||
61 | $failed_tests++ if $flag eq "FAILED!!!"; | ||
62 | # pause long enough to let user stop us with a ^C | ||
63 | select(undef, undef, undef, 0.05); | ||
45 | } | 64 | } |
46 | 65 | ||
47 | # Clean up our mess | 66 | # Clean up our mess |
48 | system("mv -f Config.h.orig Config.h"); | 67 | system("mv -f Config.h.orig Config.h"); |
49 | 68 | ||
69 | print "$total_tests applets tested, $failed_tests failures\n"; | ||
50 | print "See $logfile for details.\n"; | 70 | print "See $logfile for details.\n"; |
51 | 71 | ||
diff --git a/util-linux/more.c b/util-linux/more.c index c4c74fe4a..15c3b6f87 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #error Foo | ||
1 | /* vi: set sw=4 ts=4: */ | 2 | /* vi: set sw=4 ts=4: */ |
2 | /* | 3 | /* |
3 | * Mini more implementation for busybox | 4 | * Mini more implementation for busybox |
diff --git a/util-linux/mount.c b/util-linux/mount.c index b571e5035..79813ba18 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -232,13 +232,9 @@ mount_one(char *blockDevice, char *directory, char *filesystemType, | |||
232 | { | 232 | { |
233 | int status = 0; | 233 | int status = 0; |
234 | 234 | ||
235 | #if defined BB_FEATURE_USE_PROCFS | ||
236 | char buf[255]; | 235 | char buf[255]; |
237 | if (strcmp(filesystemType, "auto") == 0) { | 236 | if (strcmp(filesystemType, "auto") == 0) { |
238 | FILE *f = fopen("/proc/filesystems", "r"); | 237 | FILE *f = xfopen("/proc/filesystems", "r"); |
239 | |||
240 | if (f == NULL) | ||
241 | return (FALSE); | ||
242 | 238 | ||
243 | while (fgets(buf, sizeof(buf), f) != NULL) { | 239 | while (fgets(buf, sizeof(buf), f) != NULL) { |
244 | filesystemType = buf; | 240 | filesystemType = buf; |
@@ -261,7 +257,6 @@ mount_one(char *blockDevice, char *directory, char *filesystemType, | |||
261 | } | 257 | } |
262 | fclose(f); | 258 | fclose(f); |
263 | } else | 259 | } else |
264 | #endif | ||
265 | #if defined BB_FEATURE_USE_DEVPS_PATCH | 260 | #if defined BB_FEATURE_USE_DEVPS_PATCH |
266 | if (strcmp(filesystemType, "auto") == 0) { | 261 | if (strcmp(filesystemType, "auto") == 0) { |
267 | int fd, i, numfilesystems; | 262 | int fd, i, numfilesystems; |
@@ -63,26 +63,16 @@ | |||
63 | 63 | ||
64 | /* Busybox mount uses either /proc/filesystems or /dev/mtab to get the | 64 | /* Busybox mount uses either /proc/filesystems or /dev/mtab to get the |
65 | * list of available filesystems used for the -t auto option */ | 65 | * list of available filesystems used for the -t auto option */ |
66 | #if defined BB_FEATURE_USE_PROCFS && defined BB_FEATURE_USE_DEVPS_PATCH | ||
67 | //#error Sorry, but busybox can't use both /proc and /dev/ps at the same time -- Pick one and try again. | ||
68 | #error "Sorry, but busybox can't use both /proc and /dev/ps at the same time -- Pick one and try again." | ||
69 | #endif | ||
70 | |||
71 | |||
72 | #if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF | 66 | #if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF |
73 | # if defined BB_MTAB | 67 | # if defined BB_MTAB |
74 | const char mtab_file[] = "/etc/mtab"; | 68 | const char mtab_file[] = "/etc/mtab"; |
75 | # else | 69 | # else |
76 | # if defined BB_FEATURE_USE_PROCFS | ||
77 | const char mtab_file[] = "/proc/mounts"; | ||
78 | # else | ||
79 | # if defined BB_FEATURE_USE_DEVPS_PATCH | 70 | # if defined BB_FEATURE_USE_DEVPS_PATCH |
80 | const char mtab_file[] = "/dev/mtab"; | 71 | const char mtab_file[] = "/dev/mtab"; |
81 | # else | 72 | # else |
82 | # 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) | 73 | const char mtab_file[] = "/proc/mounts"; |
83 | # endif | 74 | # endif |
84 | # endif | 75 | # endif |
85 | # endif | ||
86 | #endif | 76 | #endif |
87 | 77 | ||
88 | extern void usage(const char *usage) | 78 | extern void usage(const char *usage) |
@@ -1271,9 +1261,6 @@ extern pid_t* find_pid_by_name( char* pidName) | |||
1271 | return pidList; | 1261 | return pidList; |
1272 | } | 1262 | } |
1273 | #else /* BB_FEATURE_USE_DEVPS_PATCH */ | 1263 | #else /* BB_FEATURE_USE_DEVPS_PATCH */ |
1274 | #if ! defined BB_FEATURE_USE_PROCFS | ||
1275 | #error Sorry, I depend on the /proc filesystem right now. | ||
1276 | #endif | ||
1277 | 1264 | ||
1278 | /* find_pid_by_name() | 1265 | /* find_pid_by_name() |
1279 | * | 1266 | * |
@@ -1634,7 +1621,7 @@ char process_escape_sequence(char **ptr) | |||
1634 | #endif | 1621 | #endif |
1635 | 1622 | ||
1636 | #if defined BB_BASENAME || defined BB_LN || defined BB_SH || defined BB_INIT || \ | 1623 | #if defined BB_BASENAME || defined BB_LN || defined BB_SH || defined BB_INIT || \ |
1637 | defined BB_FEATURE_USE_PROCFS || defined BB_WGET | 1624 | ! defined BB_FEATURE_USE_DEVPS_PATCH || defined BB_WGET |
1638 | char *get_last_path_component(char *path) | 1625 | char *get_last_path_component(char *path) |
1639 | { | 1626 | { |
1640 | char *s=path+strlen(path)-1; | 1627 | char *s=path+strlen(path)-1; |
@@ -1681,7 +1668,8 @@ FILE *wfopen(const char *path, const char *mode) | |||
1681 | 1668 | ||
1682 | #if defined BB_HOSTNAME || defined BB_LOADACM || defined BB_MORE \ | 1669 | #if defined BB_HOSTNAME || defined BB_LOADACM || defined BB_MORE \ |
1683 | || defined BB_SED || defined BB_SH || defined BB_TAR || defined BB_UNIQ \ | 1670 | || defined BB_SED || defined BB_SH || defined BB_TAR || defined BB_UNIQ \ |
1684 | || defined BB_WC || defined BB_CMP || defined BB_SORT || defined BB_WGET | 1671 | || defined BB_WC || defined BB_CMP || defined BB_SORT || defined BB_WGET \ |
1672 | || defined BB_MOUNT | ||
1685 | FILE *xfopen(const char *path, const char *mode) | 1673 | FILE *xfopen(const char *path, const char *mode) |
1686 | { | 1674 | { |
1687 | FILE *fp; | 1675 | FILE *fp; |