Compare commits

..
39 Commits
Author SHA1 Message Date
Eric Andersen 2f8880d233 fix 'grep -C' which requires an argument 2006-09-25 22:27:20 +00:00
Mike Frysinger d905e44d47 no longer needed 2006-03-23 23:43:06 +00:00
Mike Frysinger 5eda15566a move out of subdir 2006-03-23 23:42:40 +00:00
Mike Frysinger c5907cc380 ShaneAnderson writes in Bug 565:
need to include .config file before setting CROSS otherwise
TARGET_ARCH isnt set properly
2005-11-29 02:53:23 +00:00
Mike Frysinger 88c0e01caf Quote the user we pass to addgroup so funky chars are preserved. Fix by dragan_marinkovic in Bug 544 2005-11-15 05:53:00 +00:00
Rob Landley 2f49047deb Jan-Simon Moller adapted SVN 10238 (the selinux update) to the 1.0 line. 2005-10-09 17:03:26 +00:00
Mike Frysinger 2a5044cc46 merge endian fix from trunk 2005-09-15 01:34:28 +00:00
Mike Frysinger 3f762e4025 merge alpha/parisc support from trunk 2005-09-14 00:03:23 +00:00
Eric Andersen e78e45e801 Patch from Paul Fox to fix the reported vi status line problems.
Paul writes:

the bugs were being caused because when edit_status() and/or
show_status_line() were being called, the current status wasn't
always yet up to date.  i've changed things so that the
formatting/checking/displaying of the status line occurs more
rigorously as the last thing before the user is asked for input.
i did some minor optimization so we don't have to count the
file's lines every time, but this could be improved.  (yes, i
know that turning file_modified into a counter will cause it to
be wrong once in blue moon.  i'm willing to risk that.  ymmv.
this could be fixed with the addition of one more boolean.)
2005-09-12 22:20:22 +00:00
Eric Andersen 7a95dd6f82 sysctl was seriously broken. And since in some cases 'CONFIG_SYSCTL'
could be included into application space via the kernel config option
of the same name, nasty compilation problems could result.
2005-09-12 21:26:42 +00:00
Eric Andersen e76da05b75 Kunihiko IMAI writes:
Hi,

We're using busybox and thank the authors.

I found a short buffer allocation at busybox/sysklod/syslod.c.  It
mis-declares length of filenames, seems to forget for '\0' or two
column numbered suffix of backup files (ex. messages.10).

Here is a patch for the problem.

Thanks.
2005-09-12 19:17:03 +00:00
Rob Landley ab76d3acfd Update unzip to -current, mostly to get the integer overflow bug (commit 11299)
but the rest shouldn't hurt.
2005-09-01 01:34:05 +00:00
Rob Landley 258685a2e5 Dirk Clemens made tar cj work while upgrading the Siemens M740AV to
busybox 1.01.
2005-08-26 03:27:45 +00:00
Eric Andersen d3986eb7ec When doing 'make release' nuke the .svn directories, not the
CVS dirs (since they are no longer present)
2005-08-17 00:01:38 +00:00
Eric Andersen 9e78a1772d We don't need no stinkin changelog 2005-08-16 23:59:17 +00:00
Mike Frysinger f7c7dde158 Bernhard Fischer writes: fix devfsd usage 2005-08-15 22:13:21 +00:00
Rob Landley 830c040f6f Patch from Stephane Billiart to improve ash error message. 2005-08-14 19:17:31 +00:00
Rob Landley 045dedad91 A complete rewrite of the README. Probably broke stuff, but it's unlikely
to affect the compile, now is it?
2005-08-14 00:19:32 +00:00
Rob Landley b309ec71c8 Delete the patches directory from 1.0. 2005-08-13 04:05:50 +00:00
Rob Landley 866bad310f And 10922.
Ick.
2005-08-13 03:10:29 +00:00
Rob Landley 5e1f2d429d 11043 and 11011 2005-08-13 02:28:34 +00:00
Rob Landley 0be69b1693 More backports:
10957 start-stop-daemon -q
10981, 10982, 10994, 10996, 10997: dumpkmap cleanup
10983: top tweak
11000 traceroute
2005-08-13 01:22:03 +00:00
Rob Landley c7cba1ae3b This is published from trunk, remove from 1.0 branch. 2005-08-13 01:12:49 +00:00
Rob Landley be3dae145f Makefile related backports:
10945, 10946 Make compile much, much faster.
10923 big makefile change.  Nervous.
10946, 10991, 10998, 11003 small makefile fixes.
2005-08-13 01:10:27 +00:00
Rob Landley 6022fc8723 Backport:
10882 tar fix
10884, 10920, 11128 tail fixes
10885 tftp -g fix
10900 dpkg fix (script support)
And I guess 10918 isn't relevant?
2005-08-13 00:46:00 +00:00
Rob Landley fc455b2101 1.0 backports of:
10861, 10875, 10881, 10888 ash fix
10865 suid thing?  (look at this)
10886 telnet bugfix
10866 ftp fix for RFC 959 compliance.
10867 Remove spurious newline from cp -i prompt.
10874 ksyslogd fix
10876 msh fix
10877 httpd fix
10880, 10889, 11005 dhcp fixes
2005-08-13 00:26:01 +00:00
Rob Landley 365a345e92 Backport 10864 and 10999. 2005-08-12 06:08:41 +00:00
Rob Landley d5138f44fe Backport 10853, 10860/10870, and 10862. 2005-08-12 06:06:54 +00:00
Rob Landley 9344d8aa10 And 10873. 2005-08-12 06:02:30 +00:00
Eric Andersen 44dbd4bc65 Do not define 'AUTOCONF_INCLUDED' 2005-08-02 01:00:20 +00:00
Mike Frysinger 25b8652b4f patch by srowe in Bug 359 to fix fgrep aliasing 2005-07-31 22:41:05 +00:00
Eric Andersen 091a3e510e The change in getty.c in Busybox 1.01 caused the /etc/issue file to not
be displayed unless CONFIG_FEATURE_UTMP is set.  This was not the intended
result.
2005-07-27 06:03:24 +00:00
Mike Frysinger ffaa3deeeb no longer used as reported by apgo in Bug 348 2005-07-26 22:53:35 +00:00
Rob Landley 5f07779aca Shaun Jackman points out that we shouldn't depend on netdb.h to include
netinet.h for us, although what strange compiler this is expected to 
cause problems with wasn't specified...
2005-07-25 08:09:51 +00:00
Rob Landley ab6399a4c6 Tweak from Sean Jackman: use socklen_t instead of size_t for a declaration. 2005-07-25 01:46:24 +00:00
Eric Andersen ca17c937c2 Bump the version to 1.01 2005-07-19 00:01:10 +00:00
Eric Andersen d62df011a0 Backport 10849 and 10851 2005-07-18 23:54:47 +00:00
Eric Andersen 164a716f96 busybox-1.0.1-rc1.patch
http://busybox.net/lists/busybox/2005-July/014974.html
2005-07-18 23:51:27 +00:00
nobody 8c59a0bf0e This commit was manufactured by cvs2svn to create tag 'busybox_1_00'. 2004-10-13 09:42:10 +00:00
277 changed files with 6335 additions and 10138 deletions

No files matched your search

