new busybox
[nestedvm.git] / upstream / patches / busybox.patch
1 Only in .: .config
2 Only in .: .config.cmd
3 Only in .: .config~
4 Only in .: .depend
5 Only in .: BusyBox.class
6 diff -ru ../busybox-1.00-pre9/Rules.mak ./Rules.mak
7 --- ../busybox-1.00-pre9/Rules.mak      2004-04-06 13:58:37.000000000 -0400
8 +++ ./Rules.mak 2004-05-07 04:16:02.000000000 -0400
9 @@ -79,7 +79,8 @@
10  #CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR)
11  #GCCINCDIR:=$(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
12  
13 -WARNINGS=-Wall -Wstrict-prototypes -Wshadow
14 +WARNINGS=-Wall -Wstrict-prototypes -Wshadow -Wno-unused
15 +LIBRARIES=-lglob -lregex
16  CFLAGS=-I$(TOPDIR)include
17  ARFLAGS=-r
18  
19 @@ -158,8 +159,8 @@
20      STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging
21  else
22      CFLAGS+=$(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE -DNDEBUG
23 -    LDFLAGS += -s -Wl,-warn-common
24 -    STRIPCMD:=$(STRIP) --remove-section=.note --remove-section=.comment
25 +    LDFLAGS += -Wl,-warn-common
26 +    STRIPCMD:= true
27  endif
28  ifeq ($(strip $(CONFIG_STATIC)),y)
29      LDFLAGS += --static
30 diff -ru ../busybox-1.00-pre9/archival/tar.c ./archival/tar.c
31 --- ../busybox-1.00-pre9/archival/tar.c 2004-03-27 05:02:41.000000000 -0500
32 +++ ./archival/tar.c    2004-05-07 01:16:41.000000000 -0400
33 @@ -48,7 +48,9 @@
34  #include <errno.h>
35  #include <signal.h>
36  #include <sys/wait.h>
37 +#ifndef NESTEDVM
38  #include <sys/socket.h>
39 +#endif
40  #include "unarchive.h"
41  #include "busybox.h"
42  
43 diff -ru ../busybox-1.00-pre9/coreutils/cal.c ./coreutils/cal.c
44 --- ../busybox-1.00-pre9/coreutils/cal.c        2004-03-15 03:28:19.000000000 -0500
45 +++ ./coreutils/cal.c   2004-05-07 01:19:34.000000000 -0400
46 @@ -31,7 +31,9 @@
47  
48  #include <sys/types.h>
49  #include <ctype.h>
50 +#ifndef NESTEDVM
51  #include <err.h>
52 +#endif
53  #include <stdio.h>
54  #include <stdlib.h>
55  #include <string.h>
56 diff -ru ../busybox-1.00-pre9/coreutils/date.c ./coreutils/date.c
57 --- ../busybox-1.00-pre9/coreutils/date.c       2004-04-06 05:38:18.000000000 -0400
58 +++ ./coreutils/date.c  2004-05-07 03:14:51.000000000 -0400
59 @@ -227,7 +227,11 @@
60                 }
61  
62                 /* if setting time, set it */
63 +#ifndef NESTEDVM
64                 if (set_time && (stime(&tm) < 0)) {
65 +#else
66 +        if(0) {
67 +#endif
68                         bb_perror_msg("cannot set date");
69                 }
70         }
71 diff -ru ../busybox-1.00-pre9/coreutils/dos2unix.c ./coreutils/dos2unix.c
72 --- ../busybox-1.00-pre9/coreutils/dos2unix.c   2004-03-15 03:28:20.000000000 -0500
73 +++ ./coreutils/dos2unix.c      2004-05-07 04:11:32.000000000 -0400
74 @@ -30,7 +30,9 @@
75  #include <string.h>
76  #include <getopt.h>
77  #include <unistd.h>
78 +#ifndef NESTEDVM
79  #include <stdint.h>
80 +#endif
81  #include <fcntl.h>
82  #include <sys/time.h>
83  #include "busybox.h"
84 diff -ru ../busybox-1.00-pre9/coreutils/env.c ./coreutils/env.c
85 --- ../busybox-1.00-pre9/coreutils/env.c        2003-11-07 06:20:21.000000000 -0500
86 +++ ./coreutils/env.c   2004-05-07 01:21:10.000000000 -0400
87 @@ -50,12 +50,13 @@
88  #include <getopt.h>
89  #include "busybox.h"
90  
91 -
92 +#ifdef NESTEDVM
93  static const struct option env_long_options[] = {
94         { "ignore-environment", 0, NULL, 'i' },
95         { "unset", 1, NULL, 'u' },
96         { 0, 0, 0, 0 }
97  };
98 +#endif
99  
100  extern int env_main(int argc, char** argv)
101  {
102 diff -ru ../busybox-1.00-pre9/coreutils/ls.c ./coreutils/ls.c
103 --- ../busybox-1.00-pre9/coreutils/ls.c 2004-03-27 05:02:42.000000000 -0500
104 +++ ./coreutils/ls.c    2004-05-08 02:33:40.000000000 -0400
105 @@ -59,8 +59,10 @@
106  #include <stdlib.h>
107  #include <fcntl.h>
108  #include <signal.h>
109 +#ifndef NESTEDVM
110  #include <termios.h>
111  #include <sys/ioctl.h>
112 +#endif
113  #include "busybox.h"
114  #ifdef CONFIG_SELINUX
115  #include <fs_secure.h>
116 @@ -988,8 +990,11 @@
117  #endif
118  
119  #ifdef CONFIG_FEATURE_LS_COLOR
120 -       if (isatty(STDOUT_FILENO))
121 -               show_color = 1;
122 +    {
123 +        char *term = getenv("TERM");
124 +        if (isatty(STDOUT_FILENO) && term && *term)
125 +            show_color = 1;
126 +    }
127  #endif
128  
129         /* process options */
130 diff -ru ../busybox-1.00-pre9/coreutils/md5_sha1_sum.c ./coreutils/md5_sha1_sum.c
131 --- ../busybox-1.00-pre9/coreutils/md5_sha1_sum.c       2004-03-27 05:02:42.000000000 -0500
132 +++ ./coreutils/md5_sha1_sum.c  2004-05-07 01:26:00.000000000 -0400
133 @@ -20,7 +20,9 @@
134  #include <fcntl.h>
135  #include <limits.h>
136  #include <stdio.h>
137 +#ifndef NESTEDVM
138  #include <stdint.h>
139 +#endif
140  #include <stdlib.h>
141  #include <string.h>
142  #include <unistd.h>
143 diff -ru ../busybox-1.00-pre9/coreutils/rmdir.c ./coreutils/rmdir.c
144 --- ../busybox-1.00-pre9/coreutils/rmdir.c      2004-03-15 03:28:21.000000000 -0500
145 +++ ./coreutils/rmdir.c 2004-05-07 01:25:41.000000000 -0400
146 @@ -25,7 +25,9 @@
147  
148  #include <stdlib.h>
149  #include <unistd.h>
150 +#ifndef NESTEDVM
151  #include <libgen.h>
152 +#endif
153  #include "busybox.h"
154  
155  extern int rmdir_main(int argc, char **argv)
156 diff -ru ../busybox-1.00-pre9/include/busybox.h ./include/busybox.h
157 --- ../busybox-1.00-pre9/include/busybox.h      2004-03-15 03:28:38.000000000 -0500
158 +++ ./include/busybox.h 2004-05-07 01:11:01.000000000 -0400
159 @@ -33,7 +33,7 @@
160  #include <sys/types.h>
161  
162  #if __GNU_LIBRARY__ < 5
163 -#ifndef __dietlibc__
164 +#if !defined(__dietlibc__) && !defined(NESTEDVM)
165  #error "Sorry, libc5 is not supported"
166  #endif
167  #endif
168 @@ -48,7 +48,9 @@
169  #include <dmalloc.h>
170  #endif
171  
172 +#ifndef NESTEDVM
173  #include <features.h>
174 +#endif
175  
176  /* Pull in the utility routines from libbb */
177  #include "libbb.h"
178 Only in ./include: config
179 Only in ./include: config.h
180 diff -ru ../busybox-1.00-pre9/include/grp_.h ./include/grp_.h
181 --- ../busybox-1.00-pre9/include/grp_.h 2003-12-18 17:40:58.000000000 -0500
182 +++ ./include/grp_.h    2004-05-07 03:32:36.000000000 -0400
183 @@ -7,7 +7,9 @@
184  #else
185  
186  #include <sys/types.h>
187 +#ifndef NESTEDVM
188  #include <features.h>
189 +#endif
190  #include <stdio.h>
191  
192  
193 diff -ru ../busybox-1.00-pre9/include/libbb.h ./include/libbb.h
194 --- ../busybox-1.00-pre9/include/libbb.h        2004-03-15 03:28:38.000000000 -0500
195 +++ ./include/libbb.h   2004-05-07 02:48:25.000000000 -0400
196 @@ -24,22 +24,69 @@
197  #ifndef        __LIBCONFIG_H__
198  #define        __LIBCONFIG_H__    1
199  
200 +
201 +#ifdef NESTEDVM
202 +#include <sys/cdefs.h>
203 +#include <sys/fcntl.h>
204 +#include <stdio.h>
205 +#include <string.h>
206 +#include <unistd.h>
207 +
208 +#define WCOREDUMP(x) 0
209 +
210 +typedef char int8_t;
211 +typedef unsigned char uint8_t;
212 +typedef short int16_t;
213 +typedef unsigned short uint16_t;
214 +typedef int int32_t;
215 +typedef unsigned int uint32_t;
216 +typedef long long int64_t;
217 +typedef unsigned long long uint64_t;
218 +
219 +struct option {
220 +       const char *name;
221 +       int has_arg;
222 +       int *flag;
223 +       int val;
224 +};
225 +
226 +#include <stdarg.h>
227 +
228 +static char *strchrnul(const char *s, int c) {
229 +    char *ret;
230 +    ret = strchr(s,c);
231 +    return ret ? ret : (char*)s + strlen(s);
232 +}
233 +
234 +static char *stpcpy(char *dest, const char *src) {
235 +    while((*dest = *src) != '\0') { dest++; src++; }
236 +    return dest;
237 +}
238 +
239 +#endif
240 +
241  #include <stdio.h>
242  #include <stdlib.h>
243  #include <stdarg.h>
244  #include <sys/stat.h>
245  #include <sys/types.h>
246  #include <regex.h>
247 +#ifndef NESTEDVM
248  #include <termios.h>
249  #include <stdint.h>
250 +#endif
251  
252 +#ifndef NESTEDVM
253  #include <netdb.h>
254 +#endif
255  
256  #ifdef DMALLOC
257  #include <dmalloc.h>
258  #endif
259  
260 +#ifndef NESTEDVM
261  #include <features.h>
262 +#endif
263  
264  #include "config.h"
265  #ifdef CONFIG_SELINUX
266 @@ -123,8 +170,10 @@
267  extern int bb_parse_mode( const char* s, mode_t* theMode);
268  extern long bb_xgetlarg(const char *arg, int base, long lower, long upper);
269  
270 +#ifndef NESTEDVM
271  extern unsigned long bb_baud_to_value(speed_t speed);
272  extern speed_t bb_value_to_baud(unsigned long value);
273 +#endif
274  
275  extern int get_kernel_revision(void);
276  
277 @@ -297,6 +346,7 @@
278  extern int uncompress(int fd_in, int fd_out);
279  extern int inflate(int in, int out);
280  
281 +#ifndef NESTEDVM
282  extern struct hostent *xgethostbyname(const char *name);
283  extern struct hostent *xgethostbyname2(const char *name, int af);
284  extern int create_icmp_socket(void);
285 @@ -304,6 +354,7 @@
286  extern int xconnect(struct sockaddr_in *s_addr);
287  extern unsigned short bb_lookup_port(const char *port, const char *protocol, unsigned short default_port);
288  extern void bb_lookup_host(struct sockaddr_in *s_in, const char *host);
289 +#endif
290  
291  //#warning wrap this?
292  char *dirname (char *path);
293 diff -ru ../busybox-1.00-pre9/include/pwd_.h ./include/pwd_.h
294 --- ../busybox-1.00-pre9/include/pwd_.h 2002-07-03 19:19:10.000000000 -0400
295 +++ ./include/pwd_.h    2004-05-07 03:32:15.000000000 -0400
296 @@ -7,7 +7,9 @@
297  #else
298  
299  #include <sys/types.h>
300 +#ifndef NESTEDVM
301  #include <features.h>
302 +#endif
303  #include <stdio.h>
304  
305  /* The passwd structure.  */
306 diff -ru ../busybox-1.00-pre9/libbb/Makefile.in ./libbb/Makefile.in
307 --- ../busybox-1.00-pre9/libbb/Makefile.in      2004-03-06 17:11:45.000000000 -0500
308 +++ ./libbb/Makefile.in 2004-05-07 02:51:59.000000000 -0400
309 @@ -24,28 +24,27 @@
310  endif
311  
312  LIBBB_SRC:= \
313 -       bb_asprintf.c ask_confirmation.c change_identity.c chomp.c \
314 +       bb_asprintf.c ask_confirmation.c chomp.c \
315         compare_string_array.c concat_path_file.c copy_file.c copyfd.c \
316 -       correct_password.c create_icmp_socket.c create_icmp6_socket.c \
317 -       device_open.c dump.c error_msg.c error_msg_and_die.c find_mount_point.c \
318 +       device_open.c dump.c error_msg.c error_msg_and_die.c \
319         find_pid_by_name.c find_root_device.c fgets_str.c full_read.c \
320         full_write.c get_last_path_component.c get_line_from_file.c get_ug_id.c \
321         get_terminal_width_height.c hash_fd.c herror_msg.c herror_msg_and_die.c \
322 -       human_readable.c inet_common.c inode_hash.c interface.c isdirectory.c \
323 -       kernel_version.c last_char_is.c llist_add_to.c login.c loop.c \
324 -       make_directory.c mode_string.c module_syscalls.c mtab.c mtab_file.c \
325 +       human_readable.c inode_hash.c isdirectory.c \
326 +       last_char_is.c llist_add_to.c \
327 +       make_directory.c mode_string.c \
328         my_getgrgid.c my_getgrnam.c my_getpwnam.c my_getpwnamegid.c \
329         my_getpwuid.c obscure.c parse_mode.c parse_number.c perror_msg.c \
330 -       perror_msg_and_die.c print_file.c get_console.c \
331 -       process_escape_sequence.c procps.c pwd2spwd.c pw_encrypt.c qmodule.c \
332 +       perror_msg_and_die.c print_file.c \
333 +       process_escape_sequence.c procps.c pwd2spwd.c qmodule.c \
334         read_package_field.c recursive_action.c remove_file.c \
335 -       restricted_shell.c run_parts.c run_shell.c safe_read.c safe_write.c \
336 -       safe_strncpy.c setup_environment.c simplify_path.c syscalls.c \
337 -       syslog_msg_with_name.c trim.c u_signal_names.c vdprintf.c verror_msg.c \
338 -       vherror_msg.c vperror_msg.c wfopen.c xconnect.c xgetcwd.c \
339 -       xgethostbyname.c xgethostbyname2.c xreadlink.c xregcomp.c xgetlarg.c \
340 +       run_shell.c safe_read.c safe_write.c \
341 +       safe_strncpy.c simplify_path.c \
342 +       trim.c u_signal_names.c vdprintf.c verror_msg.c \
343 +       vperror_msg.c wfopen.c xgetcwd.c \
344 +       xreadlink.c xregcomp.c xgetlarg.c \
345         get_terminal_width_height.c fclose_nonstdin.c fflush_stdout_and_exit.c \
346 -       getopt_ulflags.c default_error_retval.c wfopen_input.c speed_table.c \
347 +       getopt_ulflags.c default_error_retval.c wfopen_input.c \
348         perror_nomsg_and_die.c perror_nomsg.c skip_whitespace.c \
349         warn_ignoring_args.c concat_subpath_file.c vfork_daemon_rexec.c
350  
351 Only in ./libbb: Makefile.in~
352 diff -ru ../busybox-1.00-pre9/libbb/get_terminal_width_height.c ./libbb/get_terminal_width_height.c
353 --- ../busybox-1.00-pre9/libbb/get_terminal_width_height.c      2004-03-23 18:15:35.000000000 -0500
354 +++ ./libbb/get_terminal_width_height.c 2004-05-07 02:36:09.000000000 -0400
355 @@ -24,8 +24,10 @@
356  #include <fcntl.h>
357  #include <unistd.h>
358  #include <unistd.h>
359 +#ifndef NESTEDVM
360  #include <termios.h>
361  #include <sys/ioctl.h>
362 +#endif
363  #include "busybox.h"
364  
365  /* It is perfectly ok to pass in a NULL for either width or for
366 @@ -34,7 +36,11 @@
367   * which case you will always get 80x24 */
368  void get_terminal_width_height(int fd, int *width, int *height)
369  {
370 +#ifdef NESTEDVM
371 +    struct { int ws_row; int ws_col; } win = { 0, 0};
372 +#else
373         struct winsize win = { 0, 0, 0, 0 };
374 +#endif
375  #ifdef CONFIG_FEATURE_AUTOWIDTH
376         if (ioctl(fd, TIOCGWINSZ, &win) != 0) {
377                 win.ws_row = 24;
378 diff -ru ../busybox-1.00-pre9/libbb/getopt_ulflags.c ./libbb/getopt_ulflags.c
379 --- ../busybox-1.00-pre9/libbb/getopt_ulflags.c 2004-02-05 08:49:29.000000000 -0500
380 +++ ./libbb/getopt_ulflags.c    2004-05-07 04:00:35.000000000 -0400
381 @@ -150,8 +150,14 @@
382      s--;
383    }
384  
385 -  while ((c = getopt_long (argc, argv, applet_opts,
386 -                           bb_applet_long_options, NULL)) > 0) {
387 +    
388 +  while ((c = 
389 +#ifdef NESTEDVM
390 +          getopt(argc,argv,applet_opts)
391 +#else
392 +          getopt_long (argc, argv, applet_opts,bb_applet_long_options, NULL) 
393 +#endif
394 +  ) > 0) {
395         for (on_off = complementaly; on_off->opt != c; on_off++) {
396             if(!on_off->opt)
397                         bb_show_usage ();
398 diff -ru ../busybox-1.00-pre9/libbb/hash_fd.c ./libbb/hash_fd.c
399 --- ../busybox-1.00-pre9/libbb/hash_fd.c        2004-03-15 03:28:42.000000000 -0500
400 +++ ./libbb/hash_fd.c   2004-05-08 02:57:19.000000000 -0400
401 @@ -20,18 +20,27 @@
402   *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
403   */
404  
405 +#ifndef NESTEDVM
406  #include <byteswap.h>
407  #include <endian.h>
408 +#endif
409  #include <fcntl.h>
410  #include <limits.h>
411  #include <stdio.h>
412 +#ifndef NESTEDVM
413  #include <stdint.h>
414 +#endif
415  #include <stdlib.h>
416  #include <string.h>
417  #include <unistd.h>
418  
419  #include "busybox.h"
420  
421 +#ifdef NESTEDVM
422 +#define __BYTE_ORDER BYTE_ORDER
423 +#define __LITTLE_ENDIAN LITTLE_ENDIAN
424 +#define __BIG_ENDIAN BIG_ENDIAN
425 +#endif
426  
427  #ifdef CONFIG_SHA1SUM
428  /*
429 diff -ru ../busybox-1.00-pre9/libbb/procps.c ./libbb/procps.c
430 --- ../busybox-1.00-pre9/libbb/procps.c 2004-01-27 15:17:39.000000000 -0500
431 +++ ./libbb/procps.c    2004-05-07 02:41:27.000000000 -0400
432 @@ -12,7 +12,9 @@
433  #include <string.h>
434  #include <stdlib.h>
435  #include <unistd.h>
436 +#ifndef NESTEDVM
437  #include <asm/page.h>
438 +#endif
439  
440  #include "libbb.h"
441  
442 diff -ru ../busybox-1.00-pre9/libbb/run_shell.c ./libbb/run_shell.c
443 --- ../busybox-1.00-pre9/libbb/run_shell.c      2004-03-15 03:28:43.000000000 -0500
444 +++ ./libbb/run_shell.c 2004-05-07 02:44:27.000000000 -0400
445 @@ -33,7 +33,9 @@
446  #include <unistd.h>
447  #include <string.h>
448  #include <stdlib.h>
449 +#ifndef NESTEDVM
450  #include <syslog.h>
451 +#endif
452  #include <ctype.h>
453  #include "libbb.h"
454  #ifdef CONFIG_SELINUX
455 diff -ru ../busybox-1.00-pre9/libbb/u_signal_names.c ./libbb/u_signal_names.c
456 --- ../busybox-1.00-pre9/libbb/u_signal_names.c 2004-03-15 03:28:43.000000000 -0500
457 +++ ./libbb/u_signal_names.c    2004-05-07 02:47:24.000000000 -0400
458 @@ -21,6 +21,7 @@
459   * USA
460   */
461  
462 +#include <sys/types.h>
463  #include <signal.h>
464  #include <ctype.h>
465  #include <string.h>
466 diff -ru ../busybox-1.00-pre9/libbb/vdprintf.c ./libbb/vdprintf.c
467 --- ../busybox-1.00-pre9/libbb/vdprintf.c       2004-03-15 03:28:43.000000000 -0500
468 +++ ./libbb/vdprintf.c  2004-05-07 03:22:03.000000000 -0400
469 @@ -26,7 +26,17 @@
470  
471  
472  #if (__GLIBC__ < 2)
473 -extern int vdprintf(int d, const char *format, va_list ap)
474 +int dprintf(int d, const char *fmt, ...) {
475 +    int ret;
476 +    va_list ap;
477 +    
478 +    va_start (ap, fmt);
479 +    ret = vdprintf (d, fmt, ap);
480 +    va_end (ap);
481 +    return ret;
482 +}
483 +
484 +int vdprintf(int d, const char *format, va_list ap)
485  {
486         char buf[BUF_SIZE];
487         int len;
488 diff -ru ../busybox-1.00-pre9/libbb/xgetcwd.c ./libbb/xgetcwd.c
489 --- ../busybox-1.00-pre9/libbb/xgetcwd.c        2003-05-26 10:06:00.000000000 -0400
490 +++ ./libbb/xgetcwd.c   2004-05-07 02:51:13.000000000 -0400
491 @@ -11,6 +11,7 @@
492  #include <unistd.h>
493  #include <limits.h>
494  #include <sys/param.h>
495 +#include <sys/syslimits.h>
496  #include "libbb.h"
497  
498  /* Amount to increase buffer size by in each try. */
499 diff -ru ../busybox-1.00-pre9/libpwdgrp/setgroups.c ./libpwdgrp/setgroups.c
500 --- ../busybox-1.00-pre9/libpwdgrp/setgroups.c  2004-03-15 03:28:45.000000000 -0500
501 +++ ./libpwdgrp/setgroups.c     2004-05-07 03:34:15.000000000 -0400
502 @@ -24,17 +24,25 @@
503  
504  #include <errno.h>
505  #include <unistd.h>
506 +#ifndef NESTEDVM
507  #include <features.h>
508 +#endif
509  #include <sys/types.h>
510  /* Kernel headers before 2.1.mumble need this on the Alpha to get
511     _syscall* defined.  */
512  #define __LIBRARY__
513 +#ifndef NESTEDVM
514  #include <sys/syscall.h>
515 +#endif
516  #include "grp_.h"
517  
518  int setgroups(size_t size, const gid_t * list)
519  {
520 +#ifndef NESTEDVM
521         return(syscall(__NR_setgroups, size, list));
522 +#else
523 +    return 0;
524 +#endif
525  }
526  
527  
528 Only in .: nestedvm.config
529 diff -ru ../busybox-1.00-pre9/procps/ps.c ./procps/ps.c
530 --- ../busybox-1.00-pre9/procps/ps.c    2004-03-15 03:29:03.000000000 -0500
531 +++ ./procps/ps.c       2004-05-07 01:30:19.000000000 -0400
532 @@ -27,8 +27,10 @@
533  #include <fcntl.h>
534  #include <ctype.h>
535  #include <string.h>
536 +#ifndef NESTEDVM
537  #include <termios.h>
538  #include <sys/ioctl.h>
539 +#endif
540  #include "busybox.h"
541  #ifdef CONFIG_SELINUX
542  #include <fs_secure.h>
543 Only in ./scripts/config: conf
544 Only in ./scripts/config: lex.zconf.c
545 Only in ./scripts/config: lkc_defs.h
546 Only in ./scripts/config: mconf
547 Only in ./scripts/config: zconf.tab.c
548 Only in ./scripts/config: zconf.tab.h
549 Only in ./scripts: mkdep
550 diff -ru ../busybox-1.00-pre9/shell/ash.c ./shell/ash.c
551 --- ../busybox-1.00-pre9/shell/ash.c    2004-04-07 05:34:26.000000000 -0400
552 +++ ./shell/ash.c       2004-05-07 19:40:04.000000000 -0400
553 @@ -67,7 +67,9 @@
554  
555  #include <sys/types.h>
556  #include <sys/cdefs.h>
557 +#ifndef NESTEDVM
558  #include <sys/ioctl.h>
559 +#endif
560  #include <sys/param.h>
561  #include <sys/resource.h>
562  #include <sys/stat.h>
563 @@ -90,8 +92,10 @@
564  #include <paths.h>
565  #include <setjmp.h>
566  #include <signal.h>
567 +#ifndef NESTEDVM
568  #include <stdint.h>
569  #include <sysexits.h>
570 +#endif
571  #include <time.h>
572  #include <fnmatch.h>
573  
574 @@ -1403,7 +1407,9 @@
575         { BUILTIN_SPEC_REG      "trap", trapcmd },
576         { BUILTIN_REGULAR       "true", truecmd },
577         { BUILTIN_NOSPEC        "type", typecmd },
578 +#ifndef NESTEDVM
579         { BUILTIN_NOSPEC        "ulimit", ulimitcmd },
580 +#endif
581         { BUILTIN_REGULAR       "umask", umaskcmd },
582  #ifdef CONFIG_ASH_ALIAS
583         { BUILTIN_REGULAR       "unalias", unaliascmd },
584 @@ -2555,7 +2561,9 @@
585         int i;
586  
587         intpending = 0;
588 +#ifndef NESTEDVM
589         sigsetmask(0);
590 +#endif
591         i = EXSIG;
592         if (gotsig[SIGINT - 1] && !trap[SIGINT]) {
593                 if (!(rootshell && iflag)) {
594 @@ -6702,7 +6710,11 @@
595  #endif
596                 }
597                 st &= 0x7f;
598 +#ifdef NESTEDVM
599 +               col = fmtstr(s, 32, "signal %d",st);
600 +#else
601                 col = fmtstr(s, 32, strsignal(st));
602 +#endif
603                 if (WCOREDUMP(status)) {
604                         col += fmtstr(s + col, 16, " (core dumped)");
605                 }
606 @@ -7309,7 +7321,7 @@
607  #endif
608         if (block == 0)
609                 flags |= WNOHANG;
610 -       return wait3(status, flags, (struct rusage *)NULL);
611 +    return waitpid((pid_t)-1,status,flags);
612  }
613  
614  /*
615 @@ -12683,6 +12695,8 @@
616         return 0;
617  }
618  
619 +#ifndef NESTEDVM
620 +
621  /*
622   * ulimit builtin
623   *
624 @@ -12864,7 +12878,7 @@
625         }
626         return 0;
627  }
628 -
629 +#endif /* NESTEDVM */
630  
631  #ifdef CONFIG_ASH_MATH_SUPPORT
632  
633 diff -ru ../busybox-1.00-pre9/util-linux/more.c ./util-linux/more.c
634 --- ../busybox-1.00-pre9/util-linux/more.c      2004-03-27 05:02:48.000000000 -0500
635 +++ ./util-linux/more.c 2004-05-07 02:26:31.000000000 -0400
636 @@ -32,7 +32,9 @@
637  #include <signal.h>
638  #include <stdlib.h>
639  #include <unistd.h>
640 +#ifndef NESTEDVM
641  #include <sys/ioctl.h>
642 +#endif
643  #include "busybox.h"
644  
645  
646 --- ../busybox-1.00-pre9/.config        1969-12-31 19:00:00.000000000 -0500
647 +++ .config     2004-05-08 02:10:25.000000000 -0400
648 @@ -0,0 +1,393 @@
649 +#
650 +# Automatically generated make config: don't edit
651 +#
652 +HAVE_DOT_CONFIG=y
653 +
654 +#
655 +# General Configuration
656 +#
657 +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
658 +CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
659 +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
660 +CONFIG_FEATURE_VERBOSE_USAGE=y
661 +# CONFIG_FEATURE_INSTALLER is not set
662 +# CONFIG_LOCALE_SUPPORT is not set
663 +# CONFIG_FEATURE_DEVFS is not set
664 +# CONFIG_FEATURE_DEVPTS is not set
665 +# CONFIG_FEATURE_CLEAN_UP is not set
666 +# CONFIG_FEATURE_SUID is not set
667 +# CONFIG_SELINUX is not set
668 +
669 +#
670 +# Build Options
671 +#
672 +CONFIG_STATIC=y
673 +# CONFIG_LFS is not set
674 +USING_CROSS_COMPILER=y
675 +CROSS_COMPILER_PREFIX="mips-unknown-elf-"
676 +EXTRA_CFLAGS_OPTIONS="-DNESTEDVM"
677 +
678 +#
679 +# Installation Options
680 +#
681 +# CONFIG_INSTALL_NO_USR is not set
682 +PREFIX="./_install"
683 +
684 +#
685 +# Archival Utilities
686 +#
687 +# CONFIG_AR is not set
688 +CONFIG_BUNZIP2=y
689 +CONFIG_CPIO=y
690 +# CONFIG_DPKG is not set
691 +# CONFIG_DPKG_DEB is not set
692 +CONFIG_GUNZIP=y
693 +CONFIG_FEATURE_GUNZIP_UNCOMPRESS=y
694 +CONFIG_GZIP=y
695 +# CONFIG_RPM2CPIO is not set
696 +# CONFIG_RPM is not set
697 +CONFIG_TAR=y
698 +CONFIG_FEATURE_TAR_CREATE=y
699 +CONFIG_FEATURE_TAR_BZIP2=y
700 +# CONFIG_FEATURE_TAR_FROM is not set
701 +CONFIG_FEATURE_TAR_GZIP=y
702 +# CONFIG_FEATURE_TAR_COMPRESS is not set
703 +CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y
704 +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
705 +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
706 +CONFIG_UNCOMPRESS=y
707 +CONFIG_UNZIP=y
708 +
709 +#
710 +# Common options for cpio and tar
711 +#
712 +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
713 +
714 +#
715 +# Coreutils
716 +#
717 +CONFIG_BASENAME=y
718 +CONFIG_CAL=y
719 +CONFIG_CAT=y
720 +CONFIG_CHGRP=y
721 +CONFIG_CHMOD=y
722 +CONFIG_CHOWN=y
723 +CONFIG_CHROOT=y
724 +CONFIG_CMP=y
725 +CONFIG_CP=y
726 +CONFIG_CUT=y
727 +CONFIG_DATE=y
728 +
729 +#
730 +# date (forced enabled for use with watch)
731 +#
732 +CONFIG_FEATURE_DATE_ISOFMT=y
733 +CONFIG_DD=y
734 +# CONFIG_DF is not set
735 +CONFIG_DIRNAME=y
736 +CONFIG_DOS2UNIX=y
737 +CONFIG_UNIX2DOS=y
738 +CONFIG_DU=y
739 +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y
740 +CONFIG_ECHO=y
741 +CONFIG_FEATURE_FANCY_ECHO=y
742 +CONFIG_ENV=y
743 +# CONFIG_EXPR is not set
744 +CONFIG_FALSE=y
745 +# CONFIG_FOLD is not set
746 +CONFIG_HEAD=y
747 +# CONFIG_FEATURE_FANCY_HEAD is not set
748 +# CONFIG_HOSTID is not set
749 +CONFIG_ID=y
750 +CONFIG_INSTALL=y
751 +# CONFIG_LENGTH is not set
752 +CONFIG_LN=y
753 +# CONFIG_LOGNAME is not set
754 +CONFIG_LS=y
755 +CONFIG_FEATURE_LS_FILETYPES=y
756 +CONFIG_FEATURE_LS_FOLLOWLINKS=y
757 +CONFIG_FEATURE_LS_RECURSIVE=y
758 +CONFIG_FEATURE_LS_SORTFILES=y
759 +CONFIG_FEATURE_LS_TIMESTAMPS=y
760 +CONFIG_FEATURE_LS_USERNAME=y
761 +CONFIG_FEATURE_LS_COLOR=y
762 +CONFIG_MD5SUM=y
763 +CONFIG_MKDIR=y
764 +CONFIG_MKFIFO=y
765 +CONFIG_MKNOD=y
766 +CONFIG_MV=y
767 +CONFIG_OD=y
768 +CONFIG_PRINTF=y
769 +CONFIG_PWD=y
770 +# CONFIG_REALPATH is not set
771 +CONFIG_RM=y
772 +CONFIG_RMDIR=y
773 +# CONFIG_SEQ is not set
774 +CONFIG_SHA1SUM=y
775 +CONFIG_SLEEP=y
776 +# CONFIG_FEATURE_FANCY_SLEEP is not set
777 +CONFIG_SORT=y
778 +# CONFIG_STTY is not set
779 +CONFIG_SYNC=y
780 +CONFIG_TAIL=y
781 +CONFIG_FEATURE_FANCY_TAIL=y
782 +CONFIG_TEE=y
783 +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
784 +CONFIG_TEST=y
785 +
786 +#
787 +# test (forced enabled for use with shell)
788 +#
789 +CONFIG_TOUCH=y
790 +CONFIG_TR=y
791 +CONFIG_TRUE=y
792 +CONFIG_TTY=y
793 +# CONFIG_UNAME is not set
794 +CONFIG_UNIQ=y
795 +CONFIG_USLEEP=y
796 +# CONFIG_UUDECODE is not set
797 +# CONFIG_UUENCODE is not set
798 +CONFIG_WATCH=y
799 +CONFIG_WC=y
800 +# CONFIG_WHO is not set
801 +CONFIG_WHOAMI=y
802 +CONFIG_YES=y
803 +
804 +#
805 +# Common options for cp and mv
806 +#
807 +CONFIG_FEATURE_PRESERVE_HARDLINKS=y
808 +
809 +#
810 +# Common options for ls and more
811 +#
812 +# CONFIG_FEATURE_AUTOWIDTH is not set
813 +
814 +#
815 +# Common options for df, du, ls
816 +#
817 +CONFIG_FEATURE_HUMAN_READABLE=y
818 +
819 +#
820 +# Common options for md5sum, sha1sum
821 +#
822 +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
823 +
824 +#
825 +# Console Utilities
826 +#
827 +# CONFIG_CHVT is not set
828 +CONFIG_CLEAR=y
829 +# CONFIG_DEALLOCVT is not set
830 +# CONFIG_DUMPKMAP is not set
831 +# CONFIG_LOADFONT is not set
832 +# CONFIG_LOADKMAP is not set
833 +# CONFIG_OPENVT is not set
834 +CONFIG_RESET=y
835 +# CONFIG_SETKEYCODES is not set
836 +
837 +#
838 +# Debian Utilities
839 +#
840 +# CONFIG_MKTEMP is not set
841 +# CONFIG_PIPE_PROGRESS is not set
842 +CONFIG_READLINK=y
843 +# CONFIG_RUN_PARTS is not set
844 +# CONFIG_START_STOP_DAEMON is not set
845 +CONFIG_WHICH=y
846 +
847 +#
848 +# Editors
849 +#
850 +CONFIG_AWK=y
851 +CONFIG_FEATURE_AWK_MATH=y
852 +CONFIG_PATCH=y
853 +CONFIG_SED=y
854 +# CONFIG_VI is not set
855 +
856 +#
857 +# Finding Utilities
858 +#
859 +CONFIG_FIND=y
860 +CONFIG_FEATURE_FIND_MTIME=y
861 +CONFIG_FEATURE_FIND_PERM=y
862 +CONFIG_FEATURE_FIND_TYPE=y
863 +CONFIG_FEATURE_FIND_XDEV=y
864 +# CONFIG_FEATURE_FIND_NEWER is not set
865 +# CONFIG_FEATURE_FIND_INUM is not set
866 +CONFIG_GREP=y
867 +CONFIG_FEATURE_GREP_EGREP_ALIAS=y
868 +CONFIG_FEATURE_GREP_FGREP_ALIAS=y
869 +CONFIG_FEATURE_GREP_CONTEXT=y
870 +CONFIG_XARGS=y
871 +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
872 +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
873 +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
874 +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
875 +
876 +#
877 +# Init Utilities
878 +#
879 +# CONFIG_INIT is not set
880 +# CONFIG_HALT is not set
881 +# CONFIG_POWEROFF is not set
882 +# CONFIG_REBOOT is not set
883 +# CONFIG_MINIT is not set
884 +# CONFIG_MESG is not set
885 +
886 +#
887 +# Login/Password Management Utilities
888 +#
889 +CONFIG_USE_BB_PWD_GRP=y
890 +# CONFIG_ADDGROUP is not set
891 +# CONFIG_DELGROUP is not set
892 +# CONFIG_ADDUSER is not set
893 +# CONFIG_DELUSER is not set
894 +# CONFIG_GETTY is not set
895 +# CONFIG_LOGIN is not set
896 +# CONFIG_PASSWD is not set
897 +# CONFIG_SU is not set
898 +# CONFIG_SULOGIN is not set
899 +# CONFIG_VLOCK is not set
900 +
901 +#
902 +# Miscellaneous Utilities
903 +#
904 +# CONFIG_ADJTIMEX is not set
905 +# CONFIG_CROND is not set
906 +# CONFIG_CRONTAB is not set
907 +CONFIG_DC=y
908 +# CONFIG_DEVFSD is not set
909 +# CONFIG_LAST is not set
910 +# CONFIG_HDPARM is not set
911 +# CONFIG_MAKEDEVS is not set
912 +# CONFIG_MT is not set
913 +# CONFIG_RX is not set
914 +CONFIG_STRINGS=y
915 +# CONFIG_TIME is not set
916 +# CONFIG_WATCHDOG is not set
917 +
918 +#
919 +# Linux Module Utilities
920 +#
921 +# CONFIG_INSMOD is not set
922 +# CONFIG_LSMOD is not set
923 +# CONFIG_MODPROBE is not set
924 +# CONFIG_RMMOD is not set
925 +
926 +#
927 +# Networking Utilities
928 +#
929 +# CONFIG_FEATURE_IPV6 is not set
930 +# CONFIG_ARPING is not set
931 +# CONFIG_FTPGET is not set
932 +# CONFIG_FTPPUT is not set
933 +# CONFIG_HOSTNAME is not set
934 +# CONFIG_HTTPD is not set
935 +# CONFIG_IFCONFIG is not set
936 +# CONFIG_IFUPDOWN is not set
937 +# CONFIG_INETD is not set
938 +# CONFIG_IP is not set
939 +# CONFIG_IPCALC is not set
940 +# CONFIG_IPADDR is not set
941 +# CONFIG_IPLINK is not set
942 +# CONFIG_IPROUTE is not set
943 +# CONFIG_IPTUNNEL is not set
944 +# CONFIG_NAMEIF is not set
945 +# CONFIG_NC is not set
946 +# CONFIG_NETSTAT is not set
947 +# CONFIG_NSLOOKUP is not set
948 +# CONFIG_PING is not set
949 +# CONFIG_ROUTE is not set
950 +# CONFIG_TELNET is not set
951 +# CONFIG_TELNETD is not set
952 +# CONFIG_TFTP is not set
953 +# CONFIG_TRACEROUTE is not set
954 +# CONFIG_VCONFIG is not set
955 +# CONFIG_WGET is not set
956 +
957 +#
958 +# udhcp Server/Client
959 +#
960 +# CONFIG_UDHCPD is not set
961 +# CONFIG_UDHCPC is not set
962 +
963 +#
964 +# Process Utilities
965 +#
966 +# CONFIG_FREE is not set
967 +CONFIG_KILL=y
968 +CONFIG_KILLALL=y
969 +CONFIG_PIDOF=y
970 +CONFIG_PS=y
971 +# CONFIG_RENICE is not set
972 +# CONFIG_TOP is not set
973 +# CONFIG_UPTIME is not set
974 +# CONFIG_SYSCTL is not set
975 +
976 +#
977 +# Another Bourne-like Shell
978 +#
979 +CONFIG_FEATURE_SH_IS_ASH=y
980 +# CONFIG_FEATURE_SH_IS_HUSH is not set
981 +# CONFIG_FEATURE_SH_IS_LASH is not set
982 +# CONFIG_FEATURE_SH_IS_MSH is not set
983 +# CONFIG_FEATURE_SH_IS_NONE is not set
984 +CONFIG_ASH=y
985 +
986 +#
987 +# Ash Shell Options
988 +#
989 +# CONFIG_ASH_JOB_CONTROL is not set
990 +CONFIG_ASH_ALIAS=y
991 +CONFIG_ASH_MATH_SUPPORT=y
992 +# CONFIG_ASH_GETOPTS is not set
993 +# CONFIG_ASH_CMDCMD is not set
994 +# CONFIG_ASH_MAIL is not set
995 +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
996 +# CONFIG_ASH_RANDOM_SUPPORT is not set
997 +# CONFIG_HUSH is not set
998 +# CONFIG_LASH is not set
999 +# CONFIG_MSH is not set
1000 +
1001 +#
1002 +# Bourne Shell Options
1003 +#
1004 +# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
1005 +CONFIG_FEATURE_SH_STANDALONE_SHELL=y
1006 +# CONFIG_FEATURE_COMMAND_EDITING is not set
1007 +
1008 +#
1009 +# System Logging Utilities
1010 +#
1011 +# CONFIG_SYSLOGD is not set
1012 +# CONFIG_LOGGER is not set
1013 +
1014 +#
1015 +# Linux System Utilities
1016 +#
1017 +# CONFIG_DMESG is not set
1018 +# CONFIG_FBSET is not set
1019 +# CONFIG_FDFLUSH is not set
1020 +# CONFIG_FDFORMAT is not set
1021 +# CONFIG_FDISK is not set
1022 +# CONFIG_FREERAMDISK is not set
1023 +# CONFIG_FSCK_MINIX is not set
1024 +# CONFIG_MKFS_MINIX is not set
1025 +# CONFIG_GETOPT is not set
1026 +# CONFIG_HEXDUMP is not set
1027 +# CONFIG_HWCLOCK is not set
1028 +# CONFIG_LOSETUP is not set
1029 +# CONFIG_MKSWAP is not set
1030 +CONFIG_MORE=y
1031 +# CONFIG_FEATURE_USE_TERMIOS is not set
1032 +# CONFIG_PIVOT_ROOT is not set
1033 +# CONFIG_RDATE is not set
1034 +# CONFIG_SWAPONOFF is not set
1035 +# CONFIG_MOUNT is not set
1036 +# CONFIG_UMOUNT is not set
1037 +
1038 +#
1039 +# Debugging Options
1040 +#
1041 +# CONFIG_DEBUG is not set