1 Only in .: BusyBox.class
2 Only in .: BusyBox.java
3 diff -ur ../busybox-0.60.5/Config.h ./Config.h
4 --- ../busybox-0.60.5/Config.h Tue Sep 17 18:04:28 2002
5 +++ ./Config.h Tue Nov 25 11:05:07 2003
31 //#define BB_DEALLOCVT
54 //#define BB_FREERAMDISK
55 //#define BB_FSCK_MINIX
98 //#define BB_MKFS_MINIX
107 +//#define BB_MODPROBE
115 //#define BB_NSLOOKUP
119 //#define BB_PIVOT_ROOT
124 +//#define BB_POWEROFF
129 //#define BB_READLINK
140 //#define BB_RPM2CPIO
141 @@ -109,13 +109,13 @@
145 -#define BB_SWAPONOFF
148 +//#define BB_SWAPONOFF
150 +//#define BB_SYSLOGD
161 @@ -124,15 +124,15 @@
163 //#define BB_TRACEROUTE
164 #define BB_TRUE_FALSE
167 //#define BB_UNIX2DOS
168 //#define BB_UUENCODE
169 //#define BB_UUDECODE
180 //#define BB_WATCHDOG
188 // End of Applications List
190 @@ -182,13 +182,13 @@
191 //#define BB_FEATURE_USE_DEVPS_PATCH
193 // show verbose usage messages
194 -#define BB_FEATURE_VERBOSE_USAGE
195 +//#define BB_FEATURE_VERBOSE_USAGE
197 // Use termios to manipulate the screen ('more' is prettier with this on)
198 //#define BB_FEATURE_USE_TERMIOS
200 // calculate terminal & column widths (for more, ls, and telnet)
201 -#define BB_FEATURE_AUTOWIDTH
202 +//#define BB_FEATURE_AUTOWIDTH
204 // show username/groupnames for ls
205 #define BB_FEATURE_LS_USERNAME
206 @@ -271,11 +271,11 @@
208 // Enable command line editing in the shell.
209 // Only relevant if a shell is enabled. On by default.
210 -#define BB_FEATURE_COMMAND_EDITING
211 +//#define BB_FEATURE_COMMAND_EDITING
213 // Enable tab completion in the shell. This is now working quite nicely.
214 // This feature adds a bit over 4k. Only relevant if a shell is enabled.
215 -#define BB_FEATURE_COMMAND_TAB_COMPLETION
216 +//#define BB_FEATURE_COMMAND_TAB_COMPLETION
218 // Attempts to match usernames in a ~-prefixed path
219 //#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
221 //were shell builtins. Nice for staticly linking an emergency rescue shell,
222 //among other things. Off by default.
223 // Only relevant if a shell is enabled.
224 -//#define BB_FEATURE_SH_STANDALONE_SHELL
225 +#define BB_FEATURE_SH_STANDALONE_SHELL
227 //When this is enabled, busybox shell applets can be called using full path
228 //names. This causes applets (i.e., most busybox commands) to override
230 // are doing is running scripts). Disabing this is bad for interactive
231 // use, since when you hit ^C in an application, it will also kill the
232 // shell. This adds about 2.5k on an x86 system.
233 -#define BB_FEATURE_ASH_JOB_CONTROL
234 +//#define BB_FEATURE_ASH_JOB_CONTROL
236 //Turn on extra fbset options
237 //#define BB_FEATURE_FBSET_FANCY
239 #define BB_FEATURE_FIND_TYPE
241 // Support for the find -perm option.
242 -#define BB_FEATURE_FIND_PERM
243 +//#define BB_FEATURE_FIND_PERM
245 // Support for the find -mtime option.
246 #define BB_FEATURE_FIND_MTIME
248 // Nothing beyond this point should ever be touched by
249 // mere mortals so leave this stuff alone.
252 #include <features.h>
255 #if defined(__uClinux__)
256 #undef BB_ASH /* Not even a chance it will work */
257 #undef BB_RPM2CPIO /* Uses gz_open(), which uses fork() */
258 diff -ur ../busybox-0.60.5/Makefile ./Makefile
259 --- ../busybox-0.60.5/Makefile Sun Oct 27 00:47:54 2002
260 +++ ./Makefile Tue Nov 25 11:27:30 2003
262 # just 1.4k to the binary size (which is a _lot_ less then glibc NSS costs).
263 # Note that if you want hostname resolution to work with glibc, you still need
264 # the libnss_* libraries.
265 -USE_SYSTEM_PWD_GRP = true
266 +USE_SYSTEM_PWD_GRP = false
268 # This enables compiling with dmalloc ( http://dmalloc.com/ )
269 # which is an excellent public domain mem leak and malloc problem
272 # If you are running a cross compiler, you may want to set this
273 # to something more interesting, like "powerpc-linux-".
275 +CROSS = mips-unknown-elf-
278 STRIP = $(CROSS)strip
279 @@ -106,11 +106,11 @@
281 # For other libraries, you are on your own...
283 -#LIBRARIES = $(LIBCDIR)/lib/libc.a -lgcc
284 +LIBRARIES = -lglob -lregex
285 #CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR)
286 #GCCINCDIR = $(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
288 -WARNINGS = -Wall -Wshadow
289 +WARNINGS = -Wall -Wshadow -Werror -Wno-unused
294 LDFLAGS += -Wl,-warn-common
295 STRIPCMD = /bin/true -Since_we_are_debugging
297 - CFLAGS += $(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE
298 - LDFLAGS += -s -Wl,-warn-common
299 - STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
300 + CFLAGS += $(WARNINGS) $(OPTIMIZATIONS) -DNEWLIB_ASH
301 + LDFLAGS += -Wl,-warn-common
304 ifeq ($(strip $(DOSTATIC)),true)
308 PWD_CSRC=__getpwent.c pwent.c getpwnam.c getpwuid.c putpwent.c getpw.c \
309 fgetpwent.c __getgrent.c grent.c getgrnam.c getgrgid.c fgetgrent.c \
310 - initgroups.c setgroups.c
312 PWD_OBJS=$(patsubst %.c,$(PWD_GRP)/%.o, $(PWD_CSRC))
313 ifneq ($(strip $(BB_SRC_DIR)),)
315 @@ -273,19 +273,19 @@
318 LIBBB_CSRC= ask_confirmation.c chomp.c concat_path_file.c copy_file.c \
319 -copy_file_chunk.c libc5.c device_open.c error_msg.c inode_hash.c \
320 -error_msg_and_die.c fgets_str.c find_mount_point.c find_pid_by_name.c \
321 -find_root_device.c full_read.c full_write.c get_console.c \
322 +copy_file_chunk.c device_open.c error_msg.c inode_hash.c \
323 +error_msg_and_die.c fgets_str.c find_pid_by_name.c \
324 +find_root_device.c full_read.c full_write.c \
325 get_last_path_component.c get_line_from_file.c gz_open.c human_readable.c \
326 -isdirectory.c kernel_version.c loop.c mode_string.c module_syscalls.c mtab.c \
327 +isdirectory.c mode_string.c \
328 mtab_file.c my_getgrnam.c my_getgrgid.c my_getpwnam.c my_getpwnamegid.c \
329 my_getpwuid.c parse_mode.c parse_number.c perror_msg.c perror_msg_and_die.c \
330 print_file.c process_escape_sequence.c read_package_field.c recursive_action.c \
331 -safe_read.c safe_strncpy.c syscalls.c syslog_msg_with_name.c time_string.c \
332 +safe_read.c safe_strncpy.c time_string.c \
333 trim.c unzip.c vdprintf.c verror_msg.c vperror_msg.c wfopen.c xfuncs.c \
334 -xgetcwd.c xreadlink.c xregcomp.c interface.c remove_file.c last_char_is.c \
335 -copyfd.c vherror_msg.c herror_msg.c herror_msg_and_die.c xgethostbyname.c \
336 -dirname.c make_directory.c create_icmp_socket.c u_signal_names.c arith.c \
337 +xgetcwd.c xreadlink.c xregcomp.c remove_file.c last_char_is.c \
338 +copyfd.c herror_msg.c herror_msg_and_die.c \
339 +dirname.c make_directory.c u_signal_names.c arith.c \
341 LIBBB_OBJS=$(patsubst %.c,$(LIBBB)/%.o, $(LIBBB_CSRC))
342 ifeq ($(strip $(BB_SRC_DIR)),)
343 diff -ur ../busybox-0.60.5/ash.c ./ash.c
344 --- ../busybox-0.60.5/ash.c Tue Oct 22 18:14:29 2002
345 +++ ./ash.c Tue Nov 25 11:17:08 2003
351 #include <sysexits.h>
354 #include <sys/stat.h>
355 #include <sys/cdefs.h>
357 #include <sys/ioctl.h>
359 #include <sys/param.h>
360 #include <sys/resource.h>
361 #include <sys/time.h>
363 * more fun than worrying about efficiency and portability. :-))
367 static void onint(void);
368 static volatile int suppressint;
369 static volatile int intpending;
371 #define CLEAR_PENDING_INT intpending = 0
372 #define int_pending() intpending
379 +#define CLEAR_PENDING_INT
380 +#define int_pending() 0
385 typedef void *pointer;
387 @@ -1556,7 +1571,9 @@
389 static int unsetcmd(int, char **);
390 static int waitcmd(int, char **);
392 static int ulimitcmd(int, char **);
394 static int timescmd(int, char **);
396 #ifdef CONFIG_ASH_MATH_SUPPORT
397 @@ -1647,10 +1664,14 @@
398 {BUILTIN_NOSPEC "setvar", setvarcmd},
399 {BUILTIN_SPECIAL "shift", shiftcmd},
400 {BUILTIN_SPECIAL "times", timescmd},
402 {BUILTIN_SPECIAL "trap", trapcmd},
404 {BUILTIN_REGULAR "true", true_main},
405 {BUILTIN_NOSPEC "type", typecmd},
407 {BUILTIN_NOSPEC "ulimit", ulimitcmd},
409 {BUILTIN_REGULAR "umask", umaskcmd},
410 #ifdef CONFIG_ASH_ALIAS
411 {BUILTIN_REGULAR "unalias", unaliascmd},
412 @@ -1918,6 +1939,8 @@
413 * just defensive programming.)
418 static void onint(void)
421 @@ -1937,6 +1960,7 @@
427 static char *commandname; /* currently executing command */
429 @@ -2086,7 +2110,7 @@
433 -#ifdef CONFIG_ASH_OPTIMIZE_FOR_SIZE
434 +#if defined(CONFIG_ASH_OPTIMIZE_FOR_SIZE) && !defined(NEWLIB_ASH)
435 static void __inton()
437 if (--suppressint == 0 && intpending) {
438 @@ -5597,7 +5621,6 @@
440 static void init(void)
446 @@ -5621,8 +5644,10 @@
451 snprintf(ppid, sizeof(ppid), "%d", (int) getppid());
452 setvar("PPID", ppid, 0);
457 @@ -6214,12 +6239,16 @@
458 else /* WIFSIGNALED(ps->status) */
460 i = WTERMSIG(ps->status);
462 if ((i & 0x7F) < NSIG && sys_siglist[i & 0x7F])
463 strcpy(s, sys_siglist[i & 0x7F]);
466 snprintf(s, 64, "Signal %d", i & 0x7F);
468 if (WCOREDUMP(ps->status))
469 strcat(s, " (core dumped)");
474 @@ -6641,7 +6670,11 @@
479 return wait3(status, flags, (struct rusage *) NULL);
481 + return waitpid(-1,status,flags);
485 static int dowait(int block, struct job *job)
486 @@ -6700,7 +6733,9 @@
489 if (!rootshell || !iflag || (job && thisjob == job)) {
491 core = WCOREDUMP(status);
493 #ifdef BB_FEATURE_ASH_JOB_CONTROL
494 if (WIFSTOPPED(status))
495 sig = WSTOPSIG(status);
496 @@ -6718,12 +6753,16 @@
497 if (sig == SIGTSTP && rootshell && iflag)
498 out2fmt("%%%ld ", (long) (job - jobtab + 1));
501 if (sig < NSIG && sys_siglist[sig])
502 out2str(sys_siglist[sig]);
505 out2fmt("Signal %d", sig);
508 out2str(" - core dumped");
512 TRACE(("Not printing status: status=%d, sig=%d\n", status, sig));
513 @@ -7993,6 +8032,8 @@
519 static int ulimitcmd(int argc, char **argv)
521 static const char unlimited_string[] = "unlimited";
522 @@ -8118,6 +8159,8 @@
526 +#endif /* !NEWLIB_ASH */
529 * prefix -- see if pfx is a prefix of string.
531 @@ -11426,6 +11469,8 @@
537 static int trapcmd(int argc, char **argv)
540 @@ -11475,6 +11520,7 @@
544 +#endif /*!NEWLIB_ASH */
547 * Set the signal handler for the specified signal. The routine figures
548 @@ -11485,7 +11531,9 @@
553 struct sigaction act;
556 if ((t = trap[signo]) == NULL)
558 @@ -11527,6 +11575,7 @@
560 * current setting unknown
563 if (sigaction(signo, 0, &act) == -1) {
565 * Pretend it worked; maybe we should give a warning
566 @@ -11536,6 +11585,7 @@
569 if (act.sa_handler == SIG_IGN) {
571 if (mflag && (signo == SIGTSTP ||
572 signo == SIGTTIN || signo == SIGTTOU)) {
573 *t = S_IGN; /* don't hard ignore these */
574 @@ -11544,15 +11594,22 @@
576 *t = S_RESET; /* force to be set */
582 if (*t == S_HARD_IGN || *t == action)
586 act.sa_handler = ((action == S_CATCH) ? onsig
587 : ((action == S_IGN) ? SIG_IGN : SIG_DFL));
590 sigemptyset(&act.sa_mask);
591 sigaction(signo, &act, 0);
593 + signal(signo,((action == S_CATCH) ? onsig : ((action == S_IGN) ? SIG_IGN : SIG_DFL)));
598 @@ -11574,10 +11631,12 @@
600 static void onsig(int signo)
603 if (signo == SIGINT && trap[SIGINT] == NULL) {
608 gotsig[signo - 1] = 1;
611 @@ -12153,6 +12212,7 @@
613 static struct var **findvar(struct var **vpp, const char *name)
616 for (; *vpp; vpp = &(*vpp)->next) {
617 if (varequal((*vpp)->text, name)) {
619 @@ -12168,8 +12228,11 @@
620 static int timescmd(int argc, char **argv)
624 + long int clk_tck = _CLOCKS_PER_SEC_;
626 long int clk_tck = sysconf(_SC_CLK_TCK);
630 printf("%dm%fs %dm%fs\n%dm%fs %dm%fs\n",
631 (int) (buf.tms_utime / clk_tck / 60),
632 diff -ur ../busybox-0.60.5/busybox.h ./busybox.h
633 --- ../busybox-0.60.5/busybox.h Fri Mar 15 21:11:46 2002
634 +++ ./busybox.h Tue Nov 25 11:10:52 2003
640 #include <features.h>
648 /* Bit map related macros -- libc5 doens't provide these... sigh. */
651 #define NBBY CHAR_BIT
653 #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
654 #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
655 #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
656 Only in ../busybox-0.60.5: busybox.links
657 diff -ur ../busybox-0.60.5/busybox.sh ./busybox.sh
658 --- ../busybox-0.60.5/busybox.sh Wed Sep 26 02:20:54 2001
659 +++ ./busybox.sh Tue Nov 25 10:57:58 2003
663 $CC -E -dM ${1:-Config.h} | \
664 - sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/\1.c/gp;' \
665 + sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*BB_\([A-Z0-9_]*\)/\1.c/gp;' \
668 test "${RAW}" != "" || exit
669 diff -ur ../busybox-0.60.5/date.c ./date.c
670 --- ../busybox-0.60.5/date.c Sat Jun 15 10:35:13 2002
671 +++ ./date.c Tue Nov 25 11:26:25 2003
674 /* if setting time, set it */
676 - if (stime(&tm) < 0) {
677 - perror_msg("cannot set date");
679 + perror_msg("cannot set date");
683 Only in ../busybox-0.60.5/docs: BusyBox.1
684 Only in ../busybox-0.60.5/docs: BusyBox.html
685 Only in ../busybox-0.60.5/docs: BusyBox.txt
686 Only in ../busybox-0.60.5/docs: busybox.pod
687 diff -ur ../busybox-0.60.5/libbb/libbb.h ./libbb/libbb.h
688 --- ../busybox-0.60.5/libbb/libbb.h Wed Sep 18 15:21:07 2002
689 +++ ./libbb/libbb.h Tue Nov 25 11:10:27 2003
691 #include <sys/stat.h>
692 #include <sys/types.h>
696 #ifndef _BB_INTERNAL_H_
697 #include "../busybox.h"
704 #include <features.h>
707 #if (__GNU_LIBRARY__ < 5) && (!defined __dietlibc__)
708 /* libc5 doesn't define socklen_t */
709 diff -ur ../busybox-0.60.5/ls.c ./ls.c
710 --- ../busybox-0.60.5/ls.c Mon Sep 16 01:53:01 2002
711 +++ ./ls.c Tue Nov 25 11:29:41 2003
715 TERMINAL_WIDTH = 80, /* use 79 if terminal has linefold bug */
716 - COLUMN_WIDTH = 14, /* default if AUTOWIDTH not defined */
717 + COLUMN_WIDTH = 18, /* default if AUTOWIDTH not defined */
718 COLUMN_GAP = 2, /* includes the file type char */
725 +#ifdef BB_FEATURE_AUTOWIDTH
727 #include <sys/ioctl.h>
731 #ifdef BB_FEATURE_LS_TIMESTAMPS
733 column_width = COLUMN_WIDTH;
736 - ncols= TERMINAL_WIDTH;
737 + ncols= (int) (TERMINAL_WIDTH / (COLUMN_WIDTH+COLUMN_GAP));
740 case STYLE_LONG: /* one record per line, extended info */
741 diff -ur ../busybox-0.60.5/md5sum.c ./md5sum.c
742 --- ../busybox-0.60.5/md5sum.c Tue Oct 22 18:13:57 2002
743 +++ ./md5sum.c Tue Nov 25 11:22:37 2003
749 #include <sys/types.h>
750 #if defined HAVE_LIMITS_H
755 +typedef unsigned int u_int32_t;
760 /* For some silly reason, this file uses backwards TRUE and FALSE conventions */
764 //----------------------------------------------------------------------------
766 /* Handle endian-ness */
767 -#if __BYTE_ORDER == __LITTLE_ENDIAN
768 - #define SWAP(n) (n)
770 - #define SWAP(n) ((n << 24) | ((n&65280)<<8) | ((n&16711680)>>8) | (n>>24))
772 +#define SWAP(n) ((n << 24) | ((n&65280)<<8) | ((n&16711680)>>8) | (n>>24))
776 diff -ur ../busybox-0.60.5/printf.c ./printf.c
777 --- ../busybox-0.60.5/printf.c Mon Mar 19 14:25:49 2001
778 +++ ./printf.c Tue Nov 25 11:22:49 2003
789 static const int S_IFMT = 0170000;
790 diff -ur ../busybox-0.60.5/pwd_grp/grp.h ./pwd_grp/grp.h
791 --- ../busybox-0.60.5/pwd_grp/grp.h Sat Jan 27 03:24:39 2001
792 +++ ./pwd_grp/grp.h Tue Nov 25 11:05:36 2003
801 #include <sys/types.h>
803 #include <features.h>
807 /* The group structure */
808 diff -ur ../busybox-0.60.5/pwd_grp/pwd.h ./pwd_grp/pwd.h
809 --- ../busybox-0.60.5/pwd_grp/pwd.h Sat Jan 27 03:24:39 2001
810 +++ ./pwd_grp/pwd.h Tue Nov 25 11:05:09 2003
819 #include <sys/types.h>
821 #include <features.h>
825 /* The passwd structure. */