-7
View File
@@ -1,7 +0,0 @@
busybox
busybox.links
_install
.config
.menuconfig.log
.config.cmd
.config.old
+16 -4
View File
@@ -2,7 +2,7 @@ List of the authors of code contained in BusyBox.
If you have code in BusyBox, you should be listed here. If you should be
listed, or the description of what you have done needs more detail, or is
incorect, _please_ let me know.
incorrect, _please_ let me know.
-Erik
@@ -23,6 +23,9 @@ Laurence Anderson <l.d.anderson@warwick.ac.uk>
Jeff Angielski <jeff@theptrgroup.com>
ftpput, ftpget
Jim Bauer <jfbauer@nfr.com>
modprobe shell dependency
Edward Betts <edward@debian.org>
expr, hostid, logname, whoami
@@ -56,6 +59,10 @@ Gennady Feldman <gfeldman@gena01.com>
Sysklogd (single threaded syslogd, IPC Circular buffer support,
logread), various fixes.
Robert Griebl <sandman@handhelds.org>
modprobe, hwclock, suid/sgid handling, tinylogin integration
many bugfixes and enhancements
Karl M. Hegbloom <karlheg@debian.org>
cp_mv.c, the test suite, various fixes to utility.c, &c.
@@ -65,6 +72,11 @@ Daniel Jacobowitz <dan@debian.org>
Matt Kraai <kraai@alumni.cmu.edu>
documentation, bugfixes, test suite
Rob Landley <rob@landley.net>
sed (major rewrite in 2003, and I now maintain the thing).
bunzip2 (complete from-scratch rewrite, then mjn3 optimized the result.)
I've patched lots of other applets, but don't maintain 'em.
Stephan Linz <linz@li-pro.net>
ipcalc, Red Hat equivalence
@@ -72,9 +84,9 @@ John Lombardo <john@deltanet.com>
tr
Glenn McGrath <bug1@iinet.net.au>
Common unarchving code and unarchiving applets, ifupdown, ftpgetput,
nameif, sed, patch, fold, install, uudecode.
Various bugfixes, review and apply numerous patches.
Common unarchiving code and unarchiving applets, ifupdown, ftpgetput,
nameif, sed, patch, fold, install, uudecode.
Various bugfixes, review and apply numerous patches.
Manuel Novoa III <mjn3@codepoet.org>
cat, head, mkfifo, mknod, rmdir, sleep, tee, tty, uniq, usleep, wc, yes,
-447
View File
@@ -1,447 +0,0 @@
---------------------
PatchSet 4272
Date: 2004/07/20 11:08:30
Author: andersen
Branch: HEAD
Tag: busybox_1_00_rc1
Log:
Update for release
Members:
docs/busybox.net/news.html:1.14->1.15
docs/busybox.net/shame.html:1.17->1.18
---------------------
PatchSet 4273
Date: 2004/07/20 11:23:45
Author: andersen
Branch: HEAD
Tag: (none)
Log:
cut-n-paste strikes again
Members:
docs/busybox.net/news.html:1.15->1.16
---------------------
PatchSet 4274
Date: 2004/07/20 11:31:08
Author: andersen
Branch: HEAD
Tag: (none)
Log:
more doc updates
Members:
docs/busybox.net/news.html:1.16->1.17
---------------------
PatchSet 4275
Date: 2004/07/20 11:31:52
Author: andersen
Branch: HEAD
Tag: (none)
Log:
Yet more doc updates
Members:
docs/busybox.net/news.html:1.17->1.18
---------------------
PatchSet 4276
Date: 2004/07/20 11:41:16
Author: andersen
Branch: HEAD
Tag: (none)
Log:
oops
Members:
docs/busybox.net/news.html:1.18->1.19
---------------------
PatchSet 4277
Date: 2004/07/20 15:43:57
Author: sandman
Branch: HEAD
Tag: (none)
Log:
new_process_module_arguments returns 0 on error and 1 if everything went ok
somehow the ! got lost..
symptoms: modules could only be loaded _without_ parameters
Members:
modutils/insmod.c:1.121->1.122
---------------------
PatchSet 4278
Date: 2004/07/20 18:36:51
Author: sandman
Branch: HEAD
Tag: (none)
Log:
Patch from Mike Snitzer <snitzer@gmail.com>:
Please see the attached patch for the following crash with busybox'
2.6 rmmod support
Members:
modutils/rmmod.c:1.30->1.31
---------------------
PatchSet 4279
Date: 2004/07/20 22:53:59
Author: andersen
Branch: HEAD
Tag: (none)
Log:
Avoid a naming conflict with include/bits/fcntl.h
Members:
miscutils/hdparm.c:1.15->1.16
---------------------
PatchSet 4280
Date: 2004/07/21 09:00:39
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Fixup -T (--files-from) option, works for non-directories now
Members:
archival/tar.c:1.192->1.193
---------------------
PatchSet 4281
Date: 2004/07/21 10:20:19
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Jean Wolter, fixes compiler warning when ASH_ALIAS is
disabled.
Members:
shell/ash.c:1.101->1.102
---------------------
PatchSet 4282
Date: 2004/07/21 12:21:39
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Mike Snitzer, bring down dhclient using its correct pid, fix
a grammatical error.
Members:
networking/ifupdown.c:1.40->1.41
---------------------
PatchSet 4283
Date: 2004/07/21 12:25:55
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Tito, ass usage for strings -a options
Members:
include/usage.h:1.213->1.214
---------------------
PatchSet 4284
Date: 2004/07/21 13:06:30
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Fix bug in accepting buffer size argument
Members:
sysklogd/syslogd.c:1.111->1.112
---------------------
PatchSet 4285
Date: 2004/07/21 23:56:31
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Mike Snitzer to fix return codes.
"I have a need to _really_ know if the interface was properly configured
via ifup so I made busybox's ifupdown pass the return codes through rather
than dropping them on the floor."
"All the functions in ifupdown.c return 1 on success and 0 on failure
(which happens to the opposite of standard practices but whatever).
So it is important for all these functions to not blindly return 1."
"The problem with blindly returning ret, even if it is != 1, is the
callers expect a 0 or 1 and accumulate the return codes. So a function that
makes 3 calls to execute will have a value of 3 accumulated. That value
of 1 (success) was almost always returned even if 1 of the commands in the
command sequence failed. The attached patch fixes the lack of checking
to verify thar result == expected_reult."
Members:
networking/ifupdown.c:1.41->1.42
---------------------
PatchSet 4286
Date: 2004/07/22 00:03:39
Author: sandman
Branch: HEAD
Tag: (none)
Log:
Patch from Mike Snitzer <snitzer@gmail.com>:
Support for /etc/modprobe.conf (for 2.6 kernels) should likely be added
to bb's modprobe, see attached patch.
modprobe.conf is just a (even simpler) variant of modules.conf
Members:
modutils/modprobe.c:1.32->1.33
---------------------
PatchSet 4287
Date: 2004/07/22 04:23:18
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Reverse my previous change, "::" is a GNU getopt extension that allows
an optional argument.
Looks like a glibc bug to me
Members:
sysklogd/syslogd.c:1.112->1.113
---------------------
PatchSet 4288
Date: 2004/07/23 01:10:22
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Manousaridis Angelos to bring dhclient down more elegently
Members:
networking/ifupdown.c:1.42->1.43
---------------------
PatchSet 4289
Date: 2004/07/23 01:20:57
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Adam Slattery to add bzip2 support to rpm2cpio
Members:
patches/rpm2cpio_bzip2.patch:INITIAL->1.1
---------------------
PatchSet 4290
Date: 2004/07/23 01:27:56
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Felipe Kellermann to fix some typo's
Members:
include/usage.h:1.214->1.215
---------------------
PatchSet 4291
Date: 2004/07/23 01:35:41
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Felipe Kellermann, "There is a call to printf using `*pr-cchar'
referencing a string and using a single char, when *p <= 0x1f."
Members:
libbb/dump.c:1.12->1.13
---------------------
PatchSet 4292
Date: 2004/07/23 01:42:28
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Felipe Kellermann writes,
"As noticed today by Steven Scholz, the od's `-v' was broken.
I've fixed that and now both the flags `-v' and `-a' are OK"
Fixes a segfault in
echo "uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu\02bar\4"| ./busybox od -av
Members:
coreutils/od.c:1.6->1.7
---------------------
PatchSet 4293
Date: 2004/07/23 01:49:46
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Fix for a bug identied by Harald Kuthe, when using many interfaces (29
in this case) the order was incorrect and there were duplicate entries.
Members:
libbb/interface.c:1.22->1.23
---------------------
PatchSet 4294
Date: 2004/07/23 02:11:25
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Dmitry Zakharov to fix a bug discovered via the freeswap
script.
Members:
editors/awk.c:1.8->1.9
---------------------
PatchSet 4295
Date: 2004/07/23 03:33:38
Author: bug1
Branch: HEAD
Tag: (none)
Log:
iUpdate reboot usage, patch by Felipe Kellermann
Members:
include/usage.h:1.215->1.216
---------------------
PatchSet 4296
Date: 2004/07/23 05:16:17
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Felipe Kellermann, fixup usage for halt command
Members:
include/usage.h:1.216->1.217
---------------------
PatchSet 4297
Date: 2004/07/23 06:06:21
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Felipe Kellermann, fixup usage for pidof, poweroff, remove
some trailing '\n'
Members:
include/usage.h:1.217->1.218
---------------------
PatchSet 4298
Date: 2004/07/23 06:43:29
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch from Felipe Kellermann, fix endless loop when first > last and
increment > 0.
Members:
coreutils/seq.c:1.2->1.3
---------------------
PatchSet 4299
Date: 2004/07/24 01:55:56
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Update Tito's contributions
Members:
AUTHORS:1.44->1.45
---------------------
PatchSet 4300
Date: 2004/07/24 06:01:52
Author: bug1
Branch: HEAD
Tag: (none)
Log:
Patch by Paul Whittaker, make busybox dc compatable with GNU dc.
the following example was broken, echo "1 1 +" | dc
Members:
miscutils/dc.c:1.18->1.19
---------------------
PatchSet 4301
Date: 2004/07/24 12:44:13
Author: andersen
Branch: HEAD
Tag: (none)
Log:
Paul Whittaker writes:
With job control enabled, ash fails to tcsetpgrp back to initialpgrp
upon exit. exitshell() should call setjobctl(0) to do this.
Context: I am using a lightweight menu system (replimenu[.sf.net]) on my
console, which invokes "/bin/sh -i -c /bin/login", where /bin/sh and
/bin/login are busybox applets. /bin/sh is ash, with
CONFIG_ASH_JOB_CONTROL=y as the sole suboption. The shell of the user
concerned (nobody) is also /bin/sh (ash). When the user /bin/sh exits
(and thereby login and its parent sh), replimenu receives EIO when it
tries to read from the terminal.
Members:
shell/ash.c:1.102->1.103
---------------------
PatchSet 4302
Date: 2004/07/26 11:46:21
Author: andersen
Branch: HEAD
Tag: (none)
Log:
YAEGASHI Takeshi writes:
Hi,
With the following /etc/fstab (any two or more lines of nfs), mount -a
-t nfs causes a segmentation faults.
server:/exports/aaa /mnt/aaa nfs defaults 0 0
server:/exprots/bbb /mnt/bbb nfs defaults 0 0
In util-linux/nfsmount.c, it overwrites malloc'ed pointer *mount_opts
with a static pointer. With this patch it does proper memory realloc
and data copy instead.
Members:
util-linux/nfsmount.c:1.27->1.28
---------------------
PatchSet 4303
Date: 2004/07/26 11:55:23
Author: andersen
Branch: HEAD
Tag: busybox_1_00_rc2
Log:
Update webpage for -rc2
Members:
docs/busybox.net/news.html:1.19->1.20
+145 -60
View File
@@ -23,61 +23,149 @@
noconfig_targets := menuconfig config oldconfig randconfig \
defconfig allyesconfig allnoconfig clean distclean \
release tags
TOPDIR=./
include Rules.mak
ifndef TOPDIR
TOPDIR=$(CURDIR)/
endif
ifndef top_srcdir
top_srcdir=$(CURDIR)
endif
ifndef top_builddir
top_builddir=$(CURDIR)
endif
export srctree=$(top_srcdir)
vpath %/Config.in $(srctree)
include $(top_builddir)/Rules.mak
DIRS:=applets archival archival/libunarchive coreutils console-tools \
debianutils editors findutils init miscutils modutils networking \
networking/libiproute networking/udhcp procps loginutils shell \
sysklogd util-linux libpwdgrp coreutils/libcoreutils libbb
SRC_DIRS:=$(patsubst %,$(top_srcdir)/%,$(DIRS))
ifeq ($(strip $(CONFIG_SELINUX)),y)
CFLAGS += -I/usr/include/selinux
LIBRARIES += -lsecure
LIBRARIES += -lselinux
endif
CONFIG_CONFIG_IN = sysdeps/$(TARGET_OS)/Config.in
CONFIG_DEFCONFIG = sysdeps/$(TARGET_OS)/defconfig
CONFIG_CONFIG_IN = $(top_srcdir)/sysdeps/$(TARGET_OS)/Config.in
CONFIG_DEFCONFIG = $(top_srcdir)/sysdeps/$(TARGET_OS)/defconfig
ALL_DIRS:= $(DIRS) scripts/config
ALL_MAKEFILES:=$(patsubst %,%/Makefile,$(ALL_DIRS))
ifeq ($(KBUILD_SRC),)
ifdef O
ifeq ("$(origin O)", "command line")
KBUILD_OUTPUT := $(O)
endif
endif
# That's our default target when none is given on the command line
.PHONY: _all
_all:
ifneq ($(KBUILD_OUTPUT),)
# Invoke a second make in the output directory, passing relevant variables
# check that the output directory actually exists
saved-output := $(KBUILD_OUTPUT)
KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(wildcard $(KBUILD_OUTPUT)),, \
$(error output directory "$(saved-output)" does not exist))
.PHONY: $(MAKECMDGOALS)
$(filter-out _all,$(MAKECMDGOALS)) _all: $(KBUILD_OUTPUT)/Rules.mak $(KBUILD_OUTPUT)/Makefile
$(MAKE) -C $(KBUILD_OUTPUT) \
top_srcdir=$(CURDIR) \
top_builddir=$(KBUILD_OUTPUT) \
TOPDIR=$(KBUILD_OUTPUT) \
KBUILD_SRC=$(CURDIR) \
-f $(CURDIR)/Makefile $@
$(KBUILD_OUTPUT)/Rules.mak:
@echo > $@
@echo top_srcdir=$(CURDIR) >> $@
@echo top_builddir=$(KBUILD_OUTPUT) >> $@
@echo include $(top_srcdir)/Rules.mak >> $@
$(KBUILD_OUTPUT)/Makefile:
@echo > $@
@echo top_srcdir=$(CURDIR) >> $@
@echo top_builddir=$(KBUILD_OUTPUT) >> $@
@echo KBUILD_SRC='$$(top_srcdir)' >> $@
@echo include '$$(KBUILD_SRC)'/Makefile >> $@
# Leave processing to above invocation of make
skip-makefile := 1
endif # ifneq ($(KBUILD_OUTPUT),)
endif # ifeq ($(KBUILD_SRC),)
ifeq ($(skip-makefile),)
_all: all
ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
all: busybox busybox.links doc
# In this section, we need .config
-include .config.cmd
include $(patsubst %,%/Makefile.in, $(DIRS))
-include $(TOPDIR).depend
all_tree: $(ALL_MAKEFILES)
busybox: .depend include/config.h $(libraries-y)
$(ALL_MAKEFILES): %/Makefile: $(top_srcdir)/%/Makefile
d=`dirname $@`; [ -d "$$d" ] || mkdir -p "$$d"; cp $< $@
# In this section, we need .config
-include $(top_builddir)/.config.cmd
include $(patsubst %,%/Makefile.in, $(SRC_DIRS))
-include $(top_builddir)/.depend
busybox: $(ALL_MAKEFILES) .depend include/config.h $(libraries-y)
$(CC) $(LDFLAGS) -o $@ -Wl,--start-group $(libraries-y) $(LIBRARIES) -Wl,--end-group
$(STRIPCMD) $@
busybox.links: applets/busybox.mkll include/config.h
busybox.links: $(top_srcdir)/applets/busybox.mkll include/config.h $(top_srcdir)/include/applets.h
- $(SHELL) $^ >$@
install: applets/install.sh busybox busybox.links
$(SHELL) $< $(PREFIX)
ifeq ($(strip $(CONFIG_FEATURE_SUID)),y)
@echo
@echo
@echo --------------------------------------------------
@echo You will probably need to make your busybox binary
@echo setuid root to ensure all configured applets will
@echo work properly.
@echo --------------------------------------------------
@echo
endif
uninstall: busybox.links
rm -f $(PREFIX)/bin/busybox
for i in `cat busybox.links` ; do rm -f $(PREFIX)$$i; done
install-hardlinks: applets/install.sh busybox busybox.links
install-hardlinks: $(top_srcdir)/applets/install.sh busybox busybox.links
$(SHELL) $< $(PREFIX) --hardlinks
check: busybox
bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \
$(top_srcdir)/testsuite/runtest
# Documentation Targets
doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html
docs/busybox.pod : docs/busybox_header.pod include/usage.h docs/busybox_footer.pod
- ( cat docs/busybox_header.pod; \
docs/autodocifier.pl include/usage.h; \
cat docs/busybox_footer.pod ) > docs/busybox.pod
docs/busybox.pod : $(top_srcdir)/docs/busybox_header.pod $(top_srcdir)/include/usage.h $(top_srcdir)/docs/busybox_footer.pod
-mkdir -p docs
- ( cat $(top_srcdir)/docs/busybox_header.pod; \
$(top_srcdir)/docs/autodocifier.pl $(top_srcdir)/include/usage.h; \
cat $(top_srcdir)/docs/busybox_footer.pod ) > docs/busybox.pod
docs/BusyBox.txt: docs/busybox.pod
@echo
@echo BusyBox Documentation
@echo
$(SECHO)
$(SECHO) BusyBox Documentation
$(SECHO)
-mkdir -p docs
-pod2text $< > $@
@@ -89,7 +177,7 @@ docs/BusyBox.1: docs/busybox.pod
docs/BusyBox.html: docs/busybox.net/BusyBox.html
- mkdir -p docs
-@ rm -f docs/BusyBox.html
-@ ln -s busybox.net/BusyBox.html docs/BusyBox.html
-@ cp docs/busybox.net/BusyBox.html docs/BusyBox.html
docs/busybox.net/BusyBox.html: docs/busybox.pod
-@ mkdir -p docs/busybox.net
@@ -98,40 +186,36 @@ docs/busybox.net/BusyBox.html: docs/busybox.pod
-@ rm -f pod2htm*
# The nifty new buildsystem stuff
scripts/mkdep: scripts/mkdep.c
$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
scripts/mkdep: $(top_srcdir)/scripts/mkdep.c
$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
scripts/split-include: scripts/split-include.c
$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
scripts/split-include: $(top_srcdir)/scripts/split-include.c
$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
.depend: scripts/mkdep
.depend: scripts/mkdep include/config.h
rm -f .depend .hdepend;
mkdir -p include/config;
$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
scripts/mkdep -I include -- \
`find -name \*.c -print | sed -e "s,^./,,"` >> .depend;
`find $(top_srcdir) -name \*.c -print | sed -e "s,^./,,"` >> .depend;
scripts/mkdep -I include -- \
`find -name \*.h -print | sed -e "s,^./,,"` >> .hdepend;
`find $(top_srcdir) -name \*.h -print | sed -e "s,^./,,"` >> .hdepend;
depend dep: include/config.h .depend
depend dep: .depend
include/config/MARKER: depend scripts/split-include
scripts/split-include include/config.h include/config
@ touch include/config/MARKER
include/config.h: .config
@if [ ! -x ./scripts/config/conf ] ; then \
@if [ ! -x $(top_builddir)/scripts/config/conf ] ; then \
$(MAKE) -C scripts/config conf; \
fi;
@./scripts/config/conf -o $(CONFIG_CONFIG_IN)
%.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
@$(top_builddir)/scripts/config/conf -o $(CONFIG_CONFIG_IN)
finished2:
@echo
@echo Finished installing...
@echo
$(SECHO)
$(SECHO) Finished installing...
$(SECHO)
else # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
@@ -140,12 +224,16 @@ all: menuconfig
# configuration
# ---------------------------------------------------------------------------
scripts/config/conf:
$(ALL_MAKEFILES): %/Makefile: $(top_srcdir)/%/Makefile
d=`dirname $@`; [ -d "$$d" ] || mkdir -p "$$d"; cp $< $@
scripts/config/conf: scripts/config/Makefile Rules.mak
$(MAKE) -C scripts/config conf
-@if [ ! -f .config ] ; then \
cp $(CONFIG_DEFCONFIG) .config; \
fi
scripts/config/mconf:
scripts/config/mconf: scripts/config/Makefile Rules.mak
$(MAKE) -C scripts/config ncurses conf mconf
-@if [ ! -f .config ] ; then \
cp $(CONFIG_DEFCONFIG) .config; \
@@ -177,9 +265,6 @@ allnoconfig: scripts/config/conf
defconfig: scripts/config/conf
@./scripts/config/conf -d $(CONFIG_CONFIG_IN)
check: busybox
cd testsuite && ./runtest
clean:
- rm -f docs/busybox.dvi docs/busybox.ps \
docs/busybox.pod docs/busybox.net/busybox.html \
@@ -200,20 +285,20 @@ distclean: clean
- $(MAKE) -C scripts/config clean
release: distclean #doc
cd ..; \
rm -rf $(PROG)-$(VERSION); \
cp -a busybox $(PROG)-$(VERSION); \
\
find $(PROG)-$(VERSION)/ -type d \
-name CVS \
-print \
-exec rm -rf {} \; ; \
\
find $(PROG)-$(VERSION)/ -type f \
-name .\#* \
-print \
-exec rm -f {} \; ; \
\
cd ..; \
rm -rf $(PROG)-$(VERSION); \
cp -a busybox $(PROG)-$(VERSION); \
\
find $(PROG)-$(VERSION)/ -type d \
-name .svn \
-print \
-exec rm -rf {} \; ; \
\
find $(PROG)-$(VERSION)/ -type f \
-name .\#* \
-print \
-exec rm -f {} \; ; \
\
tar -cvzf $(PROG)-$(VERSION).tar.gz $(PROG)-$(VERSION)/;
tags:
@@ -222,7 +307,7 @@ tags:
endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
endif # ifeq ($(skip-makefile),)
.PHONY: dummy subdirs release distclean clean config oldconfig \
menuconfig tags check test depend
menuconfig tags check test depend buildtree
+155 -84
View File
@@ -1,125 +1,196 @@
Please see the LICENSE file for details on copying and usage.
BusyBox combines tiny versions of many common UNIX utilities into a single
small executable. It provides minimalist replacements for most of the utilities
you usually find in GNU coreutils, util-linux, etc. The utilities in BusyBox
generally have fewer options than their full-featured GNU cousins; however, the
options that are included provide the expected functionality and behave very
much like their GNU counterparts.
What is busybox:
BusyBox has been written with size-optimization and limited resources in mind.
It is also extremely modular so you can easily include or exclude commands (or
features) at compile time. This makes it easy to customize your embedded
systems. To create a working system, just add /dev, /etc, and a Linux kernel.
BusyBox provides a fairly complete POSIX environment for any small or embedded
system.
BusyBox combines tiny versions of many common UNIX utilities into a single
small executable. It provides minimalist replacements for most of the
utilities you usually find in bzip2, coreutils, file, findutils, gawk, grep,
inetutils, modutils, net-tools, procps, sed, shadow, sysklogd, sysvinit, tar,
util-linux, and vim. The utilities in BusyBox often have fewer options than
their full-featured cousins; however, the options that are included provide
the expected functionality and behave very much like their larger
counterparts.
BusyBox is extremely configurable. This allows you to include only the
components you need, thereby reducing binary size. Run 'make config' or
'make menuconfig' to select the functionality that you wish to enable.
BusyBox has been written with size-optimization and limited resources in
mind, both to produce small binaries and to reduce run-time memory usage.
Busybox is also extremely modular so you can easily include or exclude
commands (or features) at compile time. This makes it easy to customize
embedded systems; to create a working system, just add /dev, /etc, and a
Linux kernel. Busybox (usually together with uClibc) has also been used as
a component of "thin client" desktop systems, live-CD distributions, rescue
disks, installers, and so on.
After the build is complete, a busybox.links file is generated. This is
used by 'make install' to create symlinks to the BusyBox binary for all
compiled in functions. By default, 'make install' will place the symlink
forest into `pwd`/_install unless you have defined the PREFIX environment
variable (i.e., 'make PREFIX=/tmp/foo install')
If you wish to install hard links, rather than symlinks, you can use
'make PREFIX=/tmp/foo install-hardlinks' instead.
BusyBox provides a fairly complete POSIX environment for any small system,
both embedded environments and more full featured systems concerned about
space. Busybox is slowly working towards implementing the full Single Unix
Specification V3 (http://www.opengroup.org/onlinepubs/009695399/), but isn't
there yet (and for size reasons will probably support at most UTF-8 for
internationalization). We are also interested in passing the Linux Test
Project (http://ltp.sourceforge.net).
----------------
Supported architectures:
Using busybox:
BusyBox in general will build on any architecture supported by gcc. It has
a few specialized features added for __sparc__ and __alpha__. insmod
functionality is currently limited to x86, ARM, SH3/4, powerpc, m68k,
MIPS, cris, and v850e.
BusyBox is extremely configurable. This allows you to include only the
components and options you need, thereby reducing binary size. Run 'make
config' or 'make menuconfig' to select the functionality that you wish to
enable.
Supported C Libraries:
The behavior of busybox is determined by the name it's called under: as
"cp" it behaves like cp, as "sed" it behaves like sed, and so on. Called
as "busybox" it takes the second argument as the name of the applet to
run (I.E. "./busybox ls -l /proc").
glibc-2.0.x, glibc-2.1.x, glibc-2.2.x, glibc-2.3.x, uClibc. People
are looking at newlib and diet-libc, but consider them unsupported,
untested, or worse. Linux-libc5 is no longer supported -- you
should probably use uClibc instead if you want a small C library.
The "standalone shell" mode is an easy way to try out busybox; this is a
command shell that calls the builtin applets without needing them to be
installed in the path. (Note that this requires /proc to be mounted, if
testing from a boot floppy or in a chroot environment.)
Supported kernels:
Full functionality requires Linux 2.2.x or better. A large fraction of the
code should run on just about anything. While the current code is fairly
Linux specific, it should be fairly easy to port the majority of the code
to, say, FreeBSD or Solaris, or Mac OS X, or even Windows (if you are into
that sort of thing).
The build automatically generates a file "busybox.links", which is used by
'make install' to create symlinks to the BusyBox binary for all compiled in
commands. Use the PREFIX environment variable to specify where to install
the busybox binary and symlink forest. (i.e., 'make PREFIX=/tmp/foo install',
or 'make PREFIX=/tmp/foo install-hardlinks' if you prefer hard links.)
----------------
Getting help:
Downloading the current source code:
When you find you need help, you can check out the BusyBox mailing list
archives at http://busybox.net/lists/busybox/ or even join
the mailing list if you are interested.
Source for the latest released version, as well as daily snapshots, can always
be downloaded from
http://busybox.net/downloads/
You can browse the up to the minute source code and change history online
at:
http://www.busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_00_stable/busybox/
Anonymous SVN access is available. For instructions, check out:
http://busybox.net/subversion.html
For those that are actively contributing and would like to check files in,
see:
http://busybox.net/developer.html
The developers also have a bug and patch tracking system
(http://bugs.busybox.net) although posting a bug/patch to the mailing list
is generally a faster way of getting it fixed, and the complete archive of
what happened is the subversion changelog.
----------------
Bugs:
getting help:
If you find bugs, please submit a detailed bug report to the BusyBox mailing
list at busybox@mail.busybox.net. A well-written bug report should include a
transcript of a shell session that demonstrates the bad behavior and enables
anyone else to duplicate the bug on their own machine. The following is such
an example:
when you find you need help, you can check out the busybox mailing list
archives at http://busybox.net/lists/busybox/ or even join
the mailing list if you are interested.
To: busybox@mail.busybox.net
From: diligent@testing.linux.org
Subject: /bin/date doesn't work
----------------
Package: BusyBox
Version: 1.00
bugs:
When I execute BusyBox 'date' it produces unexpected results.
With GNU date I get the following output:
if you find bugs, please submit a detailed bug report to the busybox mailing
list at busybox@busybox.net. a well-written bug report should include a
transcript of a shell session that demonstrates the bad behavior and enables
anyone else to duplicate the bug on their own machine. the following is such
an example:
to: busybox@mail.busybox.net
from: diligent@testing.linux.org
subject: /bin/date doesn't work
package: busybox
version: 1.00
when i execute busybox 'date' it produces unexpected results.
with gnu date i get the following output:
$ date
Sat Mar 27 14:19:41 MST 2004
fri oct 8 14:19:41 mdt 2004
But when I use BusyBox date I get this instead:
but when i use busybox date i get this instead:
$ date
illegal instruction
I am using Debian unstable, kernel version 2.4.25-vrs2 on a Netwinder,
and the latest uClibc from CVS. Thanks for the wonderful program!
i am using debian unstable, kernel version 2.4.25-vrs2 on a netwinder,
and the latest uclibc from cvs. thanks for the wonderful program!
-Diligent
-diligent
Note the careful description and use of examples showing not only what BusyBox
does, but also a counter example showing what an equivalent GNU app does. Bug
reports lacking such detail may never be fixed... Thanks for understanding.
note the careful description and use of examples showing not only what
busybox does, but also a counter example showing what an equivalent app
does (or pointing to the text of a relevant standard). Bug reports lacking
such detail may never be fixed... Thanks for understanding.
----------------
Downloads:
Portability:
Source for the latest released version, as well as daily snapshots, can always
be downloaded from
http://busybox.net/downloads/
Busybox is developed and tested on Linux 2.4 and 2.6 kernels, linked
against uClibc (0.9.27 or greater) and glibc (2.2 or greater). In such
an environment, the full set of busybox features should work (and if
anything doesn't we want to know about it so we can fix it). Note that
the 2.6 kernel can be trimmed down considerably with the aid of Matt
Mackall's -tiny work (http://www.selenic.com/tiny-about/).
Since busybox consists of a large number of more or less independent
applets, portability is a question of which features work where. Some
busybox applets (such as cat and rm) are highly portable and likely to work
just about anywhere, while others (such as insmod and losetup) are only
likely to work under fairly recent Linux kernels with recent C libraries.
Earlier versions of Linux and glibc may or may not work, for any given
configuration. Linux 2.2 or earlier should mostly work, but this is no
longer regularly tested and inherently won't support certain features (such
as long files and --bind mounts). The same is true for glibc 2.0 and 2.1,
expect a higher testing and debugging burden using such old infrastructure.
(The busybox developers are not very interested in supporting these older
versions, but can probably be talked into accepting small patches to fix
simple problems.)
Some environments are not recommended. Early versions of uClibc were buggy
and missing many features: upgrade. Linking against libc5 or dietlibc is
not supported and not interesting to the busybox developers. (The first is
obsolete and has no known size or feature advantages over uClibc, the second
has known bugs that its developers have actively refused to fix.) Ancient
Linux kernels (2.0.x and earlier) are similarly uninteresting.
In theory it's possible to use Busybox under other operating systems (such as
MacOS X, Solaris, Cygwin, or the BSD Fork Du Jour). This generally involves
a different kernel and a different C library at the same time. While it
should be possible to port the majority of the code to work in one of
these environments, don't be suprised if it doesn't work out of the box. If
you're into that sort of thing, start small (selecting just a few applets)
and work your way up.
Shaun Jackman has recently (2005) ported busybox to a combination of newlib
and libgloss, and some of his patches have been integrated. This platform
may join glibc/uclibc and Linux as a supported combination with the 1.1
release, but is not supported in 1.0.
Supported hardware:
BusyBox in general will build on any architecture supported by gcc. We
support both 32 and 64 bit platforms, and both big and little endian
systems.
Under 2.4 Linux kernels, kernel module loading was implemented in a
platform-specific manner. Busybox's insmod utility has been reported to
work under ARM, CRIS, H8/300, x86, ia64, x86_64, m68k, MIPS, PowerPC, S390,
SH3/4/5, Sparc, v850e, and x86_64. Anything else probably won't work.
The module loading mechanism for the 2.6 kernel is much more generic, and
we believe 2.6.x kernel module loading support should work on all
architectures supported by the kernel.
----------------
CVS:
BusyBox now has its own publicly browsable CVS tree at:
http://busybox.net/cgi-bin/cvsweb/busybox/
Anonymous CVS access is available. For instructions, check out:
http://busybox.net/cvs_anon.html
For those that are actively contributing there is even CVS write access:
http://busybox.net/cvs_write.html
----------------
Please feed suggestions, bug reports, insults, and bribes back to:
Please feed suggestions, bug reports, insults, and bribes back to the busybox
maintainer:
Erik Andersen
<andersen@codepoet.org>
+22 -22
View File
@@ -17,9 +17,14 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Pull in the user's busybox configuration
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
-include $(top_builddir)/.config
endif
#--------------------------------------------------------
PROG := busybox
VERSION := 1.00-rc2
VERSION := 1.01
BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
@@ -42,7 +47,7 @@ LD = $(CROSS)ld
NM = $(CROSS)nm
STRIP = $(CROSS)strip
CPP = $(CC) -E
MAKEFILES = $(TOPDIR).config
# MAKEFILES = $(top_builddir)/.config
# What OS are you compiling busybox for? This allows you to include
# OS specific things, syscall overrides, etc.
@@ -80,13 +85,13 @@ BB_SRC_DIR=
#GCCINCDIR:=$(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
WARNINGS=-Wall -Wstrict-prototypes -Wshadow
CFLAGS=-I$(TOPDIR)include
ARFLAGS=-r
CFLAGS=-I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)
ARFLAGS=cru
#--------------------------------------------------------
export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP
ifeq ($(strip $(TARGET_ARCH)),)
TARGET_ARCH=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
TARGET_ARCH:=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
-e 's/i.86/i386/' \
-e 's/sparc.*/sparc/' \
-e 's/arm.*/arm/g' \
@@ -100,23 +105,26 @@ TARGET_ARCH=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
)
endif
# Pull in the user's busybox configuration
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
-include $(TOPDIR).config
endif
# A nifty macro to make testing gcc features easier
check_gcc=$(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
then echo "$(1)"; else echo "$(2)"; fi)
# Setup some shortcuts so that silent mode is silent like it should be
ifeq ($(subst s,,$(MAKEFLAGS)),$(MAKEFLAGS))
export MAKE_IS_SILENT=n
SECHO=@echo
else
export MAKE_IS_SILENT=y
SECHO=-@false
endif
#--------------------------------------------------------
# Arch specific compiler optimization stuff should go here.
# Unless you want to override the defaults, do not set anything
# for OPTIMIZATION...
# use '-Os' optimization if available, else use -O2
OPTIMIZATION=
OPTIMIZATION=${call check_gcc,-Os,-O2}
OPTIMIZATION:=${call check_gcc,-Os,-O2}
# Some nice architecture specific optimizations
ifeq ($(strip $(TARGET_ARCH)),arm)
@@ -158,8 +166,8 @@ ifeq ($(strip $(CONFIG_DEBUG)),y)
STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging
else
CFLAGS+=$(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE -DNDEBUG
LDFLAGS += -s -Wl,-warn-common
STRIPCMD:=$(STRIP) --remove-section=.note --remove-section=.comment
LDFLAGS += -Wl,-warn-common
STRIPCMD:=$(STRIP) -s --remove-section=.note --remove-section=.comment
endif
ifeq ($(strip $(CONFIG_STATIC)),y)
LDFLAGS += --static
@@ -189,12 +197,4 @@ endif
# have a chance of winning.
CFLAGS += $(CFLAGS_EXTRA)
%.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
.PHONY: dummy
.EXPORT_ALL_VARIABLES:
+7 -5
View File
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
TOPDIR:= ../
top_srcdir=..
top_builddir=..
srcdir=$(top_srcdir)/applets
APPLETS_DIR:=./
include $(TOPDIR).config
include $(TOPDIR)Rules.mak
include Makefile.in
include $(top_builddir)/Rules.mak
include $(top_builddir)/.config
include $(srcdir)/Makefile.in
all: $(libraries-y)
-include $(TOPDIR).depend
-include $(top_builddir).depend
clean:
rm -f *.o *.a $(AR_TARGET)
+7 -6
View File
@@ -19,18 +19,19 @@
APPLETS_AR:=applets.a
ifndef $(APPLETS_DIR)
APPLETS_DIR:=$(TOPDIR)applets/
APPLETS_DIR:=$(top_builddir)/applets/
endif
srcdir=$(top_srcdir)/applets
APPLET_SRC:=applets.c busybox.c
APPLET_OBJ:= $(patsubst %.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
libraries-y+=$(APPLETS_DIR)$(APPLETS_AR)
$(APPLET_OBJ): $(TOPDIR).config
$(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ)
$(AR) -ro $@ $(APPLET_OBJ)
$(AR) $(ARFLAGS) $@ $(APPLET_OBJ)
$(APPLET_OBJ): $(top_builddir)/.config
$(APPLET_OBJ): $(APPLETS_DIR)%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+12 -12
View File
@@ -144,25 +144,25 @@ int busybox_main(int argc, char **argv)
output_width -= 20;
#endif
fprintf(stderr, "%s\n\n"
"Usage: busybox [function] [arguments]...\n"
" or: [function] [arguments]...\n\n"
"\tBusyBox is a multi-call binary that combines many common Unix\n"
"\tutilities into a single executable. Most people will create a\n"
"\tlink to busybox for each function they wish to use, and BusyBox\n"
"\twill act like whatever it was invoked as.\n"
"\nCurrently defined functions:\n", bb_msg_full_version);
printf("%s\n\n"
"Usage: busybox [function] [arguments]...\n"
" or: [function] [arguments]...\n\n"
"\tBusyBox is a multi-call binary that combines many common Unix\n"
"\tutilities into a single executable. Most people will create a\n"
"\tlink to busybox for each function they wish to use and BusyBox\n"
"\twill act like whatever it was invoked as!\n"
"\nCurrently defined functions:\n", bb_msg_full_version);
while (a->name != 0) {
col +=
fprintf(stderr, "%s%s", ((col == 0) ? "\t" : ", "),
(a++)->name);
printf("%s%s", ((col == 0) ? "\t" : ", "),
(a++)->name);
if (col > output_width && a->name != 0) {
fprintf(stderr, ",\n");
printf(",\n");
col = 0;
}
}
fprintf(stderr, "\n\n");
printf("\n\n");
exit(0);
}
+7 -5
View File
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
TOPDIR:= ../
top_srcdir=..
top_builddir=..
ARCHIVAL_DIR:=./
include $(TOPDIR).config
include $(TOPDIR)Rules.mak
include Makefile.in
srcdir=$(top_srcdir)/archival
include $(top_builddir)/Rules.mak
include $(top_builddir)/.config
include $(srcdir)/Makefile.in
all: $(libraries-y)
-include $(TOPDIR).depend
-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
+6 -2
View File
@@ -19,8 +19,9 @@
ARCHIVAL_AR:=archival.a
ifndef $(ARCHIVAL_DIR)
ARCHIVAL_DIR:=$(TOPDIR)archival/
ARCHIVAL_DIR:=$(top_builddir)/archival/
endif
srcdir=$(top_srcdir)/archival
ARCHIVAL-y:=
ARCHIVAL-$(CONFIG_APT_GET) +=
@@ -40,5 +41,8 @@ ARCHIVAL-$(CONFIG_UNZIP) += unzip.o
libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR)
$(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
$(AR) -ro $@ $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
$(AR) $(ARFLAGS) $@ $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
$(ARCHIVAL_DIR)%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+16 -7
View File
@@ -50,24 +50,27 @@ static void header_verbose_list_ar(const file_header_t *file_header)
printf("%s %d/%d%7d %s %s\n", &mode[1], file_header->uid, file_header->gid, (int) file_header->size, &mtime[4], file_header->name);
}
#define AR_CTX_PRINT 1
#define AR_CTX_LIST 2
#define AR_CTX_EXTRACT 4
#define AR_OPT_PRESERVE_DATE 8
#define AR_OPT_VERBOSE 16
#define AR_CTX_PRINT 0x01
#define AR_CTX_LIST 0x02
#define AR_CTX_EXTRACT 0x04
#define AR_OPT_PRESERVE_DATE 0x08
#define AR_OPT_VERBOSE 0x10
#define AR_OPT_CREATE 0x20
#define AR_OPT_INSERT 0x40
extern int ar_main(int argc, char **argv)
{
archive_handle_t *archive_handle;
unsigned long opt;
char *msg_unsupported_err = "Archive %s not supported. Install binutils 'ar'.";
char magic[8];
archive_handle = init_handle();
bb_opt_complementaly = "p~tx:t~px:x~pt";
opt = bb_getopt_ulflags(argc, argv, "ptxov");
opt = bb_getopt_ulflags(argc, argv, "ptxovcr");
if ((opt & 0x80000000UL) || (optind == argc)) {
if ((opt & BB_GETOPT_ERROR) || (opt == 0) || (optind == argc)) {
bb_show_usage();
}
@@ -86,6 +89,12 @@ extern int ar_main(int argc, char **argv)
if (opt & AR_OPT_VERBOSE) {
archive_handle->action_header = header_verbose_list_ar;
}
if (opt & AR_OPT_CREATE) {
bb_error_msg_and_die(msg_unsupported_err, "creation");
}
if (opt & AR_OPT_INSERT) {
bb_error_msg_and_die(msg_unsupported_err, "insertion");
}
archive_handle->src_fd = bb_xopen(argv[optind++], O_RDONLY);
+2
View File
@@ -33,6 +33,8 @@
int bunzip2_main(int argc, char **argv)
{
char *compressed_name;
/* Note: Ignore the warning about save_name being used uninitialized.
* That is not the case, but gcc has trouble working that out... */
char *save_name;
unsigned long opt;
int status;
+3 -1
View File
@@ -1327,7 +1327,7 @@ void free_array(char **array)
* the status_hashtable to retrieve the info. This results in smaller code than
* scanning the status file. The resulting list, however, is unsorted.
*/
void list_packages(void)
static void list_packages(void)
{
int i;
@@ -1520,6 +1520,7 @@ static char *deb_extract_control_file_to_buffer(archive_handle_t *ar_handle, lli
{
ar_handle->sub_archive->action_data = data_extract_to_buffer;
ar_handle->sub_archive->accept = myaccept;
ar_handle->sub_archive->filter = filter_accept_list;
unpack_ar_archive(ar_handle);
close(ar_handle->src_fd);
@@ -1714,6 +1715,7 @@ int dpkg_main(int argc, char **argv)
if (package_num == -1) {
bb_error_msg("Invalid control file in %s", argv[optind]);
optind++;
continue;
}
deb_file[deb_count]->package = (unsigned int) package_num;
+1 -1
View File
@@ -88,7 +88,7 @@ extern int dpkg_deb_main(int argc, char **argv)
argcount = 2;
}
if ((optind + argcount != argc) || (opt & 0x80000000UL)) {
if ((optind + argcount != argc) || (opt & BB_GETOPT_ERROR)) {
bb_show_usage();
}
+14 -33
View File
@@ -51,12 +51,6 @@
#include <time.h>
#include "busybox.h"
#define memzero(s, n) memset ((void *)(s), 0, (n))
#ifndef RETSIGTYPE
# define RETSIGTYPE void
#endif
typedef unsigned char uch;
typedef unsigned short ush;
typedef unsigned long ulg;
@@ -214,9 +208,6 @@ typedef int file_t; /* Do not use stdio */
static int zip(int in, int out);
static int file_read(char *buf, unsigned size);
/* from gzip.c */
static RETSIGTYPE abort_gzip(void);
/* from deflate.c */
static void lm_init(ush * flags);
static ulg deflate(void);
@@ -335,7 +326,7 @@ static void put_short(ush w)
/* ========================================================================
* Signal and error handler.
*/
static void abort_gzip()
static void abort_gzip(int ignored)
{
exit(ERROR);
}
@@ -350,13 +341,6 @@ static void clear_bufs(void)
bytes_in = 0L;
}
static void write_bb_error_msg(void)
{
fputc('\n', stderr);
bb_perror_nomsg();
abort_gzip();
}
/* ===========================================================================
* Does the same as write(), but also handles partial pipe writes and checks
* for error return.
@@ -366,9 +350,7 @@ static void write_buf(int fd, void *buf, unsigned cnt)
unsigned n;
while ((n = write(fd, buf, cnt)) != cnt) {
if (n == (unsigned) (-1)) {
write_bb_error_msg();
}
if (n == (unsigned) (-1)) bb_error_msg_and_die("can't write");
cnt -= n;
buf = (void *) ((char *) buf + n);
}
@@ -559,7 +541,7 @@ static unsigned bi_reverse(unsigned code, int len)
/* ===========================================================================
* Write out any remaining bits in an incomplete byte.
*/
static void bi_windup()
static void bi_windup(void)
{
if (bi_valid > 8) {
put_short(bi_buf);
@@ -846,7 +828,7 @@ static void lm_init(ush * flags)
register unsigned j;
/* Initialize the hash table. */
memzero((char *) head, HASH_SIZE * sizeof(*head));
memset(head, 0, HASH_SIZE * sizeof(*head));
/* prev will be initialized on the fly */
*flags |= SLOW;
@@ -996,7 +978,7 @@ static void check_match(IPos start, IPos match, int length)
* file reads are performed for at least two bytes (required for the
* translate_eol option).
*/
static void fill_window()
static void fill_window(void)
{
register unsigned n, m;
unsigned more =
@@ -1060,7 +1042,7 @@ static void fill_window()
* evaluation for matches: a match is finally adopted only if there is
* no better match at the next window position.
*/
static ulg deflate()
static ulg deflate(void)
{
IPos hash_head; /* head of hash chain */
IPos prev_match; /* previous match */
@@ -1188,8 +1170,6 @@ static ulg deflate()
typedef struct dirent dir_type;
typedef RETSIGTYPE(*sig_type) (int);
/* ======================================================================== */
int gzip_main(int argc, char **argv)
{
@@ -1235,16 +1215,16 @@ int gzip_main(int argc, char **argv)
foreground = signal(SIGINT, SIG_IGN) != SIG_IGN;
if (foreground) {
(void) signal(SIGINT, (sig_type) abort_gzip);
(void) signal(SIGINT, abort_gzip);
}
#ifdef SIGTERM
if (signal(SIGTERM, SIG_IGN) != SIG_IGN) {
(void) signal(SIGTERM, (sig_type) abort_gzip);
(void) signal(SIGTERM, abort_gzip);
}
#endif
#ifdef SIGHUP
if (signal(SIGHUP, SIG_IGN) != SIG_IGN) {
(void) signal(SIGHUP, (sig_type) abort_gzip);
(void) signal(SIGHUP, abort_gzip);
}
#endif
@@ -1271,6 +1251,7 @@ int gzip_main(int argc, char **argv)
for (i = optind; i < argc; i++) {
char *path = NULL;
clear_bufs();
if (strcmp(argv[i], "-") == 0) {
time_stamp = 0;
ifile_size = -1L;
@@ -1749,7 +1730,7 @@ static void ct_init(ush * attr, int *methodp)
/* ===========================================================================
* Initialize a new block.
*/
static void init_block()
static void init_block(void)
{
int n; /* iterates over tree elements */
@@ -2162,7 +2143,7 @@ static void send_tree(ct_data * tree, int max_code)
* Construct the Huffman tree for the bit lengths and return the index in
* bl_order of the last bit length code to send.
*/
static const int build_bl_tree()
static int build_bl_tree(void)
{
int max_blindex; /* index of last bit length code of non zero freq */
@@ -2425,7 +2406,7 @@ static void compress_block(ct_data * ltree, ct_data * dtree)
* IN assertion: the fields freq of dyn_ltree are set and the total of all
* frequencies does not exceed 64K (to fit in an int on 16 bit machines).
*/
static void set_file_type()
static void set_file_type(void)
{
int n = 0;
unsigned ascii_freq = 0;
@@ -2538,7 +2519,7 @@ static int file_read(char *buf, unsigned size)
* Write the output buffer outbuf[0..outcnt-1] and update bytes_out.
* (used for the compressed data only)
*/
static void flush_outbuf()
static void flush_outbuf(void)
{
if (outcnt == 0)
return;
+7 -5
View File
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
TOPDIR:= ../../
top_srcdir=../..
top_builddir=../..
srcdir=$(top_srcdir)/archival/libunarchive
LIBUNARCHIVE_DIR:=./
include $(TOPDIR).config
include $(TOPDIR)Rules.mak
include Makefile.in
include $(top_builddir)/Rules.mak
include $(top_builddir)/.config
include $(srcdir)/Makefile.in
all: $(libraries-y)
-include $(TOPDIR).depend
-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
+6 -2
View File
@@ -19,8 +19,9 @@
LIBUNARCHIVE_AR:=libunarchive.a
ifndef $(LIBUNARCHIVE_DIR)
LIBUNARCHIVE_DIR:=$(TOPDIR)archival/libunarchive/
LIBUNARCHIVE_DIR:=$(top_builddir)/archival/libunarchive/
endif
srcdir=$(top_srcdir)/archvial/libunarchive
LIBUNARCHIVE-y:= \
\
@@ -76,5 +77,8 @@ LIBUNARCHIVE-$(CONFIG_UNZIP) += $(GUNZIP_FILES)
libraries-y+=$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR)
$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y))
$(AR) -ro $@ $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y))
$(AR) $(ARFLAGS) $@ $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y))
$(LIBUNARCHIVA_DIR)%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
@@ -26,7 +26,7 @@ extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned
size = bb_full_read(archive_handle->src_fd, buf, count);
if ((size != 0) && (size != count)) {
bb_perror_msg_and_die("Short read, read %d of %d", size, count);
bb_perror_msg_and_die("Short read, read %ld of %ld", (long)size, (long)count);
}
return(size);
}
+1 -1
View File
@@ -35,7 +35,7 @@ extern void data_extract_all(archive_handle_t *archive_handle)
if (archive_handle->flags & ARCHIVE_CREATE_LEADING_DIRS) {
char *name = bb_xstrdup(file_header->name);
bb_make_directory (dirname(name), 0777, FILEUTILS_RECUR);
bb_make_directory (dirname(name), -1, FILEUTILS_RECUR);
free(name);
}
+13 -10
View File
@@ -284,16 +284,15 @@ static int get_next_block(bunzip_data *bd)
mtfSymbol[i]=(unsigned char)i;
}
/* Loop through compressed symbols. */
runPos=dbufCount=symCount=selector=0;
runPos=dbufCount=selector=0;
for(;;) {
/* Determine which Huffman coding group to use. */
if(!(symCount--)) {
symCount=GROUP_SIZE-1;
if(selector>=nSelectors) return RETVAL_DATA_ERROR;
hufGroup=bd->groups+selectors[selector++];
base=hufGroup->base-1;
limit=hufGroup->limit-1;
}
/* fetch next Huffman coding group from list. */
symCount=GROUP_SIZE-1;
if(selector>=nSelectors) return RETVAL_DATA_ERROR;
hufGroup=bd->groups+selectors[selector++];
base=hufGroup->base-1;
limit=hufGroup->limit-1;
continue_this_group:
/* Read next Huffman-coded symbol. */
/* Note: It is far cheaper to read maxLen bits and back up than it is
to read minLen bits and then an additional bit at a time, testing
@@ -344,7 +343,7 @@ got_huff_bits:
context). Thus space is saved. */
t += (runPos << nextSym); /* +runPos if RUNA; +2*runPos if RUNB */
runPos <<= 1;
continue;
goto end_of_huffman_loop;
}
/* When we hit the first non-run symbol after a run, we now know
how many times to repeat the last literal, so append that many
@@ -382,6 +381,10 @@ got_huff_bits:
/* We have our literal byte. Save it into dbuf. */
byteCount[uc]++;
dbuf[dbufCount++] = (unsigned int)uc;
/* Skip group initialization if we're not done with this group. Done this
* way to avoid compiler warning. */
end_of_huffman_loop:
if(symCount--) goto continue_this_group;
}
/* At this point, we've read all the Huffman-coded symbols (and repeated
runs) for this block from the input stream, and decoded them into the
+86 -81
View File
@@ -16,6 +16,11 @@
*
* read_gz interface + associated hacking by Laurence Anderson
*
* Fixed huft_build() so decoding end-of-block code does not grab more bits
* than necessary (this is required by unzip applet), added inflate_cleanup()
* to free leaked bytebuffer memory (used in unzip.c), and some minor style
* guide cleanups by Ed Clark
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -116,26 +121,26 @@ static const unsigned short mask_bits[] = {
/* Copy lengths for literal codes 257..285 */
static const unsigned short cplens[] = {
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59,
67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
};
/* note: see note #13 above about the 258 in this list. */
/* Extra bits for literal codes 257..285 */
static const unsigned char cplext[] = {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5,
5, 5, 5, 0, 99, 99
5, 5, 5, 0, 99, 99
}; /* 99==invalid */
/* Copy offsets for distance codes 0..29 */
static const unsigned short cpdist[] = {
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513,
769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577
769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577
};
/* Extra bits for distance codes */
static const unsigned char cpdext[] = {
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10,
11, 11, 12, 12, 13, 13
11, 11, 12, 12, 13, 13
};
/* Tables for deflate from PKZIP's appnote.txt. */
@@ -151,7 +156,10 @@ static unsigned int fill_bitbuffer(unsigned int bitbuffer, unsigned int *current
/* Leave the first 4 bytes empty so we can always unwind the bitbuffer
* to the front of the bytebuffer, leave 4 bytes free at end of tail
* so we can easily top up buffer in check_trailer_gzip() */
bytebuffer_size = 4 + bb_xread(gunzip_src_fd, &bytebuffer[4], bytebuffer_max - 8);
if (!(bytebuffer_size = bb_xread(gunzip_src_fd, &bytebuffer[4], bytebuffer_max - 8))) {
bb_error_msg_and_die("unexpected end of file");
}
bytebuffer_size += 4;
bytebuffer_offset = 4;
}
bitbuffer |= ((unsigned int) bytebuffer[bytebuffer_offset]) << *current;
@@ -168,7 +176,7 @@ static void make_gunzip_crc_table(void)
/* initial shift register value */
gunzip_crc = 0xffffffffL;
gunzip_crc_table = (unsigned int *) malloc(256 * sizeof(unsigned int));
gunzip_crc_table = (unsigned int *) xmalloc(256 * sizeof(unsigned int));
/* Compute and print table of CRC's, five per line */
for (i = 0; i < 256; i++) {
@@ -184,8 +192,8 @@ static void make_gunzip_crc_table(void)
table_entry = (table_entry >> 1) ^ poly;
} else {
table_entry >>= 1;
}
}
}
}
gunzip_crc_table[i] = table_entry;
}
}
@@ -225,70 +233,59 @@ static int huft_free(huft_t * t)
* t: result: starting table
* m: maximum lookup bits, returns actual
*/
static int huft_build(unsigned int *b, const unsigned int n,
const unsigned int s, const unsigned short *d,
const unsigned char *e, huft_t ** t, int *m)
int huft_build(unsigned int *b, const unsigned int n,
const unsigned int s, const unsigned short *d,
const unsigned char *e, huft_t ** t, int *m)
{
unsigned a; /* counter for codes of length k */
unsigned a; /* counter for codes of length k */
unsigned c[BMAX + 1]; /* bit length count table */
unsigned f; /* i repeats in table every f entries */
int g; /* maximum code length */
int h; /* table level */
unsigned eob_len; /* length of end-of-block code (value 256) */
unsigned f; /* i repeats in table every f entries */
int g; /* maximum code length */
int h; /* table level */
register unsigned i; /* counter, current code */
register unsigned j; /* counter */
register int k; /* number of bits in current code */
int l; /* bits per table (returned in m) */
register int k; /* number of bits in current code */
register unsigned *p; /* pointer into c[], b[], or v[] */
register huft_t *q; /* points to current table */
huft_t r; /* table entry for structure assignment */
huft_t *u[BMAX]; /* table stack */
unsigned v[N_MAX]; /* values in order of bit length */
register int w; /* bits before this table == (l * h) */
register huft_t *q; /* points to current table */
huft_t r; /* table entry for structure assignment */
huft_t *u[BMAX]; /* table stack */
unsigned v[N_MAX]; /* values in order of bit length */
int ws[BMAX+1]; /* bits decoded stack */
register int w; /* bits decoded */
unsigned x[BMAX + 1]; /* bit offsets, then code stack */
unsigned *xp; /* pointer into x */
int y; /* number of dummy codes added */
unsigned z; /* number of entries in current table */
unsigned *xp; /* pointer into x */
int y; /* number of dummy codes added */
unsigned z; /* number of entries in current table */
/* Length of EOB code, if any */
eob_len = n > 256 ? b[256] : BMAX;
/* Generate counts for each bit length */
memset((void *) (c), 0, sizeof(c));
memset((void *)c, 0, sizeof(c));
p = b;
i = n;
do {
c[*p]++; /* assume all entries <= BMAX */
p++; /* Can't combine with above line (Solaris bug) */
c[*p]++; /* assume all entries <= BMAX */
p++; /* Can't combine with above line (Solaris bug) */
} while (--i);
if (c[0] == n) { /* null input--all zero length codes */
if (c[0] == n) { /* null input--all zero length codes */
*t = (huft_t *) NULL;
*m = 0;
return 0;
}
/* Find minimum and maximum length, bound *m by those */
l = *m;
for (j = 1; j <= BMAX; j++) {
if (c[j]) {
break;
}
}
k = j; /* minimum code length */
if ((unsigned) l < j) {
l = j;
}
for (i = BMAX; i; i--) {
if (c[i]) {
break;
}
}
g = i; /* maximum code length */
if ((unsigned) l > i) {
l = i;
}
*m = l;
for (j = 1; (c[j] == 0) && (j <= BMAX); j++);
k = j; /* minimum code length */
for (i = BMAX; (c[i] == 0) && i; i--);
g = i; /* maximum code length */
*m = (*m < j) ? j : ((*m > i) ? i : *m);
/* Adjust last length count to fill out codes, if needed */
for (y = 1 << j; j < i; j++, y <<= 1) {
if ((y -= c[j]) < 0) {
return 2; /* bad input: more codes than bits */
return 2; /* bad input: more codes than bits */
}
}
if ((y -= c[i]) < 0) {
@@ -300,7 +297,7 @@ static int huft_build(unsigned int *b, const unsigned int n,
x[1] = j = 0;
p = c + 1;
xp = x + 2;
while (--i) { /* note that i == g from above */
while (--i) { /* note that i == g from above */
*xp++ = (j += *p++);
}
@@ -314,13 +311,13 @@ static int huft_build(unsigned int *b, const unsigned int n,
} while (++i < n);
/* Generate the Huffman codes and for each, make the table entries */
x[0] = i = 0; /* first Huffman code is zero */
p = v; /* grab values in bit order */
h = -1; /* no tables yet--level -1 */
w = -l; /* bits decoded == (l * h) */
x[0] = i = 0; /* first Huffman code is zero */
p = v; /* grab values in bit order */
h = -1; /* no tables yet--level -1 */
w = ws[0] = 0; /* bits decoded */
u[0] = (huft_t *) NULL; /* just to keep compilers happy */
q = (huft_t *) NULL; /* ditto */
z = 0; /* ditto */
z = 0; /* ditto */
/* go through the bit lengths (k already is bits in shortest code) */
for (; k <= g; k++) {
@@ -328,52 +325,52 @@ static int huft_build(unsigned int *b, const unsigned int n,
while (a--) {
/* here i is the Huffman code of length k bits for value *p */
/* make tables up to required level */
while (k > w + l) {
h++;
w += l; /* previous table always l bits */
while (k > ws[h + 1]) {
w = ws[++h];
/* compute minimum size table less than or equal to l bits */
z = (z = g - w) > (unsigned) l ? l : z; /* upper limit on table size */
if ((f = 1 << (j = k - w)) > a + 1) { /* try a k-w bit table *//* too few codes for k-w bit table */
f -= a + 1; /* deduct codes from patterns left */
/* compute minimum size table less than or equal to *m bits */
z = (z = g - w) > *m ? *m : z; /* upper limit on table size */
if ((f = 1 << (j = k - w)) > a + 1) { /* try a k-w bit table */
/* too few codes for k-w bit table */
f -= a + 1; /* deduct codes from patterns left */
xp = c + k;
while (++j < z) { /* try smaller tables up to z bits */
while (++j < z) { /* try smaller tables up to z bits */
if ((f <<= 1) <= *++xp) {
break; /* enough codes to use up j bits */
break; /* enough codes to use up j bits */
}
f -= *xp; /* else deduct codes from patterns */
f -= *xp; /* else deduct codes from patterns */
}
}
j = (w + j > eob_len && w < eob_len) ? eob_len - w : j; /* make EOB code end at table */
z = 1 << j; /* table entries for j-bit table */
ws[h+1] = w + j; /* set bits decoded in stack */
/* allocate and link in new table */
q = (huft_t *) xmalloc((z + 1) * sizeof(huft_t));
*t = q + 1; /* link to list for huft_free() */
*(t = &(q->v.t)) = NULL;
u[h] = ++q; /* table starts after link */
/* connect to last table, if there is one */
if (h) {
x[h] = i; /* save pattern for backing up */
r.b = (unsigned char) l; /* bits to dump before this table */
r.e = (unsigned char) (16 + j); /* bits in this table */
r.v.t = q; /* pointer to this table */
j = i >> (w - l); /* (get around Turbo C bug) */
u[h - 1][j] = r; /* connect to last table */
x[h] = i; /* save pattern for backing up */
r.b = (unsigned char) (w - ws[h - 1]); /* bits to dump before this table */
r.e = (unsigned char) (16 + j); /* bits in this table */
r.v.t = q; /* pointer to this table */
j = (i & ((1 << w) - 1)) >> ws[h - 1];
u[h - 1][j] = r; /* connect to last table */
}
}
/* set up table entry in r */
r.b = (unsigned char) (k - w);
if (p >= v + n) {
r.e = 99; /* out of values--invalid code */
r.e = 99; /* out of values--invalid code */
} else if (*p < s) {
r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is end-of-block code */
r.v.n = (unsigned short) (*p); /* simple code is just the value */
p++; /* one compiler does not like *p++ */
r.e = (unsigned char) (*p < 256 ? 16 : 15); /* 256 is EOB code */
r.v.n = (unsigned short) (*p++); /* simple code is just the value */
} else {
r.e = (unsigned char) e[*p - s]; /* non-simple--look up in lists */
r.e = (unsigned char) e[*p - s]; /* non-simple--look up in lists */
r.v.n = d[*p++ - s];
}
@@ -391,11 +388,14 @@ static int huft_build(unsigned int *b, const unsigned int n,
/* backup over finished tables */
while ((i & ((1 << w) - 1)) != x[h]) {
h--; /* don't need to update q */
w -= l;
w = ws[--h];
}
}
}
/* return actual size of base table */
*m = ws[1];
/* Return true (1) if we were given an incomplete table */
return y != 0 && g != 1;
}
@@ -901,6 +901,11 @@ extern void inflate_init(unsigned int bufsize)
bytebuffer_size = 0;
}
extern void inflate_cleanup(void)
{
free(bytebuffer);
}
extern int inflate_unzip(int in, int out)
{
ssize_t nwrote;
@@ -951,7 +956,7 @@ extern int inflate_unzip(int in, int out)
extern int inflate_gunzip(int in, int out)
{
unsigned int stored_crc = 0;
unsigned char count;
unsigned int count;
inflate_unzip(in, out);
+10
View File
@@ -62,6 +62,7 @@ extern char get_header_tar(archive_handle_t *archive_handle)
} tar;
long sum = 0;
long i;
static int end = 0;
/* Align header */
data_align(archive_handle, 512);
@@ -74,8 +75,17 @@ extern char get_header_tar(archive_handle_t *archive_handle)
/* If there is no filename its an empty header */
if (tar.formated.name[0] == 0) {
if (end) {
/* This is the second consecutive empty header! End of archive!
* Read until the end to empty the pipe from gz or bz2
*/
while (bb_full_read(archive_handle->src_fd, tar.raw, 512) == 512);
return(EXIT_FAILURE);
}
end = 1;
return(EXIT_SUCCESS);
}
end = 0;
/* Check header has valid magic, "ustar" is for the proper tar
* 0's are for the old tar format
+12 -9
View File
@@ -234,9 +234,9 @@ static inline int writeTarHeader(struct TarBallInfo *tbInfo,
TAR_MAGIC_LEN + TAR_VERSION_LEN);
/* Enter the user and group names (default to root if it fails) */
if (my_getpwuid(header.uname, statbuf->st_uid) == NULL)
if (my_getpwuid(header.uname, statbuf->st_uid, sizeof(header.uname)) == NULL)
strcpy(header.uname, "root");
if (my_getgrgid(header.gname, statbuf->st_gid) == NULL)
if (my_getgrgid(header.gname, statbuf->st_gid, sizeof(header.gname)) == NULL)
strcpy(header.gname, "root");
if (tbInfo->hlInfo) {
@@ -479,7 +479,10 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag,
close(gzipStatusPipe[0]);
fcntl(gzipStatusPipe[1], F_SETFD, FD_CLOEXEC); /* close on exec shows sucess */
execl("/bin/gzip", "gzip", "-f", 0);
if (gzip == 1)
execlp("gzip", "gzip", "-f", 0);
else
execlp("bzip2", "bzip2", "-f", 0);
vfork_exec_errno = errno;
close(gzipStatusPipe[1]);
@@ -538,7 +541,7 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag,
freeHardLinkInfo(&tbInfo.hlInfoHead);
#ifdef CONFIG_FEATURE_TAR_GZIP
if (gzip && gzipPid) {
if (gzipPid) {
if (waitpid(gzipPid, NULL, 0) == -1)
printf("Couldnt wait ?");
}
@@ -724,7 +727,7 @@ int tar_main(int argc, char **argv)
);
/* Check one and only one context option was given */
if(opt & 0x80000000UL) {
if(opt & BB_GETOPT_ERROR) {
bb_show_usage();
}
#ifdef CONFIG_FEATURE_TAR_CREATE
@@ -846,16 +849,16 @@ int tar_main(int argc, char **argv)
/* create an archive */
if (opt & CTX_CREATE) {
int verboseFlag = FALSE;
int gzipFlag = FALSE;
int zipMode = 0;
# ifdef CONFIG_FEATURE_TAR_GZIP
if (get_header_ptr == get_header_tar_gz) {
gzipFlag = TRUE;
zipMode = 1;
}
# endif /* CONFIG_FEATURE_TAR_GZIP */
# ifdef CONFIG_FEATURE_TAR_BZIP2
if (get_header_ptr == get_header_tar_bz2) {
bb_error_msg_and_die("Creating bzip2 compressed archives is not currently supported.");
zipMode = 2;
}
# endif /* CONFIG_FEATURE_TAR_BZIP2 */
@@ -864,7 +867,7 @@ int tar_main(int argc, char **argv)
verboseFlag = TRUE;
}
writeTarFile(tar_handle->src_fd, verboseFlag, opt & TAR_OPT_DEREFERNCE, tar_handle->accept,
tar_handle->reject, gzipFlag);
tar_handle->reject, zipMode);
} else
#endif /* CONFIG_FEATURE_TAR_CREATE */
{
+7 -5
View File
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
TOPDIR:= ../
top_srcdir=..
top_builddir=..
srcdir=$(top_srcdir)/console/tools
CONSOLETOOLS_DIR:=./
include $(TOPDIR).config
include $(TOPDIR)Rules.mak
include Makefile.in
include $(top_builddir)/Rules.mak
include $(top_builddir)/.config
include $(srcdir)/Makefile.in
all: $(libraries-y)
-include $(TOPDIR).depend
-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
+6 -2
View File
@@ -19,8 +19,9 @@
CONSOLETOOLS_AR:=console-tools.a
ifndef $(CONSOLETOOLS_DIR)
CONSOLETOOLS_DIR:=$(TOPDIR)console-tools/
CONSOLETOOLS_DIR:=$(top_builddir)/console-tools/
endif
srcdir=$(top_srcdir)/console-tools
CONSOLETOOLS_DIR-y:=
CONSOLETOOLS_DIR-$(CONFIG_CHVT) += chvt.o
@@ -36,5 +37,8 @@ CONSOLETOOLS_DIR-$(CONFIG_SETKEYCODES) += setkeycodes.o
libraries-y+=$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR)
$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR): $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y))
$(AR) -ro $@ $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y))
$(AR) $(ARFLAGS) $@ $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y))
$(CONSOLETOOLS_DIR)%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+18 -25
View File
@@ -35,11 +35,11 @@ struct kbentry {
unsigned char kb_index;
unsigned short kb_value;
};
static const int KDGKBENT = 0x4B46; /* gets one entry in translation table */
#define KDGKBENT 0x4B46 /* gets one entry in translation table */
/* From <linux/keyboard.h> */
static const int NR_KEYS = 128;
static const int MAX_NR_KEYMAPS = 256;
#define NR_KEYS 128
#define MAX_NR_KEYMAPS 256
int dumpkmap_main(int argc, char **argv)
{
@@ -47,28 +47,21 @@ int dumpkmap_main(int argc, char **argv)
int i, j, fd;
char flags[MAX_NR_KEYMAPS], magic[] = "bkeymap";
if (argc>=2 && *argv[1]=='-') {
if (argc >= 2 && *argv[1] == '-')
bb_show_usage();
}
fd=bb_xopen(CURRENT_VC, O_RDWR);
fd = bb_xopen(CURRENT_VC, O_RDWR);
write(1, magic, 7);
for (i=0; i < MAX_NR_KEYMAPS; i++) flags[i]=0;
flags[0]=1;
flags[1]=1;
flags[2]=1;
flags[4]=1;
flags[5]=1;
flags[6]=1;
flags[8]=1;
flags[9]=1;
flags[10]=1;
flags[12]=1;
/* Here we want to set everything to 0 except for indexes:
* [0-2] [4-6] [8-10] [12] */
memset(flags, 0x00, MAX_NR_KEYMAPS);
memset(flags, 0x01, 13);
flags[3] = flags[7] = flags[11] = 0;
/* dump flags */
for (i=0; i < MAX_NR_KEYMAPS; i++) write(1,&flags[i],1);
write(1, flags, MAX_NR_KEYMAPS);
for (i = 0; i < MAX_NR_KEYMAPS; i++) {
if (flags[i] == 1) {
@@ -76,13 +69,13 @@ int dumpkmap_main(int argc, char **argv)
ke.kb_index = j;
ke.kb_table = i;
if (ioctl(fd, KDGKBENT, &ke) < 0) {
bb_error_msg("ioctl returned: %m, %s, %s, %xqq", (char *)&ke.kb_index,(char *)&ke.kb_table,(int)&ke.kb_value);
}
else {
write(1,(void*)&ke.kb_value,2);
}
bb_perror_msg("ioctl failed with %s, %s, %p",
(char *)&ke.kb_index,
(char *)&ke.kb_table,
&ke.kb_value);
} else {
write(1, (void*)&ke.kb_value, 2);
}
}
}
}
+8
View File
@@ -455,6 +455,13 @@ if !CONFIG_ASH && !CONFIG_HUSH && !CONFIG_LASH && !CONFIG_MSH
and bash) have test builtin.
endif
config CONFIG_FEATURE_TEST_64
bool " Extend test to 64 bit"
default n
depends on CONFIG_TEST
help
Enable 64-bit support in test.
config CONFIG_TOUCH
bool "touch"
default n
@@ -538,6 +545,7 @@ config CONFIG_WC
config CONFIG_WHO
bool "who"
default n
select CONFIG_FEATURE_UTMP
help
who is used to show who is logged on.
+7 -5
View File
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
TOPDIR:= ../
top_srcdir=..
top_builddir=..
srcdir=$(top_srcdir)/coreutils
SHELLUTILS_DIR:=./
include $(TOPDIR).config
include $(TOPDIR)Rules.mak
include Makefile.in
include $(top_builddir)/Rules.mak
include $(top_builddir)/.config
include $(srcdir)/Makefile.in
all: $(libraries-y)
-include $(TOPDIR).depend
-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
+7 -2
View File
@@ -19,8 +19,9 @@
COREUTILS_AR:=coreutils.a
ifndef $(COREUTILS_DIR)
COREUTILS_DIR:=$(TOPDIR)coreutils/
COREUTILS_DIR:=$(top_builddir)/coreutils/
endif
srcdir=$(top_srcdir)/coreutils
COREUTILS-y:=
COREUTILS-$(CONFIG_BASENAME) += basename.o
@@ -90,4 +91,8 @@ COREUTILS-$(CONFIG_YES) += yes.o
libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR)
$(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
$(AR) -ro $@ $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
$(AR) $(ARFLAGS) $@ $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
$(COREUTILS_DIR)%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+7 -1
View File
@@ -42,7 +42,7 @@
#include "libcoreutils/coreutils.h"
/* WARNING!! ORDER IS IMPORTANT!! */
static const char cp_opts[] = "pdRfiar";
static const char cp_opts[] = "pdRfiarP";
extern int cp_main(int argc, char **argv)
{
@@ -73,6 +73,12 @@ extern int cp_main(int argc, char **argv)
*/
flags |= FILEUTILS_RECUR;
}
if (flags & 128) {
/* Make -P a synonym for -d,
* -d is the GNU option while -P is the POSIX 2003 option
*/
flags |= FILEUTILS_DEREFERENCE;
}
flags ^= FILEUTILS_DEREFERENCE; /* The sense of this flag was reversed. */
+1 -1
View File
@@ -300,7 +300,7 @@ extern int cut_main(int argc, char **argv)
part = opt & (OPT_BYTE_FLGS|OPT_CHAR_FLGS|OPT_FIELDS_FLGS);
if(part == 0)
bb_error_msg_and_die("you must specify a list of bytes, characters, or fields");
if(opt & 0x80000000UL)
if(opt & BB_GETOPT_ERROR)
bb_error_msg_and_die("only one type of list may be specified");
parse_lists(sopt);
if((opt & (OPT_DELIM_FLGS))) {
+17 -6
View File
@@ -47,6 +47,7 @@
static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
{
int nr;
char *cp;
nr = sscanf(t_string, "%2d%2d%2d%2d%d", &(tm_time->tm_mon),
&(tm_time->tm_mday), &(tm_time->tm_hour), &(tm_time->tm_min),
@@ -56,6 +57,14 @@ static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
bb_error_msg_and_die(bb_msg_invalid_date, t_string);
}
cp = strchr(t_string, '.');
if (cp) {
nr = sscanf(cp + 1, "%2d", &(tm_time->tm_sec));
if (nr != 1) {
bb_error_msg_and_die(bb_msg_invalid_date, t_string);
}
}
/* correct for century - minor Y2K problem here? */
if (tm_time->tm_year >= 1900) {
tm_time->tm_year -= 1900;
@@ -127,7 +136,6 @@ int date_main(int argc, char **argv)
{
char *date_str = NULL;
char *date_fmt = NULL;
char *t_buff;
int set_time;
int utc;
int use_arg = 0;
@@ -157,7 +165,7 @@ int date_main(int argc, char **argv)
bb_error_msg_and_die(bb_msg_memory_exhausted);
}
use_arg = opt & DATE_OPT_DATE;
if(opt & 0x80000000UL)
if(opt & BB_GETOPT_ERROR)
bb_show_usage();
#ifdef CONFIG_FEATURE_DATE_ISOFMT
if(opt & DATE_OPT_TIMESPEC) {
@@ -274,10 +282,13 @@ int date_main(int argc, char **argv)
date_fmt = "%Y.%m.%d-%H:%M:%S";
}
/* Print OUTPUT (after ALL that!) */
t_buff = xmalloc(201);
strftime(t_buff, 200, date_fmt, &tm_time);
puts(t_buff);
{
/* Print OUTPUT (after ALL that!) */
RESERVE_CONFIG_BUFFER(t_buff, 201);
strftime(t_buff, 200, date_fmt, &tm_time);
puts(t_buff);
RELEASE_CONFIG_BUFFER(t_buff);
}
return EXIT_SUCCESS;
}
+1 -1
View File
@@ -130,7 +130,7 @@ extern int df_main(int argc, char **argv)
} else if (strcmp(device, "/dev/root") == 0) {
/* Adjusts device to be the real root device,
* or leaves device alone if it can't find it */
if ((device = find_real_root_device_name(device)) == NULL) {
if ((device = find_real_root_device_name()) == NULL) {
goto SET_ERROR;
}
}
+14 -21
View File
@@ -245,10 +245,9 @@ static int arithmetic_common (VALUE *l, VALUE *r, int op)
static VALUE *docolon (VALUE *sv, VALUE *pv)
{
VALUE *v;
const char *errmsg;
struct re_pattern_buffer re_buffer;
struct re_registers re_regs;
int len;
regex_t re_buffer;
const int NMATCH = 2;
regmatch_t re_regs[NMATCH];
tostring (sv);
tostring (pv);
@@ -260,27 +259,22 @@ of a basic regular expression is not portable; it is being ignored",
pv->u.s);
}
len = strlen (pv->u.s);
memset (&re_buffer, 0, sizeof (re_buffer));
memset (&re_regs, 0, sizeof (re_regs));
re_buffer.allocated = 2 * len;
re_buffer.buffer = (unsigned char *) xmalloc (re_buffer.allocated);
re_buffer.translate = 0;
re_syntax_options = RE_SYNTAX_POSIX_BASIC;
errmsg = re_compile_pattern (pv->u.s, len, &re_buffer);
if (errmsg) {
bb_error_msg_and_die("%s", errmsg);
}
memset (re_regs, 0, sizeof (*re_regs));
if( regcomp (&re_buffer, pv->u.s, 0) != 0 )
bb_error_msg_and_die("Invalid regular expression");
len = re_match (&re_buffer, sv->u.s, strlen (sv->u.s), 0, &re_regs);
if (len >= 0) {
/* expr uses an anchored pattern match, so check that there was a
* match and that the match starts at offset 0. */
if (regexec (&re_buffer, sv->u.s, NMATCH, re_regs, 0) != REG_NOMATCH &&
re_regs[0].rm_so == 0) {
/* Were \(...\) used? */
if (re_buffer.re_nsub > 0) { /* was (re_regs.start[1] >= 0) */
sv->u.s[re_regs.end[1]] = '\0';
v = str_value (sv->u.s + re_regs.start[1]);
if (re_buffer.re_nsub > 0) {
sv->u.s[re_regs[1].rm_eo] = '\0';
v = str_value (sv->u.s + re_regs[1].rm_so);
}
else
v = int_value (len);
v = int_value (re_regs[0].rm_eo);
}
else {
/* Match failed -- return the right kind of null. */
@@ -289,7 +283,6 @@ of a basic regular expression is not portable; it is being ignored",
else
v = int_value (0);
}
free (re_buffer.buffer);
return v;
}
+90 -61
View File
@@ -21,90 +21,119 @@
*/
/* BB_AUDIT SUSv3 _NOT_ compliant -- option -G is not currently supported. */
/* Hacked by Tito Ragusa (C) 2004 to handle usernames of whatever length and to
* be more similar to GNU id.
*/
#include "busybox.h"
#include "pwd_.h"
#include <stdio.h>
#include <unistd.h>
#include <getopt.h>
#include <string.h>
#include <sys/types.h>
#ifdef CONFIG_SELINUX
#include <proc_secure.h>
#include <flask_util.h>
#include <selinux/selinux.h>
#endif
#define JUST_USER 1
#define JUST_GROUP 2
#define PRINT_REAL 4
#define NAME_NOT_NUMBER 8
#define PRINT_REAL 1
#define NAME_NOT_NUMBER 2
#define JUST_USER 4
#define JUST_GROUP 8
static short printf_full(unsigned int id, const char *arg, const char prefix)
{
const char *fmt = "%cid=%u";
short status=EXIT_FAILURE;
if(arg) {
fmt = "%cid=%u(%s)";
status=EXIT_SUCCESS;
}
bb_printf(fmt, prefix, id, arg);
return status;
}
extern int id_main(int argc, char **argv)
{
char user[9], group[9];
long pwnam, grnam;
int uid, gid;
int flags;
#ifdef CONFIG_SELINUX
int is_flask_enabled_flag = is_flask_enabled();
#endif
struct passwd *p;
uid_t uid;
gid_t gid;
unsigned long flags;
short status;
flags = bb_getopt_ulflags(argc, argv, "ugrn");
if (((flags & (JUST_USER | JUST_GROUP)) == (JUST_USER | JUST_GROUP))
|| (argc > optind + 1)
) {
bb_opt_complementaly = "u~g:g~u";
flags = bb_getopt_ulflags(argc, argv, "rnug");
if ((flags & BB_GETOPT_ERROR)
/* Don't allow -n -r -nr */
|| (flags <= 3 && flags > 0)
/* Don't allow more than one username */
|| (argc > optind + 1))
bb_show_usage();
/* This values could be overwritten later */
uid = geteuid();
gid = getegid();
if (flags & PRINT_REAL) {
uid = getuid();
gid = getgid();
}
if(argv[optind]) {
p=getpwnam(argv[optind]);
/* my_getpwnam is needed because it exits on failure */
uid = my_getpwnam(argv[optind]);
gid = p->pw_gid;
/* in this case PRINT_REAL is the same */
}
if (argv[optind] == NULL) {
if (flags & PRINT_REAL) {
uid = getuid();
gid = getgid();
if(flags & (JUST_GROUP | JUST_USER)) {
/* JUST_GROUP and JUST_USER are mutually exclusive */
if(flags & NAME_NOT_NUMBER) {
/* my_getpwuid and my_getgrgid exit on failure so puts cannot segfault */
puts((flags & JUST_USER) ? my_getpwuid(NULL, uid, -1 ) : my_getgrgid(NULL, gid, -1 ));
} else {
uid = geteuid();
gid = getegid();
bb_printf("%u\n",(flags & JUST_USER) ? uid : gid);
}
my_getpwuid(user, uid);
} else {
safe_strncpy(user, argv[optind], sizeof(user));
gid = my_getpwnamegid(user);
/* exit */
bb_fflush_stdout_and_exit(EXIT_SUCCESS);
}
my_getgrgid(group, gid);
pwnam=my_getpwnam(user);
grnam=my_getgrnam(group);
if (flags & (JUST_GROUP | JUST_USER)) {
char *s = group;
if (flags & JUST_USER) {
s = user;
grnam = pwnam;
}
if (flags & NAME_NOT_NUMBER) {
puts(s);
} else {
printf("%ld\n", grnam);
}
} else {
/* Print full info like GNU id */
/* my_getpwuid doesn't exit on failure here */
status=printf_full(uid, my_getpwuid(NULL, uid, 0), 'u');
putchar(' ');
/* my_getgrgid doesn't exit on failure here */
status|=printf_full(gid, my_getgrgid(NULL, gid, 0), 'g');
#ifdef CONFIG_SELINUX
printf("uid=%ld(%s) gid=%ld(%s)", pwnam, user, grnam, group);
if(is_flask_enabled_flag)
{
security_id_t mysid = getsecsid();
if ( is_selinux_enabled() ) {
security_context_t mysid;
char context[80];
int len = sizeof(context);
getcon(&mysid);
context[0] = '\0';
if(security_sid_to_context(mysid, context, &len))
strcpy(context, "unknown");
printf(" context=%s\n", context);
}
else
printf("\n");
#else
printf("uid=%ld(%s) gid=%ld(%s)\n", pwnam, user, grnam, group);
#endif
if (mysid) {
len = strlen(mysid)+1;
safe_strncpy(context, mysid, len);
freecon(mysid);
}else{
safe_strncpy(context, "unknown",8);
}
bb_printf(" context=%s", context);
}
bb_fflush_stdout_and_exit(0);
#endif
putchar('\n');
bb_fflush_stdout_and_exit(status);
}
/* END CODE */
/*
Local Variables:
c-file-style: "linux"
c-basic-offset: 4
tab-width: 4
End:
*/
+1 -1
View File
@@ -69,7 +69,7 @@ extern int install_main(int argc, char **argv)
flags = bb_getopt_ulflags(argc, argv, "cdpsg:m:o:", &gid_str, &mode_str, &uid_str); /* 'a' must be 2nd */
/* Check valid options were given */
if(flags & 0x80000000UL) {
if(flags & BB_GETOPT_ERROR) {
bb_show_usage();
}
+8 -5
View File
@@ -17,13 +17,16 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
TOPDIR:= ../../
top_srcdir=../..
top_builddir=../..
srcdir=$(top_srcdir)/coreutils/libcoreutils
LIBCOREUTILS_DIR:=./
include $(TOPDIR).config
include $(TOPDIR)Rules.mak
include Makefile.in
include $(top_builddir)/Rules.mak
include $(top_builddir)/.config
include $(srcdir)/Makefile.in
all: $(libraries-y)
-include $(TOPDIR).depend
-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
+7 -2
View File
@@ -19,8 +19,9 @@
LIBCOREUTILS_AR:=libcoreutils.a
ifndef $(LIBCOREUTILS_DIR)
LIBCOREUTILS_DIR:=$(TOPDIR)coreutils/libcoreutils/
LIBCOREUTILS_DIR:=$(top_builddir)/coreutils/libcoreutils/
endif
srcdir=$(top_srcdir)/coreutils/libcoreutils
LIBCOREUTILS_SRC:= cp_mv_stat.c getopt_mk_fifo_nod.c xgetoptfile_sort_uniq.c
@@ -29,4 +30,8 @@ LIBCOREUTILS_OBJS=$(patsubst %.c,$(LIBCOREUTILS_DIR)%.o, $(LIBCOREUTILS_SRC))
libraries-y+=$(LIBCOREUTILS_DIR)$(LIBCOREUTILS_AR)
$(LIBCOREUTILS_DIR)$(LIBCOREUTILS_AR): $(LIBCOREUTILS_OBJS)
$(AR) -ro $@ $(LIBCOREUTILS_OBJS)
$(AR) $(ARFLAGS) $@ $(LIBCOREUTILS_OBJS)
$(LIBCOREUTILS_DIR)%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+28 -25
View File
@@ -64,9 +64,7 @@ enum {
#include <sys/sysmacros.h> /* major() and minor() */
#include "busybox.h"
#ifdef CONFIG_SELINUX
#include <fs_secure.h>
#include <flask_util.h>
#include <ss.h>
#include <selinux/selinux.h>
#endif
#ifdef CONFIG_FEATURE_LS_TIMESTAMPS
@@ -182,7 +180,7 @@ struct dnode { /* the basic node */
char *fullname; /* the dir entry name */
struct stat dstat; /* the file stat info */
#ifdef CONFIG_SELINUX
security_id_t sid;
security_context_t sid;
#endif
struct dnode *next; /* point at the next node */
};
@@ -195,7 +193,7 @@ static int list_single(struct dnode *);
static unsigned int all_fmt;
#ifdef CONFIG_SELINUX
static int is_flask_enabled_flag;
static int selinux_enabled= 0;
#endif
#ifdef CONFIG_FEATURE_AUTOWIDTH
@@ -213,18 +211,19 @@ static struct dnode *my_stat(char *fullname, char *name)
struct stat dstat;
struct dnode *cur;
#ifdef CONFIG_SELINUX
security_id_t sid;
security_context_t sid=NULL;
#endif
int rc;
#ifdef CONFIG_FEATURE_LS_FOLLOWLINKS
if (all_fmt & FOLLOW_LINKS) {
#ifdef CONFIG_SELINUX
if(is_flask_enabled_flag)
rc = stat_secure(fullname, &dstat, &sid);
else
if (is_selinux_enabled()) {
rc=0; /* Set the number which means success before hand. */
rc = getfilecon(fullname,&sid);
}
#endif
rc = stat(fullname, &dstat);
rc = stat(fullname, &dstat);
if(rc)
{
bb_perror_msg("%s", fullname);
@@ -235,9 +234,12 @@ static struct dnode *my_stat(char *fullname, char *name)
#endif
{
#ifdef CONFIG_SELINUX
if(is_flask_enabled_flag)
rc = lstat_secure(fullname, &dstat, &sid);
else
if (is_selinux_enabled()) {
rc=0; /* Set the number which means success before hand. */
rc = lgetfilecon(fullname,&sid);
}
#endif
rc = lstat(fullname, &dstat);
if(rc)
@@ -683,9 +685,9 @@ static int list_single(struct dnode *dn)
break;
case LIST_ID_NAME:
#ifdef CONFIG_FEATURE_LS_USERNAME
my_getpwuid(scratch, dn->dstat.st_uid);
my_getpwuid(scratch, dn->dstat.st_uid, sizeof(scratch));
printf("%-8.8s ", scratch);
my_getgrgid(scratch, dn->dstat.st_gid);
my_getgrgid(scratch, dn->dstat.st_gid, sizeof(scratch));
printf("%-8.8s", scratch);
column += 17;
break;
@@ -736,12 +738,16 @@ static int list_single(struct dnode *dn)
#ifdef CONFIG_SELINUX
case LIST_CONTEXT:
{
char context[64];
int len = sizeof(context);
if(security_sid_to_context(dn->sid, context, &len))
{
strcpy(context, "unknown");
len = 7;
char context[80];
int len;
if (dn->sid) {
/* I assume sid initilized with NULL */
len = strlen(dn->sid)+1;
safe_strncpy(context, dn->sid, len);
freecon(dn->sid);
}else {
safe_strncpy(context, "unknown",8);
}
printf("%-32s ", context);
column += MAX(33, len);
@@ -874,7 +880,7 @@ static const char ls_options[]="Cadil1gnsxAk" \
LS_STR_SELINUX \
LS_STR_AUTOWIDTH;
#define LIST_MASK_TRIGGER LIST_SHORT
#define LIST_MASK_TRIGGER 0
#define STYLE_MASK_TRIGGER STYLE_MASK
#define SORT_MASK_TRIGGER SORT_MASK
#define DISP_MASK_TRIGGER DISP_ROWS
@@ -963,9 +969,6 @@ extern int ls_main(int argc, char **argv)
char *terminal_width_str = NULL;
#endif
#ifdef CONFIG_SELINUX
is_flask_enabled_flag = is_flask_enabled();
#endif
all_fmt = LIST_SHORT | DISP_NORMAL | STYLE_AUTO
#ifdef CONFIG_FEATURE_LS_TIMESTAMPS
+17 -30
View File
@@ -42,41 +42,28 @@ static unsigned char *hash_bin_to_hex(unsigned char *hash_value,
max = (hash_length * 2) + 2;
hex_value = xmalloc(max);
for (x = len = 0; x < hash_length; x++) {
len += snprintf(hex_value + len, max - len, "%02x", hash_value[x]);
len += snprintf((char*)(hex_value + len), max - len, "%02x", hash_value[x]);
}
return (hex_value);
}
static uint8_t *hash_file(const char *filename, uint8_t hash_algo)
{
uint8_t *hash_value_bin;
uint8_t *hash_value = NULL;
uint8_t hash_length;
int src_fd;
if (strcmp(filename, "-") == 0) {
src_fd = STDIN_FILENO;
} else {
src_fd = open(filename, O_RDONLY);
}
if (hash_algo == HASH_MD5) {
hash_length = 16;
} else {
hash_length = 20;
}
hash_value_bin = xmalloc(hash_length);
if ((src_fd != -1) && (hash_fd(src_fd, -1, hash_algo, hash_value_bin) != -2)) {
hash_value = hash_bin_to_hex(hash_value_bin, hash_length);
} else {
int src_fd = strcmp(filename, "-") == 0 ? STDIN_FILENO :
open(filename, O_RDONLY);
if (src_fd == -1) {
bb_perror_msg("%s", filename);
return NULL;
} else {
uint8_t *hash_value;
RESERVE_CONFIG_UBUFFER(hash_value_bin, 20);
hash_value = hash_fd(src_fd, -1, hash_algo, hash_value_bin) != -2 ?
hash_bin_to_hex(hash_value_bin, hash_algo == HASH_MD5 ? 16 : 20) :
NULL;
RELEASE_CONFIG_BUFFER(hash_value_bin);
close(src_fd);
return hash_value;
}
close(src_fd);
return(hash_value);
}
/* This could become a common function for md5 as well, by using md5_stream */
@@ -111,7 +98,7 @@ extern int hash_files(int argc, char **argv, const uint8_t hash_algo)
FILE *pre_computed_stream;
int count_total = 0;
int count_failed = 0;
unsigned char *file_ptr = argv[optind];
char *file_ptr = argv[optind];
char *line;
if (optind + 1 != argc) {
@@ -142,7 +129,7 @@ extern int hash_files(int argc, char **argv, const uint8_t hash_algo)
hash_value = hash_file(filename_ptr, hash_algo);
if (hash_value && (strcmp(hash_value, line) == 0)) {
if (hash_value && (strcmp((char*)hash_value, line) == 0)) {
if (!(flags & FLAG_SILENT))
printf("%s: OK\n", filename_ptr);
} else {
@@ -175,7 +162,7 @@ extern int hash_files(int argc, char **argv, const uint8_t hash_algo)
hash_value = xmalloc(hash_length);
while (optind < argc) {
unsigned char *file_ptr = argv[optind++];
char *file_ptr = argv[optind++];
hash_value = hash_file(file_ptr, hash_algo);
if (hash_value == NULL) {
+3 -3
View File
@@ -99,10 +99,10 @@ DO_MOVE:
struct stat source_stat;
int source_exists;
if (errno != EXDEV) {
if (errno != EXDEV ||
(source_exists = cp_mv_stat(*argv, &source_stat)) < 1) {
bb_perror_msg("unable to rename `%s'", *argv);
}
else if ((source_exists = cp_mv_stat(*argv, &source_stat)) >= 0) {
} else {
if (dest_exists) {
if (dest_exists == 3) {
if (source_exists != 3) {
+21 -133
View File
@@ -58,68 +58,19 @@
#include <assert.h>
#include "busybox.h"
#ifndef S_IFMT
static const int S_IFMT = 0170000;
#endif
#if !defined(S_ISBLK) && defined(S_IFBLK)
# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
#endif
#if !defined(S_ISCHR) && defined(S_IFCHR)
# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#endif
#if !defined(S_ISDIR) && defined(S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
#if !defined(S_ISREG) && defined(S_IFREG)
# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#if !defined(S_ISFIFO) && defined(S_IFIFO)
# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
#endif
#if !defined(S_ISLNK) && defined(S_IFLNK)
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
#endif
#if !defined(S_ISSOCK) && defined(S_IFSOCK)
# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
#endif
#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
#endif
#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
#endif
#define IN_CTYPE_DOMAIN(c) 1
#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c))
#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
#define ISDIGIT(c) (((unsigned char) (c)) - '0' <= 9)
#define isodigit(c) ((c) >= '0' && (c) <= '7')
#define hextobin(c) ((c)>='a'&&(c)<='f' ? (c)-'a'+10 : (c)>='A'&&(c)<='F' ? (c)-'A'+10 : (c)-'0')
#define octtobin(c) ((c) - '0')
static double xstrtod __P((char *s));
static int print_esc __P((char *escstart));
static int print_formatted __P((char *format, int argc, char **argv));
static long xstrtol __P((char *s));
static unsigned long xstrtoul __P((char *s));
static void print_esc_string __P((char *str));
static int print_formatted __P((char *format, int argc, char **argv));
static void print_direc __P( (char *start, size_t length,
int field_width, int precision, char *argument));
static void print_esc_char __P((int c));
static void print_esc_string __P((char *str));
/* The value to return to the calling program. */
static int exit_status;
int printf_main(int argc, char **argv)
{
char *format;
int args_used;
exit_status = 0;
if (argc <= 1 || **(argv + 1) == '-') {
bb_show_usage();
}
@@ -140,7 +91,7 @@ int printf_main(int argc, char **argv)
fprintf(stderr, "excess args ignored");
*/
return(exit_status);
return EXIT_SUCCESS;
}
/* Print the text in FORMAT, using ARGV (with ARGC elements) for
@@ -188,7 +139,7 @@ static int print_formatted(char *format, int argc, char **argv)
} else
field_width = 0;
} else
while (ISDIGIT(*f)) {
while (isdigit(*f)) {
++f;
++direc_length;
}
@@ -205,7 +156,7 @@ static int print_formatted(char *format, int argc, char **argv)
} else
precision = 0;
} else
while (ISDIGIT(*f)) {
while (isdigit(*f)) {
++f;
++direc_length;
}
@@ -230,7 +181,10 @@ static int print_formatted(char *format, int argc, char **argv)
break;
case '\\':
f += print_esc(f);
if (*++f == 'c')
exit(0);
putchar(bb_process_escape_sequence((const char **)&f));
f--;
break;
default:
@@ -241,84 +195,6 @@ static int print_formatted(char *format, int argc, char **argv)
return save_argc - argc;
}
/* Print a \ escape sequence starting at ESCSTART.
Return the number of characters in the escape sequence
besides the backslash. */
static int print_esc(char *escstart)
{
register char *p = escstart + 1;
int esc_value = 0; /* Value of \nnn escape. */
int esc_length; /* Length of \nnn escape. */
/* \0ooo and \xhhh escapes have maximum length of 3 chars. */
if (*p == 'x') {
for (esc_length = 0, ++p;
esc_length < 3 && ISXDIGIT(*p); ++esc_length, ++p)
esc_value = esc_value * 16 + hextobin(*p);
/* if (esc_length == 0)
fprintf(stderr, "missing hex in esc");
*/
putchar(esc_value);
} else if (*p == '0') {
for (esc_length = 0, ++p;
esc_length < 3 && isodigit(*p); ++esc_length, ++p)
esc_value = esc_value * 8 + octtobin(*p);
putchar(esc_value);
} else if (strchr("\"\\abcfnrtv", *p))
print_esc_char(*p++);
/* else
fprintf(stderr, "\\%c: invalid esc", *p);
*/
return p - escstart - 1;
}
/* Output a single-character \ escape. */
static void print_esc_char(int c)
{
switch (c) {
case 'a': /* Alert. */
putchar(7);
break;
case 'b': /* Backspace. */
putchar(8);
break;
case 'c': /* Cancel the rest of the output. */
exit(0);
break;
case 'f': /* Form feed. */
putchar(12);
break;
case 'n': /* New line. */
putchar(10);
break;
case 'r': /* Carriage return. */
putchar(13);
break;
case 't': /* Horizontal tab. */
putchar(9);
break;
case 'v': /* Vertical tab. */
putchar(11);
break;
default:
putchar(c);
break;
}
}
/* Print string STR, evaluating \ escapes. */
static void print_esc_string(char *str)
{
for (; *str; str++)
if (*str == '\\')
str += print_esc(str);
else
putchar(*str);
}
static void
print_direc(char *start, size_t length, int field_width, int precision,
char *argument)
@@ -426,3 +302,15 @@ static double xstrtod(char *arg)
return result;
}
static void print_esc_string(char *str)
{
for (; *str; str++) {
if (*str == '\\') {
str++;
putchar(bb_process_escape_sequence((const char **)&str));
} else {
putchar(*str);
}
}
}
+1
View File
@@ -980,6 +980,7 @@ set_window_size(int rows, int cols, int fd)
if ((ioctl(fd, TIOCSWINSZ, (char *) &win) != 0)
|| (ioctl(fd, TIOCSSIZE, (char *) &ttysz) != 0)) {
perror_on_device("%s");
}
return;
}
# endif
+7
View File
@@ -79,7 +79,13 @@ static void tail_xbb_full_write(const char *buf, size_t len)
static ssize_t tail_read(int fd, char *buf, size_t count)
{
ssize_t r;
off_t current,end;
struct stat sbuf;
end = current = lseek(fd, 0, SEEK_CUR);
if (!fstat(fd, &sbuf))
end = sbuf.st_size;
lseek(fd, end < current ? 0 : current, SEEK_SET);
if ((r = safe_read(fd, buf, count)) < 0) {
bb_perror_msg("read");
status = EXIT_FAILURE;
@@ -228,6 +234,7 @@ int tail_main(int argc, char **argv)
buf = tailbuf;
taillen = 0;
seen = 1;
newline = 0;
while ((nread = tail_read(fds[i], buf, tailbufsize-taillen)) > 0) {
if (from_top) {
+30 -16
View File
@@ -155,19 +155,25 @@ static const struct t_op {
0, 0, 0}
};
#ifdef CONFIG_FEATURE_TEST_64
typedef int64_t arith_t;
#else
typedef int arith_t;
#endif
static char **t_wp;
static struct t_op const *t_wp_op;
static gid_t *group_array = NULL;
static int ngroups;
static enum token t_lex(char *s);
static int oexpr(enum token n);
static int aexpr(enum token n);
static int nexpr(enum token n);
static arith_t oexpr(enum token n);
static arith_t aexpr(enum token n);
static arith_t nexpr(enum token n);
static int binop(void);
static int primary(enum token n);
static arith_t primary(enum token n);
static int filstat(char *nm, enum token mode);
static int getn(const char *s);
static arith_t getn(const char *s);
static int newerf(const char *f1, const char *f2);
static int olderf(const char *f1, const char *f2);
static int equalf(const char *f1, const char *f2);
@@ -232,9 +238,9 @@ static void syntax(const char *op, const char *msg)
}
}
static int oexpr(enum token n)
static arith_t oexpr(enum token n)
{
int res;
arith_t res;
res = aexpr(n);
if (t_lex(*++t_wp) == BOR) {
@@ -244,9 +250,9 @@ static int oexpr(enum token n)
return res;
}
static int aexpr(enum token n)
static arith_t aexpr(enum token n)
{
int res;
arith_t res;
res = nexpr(n);
if (t_lex(*++t_wp) == BAND)
@@ -255,16 +261,16 @@ static int aexpr(enum token n)
return res;
}
static int nexpr(enum token n)
static arith_t nexpr(enum token n)
{
if (n == UNOT)
return !nexpr(t_lex(*++t_wp));
return primary(n);
}
static int primary(enum token n)
static arith_t primary(enum token n)
{
int res;
arith_t res;
if (n == EOI) {
syntax(NULL, "argument expected");
@@ -298,7 +304,7 @@ static int primary(enum token n)
return strlen(*t_wp) > 0;
}
static int binop()
static int binop(void)
{
const char *opnd1, *opnd2;
struct t_op const *op;
@@ -441,13 +447,21 @@ static enum token t_lex(char *s)
}
/* atoi with error detection */
static int getn(const char *s)
static arith_t getn(const char *s)
{
char *p;
#ifdef CONFIG_FEATURE_TEST_64
long long r;
#else
long r;
#endif
errno = 0;
#ifdef CONFIG_FEATURE_TEST_64
r = strtoll(s, &p, 10);
#else
r = strtol(s, &p, 10);
#endif
if (errno != 0)
bb_error_msg_and_die("%s: out of range", s);
@@ -456,7 +470,7 @@ static int getn(const char *s)
if (*(bb_skip_whitespace(p)))
bb_error_msg_and_die("%s: bad number", s);
return (int) r;
return r;
}
static int newerf(const char *f1, const char *f2)
@@ -517,7 +531,7 @@ static int test_eaccess(char *path, int mode)
return (-1);
}
static void initialize_group_array()
static void initialize_group_array(void)
{
ngroups = getgroups(0, NULL);
group_array = xrealloc(group_array, ngroups * sizeof(gid_t));
+1 -1
View File
@@ -36,7 +36,7 @@ static const char uniq_opts[] = "f:s:cdu\0\7\3\5\1\2\4";
int uniq_main(int argc, char **argv)
{
FILE *in, *out;
/* Note: Ignore the warning about dups and e0 possibly being uninitialized.
/* Note: Ignore the warning about dups and e0 being used uninitialized.
* They will be initialized on the fist pass of the loop (since s0 is NULL). */
unsigned long dups, skip_fields, skip_chars, i;
const char *s0, *e0, *s1, *e1, *input_filename;
+5 -7
View File
@@ -82,7 +82,7 @@ extern int watch_main(int argc, char **argv)
header[len] = 0;
/* thanks to lye, who showed me how to redirect stdin/stdout */
old_stdout = dup(1);
old_stdout = dup(STDOUT_FILENO);
while (1) {
time(&t);
@@ -98,13 +98,11 @@ extern int watch_main(int argc, char **argv)
sleep(period);
} else if (0 == pid) {
//child
close(1);
dup(old_stdout);
if (execvp(*watched_argv, watched_argv)) {
bb_error_msg_and_die("Couldn't run command\n");
}
dup2(old_stdout, STDOUT_FILENO);
execvp(*watched_argv, watched_argv);
bb_perror_msg_and_die(*watched_argv);
} else {
bb_error_msg_and_die("Couldn't vfork\n");
bb_perror_msg_and_die("vfork");
}
}
}
+1 -1
View File
@@ -74,7 +74,7 @@ extern int who_main(int argc, char **argv)
} else
printf("%-8s ", "?");
printf("%-12.12s %s\n", ctime(&(ut->ut_tv.tv_sec)) + 4, ut->ut_host);
printf("%-12.12s %s\n", ctime((time_t*)&(ut->ut_tv.tv_sec)) + 4, ut->ut_host);
}
}
endutent();
+3 -9
View File
@@ -29,16 +29,10 @@
extern int whoami_main(int argc, char **argv)
{
char user[9];
uid_t uid;
if (argc > 1)
bb_show_usage();
uid = geteuid();
if (my_getpwuid(user, uid)) {
puts(user);
bb_fflush_stdout_and_exit(EXIT_SUCCESS);
}
bb_error_msg_and_die("cannot find username for UID %u", (unsigned) uid);
puts(my_getpwuid(NULL, geteuid(), -1));
/* exits on error */
bb_fflush_stdout_and_exit(EXIT_SUCCESS);
}
+7 -5
View File
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
TOPDIR:= ../
top_srcdir=..
top_builddir=..
srcdir=$(top_srcdir)/debianutils
DEBIANUTILS_DIR:=./
include $(TOPDIR).config
include $(TOPDIR)Rules.mak
include Makefile.in
include $(top_builddir)/Rules.mak
include $(top_builddir)/.config
include $(srcdir)/Makefile.in
all: $(libraries-y)
-include $(TOPDIR).depend
-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
+6 -3
View File
@@ -19,9 +19,9 @@
DEBIANUTILS_AR:=debianutils.a
ifndef $(DEBIANUTILS_DIR)
DEBIANUTILS_DIR:=$(TOPDIR)debianutils/
DEBIANUTILS_DIR:=$(top_builddir)/debianutils/
endif
srcdir=$(top_srcdir)/debianutils
DEBIANUTILS-y:=
DEBIANUTILS-$(CONFIG_MKTEMP) += mktemp.o
@@ -34,5 +34,8 @@ DEBIANUTILS-$(CONFIG_WHICH) += which.o
libraries-y+=$(DEBIANUTILS_DIR)$(DEBIANUTILS_AR)
$(DEBIANUTILS_DIR)$(DEBIANUTILS_AR): $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y))
$(AR) -ro $@ $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y))
$(AR) $(ARFLAGS) $@ $(patsubst %,$(DEBIANUTILS_DIR)%, $(DEBIANUTILS-y))
$(DEBIANUTILS_DIR)%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+4 -1
View File
@@ -238,10 +238,13 @@ start_stop_daemon_main(int argc, char **argv)
&startas, &cmdname, &signame, &userspec, &execname, &pidfile);
/* Check one and only one context option was given */
if ((opt & 0x80000000UL) || (opt & (SSD_CTX_STOP | SSD_CTX_START)) == 0) {
if ((opt & BB_GETOPT_ERROR) || (opt & (SSD_CTX_STOP | SSD_CTX_START)) == 0) {
bb_show_usage();
}
if (opt & SSD_OPT_QUIET)
quiet = 1;
if (signame) {
signal_nr = bb_xgetlarg(signame, 10, 0, NSIG);
}
-8
View File
@@ -1,8 +0,0 @@
BusyBox.txt
BusyBox.1
BusyBox.html
busybox.txt
busybox.ps
busybox.pdf
busybox
busybox.pod
-2
View File
@@ -1,2 +0,0 @@
BusyBox.html
busybox.tar.gz
-63
View File
@@ -1,63 +0,0 @@
<!--#include file="header.html" -->
<!-- Begin Introduction section -->
<h3>BusyBox: The Swiss Army Knife of Embedded Linux</h3>
BusyBox combines tiny versions of many common UNIX utilities into a single
small executable. It provides replacements for most of the utilities you
usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox
generally have fewer options than their full-featured GNU cousins; however,
the options that are included provide the expected functionality and behave
very much like their GNU counterparts. BusyBox provides a fairly complete
environment for any small or embedded system.
<p>
BusyBox has been written with size-optimization and limited resources in
mind. It is also extremely modular so you can easily include or exclude
commands (or features) at compile time. This makes it easy to customize
your embedded systems. To create a working system, just add some device
nodes in /dev, a few configuration files in /etc, and a Linux kernel.
<p>
BusyBox is maintained by <a href=
"http://codepoet.org/andersen/erik/erik.html">Erik Andersen</a>, and
licensed under the
<a href= "http://www.gnu.org/copyleft/gpl.html">GNU GENERAL PUBLIC LICENSE</a>
<p>
<p>
<h3>Sponsors</h3>
Please visit our sponsors and thank them for their
support! They have provided money for equipment and
bandwidth. Next time you need help with a project,
consider these fine companies!
<ul>
<li><a href="http://www.penguru.net">Penguru Consulting</a><br>
Custom development for embedded Linux systems and multimedia platforms
</li>
<li><a href="http://opensource.se/">opensource.se</a><br>
Embedded open source consulting in Europe.
</li>
<li><a href="http://www.codepoet-consulting.com">Codepoet Consulting</a><br>
Custom Linux, embedded Linux, BusyBox, and uClibc
development.
</li>
</ul>
If you wish to be a sponsor, or if you have already contributed and would like
your name added here, email <a href= "mailto:andersen@codepoet.org">Erik</a>.
<!--#include file="footer.html" -->
-404
View File
@@ -1,404 +0,0 @@
%!PS-Adobe-2.0
%%Title: busybox-growth.ps
%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 347
%%CreationDate: Tue Apr 10 14:03:36 2001
%%DocumentFonts: (atend)
%%BoundingBox: 50 40 554 770
%%Orientation: Landscape
%%Pages: (atend)
%%EndComments
/gnudict 120 dict def
gnudict begin
/Color true def
/Solid true def
/gnulinewidth 5.000 def
/userlinewidth gnulinewidth def
/vshift -46 def
/dl {10 mul} def
/hpt_ 31.5 def
/vpt_ 31.5 def
/hpt hpt_ def
/vpt vpt_ def
/M {moveto} bind def
/L {lineto} bind def
/R {rmoveto} bind def
/V {rlineto} bind def
/vpt2 vpt 2 mul def
/hpt2 hpt 2 mul def
/Lshow { currentpoint stroke M
0 vshift R show } def
/Rshow { currentpoint stroke M
dup stringwidth pop neg vshift R show } def
/Cshow { currentpoint stroke M
dup stringwidth pop -2 div vshift R show } def
/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
/hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def
/DL { Color {setrgbcolor Solid {pop []} if 0 setdash }
{pop pop pop Solid {pop []} if 0 setdash} ifelse } def
/BL { stroke gnulinewidth 2 mul setlinewidth } def
/AL { stroke gnulinewidth 2 div setlinewidth } def
/UL { gnulinewidth mul /userlinewidth exch def } def
/PL { stroke userlinewidth setlinewidth } def
/LTb { BL [] 0 0 0 DL } def
/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def
/LT0 { PL [] 1 0 0 DL } def
/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def
/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def
/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def
/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def
/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def
/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def
/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def
/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def
/Pnt { stroke [] 0 setdash
gsave 1 setlinecap M 0 0 V stroke grestore } def
/Dia { stroke [] 0 setdash 2 copy vpt add M
hpt neg vpt neg V hpt vpt neg V
hpt vpt V hpt neg vpt V closepath stroke
Pnt } def
/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V
currentpoint stroke M
hpt neg vpt neg R hpt2 0 V stroke
} def
/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
0 vpt2 neg V hpt2 0 V 0 vpt2 V
hpt2 neg 0 V closepath stroke
Pnt } def
/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M
hpt2 vpt2 neg V currentpoint stroke M
hpt2 neg 0 R hpt2 vpt2 V stroke } def
/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M
hpt neg vpt -1.62 mul V
hpt 2 mul 0 V
hpt neg vpt 1.62 mul V closepath stroke
Pnt } def
/Star { 2 copy Pls Crs } def
/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M
0 vpt2 neg V hpt2 0 V 0 vpt2 V
hpt2 neg 0 V closepath fill } def
/TriUF { stroke [] 0 setdash vpt 1.12 mul add M
hpt neg vpt -1.62 mul V
hpt 2 mul 0 V
hpt neg vpt 1.62 mul V closepath fill } def
/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
hpt neg vpt 1.62 mul V
hpt 2 mul 0 V
hpt neg vpt -1.62 mul V closepath stroke
Pnt } def
/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M
hpt neg vpt 1.62 mul V
hpt 2 mul 0 V
hpt neg vpt -1.62 mul V closepath fill} def
/DiaF { stroke [] 0 setdash vpt add M
hpt neg vpt neg V hpt vpt neg V
hpt vpt V hpt neg vpt V closepath fill } def
/Pent { stroke [] 0 setdash 2 copy gsave
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
closepath stroke grestore Pnt } def
/PentF { stroke [] 0 setdash gsave
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
closepath fill grestore } def
/Circle { stroke [] 0 setdash 2 copy
hpt 0 360 arc stroke Pnt } def
/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def
/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def
/C1 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 90 arc closepath fill
vpt 0 360 arc closepath } bind def
/C2 { BL [] 0 setdash 2 copy moveto
2 copy vpt 90 180 arc closepath fill
vpt 0 360 arc closepath } bind def
/C3 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 180 arc closepath fill
vpt 0 360 arc closepath } bind def
/C4 { BL [] 0 setdash 2 copy moveto
2 copy vpt 180 270 arc closepath fill
vpt 0 360 arc closepath } bind def
/C5 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 90 arc
2 copy moveto
2 copy vpt 180 270 arc closepath fill
vpt 0 360 arc } bind def
/C6 { BL [] 0 setdash 2 copy moveto
2 copy vpt 90 270 arc closepath fill
vpt 0 360 arc closepath } bind def
/C7 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 270 arc closepath fill
vpt 0 360 arc closepath } bind def
/C8 { BL [] 0 setdash 2 copy moveto
2 copy vpt 270 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/C9 { BL [] 0 setdash 2 copy moveto
2 copy vpt 270 450 arc closepath fill
vpt 0 360 arc closepath } bind def
/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
2 copy moveto
2 copy vpt 90 180 arc closepath fill
vpt 0 360 arc closepath } bind def
/C11 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 180 arc closepath fill
2 copy moveto
2 copy vpt 270 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/C12 { BL [] 0 setdash 2 copy moveto
2 copy vpt 180 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/C13 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 90 arc closepath fill
2 copy moveto
2 copy vpt 180 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/C14 { BL [] 0 setdash 2 copy moveto
2 copy vpt 90 360 arc closepath fill
vpt 0 360 arc } bind def
/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
neg 0 rlineto closepath } bind def
/Square { dup Rec } bind def
/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def
/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def
/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def
/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def
/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill
exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def
/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
2 copy vpt Square fill
Bsquare } bind def
/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def
/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def
/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
Bsquare } bind def
/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
Bsquare } bind def
/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def
/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
2 copy vpt Square fill Bsquare } bind def
/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def
/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def
/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def
/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def
/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def
/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def
/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def
/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def
/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def
/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def
/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def
/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def
/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def
/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def
/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def
/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def
/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def
/DiaE { stroke [] 0 setdash vpt add M
hpt neg vpt neg V hpt vpt neg V
hpt vpt V hpt neg vpt V closepath stroke } def
/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M
0 vpt2 neg V hpt2 0 V 0 vpt2 V
hpt2 neg 0 V closepath stroke } def
/TriUE { stroke [] 0 setdash vpt 1.12 mul add M
hpt neg vpt -1.62 mul V
hpt 2 mul 0 V
hpt neg vpt 1.62 mul V closepath stroke } def
/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M
hpt neg vpt 1.62 mul V
hpt 2 mul 0 V
hpt neg vpt -1.62 mul V closepath stroke } def
/PentE { stroke [] 0 setdash gsave
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
closepath stroke grestore } def
/CircE { stroke [] 0 setdash
hpt 0 360 arc stroke } def
/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def
/DiaW { stroke [] 0 setdash vpt add M
hpt neg vpt neg V hpt vpt neg V
hpt vpt V hpt neg vpt V Opaque stroke } def
/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M
0 vpt2 neg V hpt2 0 V 0 vpt2 V
hpt2 neg 0 V Opaque stroke } def
/TriUW { stroke [] 0 setdash vpt 1.12 mul add M
hpt neg vpt -1.62 mul V
hpt 2 mul 0 V
hpt neg vpt 1.62 mul V Opaque stroke } def
/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M
hpt neg vpt 1.62 mul V
hpt 2 mul 0 V
hpt neg vpt -1.62 mul V Opaque stroke } def
/PentW { stroke [] 0 setdash gsave
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
Opaque stroke grestore } def
/CircW { stroke [] 0 setdash
hpt 0 360 arc Opaque stroke } def
/BoxFill { gsave Rec 1 setgray fill grestore } def
end
%%EndProlog
%%Page: 1 1
gnudict begin
gsave
50 50 translate
0.100 0.100 scale
90 rotate
0 -5040 translate
0 setgray
newpath
(Helvetica) findfont 140 scalefont setfont
1.000 UL
LTb
560 420 M
63 0 V
6409 0 R
-63 0 V
476 420 M
(0) Rshow
560 1056 M
63 0 V
6409 0 R
-63 0 V
-6493 0 R
(100) Rshow
560 1692 M
63 0 V
6409 0 R
-63 0 V
-6493 0 R
(200) Rshow
560 2328 M
63 0 V
6409 0 R
-63 0 V
-6493 0 R
(300) Rshow
560 2964 M
63 0 V
6409 0 R
-63 0 V
-6493 0 R
(400) Rshow
560 3600 M
63 0 V
6409 0 R
-63 0 V
-6493 0 R
(500) Rshow
560 4236 M
63 0 V
6409 0 R
-63 0 V
-6493 0 R
(600) Rshow
560 4872 M
63 0 V
6409 0 R
-63 0 V
-6493 0 R
(700) Rshow
1531 420 M
0 63 V
0 4389 R
0 -63 V
0 -4529 R
(400) Cshow
2825 420 M
0 63 V
0 4389 R
0 -63 V
0 -4529 R
(600) Cshow
4120 420 M
0 63 V
0 4389 R
0 -63 V
0 -4529 R
(800) Cshow
5414 420 M
0 63 V
0 4389 R
0 -63 V
0 -4529 R
(1000) Cshow
6708 420 M
0 63 V
0 4389 R
0 -63 V
0 -4529 R
(1200) Cshow
1.000 UL
LTb
560 420 M
6472 0 V
0 4452 V
-6472 0 V
560 420 L
0 2646 M
currentpoint gsave translate 90 rotate 0 0 M
(tar.gz size \(Kb\)) Cshow
grestore
3796 140 M
(time \(days since Jan 1, 1998\)) Cshow
1.000 UL
LT0
696 420 M
0 593 V
1255 0 V
0 15 V
214 0 V
0 6 V
958 0 V
0 1 V
-84 0 V
0 37 V
168 0 V
0 262 V
13 0 V
0 56 V
91 0 V
0 33 V
6 0 V
0 1 V
19 0 V
0 11 V
20 0 V
0 13 V
32 0 V
0 104 V
52 0 V
0 27 V
65 0 V
0 15 V
39 0 V
0 126 V
174 0 V
0 103 V
52 0 V
0 49 V
175 0 V
0 56 V
433 0 V
0 661 V
415 0 V
0 857 V
123 0 V
0 -291 V
498 0 V
0 208 V
505 0 V
0 66 V
291 0 V
0 115 V
311 0 V
0 449 V
162 0 V
0 309 V
stroke
grestore
end
showpage
%%Trailer
%%DocumentFonts: Helvetica
%%Pages: 1
-29
View File
@@ -1,29 +0,0 @@
The code and graphics on this website (and it's mirror sites, if any) are
Copyright (c) 1999-2004 by Erik Andersen. All rights reserved.
Documents on this Web site including their graphical elements, design, and
layout are protected by trade dress and other laws and MAY BE COPIED OR
IMITATED IN WHOLE OR IN PART. THIS WEBSITE IS LICENSED FREE OF CHARGE, THERE
IS NO WARRANTY FOR THE WEBSITE TO THE EXTENT PERMITTED BY APPLICABLE LAW.
SHOULD THIS WEBSITE PROVE DEFECTIVE, YOU MAY ASSUME THAT SOMEONE MIGHT GET
AROUND TO SERVICING, REPAIRING OR CORRECTING IT SOMETIME WHEN THEY HAVE NOTHING
BETTER TO DO. REGARDLESS, YOU GET TO KEEP BOTH PIECES.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THIS
WEBSITE AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THIS WEBSITE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
LOSS OF HAIR, LOSS OF LIFE, LOSS OF MEMORY, LOSS OF YOUR CARKEYS, MISPLACEMENT
OF YOUR PAYCHECK, OR COMMANDER DATA BEING RENDERED UNABLE TO ASSIST THE
STARFLEET OFFICERS ABORD THE STARSHIP ENTERPRISE TO RECALIBRATE THE MAIN
DEFLECTOR ARRAY, LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
WEBSITE TO OPERATE WITH YOUR WEBBROWSER), EVEN IF SUCH HOLDER OR OTHER PARTY
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
You have been warned.
You can contact the webmaster at <andersen@codepoet.org> if you have some sort
of problem with this.
-57
View File
@@ -1,57 +0,0 @@
<!--#include file="header.html" -->
<h3>Anonymous CVS</h3>
We allow anonymous (read-only) CVS access to everyone. The first command you
need to run for anonymous CVS access is:
<pre>
cvs -d:pserver:anonymous@busybox.net:/var/cvs login</pre>
<p>
CVS will prompt you for a password. Just press the Enter key (there is no
password for anonymous access). This step only needs to be done once, the first
time you attempt to access CVS.
<p>
Once the login is complete, you can then check the list of available
CVS modules by running the following command (all on one line):
<pre>
cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co -c </pre>
<p>
If you wish, you can then check out a local copy of any of the
available modules. The following is an example of how to grab
a copy of busybox and tinylogin:
<pre>
cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co -P busybox tinylogin</pre>
This will create a directory called <b>busybox</b> and a directory called
<b>tinylogin</b> in the current directory. These directories contain the
latest and greatest source code for busybox and tinylogin.
<p>
If you are not already familiar with using CVS, I recommend you visit
this quick <a href="/cvs_howto.html">Introduction to CVS</a>.
<p>
I usually create a ~/.cvsrc file with the following things in it, and I
recommend you should use the same:
<pre>
-z3
update -dP
rdiff -u
diff -ubBwpN
checkout -P</pre>
<p>
Once you've checked out a copy of the source tree, you can update your
source tree at any time so it is in sync with the latest and greatest by
running the command:
<pre>
cvs update</pre>
Because you've only been granted anonymous access to the tree, you won't be
able to commit any changes. Changes can be submitted for inclusion by posting
them to the appropriate mailing list. For those that are actively contributing
<a href="cvs_write.html">CVS write access</a> can be made available.
<!--#include file="footer.html" -->
-44
View File
@@ -1,44 +0,0 @@
<!--#include file="header.html" -->
<h3>How to use CVS</h3>
If you want to know all the gory details, you will want to visit
<a href="http://www.cvshome.org/">the CVS main web page</a>.<p>
For the impatient, the following is probably about all you need to know:
<p>
<dl>
<dt><pre>cvs checkout -c</pre>
<dd>Will list the modules available for checkout
<dt><pre>cvs checkout &lt module name &gt</pre>
<dd>Will checkout the named module
<dt><pre>cvs co &lt module name &gt</pre>
<dd>Same thing
<dt><pre>cvs update</pre>
<dd>Updates your local archive so it is in sync with the repository
-- your local updates are left intact. Tries to merge upstream updates
into your local updates. You will see the following tags when it is
updating your local repository: C means conflict, U means update,
P means patched, and M means modified.
<dt><pre>cvs up</pre>
<dd>Same thing
<dt><pre>cvs update &lt file name &gt</pre>
<dd>Same thing but for just the named file(s)/directory(s).
<dt><pre>cvs commit</pre>
<dd>Will check in all your work.
<dt><pre>cvs add &lt file name &gt</pre>
<dd>Adds the named file/directory into CVS
<dt><pre>cvs remove &lt file name &gt</pre>
<dd>Removes the named file/directory from the upstream repository.
<dt><pre>cvs rm &lt file name &gt</pre>
<dd>Same thing
<dt><pre>cvs log &lt file name &gt</pre>
</dl>
<!--#include file="footer.html" -->
-32
View File
@@ -1,32 +0,0 @@
<!--#include file="header.html" -->
<h3>CVS Read/Write Access</h3>
If you want to be able to commit things to CVS, first contribute some
stuff to show you are serious. Then, very nicely ask
<a href="mailto:andersen@codepoet.org">Erik Andersen</a> if he will set you up with
an account. To access CVS, you will want to add the following to set up your environment:
<pre>
$ export CVS_RSH=/usr/bin/ssh
$ export CVSROOT='username@cvs.busybox.net:/var/cvs'</pre>
<br>
It goes without saying you must change <em>username</em> to your own
username...
<p>
To obtain commit access, you will need to demonstrate you are
serious by submitting a few good patches first. Then, you will need to
select a user-name to use when committing stuff, and finally, you will
need to send me the username you have selected, an ssh key, and the email
address where you prefer email to be sent (I will forward any email sent
to you, but not store it).
<p>
Note that if you would prefer to keep your communications with me
private, you can encrypt your email using my
<a href="http://www.codepoet.org/~andersen/erik/gpg.asc">public key</a>.
<!--#include file="footer.html" -->
-27
View File
@@ -1,27 +0,0 @@
<!--#include file="header.html" -->
<h3>Documentation</h3>
Current documentation for BusyBox includes:
<ul>
<li><a href=
"downloads/BusyBox.html">BusyBox.html</a>. This is a
list of the all the available commands in BusyBox
with complete usage information and examples of how
to use each app. I have spent a <em>lot</em> of time
updating these docs and trying to make them fairly
comprehensive. If you find any errors (factual,
grammatical, whatever) please let me know.</li>
<li><a href="downloads/README">README</a>. This is
the README file included in the busybox source
release.</li>
<li>If you need more help, the BusyBox <a href=
"lists/busybox/">mailing list</a> is a good place to
start.</li>
</ul>
<!--#include file="footer.html" -->
-38
View File
@@ -1,38 +0,0 @@
<!--#include file="header.html" -->
<h3>Download</h3>
Source for the latest release can always be
downloaded from <a href="downloads">http://www.busybox.net/downloads</a>.
<p>
You can also obtain <a href= "downloads/snapshots/">Daily Snapshots</a> of
the latest stable, and the latest development CVS source trees.
<p>
BusyBox now has <b>two</b> CVS trees. The "busybox-stable" tree
contains the older 0.60.x stable series. The "busybox" tree contains
the latest 1.0.0-preX development version of busybox.<br>
<ul>
<li> Click here to browse the <a href="/cgi-bin/cvsweb/busybox/">
CVS tree for the 1.0.0-preX development version of BusyBox</a>
</li>
<li>Click here to browse the <a href="/cgi-bin/cvsweb/busybox.stable/">
CVS tree for the stable 0.60.x version of BusyBox</a>.
</li>
<li>Anonymous <a href="cvs_anon.html">CVS access</a> is available.
</li>
<li>For those that are actively contributing there is
even <a href="cvs_write.html">CVS write access</a>.
</li>
</ul>
<!--#include file="footer.html" -->
-20
View File
@@ -1,20 +0,0 @@
<!-- Footer -->
</td>
</tr>
</table>
<hr />
<p>
<font face="arial, helvetica, sans-serif" size="-1">
<a HREF="/copyright.txt">Copyright &copy; 1999-2003 Erik Andersen</a>
<br>
Mail all comments, insults, suggestions and bribes to
<br>
Erik Andersen <A HREF="mailto:andersen@codepoet.org">andersen@codepoet.org</A><BR>
</font>
</body>
</html>
-80
View File
@@ -1,80 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>BusyBox</title>
<style type="text/css">
body {
background-color: #DEE2DE;
color: #000000;
}
:link { color: #660000 }
:visited { color: #660000 }
:active { color: #660000 }
td.c2 {font-family: arial, helvetica, sans-serif; font-size: 80%}
td.c1 {font-family: lucida, helvetica; font-size: 248%}
</style>
</head>
<body>
<basefont face="lucida, helvetica, arial" size="3">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<div class="c3">
<table border="0" cellspacing="1" cellpadding="2">
<tr>
<td class="c1">BUSYBOX</td>
</tr>
</table>
</div>
<a href="/"><IMG SRC="images/busybox1.png" alt="BusyBox" border="0"></a><BR>
</td>
</tr>
<tr>
<td valign="TOP">
<br><a href="/about.html">About</a>
<br><a href="/screenshot.html">Screenshot</a>
<br><a href="/lists.html">Mailing Lists</a>
<br><a href="/news.html">Latest News</a>
<br><a href="/download.html">Download</a>
<br><a href="/cvs_anon.html">Accessing CVS</a>
<br><a href="/cgi-bin/cvsweb/busybox/">Browse CVS</a>
<br><a href="/docs.html">Documentation</a>
<br><a href="/products.html">Products</a>
<br><a href="/shame.html">Hall of Shame</a>
<br><a href="/license.html">License</a>
<p><b>Related Sites</b>
<br><a href="http://uclibc.org/">uClibc.org</a>
<br><a href="http://udhcp.busybox.net/">udhcp</a>
<br><a href="http://tinylogin.busybox.net/">tinylogin</a>
<br><a href="http://www.ucdot.org/">uCdot</a>
<br><a href="http://www.linuxdevices.com">LinuxDevices</a>
<br><a href="http://slashdot.org/">Slashdot</a>
<br><a href="http://freshmeat.net/">Freshmeat</a>
<br><a href="http://linuxtoday.com/">Linux Today</a>
<br><a href="http://lwn.net/">Linux Weekly News</a>
<br><a href="http://www.tldp.org/HOWTO">Linux HOWTOs</a>
<!--
<a href="http://validator.w3.org/check/referer"><img
src="/images/vh40.gif" height=31 width=88
align=left border=0 alt="Valid HTML 4.0!"></a>
-->
</td>
<td Valign="TOP">
Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

-1
View File
@@ -1 +0,0 @@
<!--#include file="news.html" -->
-112
View File
@@ -1,112 +0,0 @@
<!--#include file="header.html" -->
<h3>The GPL BusyBox license</h3>
There has been some confusion in the past as to exactly what is
required to safely distribute GPL'd software such as BusyBox as
part of a product. To ensure that there is no confusion
whatsoever, this page attempts to summarize what you should do to
ensure you do not accidentally violate the law.
<p>
<p>
BusyBox is licensed under the GNU General Public License , which
is generally just abbreviated simply as the GPL license, or
just the GPL. <a href="/products.html">Anyone thinking of shipping
BusyBox as part of a product</a> should be familiar with the
licensing terms under which they are allowed to use and
distribute BusyBox. You are advised to take a look over the
<ul>
<li><a href="http://www.gnu.org/licenses/gpl.html">full text of
the GNU General Public License</a>, and
<li><a href="http://www.gnu.org/licenses/gpl-faq.html">
Frequently Asked Questions about the GNU GPL</a>
</ul>
to be sure you (and your lawyers) fully understand them.
<p>
The following is a quick summary for the impatient. If you
carefully follow these steps, it will ensure that you are 100%
authorized to ship BusyBox with your product, and have no reason
to worry about lawsuits or being listed on the <a
href="/shame.html">BusyBox Hall of Shame</a> page. You will be
able to sleep peacefully at night knowing you have fulfilled all
your licensing obligations.
<p>
If you distribute a product, it should either be accompanied by
<b>full source for all GPL'd products</b> (including BusyBox)
and/or a <b>written offer</b> to supply the source for all
GPL'd products for the cost of shipping and handling. The source
has to be in its preferred machine readable form, so you cannot
encrypt or obfuscate it. You are not required to provide full
source for all the closed source applications that happen to be
part of the system with BusyBox, though you can certainly do so
if you feel like it. But providing source for the GPL licensed
applications such as BusyBox is mandatory.
<p>
<b>Accompanied by source</b> generally means you place the full
source code for all GPL'd products such as BusyBox on a driver CD
somewhere. Full source code includes the BusyBox ".config" file
used when your shipping BusyBox binary was compiled.
<p>
<b>A written offer</b> generally means that somewhere in the
docs for your product, you write something like
<blockquote>
The GPL source code contained in this product is available as a
free download from http://blah.blah.blah/
</blockquote>
Or you can offer source by writing
somewhere in the docs for your product something like
<blockquote>
If you would like a copy of the GPL source code in this product
on a CD, please send $9.99 to &lt;address&gt; for the costs of
preparing and mailing a CD to you.
</blockquote>
<p>
Keep in mind though that if you distribute GPL'd binaries online
(as is often done when supplying firmware updates), it is highly
recommended that you make the corresponding source available online
at the same place. Regardless, you <b>must</b> either make source
available online (i.e. <b>accompanied by source</b>) and/or inform
those downloading firmware updates of their right to obtain source
(i.e. <b>a written offer</b>). Failure to do so is a violation of
your licensing obligations.
<p>
Some people have the mistaken understanding that if they use unmodified
GPL'd source code, they do not need to distribute anything. This belief
is not correct, and is not supported by the
<a href="http://www.gnu.org/licenses/gpl.html">text of GPL</a>.
Please do re-read it -- you will find there is no such provision.
If you distribute any GPL'd binaries, you must also make source available
as discussed on this webpage.
<p>
These days, <a href="http://www.linksys.com/">Linksys</a> is
doing a good job at complying with the GPL, they get to be an
example of how to do things right. Please take a moment and
check out what they do with
<a href="http://www.linksys.com/download/firmware.asp?fwid=178">
distributing the firmware for their WRT54G Router.</a>
Following their example would be a fine way to ensure you have
fulfilled your licensing obligations.
<!--#include file="footer.html" -->
-45
View File
@@ -1,45 +0,0 @@
<!--#include file="header.html" -->
<!-- Begin Introduction section -->
<h3>Mailing List Information</h3>
BusyBox has a <a href="/lists/busybox/">mailing list</a> for discussion and
development. You can subscribe by visiting
<a href="http://codepoet.org/mailman/listinfo/busybox">this page</a>.
Only subscribers to the BusyBox mailing list are allowed to post
to this list.
<p>
There is also a mailing list for <a href="/lists/busybox-cvs/">active developers</a>
wishing to read the complete diff of each and every change to busybox -- not for the
faint of heart. Active developers can subscribe by visiting
<a href="http://codepoet.org/mailman/listinfo/busybox-cvs">this page</a>.
The CVS server is the only one permtted to post to this list.
<p>
<h3>Search the List Archives</h3>
Please search the mailing list archives before asking questions on the mailing
list, since there is a good chance someone else has asked the same question
before. Checking the archives is a great way to avoid annoying everyone on the
list with frequently asked questions...
<p>
<center>
<form method="GET" action="http://www.google.com/custom">
<input type="hidden" name="domains" value="busybox.net">
<input type="hidden" name="sitesearch" value="busybox.net">
<input type="text" name="q" size="31" maxlength="255" value="">
<br>
<input type="submit" name="sa" value="search the mailing list archives">
<br>
<a href="http://www.google.com"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" height="32" width="75" align="middle"></a>
<br>
</form>
</center>
<!--#include file="footer.html" -->
-154
View File
@@ -1,154 +0,0 @@
<!--#include file="header.html" -->
<ul>
<li><b>26 July 2004 -- BusyBox 1.0.0-rc2 released</b><p>
Here goes release candidate 2...
<p>
The <a href="downloads/Changelog">changelog</a> has all the details.
And as usual you can <a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
On a less happy note, My 92 year old grandmother (my dad's mom) passed away
yesterday (June 19th). The funeral will be Thursday in a little town about
2 hours south of my home. I've checked and there is absolutely no way I
could be back in time for the funeral if I attend <a
href="http://www.linuxsymposium.org/2004/">OLS</a> and give my presentation
as scheduled.
<p>
As such, it is with great reluctance and sadness that I have come
to the conclusion I will have to make my appologies and skip OLS
this year.
<p>
<p>
<li><b>20 July 2004 -- BusyBox 1.0.0-rc1 released</b><p>
Here goes release candidate 1... This fixes all (most?) of the problems
that have turned up since -pre10. In particular, loading and unloading of
kernel modules with 2.6.x kernels should be working much better.
<p>
I <b>really</b> want to get BusyBox 1.0.0 released soon and I see no real
reason why the 1.0.0 release shouldn't happen with things pretty much as
is. BusyBox is in good shape at the moment, and it works nicely for
everything that I'm doing with it. And from the reports I've been getting,
it works nicely for what most everyone else is doing with it as well.
There will eventually be a 1.0.1 anyway, so we might as well get on with
it. No BusyBox is not perfect. No piece of software ever is. And while
there is still plenty that can be done to improve things, most of that work
is waiting till we can get a solid 1.0.0 release out the door....
<p>
Please do not bother to send in patches adding cool new features at this
time. Only bug-fix patches will be accepted. If you have submitted a
bug-fixing patch to the busybox mailing list and no one has emailed you
explaining why your patch was rejected, it is safe to say that your patch
has been lost or forgotten. That happens sometimes. Please re-submit your
bug-fixing patch to the BusyBox mailing list, and be sure to put "[PATCH]"
at the beginning of the email subject line!
<p>
The <a href="downloads/Changelog">changelog</a> has all the details.
And as usual you can <a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
On a less happy note, My 92 year old grandmother (my dad's mom) passed away
yesterday (June 19th). The funeral will be Thursday in a little town about
2 hours south of my home. I've checked and there is absolutely no way I
could be back in time for the funeral if I attend <a
href="http://www.linuxsymposium.org/2004/">OLS</a> and give my presentation
as scheduled.
<p>
As such, it is with great reluctance and sadness that I have come
to the conclusion I will have to make my appologies and skip OLS
this year.
<p>
<p>
<li><b>13 April 2004 -- BusyBox 1.0.0-pre10 released</b><p>
Ok, I lied. It turns out that -pre9 will not be the final BusyBox
pre-release. With any luck however -pre10 will be, since I <b>really</b>
want to get BusyBox 1.0.0 released very soon. As usual, please do not
bother to send in patches adding cool new features at this time. Only
bug-fix patches will be accepted. It would also be <b>very</b> helpful if
people could continue to review the BusyBox documentation and submit
improvements.
<p>
The <a href="downloads/Changelog">changelog</a> has all the details.
And as usual you can <a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<p>
<li><b>6 April 2004 -- BusyBox 1.0.0-pre9 released</b><p>
Here goes the final BusyBox pre-release... This is your last chance for
bug fixes. With luck this will be released as BusyBox 1.0.0 later this
week. Please do not bother to send in patches adding cool new features at
this time. Only bug-fix patches will be accepted. It would also be
<b>very</b> helpful if people could help review the BusyBox documentation
and submit improvements. I've spent a lot of time updating the
documentation to make it better match reality, but I could really use some
assistance in checking that the features supported by the various applets
match the features listed in the documentation.
<p>
I had hoped to get this released a month ago, but
<a href="http://codepoet.org/gallery/baby_peter/img_1796">
another release on 1 March 2004</a> has kept me busy...
<p>
The <a href="downloads/Changelog">changelog</a> has all the details.
And as usual you can <a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<p>
<li><b>23 February 2004 -- BusyBox 1.0.0-pre8 released</b><p>
Here goes yet another BusyBox pre-release... Please do not bother to send
in patches supplying new features at this time. Only bug-fix patches will
be accepted. If you have a cool new feature you would like to see
supported, or if you have an amazing new applet you would like to submit,
please wait and submit such things later. We really want to get a release
out we can all be proud of. We are still aiming to finish off the -pre
series in February and move on to the final 1.0.0 release... So if you
spot any bugs, now would be an excellent time to send in a fix to the
busybox mailing list. It would also be <b>very</b> helpful if people could
help review the BusyBox documentation and submit improvements. It would be
especially helpful if people could check that the features supported by the
various applets match the features listed in the documentation.
<p>
The <a href="downloads/Changelog">changelog</a> has all the details.
And as usual you can <a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<p>
<li><b>Old News</b><p>
<a href="/oldnews.html">Click here to read older news</a>
</ul>
<!--#include file="footer.html" -->
-924
View File
@@ -1,924 +0,0 @@
<!--#include file="header.html" -->
<ul>
<li><b>4 February 2004 -- BusyBox 1.0.0-pre7 released</b><p>
There was a bug in -pre6 that broke argument parsing for a
number of applets, since a variable was not being zeroed out
properly. This release is primarily intended to fix that one
problem. In addition, this release fixes several other
problems, including a rewrite by mjn3 of the code for parsing
the busybox.conf file used for suid handling, some shell updates
from vodz, and a scattering of other small fixes. We are still
aiming to finish off the -pre series in February and move on to
the final 1.0.0 release... If you see any problems, of have
suggestions to make, as always, please feel free to email the
busybox mailing list.
<p>
The <a href="downloads/Changelog">changelog</a> has all
the details. And as usual you can
<a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<p>
<li><b>30 January 2004 -- BusyBox 1.0.0-pre6 released</b><p>
Here goes the next pre-release for the new BusyBox stable
series. This release adds a number of size optimizations,
updates udhcp, fixes up 2.6 modutils support, updates ash
and the shell command line editing, and the usual pile of
bug fixes both large and small. Things appear to be
settling down now, so with a bit of luck and some testing
perhaps we can finish off the -pre series in February and
move on to the final 1.0.0 release... If you see any
problems, of have suggestions to make, as always, please
feel free to email the busybox mailing list.
<p>
People who rely on the <a href= "downloads/snapshots/">daily BusyBox snapshots</a>
should be aware that snapshots of the old busybox 0.60.x
series are no longer available. Daily snapshots are now
only available for the BusyBox 1.0.0 series and now use
the naming scheme "busybox-&lt;date&gt;.tar.bz2". Please
adjust any build scripts using the old naming scheme accordingly.
<p>
The <a href="downloads/Changelog">changelog</a> has all
the details. And as usual you can
<a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<p>
<li><b>23 December 2003 -- BusyBox 1.0.0-pre5 released</b><p>
Here goes the next pre-release for the new BusyBox stable
series. The most obvious thing in this release is a fix for
a terribly stupid bug in mount that prevented it from working
properly unless you specified the filesystem type. This
release also fixes a few compile problems, updates udhcp,
fixes a silly bug in fdisk, fixes ifup/ifdown to behave like
the Debian version, updates devfsd, updates the 2.6.x
modutils support, add a new 'rx' applet, removes the obsolete
'loadacm' applet, fixes a few tar bugs, fixes a sed bug, and
a few other odd fixes.
<p>
If you see any problems, of have suggestions to make, as
always, please feel free to send an email to the busybox
mailing list.
<p>
The <a href="downloads/Changelog">changelog</a> has all
the details. And as usual you can
<a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<li><b>10 December 2003 -- BusyBox 1.0.0-pre4 released</b><p>
Here goes the fourth pre-release for the new BusyBox stable
series. This release includes major rework to sed, lots of
rework on tar, a new tiny implementation of bunzip2, a new
devfsd applet, support for 2.6.x kernel modules, updates to
the ash shell, sha1sum and md5sum have been merged into a
common applet, the dpkg applets has been cleaned up, and tons
of random bugs have been fixed. Thanks everyone for all the
testing, bug reports, and patches! Once again, a big
thank-you goes to Glenn McGrath (bug1) for stepping in and
helping get patches merged!
<p>
And of course, if you are reading this, you might have noticed
the busybox website has been completely reworked. Hopefully
things are now somewhat easier to navigate... If you see any
problems, of have suggestions to make, as always, please feel
free to send an email to the busybox mailing list.
<p>
The <a href="downloads/Changelog">changelog</a> has all
the details. And as usual you can
<a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<li><b>12 Sept 2003 -- BusyBox 1.0.0-pre3 released</b><p>
Here goes the third pre-release for the new BusyBox stable
series. The last prerelease has held up quite well under
testing, but a number of problems have turned up as the number
of people using it has increased. Thanks everyone for all
the testing, bug reports, and patches!
<p>
If you have submitted a patch or a bug report to the busybox
mailing list and no one has emailed you explaining why your
patch was rejected, it is safe to say that your patch has
somehow gotten lost or forgotten. That happens sometimes.
Please re-submit your patch or bug report to the BusyBox
mailing list!
<p>
The point of the "-preX" versions is to get a larger group of
people and vendors testing, so any problems that turn up can be
fixed prior to the final 1.0.0 release. The main feature
(besides additional testing) that is still still on the TODO
list before the final BusyBox 1.0.0 release is sorting out the
modutils issues. For the new 2.6.x kernels, we already have
patches adding insmod and rmmod support and those need to be
integrated. For 2.4.x kernels, for which busybox only supports
a limited number of architectures, we may want to invest a bit
more work before we cut 1.0.0. Or we may just leave 2.4.x
module loading alone.
<p>
I had hoped this release would be out a month ago. And of
course, it wasn't since Erik became busy getting a release of
<a href="http://www.uclibc.org/">uClibc</a>
out the door. Many thanks to Glenn McGrath (bug1) for
stepping in and helping get a bunch of patches merged! I am
not even going to state a date for releasing BusyBox 1.0.0
-pre4 (or the final 1.0.0). We're aiming for late September...
But if this release proves as to be exceptionally stable (or
exceptionally unstable!), the next release may be very soon
indeed.
<p>
The <a href="downloads/Changelog">changelog</a> has all
the details. And as usual you can
<a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<li><b>30 July 2003 -- BusyBox 1.0.0-pre2 released</b><p>
Here goes another pre release for the new BusyBox stable
series. The last prerelease (pre1) was given quite a lot of
testing (thanks everyone!) which has helped turn up a number of
bugs, and these problems have now been fixed.
<p>
Highlights of -pre2 include updating the 'ash' shell to sync up
with the Debian 'dash' shell, a new 'hdparm' applet was added,
init again supports pivot_root, The 'reboot' 'halt' and
'poweroff' applets can now be used without using busybox init.
an ifconfig buffer overflow was fixed, losetup now allows
read-write loop devices, uClinux daemon support was added, the
'watchdog', 'fdisk', and 'kill' applets were rewritten, there were
tons of doc updates, and there were many other bugs fixed.
<p>
If you have submitted a patch and it is not included in this
release and Erik has not emailed you explaining why your patch
was rejected, it is safe to say that he has lost your patch.
That happens sometimes. Please re-submit your patch to the
BusyBox mailing list.
<p>
The point of the "-preX" versions is to get a larger group of
people and vendors testing, so any problems that turn up can be
fixed prior to the final 1.0.0 release. The main feature that
is still still on the TODO list before the final BusyBox 1.0.0
release is adding module support for the new 2.6.x kernels. If
necessary, a -pre3 BusyBox release will happen on August 6th.
Hopefully (i.e. unless some horrible catastrophic problem
turns up) the final BusyBox 1.0.0 release will be ready by
then...
<p>
The <a href="downloads/Changelog">changelog</a> has all
the details. As usual you can <a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<p>
<li><b>15 July 2003 -- BusyBox 1.0.0-pre1 released</b><p>
The busybox development series has been under construction for
nearly two years now. Which is just entirely too long... So
it is with great pleasure that I announce the imminent release
of a new stable series. Due to the huge number of changes
since the last stable release (and the usual mindless version
number inflation) I am branding this new stable series verison
1.0.x...
<p>
The point of "-preX" versions is to get a larger group of
people and vendors testing, so any problems that turn up can be
fixed prior to the magic 1.0.0 release (which should happen
later this month)... I plan to release BusyBox 1.0.0-pre2 next
Monday (July 21st), and, if necessary, -pre3 on July 28th.
Hopefully (i.e. unless some horrible catastrophic problem turns
up) the final BusyBox 1.0.0 release should be ready by the end
of July.
<p>
If you have submitted patches, and they are not in this release
and I have not emailed you explaining why your patch was
rejected, it is safe to say that I have lost your patch. That
happens sometimes. Please do <B>NOT</b> send all your patches,
support questions, etc, directly to Erik. I get hundreds of
emails every day (which is why I end up losing patches
sometimes in the flood)... The busybox mailing list is the
right place to send your patches, support questions, etc.
<p>
I would like to especially thank Vladimir Oleynik (vodz), Glenn
McGrath (bug1), Robert Griebl (sandman), and Manuel Novoa III
(mjn3) for their significant efforts and contributions that
have made this release possible.
<p>
As usual you can <a href="downloads">download busybox here</a>.
You don't really need to bother with the
<a href="downloads/Changelog">changelog</a>, as the changes
vs the stable version are way too extensive to easily enumerate.
But you can take a look if you really want too.
<p>Have Fun!
<p>
<p>
<li><b>26 October 2002 -- BusyBox 0.60.5 released</b><p>
I am very pleased to announce that the BusyBox 0.60.5 (stable)
is now available for download. This is a bugfix release for
the stable series to address all the problems that have turned
up since the last release. Unfortunately, the previous release
had a few nasty bugs (i.e. init could deadlock, gunzip -c tried
to delete source files, cp -a wouldn't copy symlinks, and init
was not always providing controlling ttys when it should have).
I know I said that the previous release would be the end of the
0.60.x series. Well, it turns out I'm a liar. But this time I
mean it (just like last time ;-). This will be the last
release for the 0.60.x series -- all further development work
will be done for the development busybox tree. Expect the development
version to have its first real release very very soon now...
<p>
The <a href="downloads/Changelog.full">changelog</a> has all
the details. As usual you can <a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<p>
<li><b>18 September 2002 -- BusyBox 0.60.4 released</b><p>
I am very pleased to announce that the BusyBox 0.60.4
(stable) is now available for download. This is primarily
a bugfix release for the stable series to address all
the problems that have turned up since the last
release. This will be the last release for the 0.60.x series.
I mean it this time -- all further development work will be done
on the development busybox tree, which is quite solid now and
should soon be getting its first real release.
<p>
The <a href="downloads/Changelog.full">changelog</a> has all
the details. As usual you can <a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<p>
<li><b>27 April 2002 -- BusyBox 0.60.3 released</b><p>
I am very pleased to announce that the BusyBox 0.60.3 (stable) is
now available for download. This is primarily a bugfix release
for the stable series. A number of problems have turned up since
the last release, and this should address most of those problems.
This should be the last release for the 0.60.x series. The
development busybox tree has been progressing nicely, and will
hopefully be ready to become the next stable release.
<p>
The <a href="downloads/Changelog">changelog</a> has all
the details. As usual you can <a href="downloads">download busybox here</a>.
<p>Have Fun!
<p>
<p>
<li><b>6 March 2002 -- busybox.net now has mirrors!</b><p>
Busybox.net is now much more available, thanks to
the fine folks at <a href= "http://i-netinnovations.com/">http://i-netinnovations.com/</a>
who are providing hosting for busybox.net and
uclibc.org. In addition, we now have two mirrors:
<a href= "http://busybox.linuxmagic.com/">http://busybox.linuxmagic.com/</a>
in Canada and
<a href= "http://busybox.csservers.de/">http://busybox.csservers.de/</a>
in Germany. I hope this makes things much more
accessible for everyone!
<li>
<b>3 January 2002 -- Welcome to busybox.net!</b>
<p>Thanks to the generosity of a number of busybox
users, we have been able to purchase busybox.net
(which is where you are probably reading this).
Right now, busybox.net and uclibc.org are both
living on my home system (at the end of my DSL
line). I apologize for the abrupt move off of
busybox.lineo.com. Unfortunately, I no longer have
the access needed to keep that system updated (for
example, you might notice the daily snapshots there
stopped some time ago).</p>
<p>Busybox.net is currently hosted on my home
server, at the end of a DSL line. Unfortunately,
the load on them is quite heavy. To address this,
I'm trying to make arrangements to get busybox.net
co-located directly at an ISP. To assist in the
co-location effort, <a href=
"http://www.codepoet.org/~markw">Mark Whitley</a>
(author of busybox sed, cut, and grep) has donated
his <a href=
"http://www.netwinder.org/">NetWinder</a> computer
for hosting busybox.net and uclibc.org. Once this
system is co-located, the current speed problems
should be completely eliminated. Hopefully, too,
some of you will volunteer to set up some mirror
sites, to help to distribute the load a bit.</p>
<p><!--
<center>
Click here to help support busybox.net!
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="andersen@codepoet.org">
<input type="hidden" name="item_name" value="Support Busybox">
<input type="hidden" name="image_url" value="https://codepoet-consulting.com/images/busybox2.jpg">
<input type="hidden" name="no_shipping" value="1">
<input type="image" src="images/donate.png" border="0" name="submit" alt="Make donation using PayPal">
</form>
</center>
-->
Since some people expressed concern over BusyBox
donations, let me assure you that no one is getting
rich here. All BusyBox and uClibc donations will be
spent paying for bandwidth and needed hardware
upgrades. For example, Mark's NetWinder currently
has just 64Meg of memory. As demonstrated when
google spidered the site the other day, 64 Megs in
not enough, so I'm going to be ordering 256Megs of
ram and a larger hard drive for the box today. So
far, donations received have been sufficient to
cover almost all expenses. In the future, we may
have co-location fees to worry about, but for now
we are ok. A <b>HUGE thank-you</b> goes out to
everyone that has contributed!<br>
-Erik</p>
</li>
<li>
<b>20 November 2001 -- BusyBox 0.60.2 released</b>
<p>We am very pleased to announce that the BusyBox
0.60.2 (stable) is now released to the world. This
one is primarily a bugfix release for the stable
series, and it should take care of most everyone's
needs till we can get the nice new stuff we have
been working on in CVS ready to release (with the
wonderful new buildsystem). The biggest change in
this release (beyond bugfixes) is the fact that msh
(the minix shell) has been re-worked by Vladimir N.
Oleynik (vodz) and so it no longer crashes when
told to do complex things with backticks.</p>
<p>This release has been tested on x86, ARM, and
powerpc using glibc 2.2.4, libc5, and uClibc, so it
should work with just about any Linux system you
throw it at. See the <a href=
"downloads/Changelog">changelog</a> for <small>most
of</small> the details. The last release was
<em>very</em> solid for people, and this one should
be even better.</p>
<p>As usual BusyBox 0.60.2 can be downloaded from
<a href=
"downloads">http://www.busybox.net/downloads</a>.</p>
<p>Have Fun.<br>
-Erik</p>
</li>
<li> <b>18 November 2001 -- Help us buy busybox.net!</b>
<!-- Begin PayPal Logo -->
<center>
Click here to help buy busybox.net!
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="andersen@codepoet.org">
<input type="hidden" name="item_name" value="Support Busybox">
<input type="hidden" name="image_url" value="https://busybox.net/images/busybox2.jpg">
<input type="hidden" name="no_shipping" value="1">
<input type="image" src="images/donate.png" border="0" name="submit" alt="Make donation using PayPal">
</form>
</center>
<!-- End PayPal Logo -->
I've contacted the current owner of busybox.net and he is willing
to sell the domain name -- for $250. He also owns busybox.org but
will not part with it... I will then need to pay the registry fee
for a couple of years and start paying for bandwidth, so this will
initially cost about $300. I would like to host busybox.net on my
home machine (codepoet.org) so I have full control over the system,
but to do that would require that I increase the level of bandwidth
I am paying for. Did you know that so far this month, there
have been over 1.4 Gigabytes of busybox ftp downloads? I don't
even <em>know</em> how much CVS bandwidth it requires. For the
time being, Lineo has continued to graciously provide this
bandwidth, despite the fact that I no longer work for them. If I
start running this all on my home machine, paying for the needed bandwidth
will start costing some money.
<p>
I was going to pay it all myself, but my wife didn't like that
idea at all (big surprise). It turns out &lt;insert argument
where she wins and I don't&gt; she has better ideas
about what we should spend our money on that don't involve
busybox. She suggested I should ask for contributions on the
mailing list and web page. So...
<p>
I am hoping that if everyone could contribute a bit, we could pick
up the busybox.net domain name and cover the bandwidth costs. I
know that busybox is being used by a lot of companies as well as
individuals -- hopefully people and companies that are willing to
contribute back a bit. So if everyone could please help out, that
would be wonderful!
<p>
<li> <b>23 August 2001 -- BusyBox 0.60.1 released</b>
<br>
This is a relatively minor bug fixing release that fixes
up the bugs that have shown up in the stable release in
the last few weeks. Fortunately, nothing <em>too</em>
serious has shown up. This release only fixes bugs -- no
new features, no new applets. So without further ado,
here it is. Come and get it.
<p>
The
<a href="downloads/Changelog">changelog</a> has all
the details. As usual BusyBox 0.60.1 can be downloaded from
<a href="downloads">http://busybox.net/downloads</a>.
<p>Have Fun!
<p>
<li> <b>2 August 2001 -- BusyBox 0.60.0 released</b>
<br>
I am very pleased to announce the immediate availability of
BusyBox 0.60.0. I have personally tested this release with libc5, glibc,
and <a href="http://uclibc.org/">uClibc</a> on
x86, ARM, and powerpc using linux 2.2 and 2.4, and I know a number
of people using it on everything from ia64 to m68k with great success.
Everything seems to be working very nicely now, so getting a nice
stable bug-free(tm) release out seems to be in order. This releases fixes
a memory leak in syslogd, a number of bugs in the ash and msh shells, and
cleans up a number of things.
<p>
Those wanting an easy way to test the 0.60.0 release with uClibc can
use <a href="http://user-mode-linux.sourceforge.net/">User-Mode Linux</a>
to give it a try by downloading and compiling
<a href="ftp://busybox.net/buildroot.tar.gz">buildroot.tar.gz</a>.
You don't have to be root or reboot your machine to run test this way.
Preconfigured User-Mode Linux kernel source is also on busybox.net.
<p>
Another cool thing is the nifty <a href="downloads/tutorial/index.html">
BusyBox Tutorial</a> contributed by K Computing. This requires
a ShockWave plugin (or standalone viewer), so you may want to grab the
the GPLed shockwave viewer from <a href="http://www.swift-tools.com/Flash/flash-0.4.10.tgz">here</a>
to view the tutorial.
<p>
Finally, In case you didn't notice anything odd about the
version number of this release, let me point out that this release
is <em>not</em> 0.53, because I bumped the version number up a
bit. This reflects the fact that this release is intended to form
a new stable BusyBox release series. If you need to rely on a
stable version of BusyBox, you should plan on using the stable
0.60.x series. If bugs show up then I will release 0.60.1, then
0.60.2, etc... This is also intended to deal with the fact that
the BusyBox build system will be getting a major overhaul for the
next release and I don't want that to break products that people
are shipping. To avoid that, the new build system will be
released as part of a new BusyBox development series that will
have some not-yet-decided-on odd version number. Once things
stabilize and the new build system is working for everyone, then
I will release that as a new stable release series.
<p>
The
<a href="downloads/Changelog">changelog</a> has all
the details. As usual BusyBox 0.60.0 can be downloaded from
<a href="downloads">http://busybox.net/downloads</a>.
<p>Have Fun!
<p>
<li> <b>7 July 2001 -- BusyBox 0.52 released</b>
<br>
I am very pleased to announce the immediate availability of
BusyBox 0.52 (the "new-and-improved rock-solid release"). This
release is the result of <em>many</em> hours of work and has tons
of bugfixes, optimizations, and cleanups. This release adds
several new applets, including several new shells (such as hush, msh,
and ash).
<p>
The
<a href="downloads/Changelog">changelog</a> covers
some of the more obvious details, but there are many many things that
are not mentioned, but have been improved in subtle ways. As usual,
BusyBox 0.52 can be downloaded from
<a href="downloads">http://busybox.net/downloads</a>.
<p>Have Fun!
<p>
<li> <b>10 April 2001 - Graph of Busybox Growth </b>
<br>
The illustrious Larry Doolittle has made a PostScript chart of the growth
of the Busybox tarball size over time. It is available for downloading /
viewing <a href= "busybox-growth.ps"> right here</a>.
<p> (Note that while the number of applets in Busybox has increased, you
can still configure Busybox to be as small as you want by selectively
turning off whichever applets you don't need.)
<p>
<li> <b>10 April 2001 -- BusyBox 0.51 released</b>
<br>
BusyBox 0.51 (the "rock-solid release") is now out there. This
release adds only 2 new applets: env and vi. The vi applet,
contributed by Sterling Huxley, is very functional, and is only
22k. This release fixes 3 critical bugs in the 0.50 release.
There were 2 potential segfaults in lash (the busybox shell) in
the 0.50 release which are now fixed. Another critical bug in
0.50 which is now fixed: syslogd from 0.50 could potentially
deadlock the init process and thereby break your entire system.
<p>
There are a number of improvements in this release as well. For
one thing, the wget applet is greatly improved. Dmitry Zakharov
added FTP support, and Laurence Anderson make wget fully RFC
compliant for HTTP 1.1. The mechanism for including utility
functions in previous releases was clumsy and error prone. Now
all utility functions are part of a new libbb library, which makes
maintaining utility functions much simpler. And BusyBox now
compiles on itanium systems (thanks to the Debian itanium porters
for letting me use their system!).
<p>
You can read the
<a href="downloads/Changelog">changelog</a> for
complete details. BusyBox 0.51 can be downloaded from
<a href="downloads">http://busybox.net/downloads</a>.
<p>Have Fun!
<p>
<li> <b>Busybox Boot-Floppy Image</b>
<p>Because you asked for it, we have made available a <a href=
"downloads/busybox.floppy.img"> Busybox boot floppy
image</a>. Here's how you use it:
<ol>
<li> <a href= "downloads/busybox.floppy.img">
Download the image</a>
<li> dd it onto a floppy like so: <tt> dd if=busybox.floppy.img
of=/dev/fd0 ; sync </tt>
<li> Pop it in a machine and boot up.
</ol>
<p> If you want to look at the contents of the initrd image, do this:
<pre>
mount ./busybox.floppy.img /mnt -o loop -t msdos
cp /mnt/initrd.gz /tmp
umount /mnt
gunzip /tmp/initrd.gz
mount /tmp/initrd /mnt -o loop -t minix
</pre>
<li> <b>15 March 2001 -- BusyBox 0.50 released</b>
<br>
This release adds several new applets including ifconfig, route, pivot_root, stty,
and tftp, and also fixes tons of bugs. Tab completion in the
shell is now working very well, and the shell's environment variable
expansion was fixed. Tons of other things were fixed or made
smaller. For a fairly complete overview, see the
<a href="downloads/Changelog">changelog</a>.
<p>
lash (the busybox shell) is still with us, fixed up a bit so it
now behaves itself quite nicely. It really is quite usable as
long as you don't expect it to provide Bourne shell grammer.
Standard things like pipes, redirects, command line editing, and
environment variable expansion work great. But we have found that
this shell, while very usable, does not provide an extensible
framework for adding in full Bourne shell behavior. So the first order of
business as we begin working on the next BusyBox release will be to merge in the new shell
currently in progress at
<a href="http://doolittle.faludi.com/~larry/parser.html">Larry Doolittle's website</a>.
<p>
<li> <b>27 January 2001 -- BusyBox 0.49 released</b>
<br>
Several new applets, lots of bug fixes, cleanups, and many smaller
things made nicer. Several cleanups and improvements to the shell.
For a list of the most interesting changes
you might want to look at the <a href="downloads/Changelog">changelog</a>.
<p>
Special thanks go out to Matt Kraai and Larry Doolittle for all their
work on this release, and for keeping on top of things while I've been
out of town.
<p>
<em>Special Note</em><br>
BusyBox 0.49 was supposed to have replaced lash, the BusyBox
shell, with a new shell that understands full Bourne shell/Posix shell grammer.
Well, that simply didn't happen in time for this release. A new
shell that will eventually replace lash is already under
construction. This new shell is being developed by Larry
Doolittle, and could use all of our help. Please see the work in
progress on <a href="http://doolittle.faludi.com/~larry/parser.html">Larry's website</a>
and help out if you can. This shell will be included in the next
release of BusyBox.
<p>
<li> <b>13 December 2000 -- BusyBox 0.48 released</b>
<br>
This release fixes lots and lots of bugs. This has had some very
rigorous testing, and looks very, very clean. The usual tar
update of course: tar no longer breaks hardlinks, tar -xzf is
optionally supported, and the LRP folks will be pleased to know
that 'tar -X' and 'tar --exclude' are both now in. Applets are
now looked up using a binary search making lash (the busybox
shell) much faster. For the new debian-installer (for Debian
woody) a .udeb can now be generated.
<p>
The curious can get a list of some of the more interesting changes by reading
the <a href="downloads/Changelog">changelog</a>.
<p>
Many thanks go out to the many many people that have contributed to
this release, especially Matt Kraai, Larry Doolittle, and Kent Robotti.
<p>
<p> <li> <b>26 September 2000 -- BusyBox 0.47 released</b>
<br>
This release fixes lots of bugs (including an ugly bug in 0.46
syslogd that could fork-bomb your system). Added several new
apps: rdate, wget, getopt, dos2unix, unix2dos, reset, unrpm,
renice, xargs, and expr. syslogd now supports network logging.
There are the usual tar updates. Most apps now use getopt for
more correct option parsing.
See the <a href="downloads/Changelog">changelog</a>
for complete details.
<p> <li> <b>11 July 2000 -- BusyBox 0.46 released</b>
<br>
This release fixes several bugs (including a ugly bug in tar,
and fixes for NFSv3 mount support). Added a dumpkmap to allow
people to dump a binary keymaps for use with 'loadkmap', and a
completely reworked 'grep' and 'sed' which should behave better.
BusyBox shell can now also be used as a login shell.
See the <a href="downloads/Changelog">changelog</a>
for complete details.
<p> <li> <b>21 June 2000 -- BusyBox 0.45 released</b>
<br>
This release has been slow in coming, but is very solid at this
point. BusyBox now supports libc5 as well as GNU libc. This
release provides the following new apps: cut, tr, insmod, ar,
mktemp, setkeycodes, md5sum, uuencode, uudecode, which, and
telnet. There are bug fixes for just about every app as well (see
the <a href="downloads/Changelog">changelog</a> for
details).
<p>
Also, some exciting infrastructure news! Busybox now has its own
<a href="lists/busybox/">mailing list</a>,
publically browsable
<a href="/cgi-bin/cvsweb/busybox/">CVS tree</a>,
anonymous
<a href="cvs_anon.html">CVS access</a>, and
for those that are actively contributing there is even
<a href="cvs_write.html">CVS write access</a>.
I think this will be a huge help to the ongoing development of BusyBox.
<p>
Also, for the curious, there is no 0.44 release. Somehow 0.44 got announced
a few weeks ago prior to its actually being released. To avoid any confusion
we are just skipping 0.44.
<p>
Many thanks go out to the many people that have contributed to this release
of BusyBox (esp. Pavel Roskin)!
<p> <li> <b>19 April 2000 -- syslogd bugfix</b>
<br>
Turns out that there was still a bug in busybox syslogd.
For example, with the following test app:
<pre>
#include &lt;syslog.h&gt;
int do_log(char* msg, int delay)
{
openlog("testlog", LOG_PID, LOG_DAEMON);
while(1) {
syslog(LOG_ERR, "%s: testing one, two, three\n", msg);
sleep(delay);
}
closelog();
return(0);
};
int main(void)
{
if (fork()==0)
do_log("A", 2);
do_log("B", 3);
}
</pre>
it should be logging stuff from both "A" and "B". As released in 0.43 only stuff
from "A" would have been logged. This means that if init tries to log something
while say ppp has the syslog open, init would block (which is bad, bad, bad).
<p>
Karl M. Hegbloom has created a fix for the problem.
Thanks Karl!
<p> <li> <b>18 April 2000 -- BusyBox 0.43 released (finally!)</b>
<br>
I have finally gotten everything into a state where I feel pretty
good about things. This is definitely the most stable, solid release
so far. A lot of bugs have been fixed, and the following new apps
have been added: sh, basename, dirname, killall, uptime,
freeramdisk, tr, echo, test, and usleep. Tar has been completely
rewritten from scratch. Bss size has also been greatly reduced.
More details are available in the
<a href="downloads/Changelog">changelog</a>.
Oh, and as a special bonus, I wrote some fairly comprehensive
<em>documentation</em>, complete with examples and full usage information.
<p>
Many thanks go out to the fine people that have helped by submitting patches
and bug reports; particularly instrumental in helping for this release were
Karl Hegbloom, Pavel Roskin, Friedrich Vedder, Emanuele Caratti,
Bob Tinsley, Nicolas Pitre, Avery Pennarun, Arne Bernin, John Beppu, and Jim Gleason.
There were others so if I somehow forgot to mention you, I'm very sorry.
<p>
You can grab BusyBox 0.43 tarballs <a href="downloads">here</a>.
<p> <li> <b>9 April 2000 -- BusyBox 0.43 pre release</b>
<br>
Unfortunately, I have not yet finished all the things I want to
do for BusyBox 0.43, so I am posting this pre-release for people
to poke at. This contains my complete rewrite of tar, which now weighs in at
5k (7k with all options turned on) and works for reading and writing
tarballs (which it does correctly for everything I have been able to throw
at it). Tar also (optionally) supports the "--exclude" option (mainly because
the Linux Router Project folks asked for it). This also has a pre-release
of the micro shell I have been writing. This pre-release should be stable
enough for production use -- it just isn't a release since I have some structural
changes I still want to make.
<p>
The pre-release can be found <a href="downloads">here</a>.
Please let me know ASAP if you find <em>any</em> bugs.
<p> <li> <b>28 March 2000 -- Andersen Baby Boy release</b>
<br>
I am pleased to announce that on Tuesday March 28th at 5:48pm, weighing in at 7
lbs. 12 oz, Micah Erik Andersen was born at LDS Hospital here in Salt Lake City.
He was born in the emergency room less then 5 minutes after we arrived -- and
it was such a relief that we even made it to the hospital at all. Despite the
fact that I was driving at an amazingly unlawful speed and honking at everybody
and thinking decidedly unkind thoughts about the people in our way, my wife
(inconsiderate of my feelings and complete lack of medical training) was lying
down in the back seat saying things like "I think I need to start pushing now"
(which she then proceeded to do despite my best encouraging statements to the
contrary).
<p>
Anyway, I'm glad to note that despite the much-faster-than-we-were-expecting
labor, both Shaunalei and our new baby boy are doing wonderfully.
<p>
So now that I am done with my excuse for the slow release cycle...
Progress on the next release of BusyBox has been slow but steady. I expect
to have a release sometime during the first week of April. This release will
include a number of important changes, including the addition of a shell, a
re-write of tar (to accommodate the Linux Router Project), and syslogd can now
accept multiple concurrent connections, fixing lots of unexpected blocking
problems.
<p> <li> <b>11 February 2000 -- BusyBox 0.42 released</b>
<br>
This is the most solid BusyBox release so far. Many, many
bugs have been fixed. See the
<a href="downloads/Changelog">changelog</a> for details.
Of particular interest, init will now cleanly unmount
filesystems on reboot, cp and mv have been rewritten and
behave much better, and mount and umount no longer leak
loop devices. Many thanks go out to Randolph Chung,
Karl M. Hegbloom, Taketoshi Sano, and Pavel Roskin for
their hard work on this release of BusyBox. Please pound
on it and let me know if you find any bugs.
<p> <li> <b>19 January 2000 -- BusyBox 0.41 released</b>
<br>
This release includes bugfixes to cp, mv, logger, true, false,
mkdir, syslogd, and init. New apps include wc, hostid,
logname, tty, whoami, and yes. New features include loop device
support in mount and umount, and better TERM handling by init.
The changelog can be found <a href="downloads/Changelog">here</a>.
<p> <li> <b>7 January 2000 -- BusyBox 0.40 released</b>
<br>
This release includes bugfixes to init (now includes inittab support),
syslogd, head, logger, du, grep, cp, mv, sed, dmesg, ls, kill, gunzip, and mknod.
New apps include sort, uniq, lsmod, rmmod, fbset, and loadacm.
In particular, this release fixes an important bug in tar which
in some cases produced serious security problems.
As always, the changelog can be found <a href="downloads/Changelog">here</a>.
<p> <li> <b>11 December 1999 -- BusyBox Website</b>
<br>
I have received permission from Bruce Perens (the original author of BusyBox)
to set up this site as the new primary website for BusyBox. This website
will always contain pointers to the latest and greatest, and will also
contain the latest documentation on how to use BusyBox, what it can do,
what arguments its apps support, etc.
<p> <li> <b>10 December 1999 -- BusyBox 0.39 released</b>
<br>
This release includes fixes to init, reboot, halt, kill, and ls, and contains
the new apps ping, hostname, mkfifo, free, tail, du, tee, and head. A full
changelog can be found <a href="downloads/Changelog">here</a>.
<p> <li> <b>5 December 1999 -- BusyBox 0.38 released</b>
<br>
This release includes fixes to tar, cat, ls, dd, rm, umount, find, df,
and make install, and includes new apps syslogd/klogd and logger.
</ul>
<!--#include file="footer.html" -->
-158
View File
@@ -1,158 +0,0 @@
<!--#include file="header.html" -->
<h3>Products/Projects Using BusyBox</h3>
Do you use BusyBox? I'd love to know about it and
I'd be happy to link to you.
<p>
I know of the following products and/or projects that use BusyBox --
listed in the order I happen to add them to the web page:
<ul>
<li><a href="/cgi-bin/cvsweb/buildroot/">buildroot</a><br>A configurable
means for building your own busybox/uClibc based system systems.
<li><a href="http://www.pengutronix.de/software/ptxdist_en.html">PTXdist</a><br>another
configurable means for building your own busybox based system systems.
</li><li><a href=
"http://cvs.debian.org/boot-floppies/">
Debian installer (boot floppies) project</a>
</li><li><a href="http://redhat.com/">Red Hat installer</a>
</li><li><a href=
"http://distro.ibiblio.org/pub/Linux/distributions/slackware/source/rootdsks/">
Slackware Installer</a>
</li><li><a href="http://www.gentoo.org/">Gentoo Linux install/boot CDs</a>
</li><li><a href="http://www.mandrake.com/">The Mandrake installer</a>
</li><li><a href="http://Leaf.SourceForge.net">Linux Embedded Appliance Firewall</a><br>The sucessor of the Linux Router Project, supporting all sorts of embedded Linux gateways, routers, wireless routers, and firewalls.
</li><li><a href=
"http://www.toms.net/rb/">tomsrtbt</a>
</li><li><a href="http://www.stormix.com/">Stormix
Installer</a>
</li><li><a href=
"http://www.emacinc.com/linux2_sbc.htm">EMAC Linux
2.0 SBC</a>
</li><li><a href="http://www.trinux.org/">Trinux</a>
</li><li><a href="http://oddas.sourceforge.net/">ODDAS
project</a>
</li><li><a href="http://byld.sourceforge.net/">Build Your
Linux Disk</a>
</li><li><a href=
"http://ibiblio.org/pub/Linux/system/recovery">Zdisk</a>
</li><li><a href="http://www.adtran.com">AdTran -
VPN/firewall VPN Linux Distribution</a>
</li><li><a href="http://mkcdrec.ota.be/">mkCDrec - make
CD-ROM recovery</a>
</li><li><a href=
"http://recycle.lbl.gov/~ldoolitt/bse/">Linux on
nanoEngine</a>
</li><li><a href=
"http://www.zelow.no/floppyfw/">Floppyfw</a>
</li><li><a href="http://www.ltsp.org/">Linux Terminal
Server Project</a>
</li><li><a href=
"http://www.devil-linux.org/">Devil-Linux</a>
</li><li><a href=
"http://dutnux.sourceforge.net/">DutNux</a>
</li><li><a href=
"http://www.microwerks.net/~hugo/mindi/">Mindi</a>
</li><li><a href=
"http://www.tzi.de/~pharao90/ttylinux">ttylinux</a>
</li><li><a href="http://www.coyotelinux.com/">Coyote Linux</a>
</li><li><a href="http://www.partimage.org/">Partition
Image</a>
</li><li><a href="http://www.fli4l.de/">fli4l the on(e)-disk-router</a>
</li><li><a href="http://tinfoilhat.cultists.net/">Tinfoil
Hat Linux</a>
</li><li><a href="http://familiar.handhelds.org/">Familiar Linux</a><br>A linux distribution for handheld computers
</li><li><a href="http://rescuecd.sourceforge.net/">Timo's Rescue CD Set</a>
</li><li><a href="http://sf.net/projects/netstation/">Netstation</a>
</li><li><a href="http://www.fiwix.org/">GNU/Fiwix Operating System</a>
</li><li><a href="http://www.softcraft.com/">Generations Linux</a>
</li><li><a href="http://systemimager.org/relatedprojects/">SystemImager / System Installation Suite</a>
</li><li><a href="http://www.bablokb.de/gendist/">GENDIST distribution generator</a>
</li><li><a href="http://diet-pc.sourceforge.net/">DIET-PC embedded Linux thin client distribution</a>
</li><li><a href="http://byzgl.sourceforge.net/">BYZantine Gnu/Linux</a>
</li><li><a href="http://dban.sourceforge.net/">Darik's Boot and Nuke</a>
</li><li><a href="http://www.timesys.com/">TimeSys real-time Linux</a>
</li><li><a href="http://movix.sf.net/">MoviX</a><br>Boots from CD and automatically plays every video file on the CD
</li><li><a href="http://katamaran.sourceforge.net">katamaran</a><br>Linux, X11, xfce windowmanager, based on BusyBox
</li><li><a href="http://www.sourceforge.net/projects/simplygnustep">Prometheus SimplyGNUstep</a>
</li><li><a href="http://www.renyi.hu/~ekho/lowlife/">lowlife</a><br>A documentation project on how to make your own uClibc-based systems and floppy.
</li><li><a href="http://metadistros.hispalinux.es/">Metadistros</a><br>a project to allow you easily make Live-CD distributions.
</li><li><a href="http://salvare.sourceforge.net/">Salvare</a><br>More Linux than tomsrtbt but less than Knoppix, aims to provide a useful workstation as well as a rescue disk.
</li><li><a href="http://www.stresslinux.org/">stresslinux</a><br>minimal linux distribution running from a bootable cdrom or via PXE.
</li><li><a href="http://thinstation.sourceforge.net/">thinstation</a><br>convert standard PCs into full-featured diskless thinclients.
</li><li><a href="http://www.uhulinux.hu/">UHU-Linux Hungary</a>
</li><li><a href="http://deep-water.berlios.de/">Deep-Water Linux</a>
</li><li><a href="http://www.freesco.org/">Freesco router</a>
</li><li><a href="http://Sentry.SourceForge.net/">Sentry Firewall CD</a>
</li><li><a href="http://tuxscreen.net">Tuxscreen Linux Phone</a>
</li><li><a href="http://www.kerbango.com/">The Kerbango Internet Radio</a>
</li><li><a href="http://www.linuxmagic.com/vpn/">LinuxMagic VPN Firewall</a>
</li><li><a href="http://www.isilver-inc.com/">I-Silver Linux appliance servers</a>
</li><li><a href="http://zaurus.sourceforge.net/">Sharp Zaurus PDA</a>
</li><li><a href="http://www.cyclades.com/">Cyclades-TS and other Cyclades products</a>
</li><li><a href="http://www.linksys.com/products/product.asp?prid=508">Linksys WRT54G - Wireless-G Broadband Router</a>
</li><li><a href="http://www.dell.com/us/en/biz/topics/sbtopic_005_truemobile.htm">Dell TrueMobile 1184</a>
</li><li><a href="http://actiontec.com/products/modems/dual_pcmodem/dpm_overview.html">Actiontec Dual PC Modem</a>
</li><li><a href="http://www.kiss-technology.com/">Kiss DP Series DVD players</a>
</li><li><a href="http://www.netgear.com/products/prod_details.asp?prodID=170">NetGear WG602 wireless router</a>
<br>with sources <a href="http://www.netgear.com/support/support_details.asp?dnldID=453">here</a>
</li><li><a href="http://www.trendware.com/products/TEW-411BRP.htm">TRENDnet TEW-411BRP 802.11g Wireless AP/Router/Switch</a>
<br>Source for busybox and udhcp <a href="http://www.trendware.com/asp/download/fileinfo.asp?file_id=277&B1=Search">here</a> though no kernel source is provided.
</li><li><a href="http://www.buffalo-technology.com/webcontent/products/wireless/wbr-g54.htm">Buffalo WBR-G54 wireless router</a>
</li><li><a href="http://www.asus.com/products/communication/wireless/wl-300g/overview.htm">ASUS WL-300g Wireless LAN Access Point</a>
<br>with source<a href="http://www.asus.com.tw/support/download/item.aspx?ModelName=WL-300G">here</a>
</li><li><a href="http://catalog.belkin.com/IWCatProductPage.process?Merchant_Id=&Section_Id=201522&pcount=&Product_Id=136493">Belkin 54g Wireless DSL/Cable Gateway Router</a>
<br>with source<a href="http://web.belkin.com/support/gpl.asp">here</a>
<li><a href="http://www.acronis.com/products/partitionexpert/">Acronis PartitionExpert 2003</a>
<br>includes a heavily modified BusyBox v0.60.5 with built in
cardmgr, device detection, gpm, lspci, etc. Also includes udhcp,
uClibc 0.9.26, a heavily patched up linux kernel, etc. Source
can only be obtained <a href="http://www.acronis.com/files/gpl/linux.tar.bz2">here</a>
</li><li><a href="http://www.usr.com/">U.S. Robotics Sureconnect 4-port ADSL router</a><br>
with source <a href="http://www.usr.com/support/s-gpl-code.asp">here</a>
</li><li><a href="http://www.actiontec.com/products/broadband/54mbps_wireless_gateway_1p/index.html">
ActionTec GT701-WG Wireless Gateway/DSL Modem</a>
with source <a href="http://128.121.226.214/gtproducts/index.html">here</a>
</li>
</ul>
<!--#include file="footer.html" -->
-57
View File
@@ -1,57 +0,0 @@
<!--#include file="header.html" -->
<!-- Begin Screenshot -->
<h3> Busybox Screenshot! </h3>
Everybody loves to look at screenshots, so here is a live action screenshot of BusyBox.
<pre style="background-color: black; color: lightgreen; padding: 5px;
font-family: monospace; font-size: smaller;" width="100">
$ ./busybox
BusyBox v1.00 (2004.04.06-14:56+0000) multi-call binary
Usage: busybox [function] [arguments]...
or: [function] [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use, and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, addgroup, adduser, adjtimex, ar, arping, ash, awk, basename, bunzip2,
busybox, bzcat, cal, cat, chgrp, chmod, chown, chroot, chvt, clear, cmp,
cp, cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser,
devfsd, df, dirname, dmesg, dos2unix, dpkg, dpkg-deb, du, dumpkmap,
dumpleases, echo, egrep, env, expr, false, fbset, fdflush, fdformat, fdisk,
fgrep, find, fold, free, freeramdisk, fsck.minix, ftpget, ftpput, getopt,
getty, grep, gunzip, gzip, halt, hdparm, head, hexdump, hostid, hostname,
httpd, hush, hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod,
install, ip, ipcalc, iplink, iproute, iptunnel, kill, killall, klogd, lash,
last, length, linuxrc, ln, loadfont, loadkmap, logger, login, logname,
logread, losetup, ls, lsmod, makedevs, md5sum, mesg, mkdir, mkfifo,
mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, msh, mt, mv,
nameif, nc, netstat, nslookup, od, openvt, passwd, patch, pidof, ping,
ping6, pipe_progress, pivot_root, poweroff, printf, ps, pwd, rdate,
readlink, realpath, reboot, renice, reset, rm, rmdir, rmmod, route, rpm,
rpm2cpio, run-parts, rx, sed, seq, setkeycodes, sha1sum, sleep, sort,
start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon, sync,
sysctl, syslogd, tail, tar, tee, telnet, telnetd, test, tftp, time, top,
touch, tr, traceroute, true, tty, udhcpc, udhcpd, umount, uname,
uncompress, uniq, unix2dos, unzip, uptime, usleep, uudecode, uuencode,
vconfig, vi, vlock, watch, watchdog, wc, wget, which, who, whoami, xargs,
yes, zcat
$ <blink>_</blink>
</pre>
<!--#include file="footer.html" -->
-71
View File
@@ -1,71 +0,0 @@
<!--#include file="header.html" -->
<h3>Hall of Shame!!!</h3>
The following products and/or projects appear to use BusyBox, but do not
appear to release source code as required by the <a
href="/license.html">BusyBox license</a>. This is a violation of the law!
The distributors of these products are invited to contact <a href=
"mailto:andersen@codepoet.org">Erik Andersen</a> if they have any confusion
as to what is needed to bring their products into compliance, or if they have
already brought their product into compliance and wish to be removed from the
Hall of Shame.
<p>
Here are the details of <a href="/license.html">exactly how to comply
with the BusyBox license</a>, so there should be no question as to
exactly what is expected.
Complying with the Busybox license is easy and completely free, so the
companies listed below should be ashamed of themselves. Furthermore, each
product listed here is subject to being legally ordered to cease and desist
distribution for violation of copyright law, and the distributor of each
product is subject to being sued for statutory copyright infringement damages
plus legal fees. Nobody wants to be sued, and <a
href="mailto:andersen@codepoet.org">Erik</a> certainly has better things to do
than sue people. But he will sue if forced to do so to maintain compliance.
Do everyone a favor and don't break the law -- if you use busybox, comply with
the busybox license by releasing the source code with your product.
<p>
<ul>
<li><a href="http://www.dlink.com/"> DLink - Model GSL-G604T, DSL-300T, and possibly other models</a>
<li><a href="http://www.trittontechnologies.com/products.html">Tritton Technologies NAS120</a>
<br>see <a href="http://www.ussg.iu.edu/hypermail/linux/kernel/0404.0/1611.html">here for details</a>
<li><a href="http://www.macsense.com/product/homepod/">Macsense HomePod</a>
<br>with details
<a href="http://developer.gloolabs.com/modules.php?op=modload&name=Forums&file=viewtopic&topic=123&forum=7">here</a>
<li><a href="http://www.cpx.com/products.asp?c=Wireless+Products">Compex Wireless Products</a>
<br>appears to be running v0.60.5 with Linux version 2.4.20-uc0 on ColdFire,
but no source code is mentioned or offered.
<li><a href="http://www.inventel.com/en/product/datasheet/10/">Inventel DW 200 wireless/ADSL router</a>
<li><a href="http://www.sweex.com/product.asp">Sweex DSL router</a>
<br>appears to be running BusyBox v1.00-pre2 and udhcpd, but no source
code is mentioned or offered.
<li><a href="http://www.trendware.com/products/TEW-410APB.htm">TRENDnet TEW-410APB</a>
</li><li><a href="http://www.hauppauge.com/Pages/products/data_mediamvp.html">Hauppauge Media MVP</a>
<br>Hauppauge contacted me on 16 Dec 2003, and claims to be working on resolving this problem.
</li><li><a href="http://www.hitex.com/download/adescom/data/">TriCore</a>
</li><li><a href="http://www.allnet.de/">ALLNET 0186 wireless router</a>
</li><li><a href="http://www.dmmtv.com/">Dreambox DM7000S DVB Satellite Receiver</a>
<br> Dream Multimedia contacted me on 22 Dec 2003 and is working on resolving this problem.
<br> Source _may_ be here: http://cvs.tuxbox.org/cgi-bin/viewcvs.cgi/tuxbox/cdk/
</li><li><a href="http://testing.lkml.org/slashdot.php?mid=331690">Sigma Designs EM8500 based DVD players</a>
<br>Source for the Sigma Designs reference platform is found here<br>
<a href="http://www.uclinux.org/pub/uClinux/ports/arm/EM8500/uClinux-2.4-sigma.tar.gz">uClinux-2.4-sigma.tar.gz</a>, so while Sigma Designs itself appears to be in compliance, as far as I can tell,
no vendors of Sigma Designs EM8500 based devices actually comply with the GPL....
</li><li><a href="http://testing.lkml.org/slashdot.php?mid=433790">Liteon LVD2001 DVD player using the Sigma Designs EM8500</a>
</li><li><a href="http://www.rimax.net/">Rimax DVD players using the Sigma Designs EM8500</a>
</li><li><a href="http://www.vinc.us/">Bravo DVD players using the Sigma Designs EM8500</a>
</li><li><a href="http://www.hb-direct.com/">H&B DX3110 Divx player based on Sigma Designs EM8500</a>
</li><li><a href="http://www.recospa.it/mdpro1/index.php">United *DVX4066 mpeg4 capable DVD players</a>
</li><li>Undoubtedly there are others... Please report them so we can shame them (or if necessary sue them) into compliance.
</ul>
<!--#include file="footer.html" -->
+5 -5
View File
@@ -89,11 +89,11 @@ Currently defined functions include:
fgrep, find, fold, free, freeramdisk, fsck.minix, ftpget, ftpput, getopt,
getty, grep, gunzip, gzip, halt, hdparm, head, hexdump, hostid, hostname,
httpd, hush, hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod,
install, ip, ipcalc, iplink, iproute, iptunnel, kill, killall, klogd, lash,
last, length, linuxrc, ln, loadfont, loadkmap, logger, login, logname,
logread, losetup, ls, lsmod, makedevs, md5sum, mesg, mkdir, mkfifo,
mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, msh, mt, mv,
nameif, nc, netstat, nslookup, od, openvt, passwd, patch, pidof, ping,
install, ip, ipaddr, ipcalc, iplink, iproute, iptunnel, kill, killall,
klogd, lash, last, length, linuxrc, ln, loadfont, loadkmap, logger, login,
logname, logread, losetup, ls, lsmod, makedevs, md5sum, mesg, mkdir,
mkfifo, mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, msh, mt,
mv, nameif, nc, netstat, nslookup, od, openvt, passwd, patch, pidof, ping,
ping6, pipe_progress, pivot_root, poweroff, printf, ps, pwd, rdate,
readlink, realpath, reboot, renice, reset, rm, rmdir, rmmod, route, rpm,
rpm2cpio, run-parts, rx, sed, seq, setkeycodes, sha1sum, sleep, sort,
+2 -7
View File
@@ -52,10 +52,10 @@ int mu_main(int argc, char **argv)
char mu;
if ((fd = open("/dev/random", O_RDONLY)) < 0)
perror_msg_and_die("/dev/random");
bb_perror_msg_and_die("/dev/random");
if ((n = safe_read(fd, &mu, 1)) < 1)
perror_msg_and_die("/dev/random");
bb_perror_msg_and_die("/dev/random");
return mu;
}
@@ -137,11 +137,6 @@ algorithm in busybox.c and the Gods of BusyBox smite you. Yea, verily:
/* all programs below here are alphabetically "greater than" 'mu' */
Finally, add a define for your applet to include/config.h
#undef CONFIG_MU
Documentation
-------------
+7 -5
View File
@@ -17,13 +17,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
TOPDIR:= ../
top_srcdir=..
top_builddir=..
srcdir=$(top_srcdir)/editors
EDITOR_DIR:=./
include $(TOPDIR).config
include $(TOPDIR)Rules.mak
include Makefile.in
include $(top_builddir)/Rules.mak
include $(top_builddir)/.config
include $(srcdir)/Makefile.in
all: $(libraries-y)
-include $(TOPDIR).depend
-include $(top_builddir)/.depend
clean:
rm -f *.o *.a $(AR_TARGET)
+6 -2
View File
@@ -19,8 +19,9 @@
EDITOR_AR:=editors.a
ifndef $(EDITOR_DIR)
EDITOR_DIR:=$(TOPDIR)editors/
EDITOR_DIR:=$(top_builddir)/editors/
endif
srcdir=$(top_srcdir)/editors
EDITOR-y:=
EDITOR-$(CONFIG_AWK) += awk.o
@@ -40,5 +41,8 @@ ifeq ($(needlibm-y),y)
endif
$(EDITOR_DIR)$(EDITOR_AR): $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
$(AR) -ro $@ $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
$(AR) $(ARFLAGS) $@ $(patsubst %,$(EDITOR_DIR)%, $(EDITOR-y))
$(EDITOR_DIR)%.o: $(srcdir)/%.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+7 -3
View File
@@ -1084,7 +1084,7 @@ static node *parse_expr(unsigned long iexp) {
cn->a.n = vn;
xtc = TC_OPERAND | TC_UOPPRE | TC_REGEXP;
if (tc & (TC_OPERAND | TC_REGEXP)) {
xtc = TC_UOPPRE | TC_BINOP | TC_OPERAND | iexp;
xtc = TC_UOPPRE | TC_UOPPOST | TC_BINOP | TC_OPERAND | iexp;
/* one should be very careful with switch on tclass -
* only simple tclasses should be used! */
switch (tc) {
@@ -1101,7 +1101,6 @@ static node *parse_expr(unsigned long iexp) {
cn->info |= xS;
cn->r.n = parse_expr(TC_ARRTERM);
}
xtc = TC_UOPPOST | TC_UOPPRE | TC_BINOP | TC_OPERAND | iexp;
break;
case TC_NUMBER:
@@ -1554,7 +1553,7 @@ static void handle_special(var *v) {
memcpy(b+len, s, l);
len += l;
}
b[len] = '\0';
if (b) b[len] = '\0';
setvar_p(V[F0], b);
is_f0_split = TRUE;
@@ -2551,6 +2550,7 @@ static int awk_exit(int r) {
if (! exiting) {
exiting = TRUE;
nextrec = FALSE;
evaluate(endseq.first, &tv);
}
@@ -2670,8 +2670,12 @@ extern int awk_main(int argc, char **argv) {
for (envp=environ; *envp; envp++) {
s = bb_xstrdup(*envp);
s1 = strchr(s, '=');
if (!s1) {
goto keep_going;
}
*(s1++) = '\0';
setvar_u(findvar(iamarray(V[ENVIRON]), s), s1);
keep_going:
free(s);
}
+63 -49
View File
@@ -34,7 +34,10 @@
resulting sed_cmd_t structures are appended to a linked list
(sed_cmd_head/sed_cmd_tail).
process_file() does actual sedding, reading data lines from an input FILE *
add_input_file() adds a FILE * to the list of input files. We need to
know them all ahead of time to find the last line for the $ match.
process_files() does actual sedding, reading data lines from each input FILE *
(which could be stdin) and applying the sed command list (sed_cmd_head) to
each of the resulting lines.
@@ -112,17 +115,20 @@ typedef struct sed_cmd_s {
/* globals */
/* options */
static int be_quiet = 0, in_place=0, regex_type=0;
static int be_quiet, in_place, regex_type;
FILE *nonstdout;
char *outname;
char *outname,*hold_space;
/* List of input files */
int input_file_count,current_input_file;
FILE **input_file_list;
static const char bad_format_in_subst[] =
"bad format in substitution expression";
const char *const semicolon_whitespace = "; \n\r\t\v";
regmatch_t regmatch[10];
static regex_t *previous_regex_ptr = NULL;
static regex_t *previous_regex_ptr;
/* linked list of sed commands */
static sed_cmd_t sed_cmd_head;
@@ -169,6 +175,11 @@ static void free_and_close_stuff(void)
free(sed_cmd);
sed_cmd = sed_cmd_next;
}
if(hold_space) free(hold_space);
while(current_input_file<input_file_count)
fclose(input_file_list[current_input_file++]);
}
#endif
@@ -563,6 +574,8 @@ void add_cmd(char *cmdstr)
}
}
/* Append to a string, reallocating memory as necessary. */
struct pipeline {
char *buf; /* Space to hold string */
int idx; /* Space used */
@@ -716,20 +729,29 @@ static void flush_append(void)
append_head=append_tail=NULL;
}
/* Get next line of input, flushing append buffer and noting if we hit EOF
* without a newline on the last line.
*/
static char *get_next_line(FILE * file, int *no_newline)
void add_input_file(FILE *file)
{
char *temp;
input_file_list=xrealloc(input_file_list,(input_file_count+1)*sizeof(FILE *));
input_file_list[input_file_count++]=file;
}
/* Get next line of input from input_file_list, flushing append buffer and
* noting if we ran out of files without a newline on the last line we read.
*/
static char *get_next_line(int *no_newline)
{
char *temp=NULL;
int len;
flush_append();
temp=bb_get_line_from_file(file);
if(temp) {
len=strlen(temp);
if(len && temp[len-1]=='\n') temp[len-1]=0;
else *no_newline=1;
while(current_input_file<input_file_count) {
temp=bb_get_line_from_file(input_file_list[current_input_file]);
if(temp) {
len=strlen(temp);
*no_newline=!(len && temp[len-1]=='\n');
if(!*no_newline) temp[len-1]=0;
break;
} else fclose(input_file_list[current_input_file++]);
}
return temp;
@@ -755,15 +777,15 @@ static int puts_maybe_newline(char *s, FILE *file, int missing_newline, int no_n
#define sed_puts(s,n) missing_newline=puts_maybe_newline(s,nonstdout,missing_newline,n)
static void process_file(FILE *file)
static void process_files(void)
{
char *pattern_space, *next_line, *hold_space=NULL;
static int linenum = 0, missing_newline=0;
char *pattern_space, *next_line;
int linenum = 0, missing_newline=0;
int no_newline,next_no_newline=0;
next_line = get_next_line(file,&next_no_newline);
next_line = get_next_line(&next_no_newline);
/* go through every line in the file */
/* go through every line in each file */
for(;;) {
sed_cmd_t *sed_cmd;
int substituted=0;
@@ -773,7 +795,7 @@ static void process_file(FILE *file)
no_newline=next_no_newline;
/* Read one line in advance so we can act on the last line, the '$' address */
next_line = get_next_line(file,&next_no_newline);
next_line = get_next_line(&next_no_newline);
linenum++;
restart:
/* for every line, go through all the commands */
@@ -908,7 +930,7 @@ restart:
/* Cut and paste text (replace) */
case 'c':
/* Only triggers on last line of a matching range. */
if (!sed_cmd->in_match) sed_puts(sed_cmd->string,1);
if (!sed_cmd->in_match) sed_puts(sed_cmd->string,0);
goto discard_line;
/* Read file, append contents to output */
@@ -942,7 +964,7 @@ restart:
free(pattern_space);
pattern_space = next_line;
no_newline=next_no_newline;
next_line = get_next_line(file,&next_no_newline);
next_line = get_next_line(&next_no_newline);
linenum++;
break;
}
@@ -972,7 +994,7 @@ restart:
pattern_space[len]='\n';
strcpy(pattern_space+len+1, next_line);
no_newline=next_no_newline;
next_line = get_next_line(file,&next_no_newline);
next_line = get_next_line(&next_no_newline);
linenum++;
}
break;
@@ -1007,10 +1029,7 @@ restart:
}
case 'g': /* Replace pattern space with hold space */
free(pattern_space);
if (hold_space) {
pattern_space = strdup(hold_space);
no_newline=0;
}
pattern_space = strdup(hold_space ? hold_space : "");
break;
case 'G': /* Append newline and hold space to pattern space */
{
@@ -1096,9 +1115,7 @@ static void add_cmd_block(char *cmdstr)
extern int sed_main(int argc, char **argv)
{
int status = EXIT_SUCCESS;
int opt;
uint8_t getpat = 1;
int status = EXIT_SUCCESS, opt, getpat = 1;
#ifdef CONFIG_FEATURE_CLEAN_UP
/* destroy command strings on exit */
@@ -1153,8 +1170,7 @@ extern int sed_main(int argc, char **argv)
}
}
/* if we didn't get a pattern from a -e and no command file was specified,
* argv[optind] should be the pattern. no pattern, no worky */
/* if we didn't get a pattern from -e or -f, use argv[optind] */
if(getpat) {
if (argv[optind] == NULL)
bb_show_usage();
@@ -1171,49 +1187,47 @@ extern int sed_main(int argc, char **argv)
* files were specified or '-' was specified, take input from stdin.
* Otherwise, we process all the files specified. */
if (argv[optind] == NULL) {
if(in_place) {
fprintf(stderr,"sed: Filename required for -i\n");
exit(1);
}
process_file(stdin);
if(in_place) bb_error_msg_and_die("Filename required for -i");
add_input_file(stdin);
process_files();
} else {
int i;
FILE *file;
for (i = optind; i < argc; i++) {
if(!strcmp(argv[i], "-") && !in_place) {
process_file(stdin);
add_input_file(stdin);
process_files();
} else {
file = bb_wfopen(argv[i], "r");
if (file) {
if(in_place) {
struct stat statbuf;
int nonstdoutfd;
outname=bb_xstrndup(argv[i],strlen(argv[i])+6);
strcat(outname,"XXXXXX");
if(-1==(nonstdoutfd=mkstemp(outname)))
bb_error_msg_and_die("no temp file");
nonstdout=fdopen(nonstdoutfd,"w");
/* Set permissions of output file */
fstat(fileno(file),&statbuf);
mkstemp(outname);
nonstdout=bb_wfopen(outname,"w");
/* Set permissions of output file */
fstat(fileno(file),&statbuf);
fchmod(fileno(nonstdout),statbuf.st_mode);
atexit(cleanup_outname);
}
process_file(file);
fclose(file);
if(in_place) {
fchmod(nonstdoutfd,statbuf.st_mode);
add_input_file(file);
process_files();
fclose(nonstdout);
nonstdout=stdout;
unlink(argv[i]);
rename(outname,argv[i]);
free(outname);
outname=0;
}
} else add_input_file(file);
} else {
status = EXIT_FAILURE;
}
}
}
if(input_file_count>current_input_file) process_files();
}
return status;
+58 -48
View File
@@ -19,7 +19,7 @@
*/
static const char vi_Version[] =
"$Id: vi.c,v 1.37 2004/07/20 06:44:46 andersen Exp $";
"$Id: vi.c,v 1.38 2004/08/19 19:15:06 andersen Exp $";
/*
* To compile for standalone use:
@@ -166,7 +166,7 @@ static int vi_setops;
static int editing; // >0 while we are editing a file
static int cmd_mode; // 0=command 1=insert
static int cmd_mode; // 0=command 1=insert 2=replace
static int file_modified; // buffer contents changed
static int fn_start; // index of first cmd line file name
static int save_argc; // how many file names on cmd line
@@ -272,7 +272,7 @@ static void show_status_line(void); // put a message on the bottom line
static void psb(const char *, ...); // Print Status Buf
static void psbs(const char *, ...); // Print Status Buf in standout mode
static void ni(Byte *); // display messages
static void edit_status(void); // show file status on status line
static void compute_edit_status(void); // format file status on status line
static void redraw(int); // force a full screen refresh
static void format_line(Byte*, Byte*, int);
static void refresh(int); // update the terminal from screen[]
@@ -344,6 +344,7 @@ extern int vi_main(int argc, char **argv)
#endif /* CONFIG_FEATURE_VI_CRASHME */
status_buffer = STATUS_BUFFER;
*status_buffer = '\0'; // clear status buffer
#ifdef CONFIG_FEATURE_VI_READONLY
vi_readonly = readonly = FALSE;
@@ -449,7 +450,7 @@ static void edit_file(Byte * fn)
if (ch < 1) {
(void) char_insert(text, '\n'); // start empty buf with dummy line
}
file_modified = FALSE;
file_modified = 0;
#ifdef CONFIG_FEATURE_VI_YANKMARK
YDreg = 26; // default Yank/Delete reg
Ureg = 27; // hold orig line for "U" cmd
@@ -462,7 +463,6 @@ static void edit_file(Byte * fn)
last_forward_char = last_input_char = '\0';
crow = 0;
ccol = 0;
edit_status();
#ifdef CONFIG_FEATURE_VI_USE_SIGNALS
catch_sig(0);
@@ -507,7 +507,6 @@ static void edit_file(Byte * fn)
#endif /* CONFIG_FEATURE_VI_DOT_CMD */
redraw(FALSE); // dont force every col re-draw
show_status_line();
fflush(stdout);
//------This is the main Vi cmd handling loop -----------------------
while (editing > 0) {
@@ -676,7 +675,7 @@ static void colon(Byte * buf)
Byte c, *orig_buf, *buf1, *q, *r;
Byte *fn, cmd[BUFSIZ], args[BUFSIZ];
int i, l, li, ch, st, b, e;
int useforce, forced;
int useforce = FALSE, forced = FALSE;
struct stat st_buf;
// :3154 // if (-e line 3154) goto it else stay put
@@ -693,7 +692,6 @@ static void colon(Byte * buf)
// :s/find/replace/ // substitute pattern "find" with "replace"
// :!<cmd> // run <cmd> then return
//
forced = useforce = FALSE;
if (strlen((char *) buf) <= 0)
goto vc1;
@@ -835,7 +833,7 @@ static void colon(Byte * buf)
(void) char_insert(text, '\n');
ch= 1;
}
file_modified = FALSE;
file_modified = 0;
#ifdef CONFIG_FEATURE_VI_YANKMARK
if (Ureg >= 0 && Ureg < 28 && reg[Ureg] != 0) {
free(reg[Ureg]); // free orig line reg- for 'U'
@@ -872,7 +870,7 @@ static void colon(Byte * buf)
cfn = (Byte *) bb_xstrdup((char *) args);
} else {
// user wants file status info
edit_status();
/* no-op */;
}
} else if (strncasecmp((char *) cmd, "features", i) == 0) { // what features are available
// print out values of all features
@@ -978,7 +976,7 @@ static void colon(Byte * buf)
// if the insert is before "dot" then we need to update
if (q <= dot)
dot += ch;
file_modified = TRUE;
file_modified++;
}
} else if (strncasecmp((char *) cmd, "rewind", i) == 0) { // rewind cmd line args
if (file_modified && ! useforce) {
@@ -1110,7 +1108,7 @@ static void colon(Byte * buf)
}
psb("\"%s\" %dL, %dC", fn, li, l);
if (q == text && r == end - 1 && l == ch)
file_modified = FALSE;
file_modified = 0;
if ((cmd[0] == 'x' || cmd[1] == 'q') && l == ch) {
editing = 0;
}
@@ -1589,16 +1587,16 @@ static Byte *char_insert(Byte * p, Byte c) // insert the char c at 'p'
c = get_one_char();
*p = c;
p++;
file_modified = TRUE; // has the file been modified
file_modified++; // has the file been modified
} else if (c == 27) { // Is this an ESC?
cmd_mode = 0;
cmdcnt = 0;
end_cmd_q(); // stop adding to q
strcpy((char *) status_buffer, " "); // clear the status buffer
*status_buffer = '\0'; // clear the status buffer
if ((p[-1] != '\n') && (dot>text)) {
p--;
}
} else if (c == erase_char) { // Is this a BS
} else if (c == erase_char || c == 8 || c == 127) { // Is this a BS
// 123456789
if ((p[-1] != '\n') && (dot>text)) {
p--;
@@ -1644,7 +1642,7 @@ static Byte *stupid_insert(Byte * p, Byte c) // stupidly insert the char c at 'p
p = text_hole_make(p, 1);
if (p != 0) {
*p = c;
file_modified = TRUE; // has the file been modified
file_modified++; // has the file been modified
p++;
}
return (p);
@@ -1842,7 +1840,7 @@ static Byte *text_hole_make(Byte * p, int size) // at "p", make a 'size' byte ho
}
memset(p, ' ', size); // clear new hole
end = end + size; // adjust the new END
file_modified = TRUE; // has the file been modified
file_modified++; // has the file been modified
thm0:
return (p);
}
@@ -1878,7 +1876,7 @@ static Byte *text_hole_delete(Byte * p, Byte * q) // delete "p" thru "q", inclus
dest = end - 1; // make sure dest in below end-1
if (end <= text)
dest = end = text; // keep pointers valid
file_modified = TRUE; // has the file been modified
file_modified++; // has the file been modified
thd0:
return (dest);
}
@@ -2342,7 +2340,7 @@ static Byte readit(void) // read (maybe cursor) key from stdin
}
//----- IO Routines --------------------------------------------
static Byte get_one_char()
static Byte get_one_char(void)
{
static Byte c;
@@ -2497,7 +2495,7 @@ static int file_insert(Byte * fn, Byte * p, int size)
psbs("could not read all of file \"%s\"", fn);
}
if (cnt >= size)
file_modified = TRUE;
file_modified++;
fi0:
return (cnt);
}
@@ -2602,25 +2600,25 @@ static void place_cursor(int row, int col, int opti)
}
//----- Erase from cursor to end of line -----------------------
static void clear_to_eol()
static void clear_to_eol(void)
{
write1(Ceol); // Erase from cursor to end of line
}
//----- Erase from cursor to end of screen -----------------------
static void clear_to_eos()
static void clear_to_eos(void)
{
write1(Ceos); // Erase from cursor to end of screen
}
//----- Start standout mode ------------------------------------
static void standout_start() // send "start reverse video" sequence
static void standout_start(void) // send "start reverse video" sequence
{
write1(SOs); // Start reverse video mode
}
//----- End standout mode --------------------------------------
static void standout_end() // send "end reverse video" sequence
static void standout_end(void) // send "end reverse video" sequence
{
write1(SOn); // End reverse video mode
}
@@ -2650,7 +2648,7 @@ static void Indicate_Error(void)
//----- Screen[] Routines --------------------------------------
//----- Erase the Screen[] memory ------------------------------
static void screen_erase()
static void screen_erase(void)
{
memset(screen, ' ', screensize); // clear new screen
}
@@ -2661,6 +2659,7 @@ static void show_status_line(void)
static int last_cksum;
int l, cnt, cksum;
compute_edit_status();
cnt = strlen((char *) status_buffer);
for (cksum= l= 0; l < cnt; l++) { cksum += (int)(status_buffer[l]); }
// don't write the status line unless it changes
@@ -2671,6 +2670,7 @@ static void show_status_line(void)
clear_to_eol();
place_cursor(crow, ccol, FALSE); // put cursor back in correct place
}
fflush(stdout);
}
//----- format the status buffer, the bottom line of screen ------
@@ -2681,8 +2681,7 @@ static void psbs(const char *format, ...)
va_start(args, format);
strcpy((char *) status_buffer, SOs); // Terminal standout mode on
vsprintf((char *) status_buffer + strlen((char *) status_buffer), format,
args);
vsprintf((char *) status_buffer + strlen((char *) status_buffer), format, args);
strcat((char *) status_buffer, SOn); // Terminal standout mode off
va_end(args);
@@ -2708,12 +2707,19 @@ static void ni(Byte * s) // display messages
psbs("\'%s\' is not implemented", buf);
}
static void edit_status(void) // show file status on status line
static void compute_edit_status(void) // show file status on status line
{
int cur, tot, percent;
int cur, percent;
static int tot;
static int last_file_modified = -1;
cur = count_lines(text, dot);
tot = count_lines(text, end - 1);
/* try and reduce counting */
if (file_modified != last_file_modified) {
tot = cur + count_lines(dot, end - 1) - 1;
last_file_modified = file_modified;
}
// current line percent
// ------------- ~~ ----------
// total lines 100
@@ -2723,17 +2729,21 @@ static void edit_status(void) // show file status on status line
cur = tot = 0;
percent = 100;
}
psb("\"%s\""
sprintf((char *) status_buffer,
"\"%s\""
#ifdef CONFIG_FEATURE_VI_READONLY
"%s"
"%s"
#endif /* CONFIG_FEATURE_VI_READONLY */
"%s line %d of %d --%d%%--",
(cfn != 0 ? (char *) cfn : "No file"),
"%s"
"%s line %d of %d --%d%%--",
(cfn != 0 ? (char *) cfn : "No file"),
#ifdef CONFIG_FEATURE_VI_READONLY
((vi_readonly || readonly) ? " [Read only]" : ""),
((vi_readonly || readonly) ? " [Read only]" : ""),
#endif /* CONFIG_FEATURE_VI_READONLY */
(file_modified ? " [modified]" : ""),
cur, tot, percent);
(cmd_mode ? (cmd_mode == 2 ? " [Replace]":" [Insert]") : ""),
(file_modified ? " [modified]" : ""),
cur, tot, percent);
}
//----- Force refresh of all Lines -----------------------------
@@ -2938,6 +2948,8 @@ static void do_cmd(Byte c)
p = q = save_dot = msg = buf; // quiet the compiler
memset(buf, '\0', 9); // clear buf
show_status_line();
/* if this is a cursor key, skip these checks */
switch (c) {
case VI_K_UP:
@@ -3057,12 +3069,11 @@ key_cmd_mode:
dot_scroll(rows - 2, 1);
break;
case 7: // ctrl-G show current status
edit_status();
break;
case 'h': // h- move left
case VI_K_LEFT: // cursor key Left
case 8: // ctrl-H- move left (This may be ERASE char)
case 127: // DEL- move left (This may be ERASE char)
case 8: // ctrl-H- move left (This may be ERASE char)
case 127: // DEL- move left (This may be ERASE char)
if (cmdcnt-- > 1) {
do_cmd(c);
} // repeat cnt
@@ -3225,7 +3236,7 @@ key_cmd_mode:
//
// dont separate these two commands. 'f' depends on ';'
//
//**** fall thru to ... 'i'
//**** fall thru to ... ';'
case ';': // ;- look at rest of line for last forward char
if (cmdcnt-- > 1) {
do_cmd(';');
@@ -3376,13 +3387,13 @@ key_cmd_mode:
strncasecmp((char *) p, "wq", cnt) == 0 ||
strncasecmp((char *) p, "x", cnt) == 0) {
cnt = file_write(cfn, text, end - 1);
file_modified = FALSE;
file_modified = 0;
psb("\"%s\" %dL, %dC", cfn, count_lines(text, end - 1), cnt);
if (p[0] == 'x' || p[1] == 'q') {
editing = 0;
}
} else if (strncasecmp((char *) p, "file", cnt) == 0 ) {
edit_status(); // show current file status
/* no-op */; // show current file status
} else if (sscanf((char *) p, "%d", &j) > 0) {
dot = find_line(j); // go to line # j
dot_skip_over_ws();
@@ -3483,7 +3494,6 @@ key_cmd_mode:
case VI_K_INSERT: // Cursor Key Insert
dc_i:
cmd_mode = 1; // start insrting
psb("-- Insert --");
break;
case 'J': // J- join current and next lines together
if (cmdcnt-- > 2) {
@@ -3492,6 +3502,7 @@ key_cmd_mode:
dot_end(); // move to NL
if (dot < end - 1) { // make sure not last char in text[]
*dot++ = ' '; // replace NL with space
file_modified++;
while (isblnk(*dot)) { // delete leading WS
dot_delete();
}
@@ -3532,7 +3543,6 @@ key_cmd_mode:
case 'R': // R- continuous Replace char
dc5:
cmd_mode = 2;
psb("-- Replace --");
break;
case 'X': // X- delete char before dot
case 'x': // x- delete the current char
@@ -3682,7 +3692,7 @@ key_cmd_mode:
c1 = get_one_char(); // get the replacement char
if (*dot != '\n') {
*dot = c1;
file_modified = TRUE; // has the file been modified
file_modified++; // has the file been modified
}
end_cmd_q(); // stop adding to q
break;
@@ -3727,10 +3737,10 @@ key_cmd_mode:
} // repeat cnt
if (islower(*dot)) {
*dot = toupper(*dot);
file_modified = TRUE; // has the file been modified
file_modified++; // has the file been modified
} else if (isupper(*dot)) {
*dot = tolower(*dot);
file_modified = TRUE; // has the file been modified
file_modified++; // has the file been modified
}
dot_right();
end_cmd_q(); // stop adding to q
+2 -1
View File
@@ -15,9 +15,10 @@ then
do :
done
metric=0
for i in $router
do
/sbin/route add default gw $i dev $interface
/sbin/route add default gw $i dev $interface metric $((metric++))
done
fi
+2 -1
View File
@@ -15,9 +15,10 @@ then
do :
done
metric=0
for i in $router
do
/sbin/route add default gw $i dev $interface
/sbin/route add default gw $i dev $interface metric $((metric++))
done
fi
+2 -1
View File
@@ -22,8 +22,9 @@ case "$1" in
:
done
metric=0
for i in $router ; do
route add default gw $i dev $interface
route add default gw $i dev $interface metric $((metric++))
done
fi
+7
View File
@@ -114,3 +114,10 @@ option lease 864000 # 10 days of seconds
#opt ntpsrv
#opt tftp
#opt bootfile
# Static leases map
#static_lease 00:60:08:11:CE:4E 192.168.0.54
#static_lease 00:60:08:11:CE:3E 192.168.0.44
+3 -3
View File
@@ -73,13 +73,13 @@ config CONFIG_FEATURE_GREP_EGREP_ALIAS
and various repetition operators.
config CONFIG_FEATURE_GREP_FGREP_ALIAS
bool " Alias fgrep to grep -f"
bool " Alias fgrep to grep -F"
default y
depends on CONFIG_GREP
help
fgrep sees the search pattern as a normal string rather than
fgrep sees the search pattern as a normal string rather than
regular expressions.
grep -f is always builtin, this just creates the fgrep alias.
grep -F is always builtin, this just creates the fgrep alias.
config CONFIG_FEATURE_GREP_CONTEXT
bool " Enable before and after context flags (-A, -B and -C)"
Loaded 100 of 277 files, more files were not shown because too many files have changed in this diff. Show more