Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0da28c91b | ||
|
|
52a3c2726e | ||
|
|
b89fcd4430 | ||
|
|
334dc65c92 | ||
|
|
a120c32cfa | ||
|
|
67ff3a1ffd | ||
|
|
0933a92f5a | ||
|
|
f295b5a408 | ||
|
|
8f3bc4ce52 | ||
|
|
a8d82fe52e | ||
|
|
b868f55c78 | ||
|
|
08573e0ac4 | ||
|
|
02e0355504 | ||
|
|
236e93d133 | ||
|
|
f62ea20aff | ||
|
|
266c1f5eff | ||
|
|
ffccf6eb5d | ||
|
|
03d8091859 | ||
|
|
514aeabc36 | ||
|
|
28c111e1c5 | ||
|
|
d4a5e255c4 | ||
|
|
3752d337b3 | ||
|
|
89f10bcf37 | ||
|
|
769a3ef08d | ||
|
|
f18bd8931d | ||
|
|
1a773a656e | ||
|
|
658f8b1d1a | ||
|
|
b8d2cd44a6 | ||
|
|
b51eb26568 | ||
|
|
07d2f4052f | ||
|
|
850b05fbde | ||
|
|
f796700cf0 | ||
|
|
4e864a36b6 | ||
|
|
e30495654d | ||
|
|
76729b8c69 | ||
|
|
5f46f1c241 | ||
|
|
b627c54813 | ||
|
|
6b3f757053 | ||
|
|
4040d3d712 | ||
|
|
8b3845106a | ||
|
|
4b77acafa6 | ||
|
|
7becf5987a | ||
|
|
a3170d5aab | ||
|
|
8f43126934 | ||
|
|
62419df95c | ||
|
|
4a9e34c148 | ||
|
|
a1fece2c70 | ||
|
|
d4f7a5edad | ||
|
|
c1893c5801 | ||
|
|
416c24224d | ||
|
|
7dad86601a | ||
|
|
e06bea7767 | ||
|
|
5b8a59400c | ||
|
|
c181f34c87 | ||
|
|
e7047887b0 | ||
|
|
37f4116ecb | ||
|
|
de4f07e56e | ||
|
|
9f6c12a42e | ||
|
|
2e0455d82b | ||
|
|
539eef6f28 | ||
|
|
d5c746f3a8 | ||
|
|
747f2f7d78 | ||
|
|
f6bba3d689 | ||
|
|
9adcf73152 | ||
|
|
5c0d84aaf0 | ||
|
|
142abc18ce | ||
|
|
22e1ca382b | ||
|
|
c83e3a6406 | ||
|
|
50547c0745 | ||
|
|
3860b2ebd6 | ||
|
|
5be6a200f0 | ||
|
|
b8c3a54531 | ||
|
|
11e69471be | ||
|
|
e39ee01821 | ||
|
|
fea4b446df | ||
|
|
4ddddd180e | ||
|
|
c3498f678a | ||
|
|
f0515dad66 | ||
|
|
7ffe133864 | ||
|
|
1a2d75fd72 | ||
|
|
d0550d8fc9 | ||
|
|
acbdc47aac | ||
|
|
2cd1eb16ad | ||
|
|
78cd84da8a | ||
|
|
e857122c97 | ||
|
|
d9c8ab40a4 | ||
|
|
3a2fcc63b8 | ||
|
|
bebc40b406 | ||
|
|
ba49651de9 | ||
|
|
90c9df93f3 | ||
|
|
0413af0e27 | ||
|
|
5c069aaf2f | ||
|
|
d85421de22 | ||
|
|
931ae9d2f8 | ||
|
|
0c5d9c27a5 | ||
|
|
7370f62493 | ||
|
|
0b6539f7f9 | ||
|
|
56f16b42c9 | ||
|
|
20872be9a4 | ||
|
|
3b9fc8fe2a | ||
|
|
de3ea9f049 | ||
|
|
aee0fd8320 | ||
|
|
303b7d83f0 | ||
|
|
f074afc2a0 | ||
|
|
cccf49fb0f | ||
|
|
7e4b3347b2 | ||
|
|
0874a613d2 | ||
|
|
8dc8cb133c | ||
|
|
5699b8525e | ||
|
|
54ac057c00 | ||
|
|
5c2c8eca4a | ||
|
|
e57feeb9e6 | ||
|
|
eba86e2adb | ||
|
|
e9080c9f41 | ||
|
|
7b215b99b2 | ||
|
|
1a41db8eaf | ||
|
|
94cf153c2b | ||
|
|
d09bcecda8 | ||
|
|
5f28455c6e | ||
|
|
b6e58d2b9a | ||
|
|
c16686c1e2 | ||
|
|
61b038accc | ||
|
|
8211db5af0 | ||
|
|
e0c83af4ce | ||
|
|
d2a897aab0 | ||
|
|
0bdf41ad7e | ||
|
|
bbce615c7e | ||
|
|
2849209db2 | ||
|
|
28d4e16cd7 | ||
|
|
d2160aaeab | ||
|
|
b1ffba0401 | ||
|
|
1b1942f93d | ||
|
|
7f9de02ca6 | ||
|
|
5912acb670 | ||
|
|
2685724e23 | ||
|
|
6d687817a8 | ||
|
|
b7077a7316 | ||
|
|
04d055f4e1 | ||
|
|
f6067beaa9 | ||
|
|
e6dc439b3a | ||
|
|
8179cf2b78 | ||
|
|
252183e3f5 | ||
|
|
e64bf409dd | ||
|
|
4ef5a84583 | ||
|
|
0120be94a0 | ||
|
|
9716575f1a | ||
|
|
40c9489d33 | ||
|
|
09c295a5bc | ||
|
|
00ed36fd52 | ||
|
|
b8b6816f7b | ||
|
|
f4fd3a1331 | ||
|
|
984b45142a | ||
|
|
6530f0d3a1 | ||
|
|
4636aa9dcd | ||
|
|
f235d05773 | ||
|
|
1c834407e3 | ||
|
|
debb21ece7 | ||
|
|
e81fc5fb30 | ||
|
|
5fa4db29f7 | ||
|
|
2053a8c747 | ||
|
|
e78fe2414b | ||
|
|
a92877403a | ||
|
|
a48b0a3af7 | ||
|
|
514633bf3f | ||
|
|
7f6295f516 | ||
|
|
28672dd3b9 | ||
|
|
9ef6c93090 | ||
|
|
976a55e168 | ||
|
|
f1d3ac429e | ||
|
|
637d2266e1 | ||
|
|
5289969f08 | ||
|
|
88c916bdec | ||
|
|
951df20b7e | ||
|
|
acf6c917e2 | ||
|
|
1acfb72e71 | ||
|
|
0d6d88a205 | ||
|
|
6fe55ae939 | ||
|
|
7857c03808 | ||
|
|
d12061b299 | ||
|
|
61796945e3 | ||
|
|
75a5684793 | ||
|
|
2af70005b9 | ||
|
|
fe4704e948 | ||
|
|
12940e1ce0 | ||
|
|
17d21fa519 | ||
|
|
a55d72bbb4 | ||
|
|
99825960c1 | ||
|
|
29c77f71ba | ||
|
|
dae099b2f9 | ||
|
|
638da75f4b | ||
|
|
07085855ad | ||
|
|
586d86cc8c | ||
|
|
9d1a33c690 | ||
|
|
add3eadc46 | ||
|
|
42c25735e6 | ||
|
|
fd7bc13557 | ||
|
|
f86bd9f2cd | ||
|
|
07cf92676a | ||
|
|
1dc0ccafdd | ||
|
|
8ac86e33a2 | ||
|
|
4a77c781ef | ||
|
|
cb920d9778 | ||
|
|
91b3d460c7 | ||
|
|
9c91e4142d | ||
|
|
0ad4daa54e | ||
|
|
738fb33994 | ||
|
|
aa5a602689 | ||
|
|
e6ba16f830 | ||
|
|
f7dd10f67c | ||
|
|
a79220db6e | ||
|
|
6b0658f5c0 | ||
|
|
6376b583e2 | ||
|
|
c98c7d9a14 | ||
|
|
761ec20f81 | ||
|
|
a406a9c853 | ||
|
|
eebcc1d98a | ||
|
|
d72e34c752 | ||
|
|
d3612178b7 | ||
|
|
2570b43e82 | ||
|
|
204ff1cea4 | ||
|
|
96fd1b98f1 | ||
|
|
baaa6e9e7d | ||
|
|
a3822de23e | ||
|
|
e16ab475ad | ||
|
|
977451ef44 | ||
|
|
47e5ca1ecb | ||
|
|
e3e28d3bb6 | ||
|
|
8efe967018 | ||
|
|
c4f72d1426 | ||
|
|
45638df230 | ||
|
|
2205c84de4 | ||
|
|
1393a39df4 | ||
|
|
2eed0e2d47 | ||
|
|
6e5687abc3 | ||
|
|
7b35121297 | ||
|
|
73116311e5 | ||
|
|
65f9dc01f3 | ||
|
|
640c1f547f | ||
|
|
ba5eb27ce3 | ||
|
|
c43f9edf88 | ||
|
|
294d113adb | ||
|
|
8417c8c38b | ||
|
|
7bf8f5bc5e | ||
|
|
8a0b59fb82 | ||
|
|
edc388cf4e | ||
|
|
3fe475677a | ||
|
|
f4523562b6 | ||
|
|
8aac05bfe5 | ||
|
|
7c59a83a77 | ||
|
|
4dc1d25a30 | ||
|
|
f36635cec6 | ||
|
|
c18ce373a2 | ||
|
|
c2b9186be1 | ||
|
|
2af30446f1 | ||
|
|
eb213bd2a2 | ||
|
|
7f2935ba0e | ||
|
|
70af8834df | ||
|
|
aa2afee922 | ||
|
|
839bd4a73b | ||
|
|
3acfedfafe | ||
|
|
23bc836f42 | ||
|
|
beb3bbd991 | ||
|
|
ef91bf67ed | ||
|
|
51ed242ad6 | ||
|
|
e15138a870 | ||
|
|
f57a614db9 | ||
|
|
a4389cfb51 | ||
|
|
14092a1ed2 | ||
|
|
81155f8fa8 | ||
|
|
2fdba24620 | ||
|
|
6231f092bd | ||
|
|
cc20ebc11e | ||
|
|
1cb2622f9c | ||
|
|
fe538ba5d6 | ||
|
|
87af49f26b | ||
|
|
640fb86b28 | ||
|
|
07f6b95d8f | ||
|
|
5875be406e | ||
|
|
55bf79f944 | ||
|
|
b65422cf65 | ||
|
|
350733abb8 | ||
|
|
d6bdd5dc08 | ||
|
|
b77158a934 | ||
|
|
99bd5adf99 | ||
|
|
759d7ececd | ||
|
|
530ea42abc | ||
|
|
dc4e75ef7c | ||
|
|
005f83adf5 | ||
|
|
d9461f887e | ||
|
|
c2942f0904 | ||
|
|
bb13624d8c | ||
|
|
502907f5b3 | ||
|
|
759515c26a | ||
|
|
29a05f56d5 | ||
|
|
9b04f1841e | ||
|
|
72f5f02184 | ||
|
|
5cd6461b6f | ||
|
|
e01c550eab | ||
|
|
21aacba2b7 | ||
|
|
8ce8f9b482 | ||
|
|
2233685f00 | ||
|
|
2ce002a732 | ||
|
|
b19c73dee6 | ||
|
|
3bff66617a | ||
|
|
87470def24 | ||
|
|
b54a748621 | ||
|
|
08dea3e5a7 | ||
|
|
62b031fb82 | ||
|
|
a6b7bdcf8c | ||
|
|
dc72f3ace2 | ||
|
|
7b8765c808 | ||
|
|
23365976f8 | ||
|
|
523c1675a2 | ||
|
|
e7bdfccb3f | ||
|
|
83e4a5bccf | ||
|
|
8b96b7169d | ||
|
|
4cee66d5a8 | ||
|
|
444566837c | ||
|
|
b79db92a21 | ||
|
|
c3f2956cfa | ||
|
|
4d5e4685fe | ||
|
|
ce6482eace | ||
|
|
97e2426582 | ||
|
|
6d3c7e7a9c | ||
|
|
24e098a77d | ||
|
|
d382c89467 | ||
|
|
3d5828fb6d | ||
|
|
062913f662 | ||
|
|
bf83355dda | ||
|
|
4456f25e8f | ||
|
|
5b3c05637d | ||
|
|
9a9f6777e9 | ||
|
|
96379b0d7d | ||
|
|
8f4cdd516d | ||
|
|
b287e2e27a | ||
|
|
c601ff149a | ||
|
|
2e9c257000 | ||
|
|
f1c56a9306 | ||
|
|
92fb9395f7 | ||
|
|
99a75d1376 | ||
|
|
de6a6ae876 | ||
|
|
6c0e0fb8ac | ||
|
|
3869f66eac | ||
|
|
9089844382 | ||
|
|
dc19af4179 | ||
|
|
fdd2a0f318 | ||
|
|
d3652bf334 | ||
|
|
0a57a79e38 | ||
|
|
4b4e09854c | ||
|
|
50af12dbd6 | ||
|
|
481772a4c2 | ||
|
|
5378fbcb33 | ||
|
|
8f4ef159f0 | ||
|
|
c774efe317 | ||
|
|
7001480a5e | ||
|
|
72d8e444f0 | ||
|
|
461c279ac1 | ||
|
|
b1d5b741ac | ||
|
|
546f21aa2d | ||
|
|
e6b811583a | ||
|
|
91e464632b | ||
|
|
6a9ca985b8 |
No files matched your search
@@ -11,7 +11,7 @@ incorect, _please_ let me know.
|
||||
Emanuele Aina <emanuele.aina@tiscali.it>
|
||||
run-parts
|
||||
|
||||
Erik Andersen <andersen@codepoet.org>, <andersen@codepoet.org>
|
||||
Erik Andersen <andersen@codepoet.org>
|
||||
Tons of new stuff, major rewrite of most of the
|
||||
core apps, tons of new apps as noted in header files.
|
||||
|
||||
@@ -22,16 +22,16 @@ Jeff Angielski <jeff@theptrgroup.com>
|
||||
ftpput, ftpget
|
||||
|
||||
Edward Betts <edward@debian.org>
|
||||
expr, hostid, logname, tty, wc, whoami, yes
|
||||
expr, hostid, logname, whoami
|
||||
|
||||
John Beppu <beppu@codepoet.org>
|
||||
du, head, nslookup, sort, tee, uniq
|
||||
du, nslookup, sort
|
||||
|
||||
Brian Candler <B.Candler@pobox.com>
|
||||
tiny-ls(ls)
|
||||
|
||||
Randolph Chung <tausq@debian.org>
|
||||
fbset, ping, hostname, and mkfifo
|
||||
fbset, ping, hostname
|
||||
|
||||
Dave Cinege <dcinege@psychosis.com>
|
||||
more(v2), makedevs, dutmp, modularization, auto links file,
|
||||
@@ -67,11 +67,21 @@ Stephan Linz <linz@li-pro.net>
|
||||
ipcalc, Red Hat equivalence
|
||||
|
||||
John Lombardo <john@deltanet.com>
|
||||
dirname, tr
|
||||
tr
|
||||
|
||||
Glenn McGrath <bug1@optushome.com.au>
|
||||
ar, dpkg, dpkg-deb
|
||||
|
||||
Manuel Novoa III <mjn3@codepoet.org>
|
||||
cat, head, mkfifo, mknod, rmdir, sleep, tee, tty, uniq, usleep, wc, yes,
|
||||
mesg, vconfig, make_directory, parse_mode, dirname, mode_string,
|
||||
get_last_path_component, simplify_path, and a number trivial libbb routines
|
||||
|
||||
also bug fixes, partial rewrites, and size optimizations in
|
||||
ash, basename, cal, cmp, cp, df, du, echo, env, ln, logname, md5sum, mkdir,
|
||||
mv, realpath, rm, sort, tail, touch, uname, watch, arith, human_readable,
|
||||
interface, dutmp, ifconfig
|
||||
|
||||
Vladimir Oleynik <dzo@simtreas.ru>
|
||||
cmdedit; xargs(current), httpd(current);
|
||||
ports: ash, crond, fdisk, inetd, stty, traceroute, top;
|
||||
@@ -109,3 +119,7 @@ Charles P. Wright <cpwright@villagenet.com>
|
||||
|
||||
Enrique Zanardi <ezanardi@ull.es>
|
||||
tarcat (since removed), loadkmap, various fixes, Debian maintenance
|
||||
|
||||
Tito Ragusa <farmatito@tiscali.it>
|
||||
devfsd and size optimizations in strings, openvt and deallocvt.
|
||||
|
||||
@@ -36,6 +36,9 @@ CFLAGS += -I/usr/include/selinux
|
||||
LIBRARIES += -lsecure
|
||||
endif
|
||||
|
||||
CONFIG_CONFIG_IN = sysdeps/$(TARGET_OS)/Config.in
|
||||
CONFIG_DEFCONFIG = sysdeps/$(TARGET_OS)/defconfig
|
||||
|
||||
ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
|
||||
|
||||
all: busybox busybox.links doc
|
||||
@@ -45,7 +48,7 @@ all: busybox busybox.links doc
|
||||
include $(patsubst %,%/Makefile.in, $(DIRS))
|
||||
|
||||
busybox: .depend include/config.h $(libraries-y)
|
||||
$(CC) $(LDFLAGS) -o $@ $(libraries-y) $(LIBRARIES)
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,--start-group $(libraries-y) $(LIBRARIES) -Wl,--end-group
|
||||
$(STRIPCMD) $@
|
||||
|
||||
busybox.links: applets/busybox.mkll include/config.h
|
||||
@@ -54,8 +57,9 @@ busybox.links: applets/busybox.mkll include/config.h
|
||||
install: applets/install.sh busybox busybox.links
|
||||
$(SHELL) $< $(PREFIX)
|
||||
|
||||
uninstall: busybox busybox.links
|
||||
for i in `cat busybox.links` ; do rm -f $$PREFIX$$i; done
|
||||
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
|
||||
$(SHELL) $< $(PREFIX) --hardlinks
|
||||
@@ -147,9 +151,9 @@ include/config/MARKER: depend scripts/split-include
|
||||
|
||||
include/config.h: .config
|
||||
@if [ ! -x ./scripts/config/conf ] ; then \
|
||||
make -C scripts/config conf; \
|
||||
$(MAKE) -C scripts/config conf; \
|
||||
fi;
|
||||
@./scripts/config/conf -o sysdeps/$(TARGET_OS)/Config.in
|
||||
@./scripts/config/conf -o $(CONFIG_CONFIG_IN)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
|
||||
@@ -167,36 +171,36 @@ all: menuconfig
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
scripts/config/conf:
|
||||
make -C scripts/config conf
|
||||
$(MAKE) -C scripts/config conf
|
||||
-@if [ ! -f .config ] ; then \
|
||||
cp sysdeps/$(TARGET_OS)/defconfig .config; \
|
||||
cp $(CONFIG_DEFCONFIG) .config; \
|
||||
fi
|
||||
scripts/config/mconf:
|
||||
make -C scripts/config ncurses conf mconf
|
||||
$(MAKE) -C scripts/config ncurses conf mconf
|
||||
-@if [ ! -f .config ] ; then \
|
||||
cp sysdeps/$(TARGET_OS)/defconfig .config; \
|
||||
cp $(CONFIG_DEFCONFIG) .config; \
|
||||
fi
|
||||
|
||||
menuconfig: scripts/config/mconf
|
||||
@./scripts/config/mconf sysdeps/$(TARGET_OS)/Config.in
|
||||
@./scripts/config/mconf $(CONFIG_CONFIG_IN)
|
||||
|
||||
config: scripts/config/conf
|
||||
@./scripts/config/conf sysdeps/$(TARGET_OS)/Config.in
|
||||
@./scripts/config/conf $(CONFIG_CONFIG_IN)
|
||||
|
||||
oldconfig: scripts/config/conf
|
||||
@./scripts/config/conf -o sysdeps/$(TARGET_OS)/Config.in
|
||||
@./scripts/config/conf -o $(CONFIG_CONFIG_IN)
|
||||
|
||||
randconfig: scripts/config/conf
|
||||
@./scripts/config/conf -r sysdeps/$(TARGET_OS)/Config.in
|
||||
@./scripts/config/conf -r $(CONFIG_CONFIG_IN)
|
||||
|
||||
allyesconfig: scripts/config/conf
|
||||
@./scripts/config/conf -y sysdeps/$(TARGET_OS)/Config.in
|
||||
@./scripts/config/conf -y $(CONFIG_CONFIG_IN)
|
||||
|
||||
allnoconfig: scripts/config/conf
|
||||
@./scripts/config/conf -n sysdeps/$(TARGET_OS)/Config.in
|
||||
@./scripts/config/conf -n $(CONFIG_CONFIG_IN)
|
||||
|
||||
defconfig: scripts/config/conf
|
||||
@./scripts/config/conf -d sysdeps/$(TARGET_OS)/Config.in
|
||||
@./scripts/config/conf -d $(CONFIG_CONFIG_IN)
|
||||
|
||||
test tests: busybox
|
||||
# Note that 'tests' is depricated. Use 'make check' instead
|
||||
@@ -208,13 +212,13 @@ check: busybox
|
||||
|
||||
clean:
|
||||
- $(MAKE) -C tests clean
|
||||
- rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
|
||||
docs/busybox.net/BusyBox.html
|
||||
- rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
|
||||
docs/busybox.pdf docs/busybox.pod docs/busybox.net/busybox.html \
|
||||
docs/busybox _install pod2htm* *.gdb *.elf *~ core
|
||||
- rm -f busybox busybox.links libbb/loop.h .config.old .hdepend
|
||||
- rm -f .*config.log
|
||||
docs/busybox pod2htm* *.gdb *.elf *~ core .*config.log \
|
||||
docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
|
||||
docs/busybox.net/BusyBox.html busybox.links libbb/loop.h \
|
||||
.config.old .hdepend busybox
|
||||
- rm -rf _install
|
||||
- find . -name .\*.flags -exec rm -f {} \;
|
||||
- find . -name \*.o -exec rm -f {} \;
|
||||
- find . -name \*.a -exec rm -f {} \;
|
||||
@@ -228,20 +232,20 @@ distclean: clean
|
||||
|
||||
release: distclean #doc
|
||||
cd ..; \
|
||||
rm -rf busybox-$(VERSION); \
|
||||
cp -a busybox busybox-$(VERSION); \
|
||||
rm -rf $(PROG)-$(VERSION); \
|
||||
cp -a busybox $(PROG)-$(VERSION); \
|
||||
\
|
||||
find busybox-$(VERSION)/ -type d \
|
||||
find $(PROG)-$(VERSION)/ -type d \
|
||||
-name CVS \
|
||||
-print \
|
||||
-exec rm -rf {} \; ; \
|
||||
\
|
||||
find busybox-$(VERSION)/ -type f \
|
||||
find $(PROG)-$(VERSION)/ -type f \
|
||||
-name .\#* \
|
||||
-print \
|
||||
-exec rm -f {} \; ; \
|
||||
\
|
||||
tar -cvzf busybox-$(VERSION).tar.gz busybox-$(VERSION)/;
|
||||
tar -cvzf $(PROG)-$(VERSION).tar.gz $(PROG)-$(VERSION)/;
|
||||
|
||||
tags:
|
||||
ctags -R .
|
||||
|
||||
@@ -37,7 +37,7 @@ Supported architectures:
|
||||
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, and v850e.
|
||||
MIPS, cris, and v850e.
|
||||
|
||||
Supported libcs:
|
||||
|
||||
@@ -56,36 +56,6 @@ Supported kernels:
|
||||
|
||||
----------------
|
||||
|
||||
Shells:
|
||||
|
||||
lash is the very smallest shell (adds just 10k) and it is quite usable as
|
||||
a command prompt, but it is not suitable for any but the most trivial
|
||||
scripting (such as an initrd that calls insmod a few times) since it does
|
||||
not understand Bourne shell grammer. It does handle pipes, redirects, and
|
||||
job control though. Adding in command editing makes it a very nice
|
||||
lightweight command prompt.
|
||||
|
||||
hush is also quite small (just 18k) and it has very complete Bourne shell
|
||||
grammer. It handles if/then/else/fi just fine, but doesn't handle loops
|
||||
like for/do/done or case/esac and such. It also currently has a problem
|
||||
with job control. Using hush is not yet recommended.
|
||||
|
||||
msh: The minix shell (adds just 30k) is quite complete and handles things
|
||||
like for/do/done, case/esac and all the things you expect a Bourne shell to
|
||||
do. It is not always pedantically correct about Bourne shell grammer (try
|
||||
running the shell testscript "tests/sh.testcases" on it and compare vs bash)
|
||||
but for most things it works quite well. It also uses only vfork, so it can
|
||||
be used on uClinux systems. This was only recently added, so there is still
|
||||
room to shrink it further...
|
||||
|
||||
ash: This adds about 60k in the default configuration and is the most
|
||||
complete and most pedantically correct shell included with busybox. This
|
||||
shell was also recently added, and several people (mainly Vladimir and Erik)
|
||||
have been working on it. There are a number of configurable things at the
|
||||
top of ash.c as well, so check those out if you want to tweak things.
|
||||
|
||||
----------------
|
||||
|
||||
Getting help:
|
||||
|
||||
When you find you need help, you can check out the BusyBox mailing list
|
||||
@@ -97,12 +67,12 @@ the mailing list if you are interested.
|
||||
Bugs:
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
To: busybox@busybox.net
|
||||
To: busybox@mail.busybox.net
|
||||
From: diligent@testing.linux.org
|
||||
Subject: /bin/date doesn't work
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#--------------------------------------------------------
|
||||
PROG := busybox
|
||||
VERSION := 1.00-pre2
|
||||
VERSION := 1.00-pre5
|
||||
BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ TARGET_ARCH=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
|
||||
)
|
||||
endif
|
||||
|
||||
# Pull in the user's uClibc configuration
|
||||
# Pull in the user's busybox configuration
|
||||
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
|
||||
-include $(TOPDIR).config
|
||||
endif
|
||||
|
||||
+11
-2
@@ -135,6 +135,14 @@ int busybox_main(int argc, char **argv)
|
||||
/* If we've already been here once, exit now */
|
||||
if (been_there_done_that == 1 || argc < 1) {
|
||||
const struct BB_applet *a = applets;
|
||||
int output_width = 60;
|
||||
|
||||
#ifdef CONFIG_FEATURE_AUTOWIDTH
|
||||
/* Obtain the terminal width. */
|
||||
get_terminal_width_height(0, &output_width, NULL);
|
||||
/* leading tab and room to wrap */
|
||||
output_width -= 20;
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "%s\n\n"
|
||||
"Usage: busybox [function] [arguments]...\n"
|
||||
@@ -149,7 +157,7 @@ int busybox_main(int argc, char **argv)
|
||||
col +=
|
||||
fprintf(stderr, "%s%s", ((col == 0) ? "\t" : ", "),
|
||||
(a++)->name);
|
||||
if (col > 60 && a->name != 0) {
|
||||
if (col > output_width && a->name != 0) {
|
||||
fprintf(stderr, ",\n");
|
||||
col = 0;
|
||||
}
|
||||
@@ -160,8 +168,9 @@ int busybox_main(int argc, char **argv)
|
||||
|
||||
/* Flag that we've been here already */
|
||||
been_there_done_that = 1;
|
||||
|
||||
|
||||
/* Move the command line down a notch */
|
||||
/* Preserve pointers so setproctitle() works consistently */
|
||||
len = argv[argc] + strlen(argv[argc]) - argv[1];
|
||||
memmove(argv[0], argv[1], len);
|
||||
memset(argv[0] + len, 0, argv[1] - argv[0]);
|
||||
|
||||
+31
-19
@@ -16,13 +16,14 @@ config CONFIG_AR
|
||||
The original files' contents, mode (permissions), timestamp, owner,
|
||||
and group are preserved in the archive, and can be restored on
|
||||
extraction.
|
||||
|
||||
The stored filename is limited to 15 characters. (for more information
|
||||
see long filename support).
|
||||
ar has 60 bytes of overheads for every stored file.
|
||||
|
||||
This implementation of ar can extract archives, it cannot create or
|
||||
modify them.
|
||||
On an x86 system, the ar applet adds about XXX bytes.
|
||||
On an x86 system, the ar applet adds about 1K.
|
||||
|
||||
Unless you have a specific application which requires ar, you should
|
||||
probably say N here.
|
||||
@@ -41,14 +42,14 @@ config CONFIG_BUNZIP2
|
||||
bool "bunzip2"
|
||||
default n
|
||||
help
|
||||
bunzip2 is an compression utility using the Burrows-Wheeler block
|
||||
bunzip2 is a compression utility using the Burrows-Wheeler block
|
||||
sorting text compression algorithm, and Huffman coding. Compression
|
||||
is generally considerably better than that achieved by more
|
||||
conventional LZ77/LZ78-based compressors, and approaches the
|
||||
performance of the PPM family of statistical compressors.
|
||||
|
||||
The BusyBox bunzip2 applet is limited to de-compression only.
|
||||
On an x86 system, this applet adds about XXX bytes.
|
||||
On an x86 system, this applet adds about 11K.
|
||||
|
||||
Unless you have a specific application which requires bunzip2, you
|
||||
should probably say N here.
|
||||
@@ -92,7 +93,7 @@ config CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY
|
||||
default n
|
||||
depends on CONFIG_DPKG_DEB
|
||||
help
|
||||
This reduced dpkg-deb to the equivalent of "ar -p <deb> data.tar.gz | tar -zx".
|
||||
This reduces dpkg-deb to the equivalent of "ar -p <deb> data.tar.gz | tar -zx".
|
||||
However it saves space as none of the extra dpkg-deb, ar or tar options are
|
||||
needed, they are linked to internally.
|
||||
|
||||
@@ -103,7 +104,7 @@ config CONFIG_FEATURE_DEB_TAR_GZ
|
||||
help
|
||||
This is the default compression method inside the debian ar file.
|
||||
|
||||
If you want compatability with standard .deb's you should say yes here.
|
||||
If you want compatibility with standard .deb's you should say yes here.
|
||||
|
||||
config CONFIG_FEATURE_DEB_TAR_BZ2
|
||||
bool " bzip2 debian packages"
|
||||
@@ -113,7 +114,7 @@ config CONFIG_FEATURE_DEB_TAR_BZ2
|
||||
This allows dpkg and dpkg-deb to extract deb's that are compressed internally
|
||||
with bzip2 instead of gzip.
|
||||
|
||||
You only want this is your are creating your own custom debian packages that
|
||||
You only want this if you are creating your own custom debian packages that
|
||||
use an internal control.tar.bz2 or data.tar.bz2.
|
||||
|
||||
config CONFIG_GUNZIP
|
||||
@@ -129,7 +130,7 @@ config CONFIG_FEATURE_GUNZIP_UNCOMPRESS
|
||||
default n
|
||||
depends on CONFIG_GUNZIP
|
||||
help
|
||||
If you want gunzip to have the ability to decompress
|
||||
Enable if you want gunzip to have the ability to decompress
|
||||
archives created by the program compress (not much
|
||||
used anymore).
|
||||
|
||||
@@ -138,7 +139,7 @@ config CONFIG_GZIP
|
||||
default n
|
||||
help
|
||||
gzip is used to compress files.
|
||||
It's probably the most used UNIX compression program.
|
||||
It's probably the most widely used UNIX compression program.
|
||||
|
||||
config CONFIG_RPM2CPIO
|
||||
bool "rpm2cpio"
|
||||
@@ -150,14 +151,14 @@ config CONFIG_RPM
|
||||
bool "rpm"
|
||||
default n
|
||||
help
|
||||
Mini RPM applet - querys and extracts
|
||||
Mini RPM applet - queries and extracts
|
||||
|
||||
config CONFIG_TAR
|
||||
bool "tar"
|
||||
default n
|
||||
help
|
||||
tar is an archiving program. It's commonly used with gzip to
|
||||
create compressed archives. It's probably the most used
|
||||
create compressed archives. It's probably the most widely used
|
||||
UNIX archive program.
|
||||
|
||||
config CONFIG_FEATURE_TAR_CREATE
|
||||
@@ -192,13 +193,21 @@ config CONFIG_FEATURE_TAR_GZIP
|
||||
If you enable this option tar will be able to call gzip,
|
||||
when creating or extracting tar gziped archives.
|
||||
|
||||
config CONFIG_FEATURE_TAR_COMPRESS
|
||||
bool " Enable -Z option"
|
||||
default n
|
||||
depends on CONFIG_TAR
|
||||
help
|
||||
If you enable this option tar will be able to call uncompress,
|
||||
when extracting .tar.Z archives.
|
||||
|
||||
config CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY
|
||||
bool " Enable support for old tar header format"
|
||||
default N
|
||||
depends on CONFIG_TAR
|
||||
help
|
||||
This option is required to unpack archives created with
|
||||
in the old GNU format, help to kill this old format by
|
||||
This option is required to unpack archives created in
|
||||
the old GNU format; help to kill this old format by
|
||||
repacking your ancient archives with the new format.
|
||||
|
||||
config CONFIG_FEATURE_TAR_GNU_EXTENSIONS
|
||||
@@ -209,13 +218,6 @@ config CONFIG_FEATURE_TAR_GNU_EXTENSIONS
|
||||
With this option busybox supports GNU long filenames and
|
||||
linknames.
|
||||
|
||||
config CONFIG_FEATURE_UNARCHIVE_TAPE
|
||||
bool " Enable tape drive support"
|
||||
default n
|
||||
depends on CONFIG_TAR || CONFIG_CPIO
|
||||
help
|
||||
I dont think this is needed anymore.
|
||||
|
||||
config CONFIG_UNCOMPRESS
|
||||
bool "uncompress"
|
||||
default n
|
||||
@@ -233,4 +235,14 @@ config CONFIG_UNZIP
|
||||
current directory. Use the `-d' option to extract to a
|
||||
directory of your choice.
|
||||
|
||||
comment "Common options for cpio and tar"
|
||||
depends on CONFIG_CPIO || CONFIG_TAR
|
||||
|
||||
config CONFIG_FEATURE_UNARCHIVE_TAPE
|
||||
bool " Enable tape drive support"
|
||||
default n
|
||||
depends on CONFIG_CPIO || CONFIG_TAR
|
||||
help
|
||||
I don't think this is needed anymore.
|
||||
|
||||
endmenu
|
||||
+1
-1
@@ -59,7 +59,7 @@ static void data_extract_regular_file(archive_handle_t *archive_handle)
|
||||
|
||||
file_header = archive_handle->file_header;
|
||||
dst_fd = bb_xopen(file_header->name, O_WRONLY | O_CREAT);
|
||||
archive_copy_file(archive_handle, dst_fd);
|
||||
bb_copyfd_size(archive_handle->src_fd, dst_fd, file_header->size);
|
||||
close(dst_fd);
|
||||
|
||||
chmod(file_header->name, file_header->mode);
|
||||
|
||||
+5
-8
@@ -83,16 +83,13 @@ int bunzip2_main(int argc, char **argv)
|
||||
dst_fd = bb_xopen(save_name, O_WRONLY | O_CREAT);
|
||||
}
|
||||
|
||||
if (uncompressStream(src_fd, dst_fd)) {
|
||||
if (!(flags & bunzip_to_stdout)) {
|
||||
status = uncompressStream(src_fd, dst_fd);
|
||||
if(!(flags & bunzip_to_stdout)) {
|
||||
if (status) {
|
||||
delete_name = save_name;
|
||||
} else {
|
||||
delete_name = argv[optind];
|
||||
}
|
||||
status = EXIT_SUCCESS;
|
||||
} else {
|
||||
if (!(flags & bunzip_to_stdout)) {
|
||||
delete_name = save_name;
|
||||
}
|
||||
status = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if ((delete_name) && (unlink(delete_name) < 0)) {
|
||||
|
||||
+15
-5
@@ -40,8 +40,8 @@ extern int cpio_main(int argc, char **argv)
|
||||
archive_handle = init_handle();
|
||||
archive_handle->src_fd = fileno(stdin);
|
||||
archive_handle->seek = seek_by_char;
|
||||
archive_handle->action_header = header_list;
|
||||
|
||||
archive_handle->flags = ARCHIVE_EXTRACT_NEWER | ARCHIVE_PRESERVE_DATE;
|
||||
|
||||
while ((opt = getopt(argc, argv, "idmuvtF:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'i': /* extract */
|
||||
@@ -50,17 +50,28 @@ extern int cpio_main(int argc, char **argv)
|
||||
case 'd': /* create _leading_ directories */
|
||||
archive_handle->flags |= ARCHIVE_CREATE_LEADING_DIRS;
|
||||
break;
|
||||
#if 0
|
||||
case 'm': /* preserve modification time */
|
||||
archive_handle->flags |= ARCHIVE_PRESERVE_DATE;
|
||||
break;
|
||||
#endif
|
||||
case 'v': /* verbosly list files */
|
||||
archive_handle->action_header = header_verbose_list;
|
||||
if (archive_handle->action_header == header_list) {
|
||||
archive_handle->action_header = header_verbose_list;
|
||||
} else {
|
||||
archive_handle->action_header = header_list;
|
||||
}
|
||||
break;
|
||||
case 'u': /* unconditional */
|
||||
archive_handle->flags |= ARCHIVE_EXTRACT_UNCONDITIONAL;
|
||||
archive_handle->flags &= ~ARCHIVE_EXTRACT_NEWER;
|
||||
break;
|
||||
case 't': /* list files */
|
||||
archive_handle->action_header = header_list;
|
||||
if (archive_handle->action_header == header_list) {
|
||||
archive_handle->action_header = header_verbose_list;
|
||||
} else {
|
||||
archive_handle->action_header = header_list;
|
||||
}
|
||||
break;
|
||||
case 'F':
|
||||
archive_handle->src_fd = bb_xopen(optarg, O_RDONLY);
|
||||
@@ -81,4 +92,3 @@ extern int cpio_main(int argc, char **argv)
|
||||
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
+286
-106
@@ -27,11 +27,8 @@
|
||||
* consider important, its worth keeping a note of differences anyway, just to
|
||||
* make it easier to maintain.
|
||||
* - The first value for the Confflile: field isnt placed on a new line.
|
||||
* - The <package>.control file is extracted and kept in the info dir.
|
||||
* - When installing a package the Status: field is placed at the end of the
|
||||
* section, rather than just after the Package: field.
|
||||
* - Packages with previously unknown status are inserted at the begining of
|
||||
* the status file
|
||||
*
|
||||
* Bugs that need to be fixed
|
||||
* - (unknown, please let me know when you find any)
|
||||
@@ -392,8 +389,54 @@ int search_package_hashtable(const unsigned int name, const unsigned int version
|
||||
return(probe_address);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function searches through the entire package_hashtable looking
|
||||
* for a package which provides "needle". It returns the index into
|
||||
* the package_hashtable for the provining package.
|
||||
*
|
||||
* needle is the index into name_hashtable of the package we are
|
||||
* looking for.
|
||||
*
|
||||
* start_at is the index in the package_hashtable to start looking
|
||||
* at. If start_at is -1 then start at the beginning. This is to allow
|
||||
* for repeated searches since more than one package might provide
|
||||
* needle.
|
||||
*
|
||||
* FIXME: I don't think this is very efficient, but I thought I'd keep
|
||||
* it simple for now until it proves to be a problem.
|
||||
*/
|
||||
int search_for_provides(int needle, int start_at) {
|
||||
int i, j;
|
||||
common_node_t *p;
|
||||
for (i = start_at + 1; i < PACKAGE_HASH_PRIME; i++) {
|
||||
p = package_hashtable[i];
|
||||
if ( p == NULL ) continue;
|
||||
for(j = 0; j < p->num_of_edges; j++)
|
||||
if ( p->edge[j]->type == EDGE_PROVIDES && p->edge[j]->name == needle )
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add an edge to a node
|
||||
*/
|
||||
void add_edge_to_node(common_node_t *node, edge_t *edge)
|
||||
{
|
||||
node->num_of_edges++;
|
||||
node->edge = xrealloc(node->edge, sizeof(edge_t) * (node->num_of_edges + 1));
|
||||
node->edge[node->num_of_edges - 1] = edge;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create one new node and one new edge for every dependency.
|
||||
*
|
||||
* Dependencies which contain multiple alternatives are represented as
|
||||
* an EDGE_OR_PRE_DEPENDS or EDGE_OR_DEPENDS node, followed by a
|
||||
* number of EDGE_PRE_DEPENDS or EDGE_DEPENDS nodes. The name field of
|
||||
* the OR edge contains the full dependency string while the version
|
||||
* field contains the number of EDGE nodes which follow as part of
|
||||
* this alternative.
|
||||
*/
|
||||
void add_split_dependencies(common_node_t *parent_node, const char *whole_line, unsigned int edge_type)
|
||||
{
|
||||
@@ -405,25 +448,33 @@ void add_split_dependencies(common_node_t *parent_node, const char *whole_line,
|
||||
char *field2;
|
||||
char *version;
|
||||
edge_t *edge;
|
||||
edge_t *or_edge;
|
||||
int offset_ch;
|
||||
int type;
|
||||
|
||||
field = strtok_r(line, ",", &line_ptr1);
|
||||
do {
|
||||
/* skip leading spaces */
|
||||
field += strspn(field, " ");
|
||||
line2 = bb_xstrdup(field);
|
||||
field2 = strtok_r(line2, "|", &line_ptr2);
|
||||
if ((edge_type == EDGE_DEPENDS) && (strcmp(field, field2) != 0)) {
|
||||
type = EDGE_OR_DEPENDS;
|
||||
}
|
||||
else if ((edge_type == EDGE_PRE_DEPENDS) && (strcmp(field, field2) != 0)) {
|
||||
type = EDGE_OR_PRE_DEPENDS;
|
||||
if ( (edge_type == EDGE_DEPENDS || edge_type == EDGE_PRE_DEPENDS) &&
|
||||
(strcmp(field, field2) != 0)) {
|
||||
or_edge = (edge_t *)xmalloc(sizeof(edge_t));
|
||||
or_edge->type = edge_type + 1;
|
||||
} else {
|
||||
type = edge_type;
|
||||
or_edge = NULL;
|
||||
}
|
||||
|
||||
if ( or_edge ) {
|
||||
or_edge->name = search_name_hashtable(field);
|
||||
or_edge->version = 0; // tracks the number of altenatives
|
||||
|
||||
add_edge_to_node(parent_node, or_edge);
|
||||
}
|
||||
|
||||
do {
|
||||
edge = (edge_t *) xmalloc(sizeof(edge_t));
|
||||
edge->type = type;
|
||||
edge->type = edge_type;
|
||||
|
||||
/* Skip any extra leading spaces */
|
||||
field2 += strspn(field2, " ");
|
||||
@@ -473,11 +524,11 @@ void add_split_dependencies(common_node_t *parent_node, const char *whole_line,
|
||||
/* Get the dependency name */
|
||||
field2[strcspn(field2, " (")] = '\0';
|
||||
edge->name = search_name_hashtable(field2);
|
||||
|
||||
/* link the new edge to the current node */
|
||||
parent_node->num_of_edges++;
|
||||
parent_node->edge = xrealloc(parent_node->edge, sizeof(edge_t) * (parent_node->num_of_edges + 1));
|
||||
parent_node->edge[parent_node->num_of_edges - 1] = edge;
|
||||
|
||||
if ( or_edge )
|
||||
or_edge->version++;
|
||||
|
||||
add_edge_to_node(parent_node, edge);
|
||||
} while ((field2 = strtok_r(NULL, "|", &line_ptr2)) != NULL);
|
||||
free(line2);
|
||||
} while ((field = strtok_r(NULL, ",", &line_ptr1)) != NULL);
|
||||
@@ -493,7 +544,8 @@ void free_package(common_node_t *node)
|
||||
for (i = 0; i < node->num_of_edges; i++) {
|
||||
free(node->edge[i]);
|
||||
}
|
||||
free(node->edge);
|
||||
if ( node->edge )
|
||||
free(node->edge);
|
||||
free(node);
|
||||
}
|
||||
}
|
||||
@@ -630,6 +682,31 @@ void set_status(const unsigned int status_node_num, const char *new_value, const
|
||||
return;
|
||||
}
|
||||
|
||||
const char *describe_status(int status_num) {
|
||||
int status_want, status_state ;
|
||||
if ( status_hashtable[status_num] == NULL || status_hashtable[status_num]->status == 0 )
|
||||
return "is not installed or flagged to be installed\n";
|
||||
|
||||
status_want = get_status(status_num, 1);
|
||||
status_state = get_status(status_num, 3);
|
||||
|
||||
if ( status_state == search_name_hashtable("installed") ) {
|
||||
if ( status_want == search_name_hashtable("install") )
|
||||
return "is installed";
|
||||
if ( status_want == search_name_hashtable("deinstall") )
|
||||
return "is marked to be removed";
|
||||
if ( status_want == search_name_hashtable("purge") )
|
||||
return "is marked to be purged";
|
||||
}
|
||||
if ( status_want == search_name_hashtable("unknown") )
|
||||
return "is in an indeterminate state";
|
||||
if ( status_want == search_name_hashtable("install") )
|
||||
return "is marked to be installed";
|
||||
|
||||
return "is not installed or flagged to be installed";
|
||||
}
|
||||
|
||||
|
||||
void index_status_file(const char *filename)
|
||||
{
|
||||
FILE *status_file;
|
||||
@@ -662,7 +739,7 @@ void index_status_file(const char *filename)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#if 0 /* this code is no longer used */
|
||||
char *get_depends_field(common_node_t *package, const int depends_type)
|
||||
{
|
||||
char *depends = NULL;
|
||||
@@ -733,6 +810,7 @@ char *get_depends_field(common_node_t *package, const int depends_type)
|
||||
}
|
||||
return(depends);
|
||||
}
|
||||
#endif
|
||||
|
||||
void write_buffer_no_status(FILE *new_status_file, const char *control_buffer)
|
||||
{
|
||||
@@ -893,13 +971,34 @@ void write_status_file(deb_file_t **deb_file)
|
||||
}
|
||||
}
|
||||
|
||||
/* This function returns TRUE if the given package can statisfy a
|
||||
* dependency of type depend_type.
|
||||
*
|
||||
* A pre-depends is statisfied only if a package is already installed,
|
||||
* which a regular depends can be satisfied by a package which we want
|
||||
* to install.
|
||||
*/
|
||||
int package_satisfies_dependency(int package, int depend_type)
|
||||
{
|
||||
int status_num = search_status_hashtable(name_hashtable[package_hashtable[package]->name]);
|
||||
|
||||
/* status could be unknown if package is a pure virtual
|
||||
* provides which cannot satisfy any dependency by itself.
|
||||
*/
|
||||
if ( status_hashtable[status_num] == NULL )
|
||||
return 0;
|
||||
|
||||
switch (depend_type) {
|
||||
case EDGE_PRE_DEPENDS: return get_status(status_num, 3) == search_name_hashtable("installed");
|
||||
case EDGE_DEPENDS: return get_status(status_num, 1) == search_name_hashtable("install");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
|
||||
{
|
||||
int *conflicts = NULL;
|
||||
int conflicts_num = 0;
|
||||
int state_status;
|
||||
int state_flag;
|
||||
int state_want;
|
||||
int i = deb_start;
|
||||
int j;
|
||||
|
||||
@@ -955,21 +1054,17 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
|
||||
|
||||
for (j = 0; j < package_node->num_of_edges; j++) {
|
||||
const edge_t *package_edge = package_node->edge[j];
|
||||
const unsigned int package_num =
|
||||
search_package_hashtable(package_edge->name,
|
||||
package_edge->version, package_edge->operator);
|
||||
|
||||
if (package_edge->type == EDGE_CONFLICTS) {
|
||||
const unsigned int package_num =
|
||||
search_package_hashtable(package_edge->name,
|
||||
package_edge->version,
|
||||
package_edge->operator);
|
||||
int result = 0;
|
||||
if (package_hashtable[package_num] != NULL) {
|
||||
status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]);
|
||||
state_status = get_status(status_num, 3);
|
||||
state_flag = get_status(status_num, 1);
|
||||
|
||||
result = (state_status == search_name_hashtable("installed")) ||
|
||||
(state_flag == search_name_hashtable("want-install"));
|
||||
|
||||
if (result) {
|
||||
if (get_status(status_num, 1) == search_name_hashtable("install")) {
|
||||
result = test_version(package_hashtable[deb_file[i]->package]->version,
|
||||
package_edge->version, package_edge->operator);
|
||||
}
|
||||
@@ -987,66 +1082,123 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
|
||||
|
||||
|
||||
/* Check dependendcies */
|
||||
i = 0;
|
||||
while (deb_file[i] != NULL) {
|
||||
const common_node_t *package_node = package_hashtable[deb_file[i]->package];
|
||||
for (i = 0; i < PACKAGE_HASH_PRIME; i++) {
|
||||
int status_num = 0;
|
||||
int number_of_alternatives = 0;
|
||||
const edge_t * root_of_alternatives;
|
||||
const common_node_t *package_node = package_hashtable[i];
|
||||
|
||||
status_num = search_status_hashtable(name_hashtable[package_node->name]);
|
||||
state_status = get_status(status_num, 3);
|
||||
state_want = get_status(status_num, 1);
|
||||
/* If the package node does not exist then this
|
||||
* package is a virtual one. In which case there are
|
||||
* no dependencies to check.
|
||||
*/
|
||||
if ( package_node == NULL ) continue;
|
||||
|
||||
if (state_status == search_name_hashtable("installed")) {
|
||||
i++;
|
||||
status_num = search_status_hashtable(name_hashtable[package_node->name]);
|
||||
|
||||
/* If there is no status then this package is a
|
||||
* virtual one provided by something else. In which
|
||||
* case there are no dependencies to check.
|
||||
*/
|
||||
if ( status_hashtable[status_num] == NULL ) continue;
|
||||
|
||||
/* If we don't want this package installed then we may
|
||||
* as well ignore it's dependencies.
|
||||
*/
|
||||
if (get_status(status_num, 1) != search_name_hashtable("install")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (j = 0; j < package_hashtable[deb_file[i]->package]->num_of_edges; j++) {
|
||||
#if 0
|
||||
/* This might be needed so we don't complain about
|
||||
* things which are broken but unrelated to the
|
||||
* packages that are currently being installed
|
||||
*/
|
||||
if (state_status == search_name_hashtable("installed"))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
/* This code is tested only for EDGE_DEPENDS, sine I
|
||||
* have no suitable pre-depends available. There is no
|
||||
* reason that it shouldn't work though :-)
|
||||
*/
|
||||
for (j = 0; j < package_node->num_of_edges; j++) {
|
||||
const edge_t *package_edge = package_node->edge[j];
|
||||
unsigned int package_num;
|
||||
|
||||
if ( package_edge->type == EDGE_OR_PRE_DEPENDS ||
|
||||
package_edge->type == EDGE_OR_DEPENDS ) { /* start an EDGE_OR_ list */
|
||||
number_of_alternatives = package_edge->version;
|
||||
root_of_alternatives = package_edge;
|
||||
continue;
|
||||
} else if ( number_of_alternatives == 0 ) { /* not in the middle of an EDGE_OR_ list */
|
||||
number_of_alternatives = 1;
|
||||
root_of_alternatives = NULL;
|
||||
}
|
||||
|
||||
package_num = search_package_hashtable(package_edge->name, package_edge->version, package_edge->operator);
|
||||
|
||||
switch (package_edge->type) {
|
||||
case(EDGE_PRE_DEPENDS):
|
||||
case(EDGE_OR_PRE_DEPENDS): {
|
||||
int result=1;
|
||||
/* It must be already installed */
|
||||
/* NOTE: This is untested, nothing apropriate in my status file */
|
||||
if (package_hashtable[package_num] != NULL) {
|
||||
status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]);
|
||||
state_status = get_status(status_num, 3);
|
||||
state_want = get_status(status_num, 1);
|
||||
result = (state_status != search_name_hashtable("installed"));
|
||||
}
|
||||
if (package_edge->type == EDGE_PRE_DEPENDS ||
|
||||
package_edge->type == EDGE_DEPENDS ) {
|
||||
int result=1;
|
||||
status_num = 0;
|
||||
|
||||
if (result) {
|
||||
bb_error_msg_and_die("Package %s pre-depends on %s, but it is not installed",
|
||||
name_hashtable[package_node->name],
|
||||
name_hashtable[package_edge->name]);
|
||||
/* If we are inside an alternative then check
|
||||
* this edge is the right type.
|
||||
*
|
||||
* EDGE_DEPENDS == OR_DEPENDS -1
|
||||
* EDGE_PRE_DEPENDS == OR_PRE_DEPENDS -1
|
||||
*/
|
||||
if ( root_of_alternatives && package_edge->type != root_of_alternatives->type - 1)
|
||||
bb_error_msg_and_die("Fatal error. Package dependencies corrupt: %d != %d - 1 \n",
|
||||
package_edge->type, root_of_alternatives->type);
|
||||
|
||||
if (package_hashtable[package_num] != NULL)
|
||||
result = !package_satisfies_dependency(package_num, package_edge->type);
|
||||
|
||||
if (result) { /* check for other package which provide what we are looking for */
|
||||
int provider = -1;
|
||||
|
||||
while ( (provider = search_for_provides(package_edge->name, provider) ) > -1 ) {
|
||||
if ( package_hashtable[provider] == NULL ) {
|
||||
printf("Have a provider but no package information for it\n");
|
||||
continue;
|
||||
}
|
||||
result = !package_satisfies_dependency(provider, package_edge->type);
|
||||
|
||||
if ( result == 0 )
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case(EDGE_DEPENDS):
|
||||
case(EDGE_OR_DEPENDS): {
|
||||
int result=1;
|
||||
if (package_hashtable[package_num] != NULL) {
|
||||
status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]);
|
||||
state_status = get_status(status_num, 3);
|
||||
state_want = get_status(status_num, 1);
|
||||
result=(state_status != search_name_hashtable("installed")) && (state_want != search_name_hashtable("want-install"));
|
||||
}
|
||||
/* It must be already installed, or to be installed */
|
||||
if (result) {
|
||||
bb_error_msg_and_die("Package %s depends on %s, but it is not installed, or flaged to be installed",
|
||||
|
||||
/* It must be already installed, or to be installed */
|
||||
number_of_alternatives--;
|
||||
if (result && number_of_alternatives == 0) {
|
||||
if ( root_of_alternatives )
|
||||
bb_error_msg_and_die(
|
||||
"Package %s %sdepends on %s, "
|
||||
"which cannot be satisfied",
|
||||
name_hashtable[package_node->name],
|
||||
name_hashtable[package_edge->name]);
|
||||
}
|
||||
break;
|
||||
package_edge->type == EDGE_PRE_DEPENDS ? "pre-" : "",
|
||||
name_hashtable[root_of_alternatives->name]);
|
||||
else
|
||||
bb_error_msg_and_die(
|
||||
"Package %s %sdepends on %s, which %s\n",
|
||||
name_hashtable[package_node->name],
|
||||
package_edge->type == EDGE_PRE_DEPENDS ? "pre-" : "",
|
||||
name_hashtable[package_edge->name],
|
||||
describe_status(status_num));
|
||||
} else if ( result == 0 && number_of_alternatives ) {
|
||||
/* we've found a package which
|
||||
* satisfies the dependency,
|
||||
* so skip over the rest of
|
||||
* the alternatives.
|
||||
*/
|
||||
j += number_of_alternatives;
|
||||
number_of_alternatives = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
free(conflicts);
|
||||
return(TRUE);
|
||||
@@ -1138,21 +1290,22 @@ int run_package_script(const char *package_name, const char *script_type)
|
||||
return(result);
|
||||
}
|
||||
|
||||
const char *all_control_files[] = {"preinst", "postinst", "prerm", "postrm",
|
||||
"list", "md5sums", "shlibs", "conffiles", "config", "templates", NULL };
|
||||
|
||||
char **all_control_list(const char *package_name)
|
||||
{
|
||||
const char *extensions[11] = {"preinst", "postinst", "prerm", "postrm",
|
||||
"list", "md5sums", "shlibs", "conffiles", "config", "templates", NULL };
|
||||
unsigned short i = 0;
|
||||
char **remove_files;
|
||||
|
||||
/* Create a list of all /var/lib/dpkg/info/<package> files */
|
||||
remove_files = malloc(sizeof(char *) * 11);
|
||||
while (extensions[i]) {
|
||||
remove_files[i] = xmalloc(strlen(package_name) + strlen(extensions[i]) + 21);
|
||||
sprintf(remove_files[i], "/var/lib/dpkg/info/%s.%s", package_name, extensions[i]);
|
||||
remove_files = malloc(sizeof(all_control_files));
|
||||
while (all_control_files[i]) {
|
||||
remove_files[i] = xmalloc(strlen(package_name) + strlen(all_control_files[i]) + 21);
|
||||
sprintf(remove_files[i], "/var/lib/dpkg/info/%s.%s", package_name, all_control_files[i]);
|
||||
i++;
|
||||
}
|
||||
remove_files[10] = NULL;
|
||||
remove_files[sizeof(all_control_files)/sizeof(char*) - 1] = NULL;
|
||||
|
||||
return(remove_files);
|
||||
}
|
||||
@@ -1211,9 +1364,10 @@ void list_packages(void)
|
||||
}
|
||||
}
|
||||
|
||||
void remove_package(const unsigned int package_num)
|
||||
void remove_package(const unsigned int package_num, int noisy)
|
||||
{
|
||||
const char *package_name = name_hashtable[package_hashtable[package_num]->name];
|
||||
const char *package_version = name_hashtable[package_hashtable[package_num]->version];
|
||||
const unsigned int status_num = search_status_hashtable(package_name);
|
||||
const int package_name_length = strlen(package_name);
|
||||
char **remove_files;
|
||||
@@ -1222,7 +1376,8 @@ void remove_package(const unsigned int package_num)
|
||||
char conffile_name[package_name_length + 30];
|
||||
int return_value;
|
||||
|
||||
printf("Removing %s ...\n", package_name);
|
||||
if ( noisy )
|
||||
printf("Removing %s (%s) ...\n", package_name, package_version);
|
||||
|
||||
/* run prerm script */
|
||||
return_value = run_package_script(package_name, "prerm");
|
||||
@@ -1260,18 +1415,20 @@ void remove_package(const unsigned int package_num)
|
||||
rename(conffile_name, list_name);
|
||||
|
||||
/* Change package status */
|
||||
set_status(status_num, "deinstall", 1);
|
||||
set_status(status_num, "config-files", 3);
|
||||
}
|
||||
|
||||
void purge_package(const unsigned int package_num)
|
||||
{
|
||||
const char *package_name = name_hashtable[package_hashtable[package_num]->name];
|
||||
const char *package_version = name_hashtable[package_hashtable[package_num]->version];
|
||||
const unsigned int status_num = search_status_hashtable(package_name);
|
||||
char **remove_files;
|
||||
char **exclude_files;
|
||||
char list_name[strlen(package_name) + 25];
|
||||
|
||||
printf("Purging %s (%s) ...\n", package_name, package_version);
|
||||
|
||||
/* run prerm script */
|
||||
if (run_package_script(package_name, "prerm") != 0) {
|
||||
bb_error_msg_and_die("script failed, prerm failure");
|
||||
@@ -1300,7 +1457,6 @@ void purge_package(const unsigned int package_num)
|
||||
}
|
||||
|
||||
/* Change package status */
|
||||
set_status(status_num, "purge", 1);
|
||||
set_status(status_num, "not-installed", 3);
|
||||
}
|
||||
|
||||
@@ -1322,7 +1478,6 @@ static void init_archive_deb_control(archive_handle_t *ar_handle)
|
||||
|
||||
/* Setup the tar archive handle */
|
||||
tar_handle = init_handle();
|
||||
tar_handle->filter = filter_accept_list;
|
||||
tar_handle->src_fd = ar_handle->src_fd;
|
||||
|
||||
/* We dont care about data.tar.* or debian-binary, just control.tar.* */
|
||||
@@ -1345,15 +1500,14 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
|
||||
|
||||
/* Setup the tar archive handle */
|
||||
tar_handle = init_handle();
|
||||
tar_handle->filter = filter_accept_all;
|
||||
tar_handle->src_fd = ar_handle->src_fd;
|
||||
|
||||
/* We dont care about data.tar.* or debian-binary, just control.tar.* */
|
||||
/* We dont care about control.tar.* or debian-binary, just data.tar.* */
|
||||
#ifdef CONFIG_FEATURE_DEB_TAR_GZ
|
||||
tar_handle->accept = llist_add_to(NULL, "data.tar.gz");
|
||||
ar_handle->accept = llist_add_to(NULL, "data.tar.gz");
|
||||
#endif
|
||||
#ifdef CONFIG_FEATURE_DEB_TAR_BZ2
|
||||
tar_handle->accept = llist_add_to(ar_handle->accept, "data.tar.bz2");
|
||||
ar_handle->accept = llist_add_to(ar_handle->accept, "data.tar.bz2");
|
||||
#endif
|
||||
|
||||
/* Assign the tar handle as a subarchive of the ar handle */
|
||||
@@ -1362,10 +1516,10 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
|
||||
return;
|
||||
}
|
||||
|
||||
static char *deb_extract_control_file_to_buffer(archive_handle_t *ar_handle, llist_t *accept)
|
||||
static char *deb_extract_control_file_to_buffer(archive_handle_t *ar_handle, llist_t *myaccept)
|
||||
{
|
||||
ar_handle->sub_archive->action_data = data_extract_to_buffer;
|
||||
ar_handle->sub_archive->accept = accept;
|
||||
ar_handle->sub_archive->accept = myaccept;
|
||||
|
||||
unpack_ar_archive(ar_handle);
|
||||
close(ar_handle->src_fd);
|
||||
@@ -1395,6 +1549,8 @@ static void unpack_package(deb_file_t *deb_file)
|
||||
char *info_prefix;
|
||||
archive_handle_t *archive_handle;
|
||||
FILE *out_stream;
|
||||
llist_t *accept_list = NULL;
|
||||
int i = 0;
|
||||
|
||||
/* If existing version, remove it first */
|
||||
if (strcmp(name_hashtable[get_status(status_num, 3)], "installed") == 0) {
|
||||
@@ -1402,7 +1558,7 @@ static void unpack_package(deb_file_t *deb_file)
|
||||
printf("Preparing to replace %s %s (using %s) ...\n", package_name,
|
||||
name_hashtable[package_hashtable[status_package_num]->version],
|
||||
deb_file->filename);
|
||||
remove_package(status_package_num);
|
||||
remove_package(status_package_num, 0);
|
||||
} else {
|
||||
printf("Unpacking %s (from %s) ...\n", package_name, deb_file->filename);
|
||||
}
|
||||
@@ -1412,8 +1568,18 @@ static void unpack_package(deb_file_t *deb_file)
|
||||
sprintf(info_prefix, "/var/lib/dpkg/info/%s.", package_name);
|
||||
archive_handle = init_archive_deb_ar(deb_file->filename);
|
||||
init_archive_deb_control(archive_handle);
|
||||
|
||||
while(all_control_files[i]) {
|
||||
char *c = (char *) xmalloc(3 + bb_strlen(all_control_files[i]));
|
||||
sprintf(c, "./%s", all_control_files[i]);
|
||||
accept_list= llist_add_to(accept_list, c);
|
||||
i++;
|
||||
}
|
||||
archive_handle->sub_archive->accept = accept_list;
|
||||
archive_handle->sub_archive->filter = filter_accept_list;
|
||||
archive_handle->sub_archive->action_data = data_extract_all_prefix;
|
||||
archive_handle->sub_archive->buffer = info_prefix;
|
||||
archive_handle->sub_archive->flags |= ARCHIVE_EXTRACT_UNCONDITIONAL;
|
||||
unpack_ar_archive(archive_handle);
|
||||
|
||||
/* Run the preinst prior to extracting */
|
||||
@@ -1425,16 +1591,19 @@ static void unpack_package(deb_file_t *deb_file)
|
||||
/* Extract data.tar.gz to the root directory */
|
||||
archive_handle = init_archive_deb_ar(deb_file->filename);
|
||||
init_archive_deb_data(archive_handle);
|
||||
archive_handle->sub_archive->action_data = data_extract_all_prefix;
|
||||
archive_handle->sub_archive->buffer = "/";
|
||||
archive_handle->sub_archive->flags |= ARCHIVE_EXTRACT_UNCONDITIONAL;
|
||||
unpack_ar_archive(archive_handle);
|
||||
|
||||
/* Create the list file */
|
||||
strcat(info_prefix, "list");
|
||||
out_stream = bb_xfopen(info_prefix, "w");
|
||||
while (archive_handle->passed) {
|
||||
/* blindly skip over the leading '.' */
|
||||
fputs(archive_handle->passed->data + 1, out_stream);
|
||||
while (archive_handle->sub_archive->passed) {
|
||||
/* the leading . has been stripped by data_extract_all_prefix already */
|
||||
fputs(archive_handle->sub_archive->passed->data, out_stream);
|
||||
fputc('\n', out_stream);
|
||||
archive_handle->passed = archive_handle->passed->link;
|
||||
archive_handle->sub_archive->passed = archive_handle->sub_archive->passed->link;
|
||||
}
|
||||
fclose(out_stream);
|
||||
|
||||
@@ -1451,7 +1620,7 @@ void configure_package(deb_file_t *deb_file)
|
||||
const char *package_version = name_hashtable[package_hashtable[deb_file->package]->version];
|
||||
const int status_num = search_status_hashtable(package_name);
|
||||
|
||||
printf("Setting up %s (%s)\n", package_name, package_version);
|
||||
printf("Setting up %s (%s) ...\n", package_name, package_version);
|
||||
|
||||
/* Run the postinst script */
|
||||
if (run_package_script(package_name, "postinst") != 0) {
|
||||
@@ -1485,6 +1654,7 @@ int dpkg_main(int argc, char **argv)
|
||||
if (strcmp(optarg, "depends") == 0) {
|
||||
dpkg_opt |= dpkg_opt_force_ignore_depends;
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
dpkg_opt |= dpkg_opt_install;
|
||||
dpkg_opt |= dpkg_opt_filename;
|
||||
@@ -1550,19 +1720,20 @@ int dpkg_main(int argc, char **argv)
|
||||
|
||||
/* Add the package to the status hashtable */
|
||||
if ((dpkg_opt & dpkg_opt_unpack) || (dpkg_opt & dpkg_opt_install)) {
|
||||
status_node = (status_node_t *) xmalloc(sizeof(status_node_t));
|
||||
status_node->package = deb_file[deb_count]->package;
|
||||
/* Try and find a currently installed version of this package */
|
||||
status_num = search_status_hashtable(name_hashtable[package_hashtable[deb_file[deb_count]->package]->name]);
|
||||
/* If no previous entry was found initialise a new entry */
|
||||
if ((status_hashtable[status_num] == NULL) ||
|
||||
(status_hashtable[status_num]->status == 0)) {
|
||||
status_node = (status_node_t *) xmalloc(sizeof(status_node_t));
|
||||
status_node->package = deb_file[deb_count]->package;
|
||||
/* reinstreq isnt changed to "ok" until the package control info
|
||||
* is written to the status file*/
|
||||
status_node->status = search_name_hashtable("want-install reinstreq not-installed");
|
||||
status_node->status = search_name_hashtable("install reinstreq not-installed");
|
||||
status_hashtable[status_num] = status_node;
|
||||
} else {
|
||||
status_hashtable[status_num]->status = search_name_hashtable("want-install reinstreq not-installed");
|
||||
set_status(status_num, "install", 1);
|
||||
set_status(status_num, "reinstreq", 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1575,20 +1746,24 @@ int dpkg_main(int argc, char **argv)
|
||||
if (package_hashtable[deb_file[deb_count]->package] == NULL) {
|
||||
bb_error_msg_and_die("Package %s is uninstalled or unknown\n", argv[optind]);
|
||||
}
|
||||
state_status = get_status(search_status_hashtable(name_hashtable[package_hashtable[deb_file[deb_count]->package]->name]), 3);
|
||||
package_num = deb_file[deb_count]->package;
|
||||
status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]);
|
||||
state_status = get_status(status_num, 3);
|
||||
|
||||
/* check package status is "installed" */
|
||||
if (dpkg_opt & dpkg_opt_remove) {
|
||||
if ((strcmp(name_hashtable[state_status], "not-installed") == 0) ||
|
||||
(strcmp(name_hashtable[state_status], "config-files") == 0)) {
|
||||
bb_error_msg_and_die("%s is already removed.", name_hashtable[package_hashtable[deb_file[deb_count]->package]->name]);
|
||||
bb_error_msg_and_die("%s is already removed.", name_hashtable[package_hashtable[package_num]->name]);
|
||||
}
|
||||
set_status(status_num, "deinstall", 1);
|
||||
}
|
||||
else if (dpkg_opt & dpkg_opt_purge) {
|
||||
/* if package status is "conf-files" then its ok */
|
||||
if (strcmp(name_hashtable[state_status], "not-installed") == 0) {
|
||||
bb_error_msg_and_die("%s is already purged.", name_hashtable[package_hashtable[deb_file[deb_count]->package]->name]);
|
||||
bb_error_msg_and_die("%s is already purged.", name_hashtable[package_hashtable[package_num]->name]);
|
||||
}
|
||||
set_status(status_num, "purge", 1);
|
||||
}
|
||||
}
|
||||
deb_count++;
|
||||
@@ -1597,17 +1772,17 @@ int dpkg_main(int argc, char **argv)
|
||||
deb_file[deb_count] = NULL;
|
||||
|
||||
/* Check that the deb file arguments are installable */
|
||||
/* TODO: check dependencies before removing */
|
||||
if ((dpkg_opt & dpkg_opt_force_ignore_depends) != dpkg_opt_force_ignore_depends) {
|
||||
if (!check_deps(deb_file, 0, deb_count)) {
|
||||
bb_error_msg_and_die("Dependency check failed");
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: install or remove packages in the correct dependency order */
|
||||
for (i = 0; i < deb_count; i++) {
|
||||
/* Remove or purge packages */
|
||||
if (dpkg_opt & dpkg_opt_remove) {
|
||||
remove_package(deb_file[i]->package);
|
||||
remove_package(deb_file[i]->package, 1);
|
||||
}
|
||||
else if (dpkg_opt & dpkg_opt_purge) {
|
||||
purge_package(deb_file[i]->package);
|
||||
@@ -1617,12 +1792,17 @@ int dpkg_main(int argc, char **argv)
|
||||
}
|
||||
else if (dpkg_opt & dpkg_opt_install) {
|
||||
unpack_package(deb_file[i]);
|
||||
configure_package(deb_file[i]);
|
||||
/* package is configured in second pass below */
|
||||
}
|
||||
else if (dpkg_opt & dpkg_opt_configure) {
|
||||
configure_package(deb_file[i]);
|
||||
}
|
||||
}
|
||||
/* configure installed packages */
|
||||
if (dpkg_opt & dpkg_opt_install) {
|
||||
for (i = 0; i < deb_count; i++)
|
||||
configure_package(deb_file[i]);
|
||||
}
|
||||
|
||||
write_status_file(deb_file);
|
||||
|
||||
|
||||
+1
-2
@@ -179,11 +179,10 @@ extern int gunzip_main(int argc, char **argv)
|
||||
#endif
|
||||
if (magic2 == 0x8b) {
|
||||
check_header_gzip(src_fd);
|
||||
status = inflate(src_fd, dst_fd);
|
||||
status = inflate_gunzip(src_fd, dst_fd);
|
||||
if (status != 0) {
|
||||
bb_error_msg_and_die("Error inflating");
|
||||
}
|
||||
check_trailer_gzip(src_fd);
|
||||
} else {
|
||||
bb_error_msg_and_die("Invalid magic");
|
||||
}
|
||||
|
||||
+1
-4
@@ -305,8 +305,6 @@ DECLARE(ush, d_buf, DIST_BUFSIZE);
|
||||
DECLARE(uch, window, 2L * WSIZE);
|
||||
DECLARE(ush, tab_prefix, 1L << BITS);
|
||||
|
||||
static int crc_table_empty = 1;
|
||||
|
||||
static int foreground; /* set if program run in foreground */
|
||||
static int method = DEFLATED; /* compression method */
|
||||
static int exit_code = OK; /* program exit code */
|
||||
@@ -387,14 +385,13 @@ static ulg updcrc(uch * s, unsigned n)
|
||||
register ulg c; /* temporary variable */
|
||||
static unsigned long crc_32_tab[256];
|
||||
|
||||
if (crc_table_empty) {
|
||||
if (crc_32_tab[1] == 0x00000000L) {
|
||||
unsigned long csr; /* crc shift register */
|
||||
const unsigned long e = 0xedb88320L; /* polynomial exclusive-or pattern */
|
||||
int i; /* counter for all possible eight bit values */
|
||||
int k; /* byte being shifted into crc apparatus */
|
||||
|
||||
/* Compute table of CRC's. */
|
||||
crc_32_tab[0] = 0x00000000L;
|
||||
for (i = 1; i < 256; i++) {
|
||||
csr = i;
|
||||
/* The idea to initialize the register with the byte instead of
|
||||
|
||||
@@ -31,46 +31,47 @@ LIBUNARCHIVE-y:= \
|
||||
\
|
||||
filter_accept_all.o \
|
||||
filter_accept_list.o \
|
||||
filter_accept_list_reassign.o \
|
||||
filter_accept_reject_list.o \
|
||||
\
|
||||
get_header_ar.o \
|
||||
get_header_cpio.o \
|
||||
get_header_tar.o \
|
||||
get_header_tar_bz2.o \
|
||||
get_header_tar_gz.o \
|
||||
\
|
||||
header_skip.o \
|
||||
header_list.o \
|
||||
header_verbose_list.o \
|
||||
\
|
||||
archive_xread.o \
|
||||
archive_xread_all.o \
|
||||
archive_xread_all_eof.o \
|
||||
archive_xread_char.o \
|
||||
\
|
||||
seek_by_char.o \
|
||||
seek_by_jump.o \
|
||||
\
|
||||
archive_copy_file.o \
|
||||
\
|
||||
check_header_gzip.o \
|
||||
data_align.o \
|
||||
decompress_bunzip2.o \
|
||||
find_list_entry.o \
|
||||
init_handle.o \
|
||||
uncompress.o \
|
||||
unpack_ar_archive.o \
|
||||
unzip.o
|
||||
open_transformer.o \
|
||||
init_handle.o
|
||||
|
||||
LIBUNARCHIVE-$(CONFIG_DPKG) +=
|
||||
LIBUNARCHIVE-$(CONFIG_DPKG_DEB) +=
|
||||
LIBUNARCHIVE-$(CONFIG_AR) +=
|
||||
LIBUNARCHIVE-$(CONFIG_CPIO) +=
|
||||
LIBUNARCHIVE-$(CONFIG_GUNZIP) +=
|
||||
LIBUNARCHIVE-$(CONFIG_RPM2CPIO) +=
|
||||
LIBUNARCHIVE-$(CONFIG_TAR) +=
|
||||
LIBUNARCHIVE-$(CONFIG_UNZIP) +=
|
||||
GUNZIP_FILES:= check_header_gzip.o unzip.o
|
||||
DPKG_FILES:= \
|
||||
get_header_ar.o \
|
||||
unpack_ar_archive.o \
|
||||
get_header_tar.o \
|
||||
filter_accept_list_reassign.o
|
||||
|
||||
LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o
|
||||
LIBUNARCHIVE-$(CONFIG_BUNZIP2) += decompress_bunzip2.o
|
||||
LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o
|
||||
LIBUNARCHIVE-$(CONFIG_DPKG) += $(DPKG_FILES)
|
||||
LIBUNARCHIVE-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_GZ) += $(GUNZIP_FILES) get_header_tar_gz.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o
|
||||
LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += uncompress.o
|
||||
LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
|
||||
LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
|
||||
LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_GZIP) += $(GUNZIP_FILES) get_header_tar_gz.o
|
||||
LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_COMPRESS) += uncompress.o
|
||||
LIBUNARCHIVE-$(CONFIG_UNCOMPRESS) += uncompress.o
|
||||
LIBUNARCHIVE-$(CONFIG_UNZIP) += $(GUNZIP_FILES)
|
||||
|
||||
libraries-y+=$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR)
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "libbb.h"
|
||||
#include "unarchive.h"
|
||||
|
||||
extern void archive_copy_file(const archive_handle_t *archive_handle, const int dst_fd)
|
||||
{
|
||||
char buffer[512];
|
||||
off_t chunksize = archive_handle->file_header->size;
|
||||
|
||||
while (chunksize != 0) {
|
||||
size_t size;
|
||||
if (chunksize > 512) {
|
||||
size = 512;
|
||||
} else {
|
||||
size = chunksize;
|
||||
}
|
||||
// archive_xread_all(archive_handle, buffer, size);
|
||||
size = archive_xread(archive_handle, buffer, size);
|
||||
|
||||
if (write(dst_fd, buffer, size) != size) {
|
||||
bb_error_msg_and_die ("Short write");
|
||||
}
|
||||
chunksize -= size;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -24,7 +24,7 @@ extern void archive_xread_all(const archive_handle_t *archive_handle, void *buf,
|
||||
{
|
||||
ssize_t size;
|
||||
|
||||
size = archive_xread(archive_handle, buf, count);
|
||||
size = bb_full_read(archive_handle->src_fd, buf, count);
|
||||
if (size != count) {
|
||||
bb_error_msg_and_die("Short read");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ extern ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned
|
||||
{
|
||||
ssize_t size;
|
||||
|
||||
size = archive_xread(archive_handle, buf, count);
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ extern void data_align(archive_handle_t *archive_handle, const unsigned short bo
|
||||
const unsigned short skip_amount = (boundary - (archive_handle->offset % boundary)) % boundary;
|
||||
|
||||
archive_handle->seek(archive_handle, skip_amount);
|
||||
|
||||
archive_handle->offset += skip_amount;
|
||||
|
||||
return;
|
||||
|
||||
@@ -39,58 +39,82 @@ extern void data_extract_all(archive_handle_t *archive_handle)
|
||||
free(name);
|
||||
}
|
||||
|
||||
/* Create the filesystem entry */
|
||||
switch(file_header->mode & S_IFMT) {
|
||||
case S_IFREG: {
|
||||
#ifdef CONFIG_CPIO
|
||||
if (file_header->link_name && file_header->size == 0) {
|
||||
/* hard link */
|
||||
res = link(file_header->link_name, file_header->name);
|
||||
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
|
||||
bb_perror_msg("Couldnt create hard link");
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
/* Regular file */
|
||||
unlink(file_header->name);
|
||||
dst_fd = bb_xopen(file_header->name, O_WRONLY | O_CREAT | O_EXCL);
|
||||
archive_copy_file(archive_handle, dst_fd);
|
||||
close(dst_fd);
|
||||
}
|
||||
break;
|
||||
/* Check if the file already exists */
|
||||
if (archive_handle->flags & ARCHIVE_EXTRACT_UNCONDITIONAL) {
|
||||
/* Remove the existing entry if it exists */
|
||||
if (((file_header->mode & S_IFMT) != S_IFDIR) && (unlink(file_header->name) == -1) && (errno != ENOENT)) {
|
||||
bb_perror_msg_and_die("Couldnt remove old file");
|
||||
}
|
||||
case S_IFDIR:
|
||||
unlink(file_header->name);
|
||||
res = mkdir(file_header->name, file_header->mode);
|
||||
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
|
||||
bb_perror_msg("extract_archive: %s", file_header->name);
|
||||
}
|
||||
else if (archive_handle->flags & ARCHIVE_EXTRACT_NEWER) {
|
||||
/* Remove the existing entry if its older than the extracted entry */
|
||||
struct stat statbuf;
|
||||
if (lstat(file_header->name, &statbuf) == -1) {
|
||||
if (errno != ENOENT) {
|
||||
bb_perror_msg_and_die("Couldnt stat old file");
|
||||
}
|
||||
break;
|
||||
case S_IFLNK:
|
||||
/* Symlink */
|
||||
unlink(file_header->name);
|
||||
res = symlink(file_header->link_name, file_header->name);
|
||||
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
|
||||
bb_perror_msg("Cannot create symlink from %s to '%s'", file_header->name, file_header->link_name);
|
||||
}
|
||||
else if (statbuf.st_mtime <= file_header->mtime) {
|
||||
if (!(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
|
||||
bb_error_msg("%s not created: newer or same age file exists", file_header->name);
|
||||
}
|
||||
break;
|
||||
case S_IFSOCK:
|
||||
case S_IFBLK:
|
||||
case S_IFCHR:
|
||||
case S_IFIFO:
|
||||
unlink(file_header->name);
|
||||
res = mknod(file_header->name, file_header->mode, file_header->device);
|
||||
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
|
||||
bb_perror_msg("Cannot create node %s", file_header->name);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
bb_error_msg_and_die("Unrecognised file type");
|
||||
data_skip(archive_handle);
|
||||
return;
|
||||
}
|
||||
else if ((unlink(file_header->name) == -1) && (errno != EISDIR)) {
|
||||
bb_perror_msg_and_die("Couldnt remove old file %s", file_header->name);
|
||||
}
|
||||
}
|
||||
|
||||
chmod(file_header->name, file_header->mode);
|
||||
chown(file_header->name, file_header->uid, file_header->gid);
|
||||
/* Handle hard links seperately
|
||||
* We identified hard links as regular files of size 0 with a symlink */
|
||||
if (S_ISREG(file_header->mode) && (file_header->link_name) && (file_header->size == 0)) {
|
||||
/* hard link */
|
||||
res = link(file_header->link_name, file_header->name);
|
||||
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
|
||||
bb_perror_msg("Couldnt create hard link");
|
||||
}
|
||||
} else {
|
||||
/* Create the filesystem entry */
|
||||
switch(file_header->mode & S_IFMT) {
|
||||
case S_IFREG: {
|
||||
/* Regular file */
|
||||
dst_fd = bb_xopen(file_header->name, O_WRONLY | O_CREAT | O_EXCL);
|
||||
bb_copyfd_size(archive_handle->src_fd, dst_fd, file_header->size);
|
||||
close(dst_fd);
|
||||
break;
|
||||
}
|
||||
case S_IFDIR:
|
||||
res = mkdir(file_header->name, file_header->mode);
|
||||
if ((errno != EISDIR) && (res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
|
||||
bb_perror_msg("extract_archive: %s", file_header->name);
|
||||
}
|
||||
break;
|
||||
case S_IFLNK:
|
||||
/* Symlink */
|
||||
res = symlink(file_header->link_name, file_header->name);
|
||||
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
|
||||
bb_perror_msg("Cannot create symlink from %s to '%s'", file_header->name, file_header->link_name);
|
||||
}
|
||||
break;
|
||||
case S_IFSOCK:
|
||||
case S_IFBLK:
|
||||
case S_IFCHR:
|
||||
case S_IFIFO:
|
||||
res = mknod(file_header->name, file_header->mode, file_header->device);
|
||||
if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) {
|
||||
bb_perror_msg("Cannot create node %s", file_header->name);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
bb_error_msg_and_die("Unrecognised file type");
|
||||
}
|
||||
}
|
||||
|
||||
lchown(file_header->name, file_header->uid, file_header->gid);
|
||||
if ((file_header->mode & S_IFMT) != S_IFLNK) {
|
||||
chmod(file_header->name, file_header->mode);
|
||||
}
|
||||
|
||||
if (archive_handle->flags & ARCHIVE_PRESERVE_DATE) {
|
||||
struct utimbuf t;
|
||||
|
||||
@@ -18,5 +18,5 @@
|
||||
|
||||
extern void data_extract_to_stdout(archive_handle_t *archive_handle)
|
||||
{
|
||||
archive_copy_file(archive_handle, fileno(stdout));
|
||||
bb_copyfd_size(archive_handle->src_fd, fileno(stdout), archive_handle->file_header->size);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,8 +1,6 @@
|
||||
#include "config.h"
|
||||
#include "libbb.h"
|
||||
|
||||
#if defined CONFIG_UNCOMPRESS || defined CONFIG_FEATURE_GUNZIP_UNCOMPRESS
|
||||
|
||||
/* uncompress for busybox -- (c) 2002 Robert Griebl
|
||||
*
|
||||
* based on the original compress42.c source
|
||||
@@ -166,7 +164,7 @@ extern int uncompress(int fd_in, int fd_out)
|
||||
}
|
||||
|
||||
if (insize < (int) sizeof(inbuf) - IBUFSIZ) {
|
||||
rsize = read(fd_in, inbuf + insize, IBUFSIZ);
|
||||
rsize = safe_read(fd_in, inbuf + insize, IBUFSIZ);
|
||||
insize += rsize;
|
||||
}
|
||||
|
||||
@@ -293,6 +291,3 @@ extern int uncompress(int fd_in, int fd_out)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -103,7 +103,7 @@ static unsigned int gunzip_bb; /* bit buffer */
|
||||
static unsigned char gunzip_bk; /* bits in bit buffer */
|
||||
|
||||
/* These control the size of the bytebuffer */
|
||||
#define BYTEBUFFER_MAX 0x8000
|
||||
static unsigned int bytebuffer_max = 0x8000;
|
||||
static unsigned char *bytebuffer = NULL;
|
||||
static unsigned int bytebuffer_offset = 0;
|
||||
static unsigned int bytebuffer_size = 0;
|
||||
@@ -144,21 +144,16 @@ static const unsigned char border[] = {
|
||||
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
|
||||
};
|
||||
|
||||
static void fill_bytebuffer(void)
|
||||
{
|
||||
if (bytebuffer_offset >= bytebuffer_size) {
|
||||
/* 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);
|
||||
bytebuffer_offset = 4;
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int fill_bitbuffer(unsigned int bitbuffer, unsigned int *current, const unsigned int required)
|
||||
{
|
||||
while (*current < required) {
|
||||
fill_bytebuffer();
|
||||
if (bytebuffer_offset >= bytebuffer_size) {
|
||||
/* 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);
|
||||
bytebuffer_offset = 4;
|
||||
}
|
||||
bitbuffer |= ((unsigned int) bytebuffer[bytebuffer_offset]) << *current;
|
||||
bytebuffer_offset++;
|
||||
*current += 8;
|
||||
@@ -861,9 +856,9 @@ static void calculate_gunzip_crc(void)
|
||||
|
||||
static int inflate_get_next_window(void)
|
||||
{
|
||||
static int needAnotherBlock = 1;
|
||||
static int method = -1; // Method == -1 for stored, -2 for codes
|
||||
static int e = 0;
|
||||
static int needAnotherBlock = 1;
|
||||
|
||||
gunzip_outbuf_count = 0;
|
||||
|
||||
@@ -873,6 +868,8 @@ static int inflate_get_next_window(void)
|
||||
if (needAnotherBlock) {
|
||||
if(e) {
|
||||
calculate_gunzip_crc();
|
||||
e = 0;
|
||||
needAnotherBlock = 1;
|
||||
return 0;
|
||||
} // Last block
|
||||
method = inflate_block(&e);
|
||||
@@ -895,54 +892,25 @@ static int inflate_get_next_window(void)
|
||||
/* Doesnt get here */
|
||||
}
|
||||
|
||||
/*
|
||||
* User functions
|
||||
*
|
||||
* read_gz, GZ_gzReadOpen, GZ_gzReadClose, inflate
|
||||
*/
|
||||
|
||||
extern ssize_t read_gz(int fd, void *buf, size_t count)
|
||||
/* Initialise bytebuffer, be carefull not to overfill the buffer */
|
||||
extern void inflate_init(unsigned int bufsize)
|
||||
{
|
||||
static int morebytes = 0, finished = 0;
|
||||
|
||||
if (morebytes) {
|
||||
int bytesRead = morebytes > count ? count : morebytes;
|
||||
memcpy(buf, gunzip_window + (gunzip_outbuf_count - morebytes), bytesRead);
|
||||
morebytes -= bytesRead;
|
||||
return bytesRead;
|
||||
} else if (finished) {
|
||||
return 0;
|
||||
} else if (count >= 0x8000) { // We can decompress direcly to the buffer, 32k at a time
|
||||
// Could decompress to larger buffer, but it must be a power of 2, and calculating that is probably more expensive than the benefit
|
||||
unsigned char *old_gunzip_window = gunzip_window; // Save old window
|
||||
gunzip_window = buf;
|
||||
if (inflate_get_next_window() == 0) finished = 1;
|
||||
gunzip_window = old_gunzip_window; // Restore old window
|
||||
return gunzip_outbuf_count;
|
||||
} else { // Oh well, need to split up the gunzip_window
|
||||
int bytesRead;
|
||||
if (inflate_get_next_window() == 0) finished = 1;
|
||||
morebytes = gunzip_outbuf_count;
|
||||
bytesRead = morebytes > count ? count : morebytes;
|
||||
memcpy(buf, gunzip_window, bytesRead);
|
||||
morebytes -= bytesRead;
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
/* Set the bytebuffer size, default is same as gunzip_wsize */
|
||||
bytebuffer_max = bufsize + 8;
|
||||
bytebuffer_offset = 4;
|
||||
bytebuffer_size = 0;
|
||||
}
|
||||
|
||||
extern void GZ_gzReadOpen(int fd, void *unused, int nUnused)
|
||||
extern int inflate_unzip(int in, int out)
|
||||
{
|
||||
ssize_t nwrote;
|
||||
typedef void (*sig_type) (int);
|
||||
|
||||
/* Allocate all global buffers (for DYN_ALLOC option) */
|
||||
gunzip_window = xmalloc(gunzip_wsize);
|
||||
gunzip_outbuf_count = 0;
|
||||
gunzip_bytes_out = 0;
|
||||
gunzip_src_fd = fd;
|
||||
|
||||
/* Input buffer */
|
||||
bytebuffer = xmalloc(BYTEBUFFER_MAX);
|
||||
gunzip_src_fd = in;
|
||||
|
||||
/* initialize gunzip_window, bit buffer */
|
||||
gunzip_bk = 0;
|
||||
@@ -950,10 +918,20 @@ extern void GZ_gzReadOpen(int fd, void *unused, int nUnused)
|
||||
|
||||
/* Create the crc table */
|
||||
make_gunzip_crc_table();
|
||||
}
|
||||
|
||||
extern void GZ_gzReadClose(void)
|
||||
{
|
||||
/* Allocate space for buffer */
|
||||
bytebuffer = xmalloc(bytebuffer_max);
|
||||
|
||||
while(1) {
|
||||
int ret = inflate_get_next_window();
|
||||
nwrote = bb_full_write(out, gunzip_window, gunzip_outbuf_count);
|
||||
if (nwrote == -1) {
|
||||
bb_perror_msg("write");
|
||||
return -1;
|
||||
}
|
||||
if (ret == 0) break;
|
||||
}
|
||||
|
||||
/* Cleanup */
|
||||
free(gunzip_window);
|
||||
free(gunzip_crc_table);
|
||||
@@ -967,57 +945,20 @@ extern void GZ_gzReadClose(void)
|
||||
gunzip_bb >>= 8;
|
||||
gunzip_bk -= 8;
|
||||
}
|
||||
}
|
||||
|
||||
/*extern int inflate(int in, int out) // Useful for testing read_gz
|
||||
{
|
||||
char buf[8192];
|
||||
ssize_t nread, nwrote;
|
||||
|
||||
GZ_gzReadOpen(in, 0, 0);
|
||||
while(1) { // Robbed from bb_copyfd.c
|
||||
nread = read_gz(in, buf, sizeof(buf));
|
||||
if (nread == 0) break; // no data to write
|
||||
else if (nread == -1) {
|
||||
bb_perror_msg("read");
|
||||
return -1;
|
||||
}
|
||||
nwrote = bb_full_write(out, buf, nread);
|
||||
if (nwrote == -1) {
|
||||
bb_perror_msg("write");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
GZ_gzReadClose();
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
extern int inflate(int in, int out)
|
||||
{
|
||||
ssize_t nwrote;
|
||||
GZ_gzReadOpen(in, 0, 0);
|
||||
while(1) {
|
||||
int ret = inflate_get_next_window();
|
||||
nwrote = bb_full_write(out, gunzip_window, gunzip_outbuf_count);
|
||||
if (nwrote == -1) {
|
||||
bb_perror_msg("write");
|
||||
return -1;
|
||||
}
|
||||
if (ret == 0) break;
|
||||
}
|
||||
GZ_gzReadClose();
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern void check_trailer_gzip(int src_fd)
|
||||
extern int inflate_gunzip(int in, int out)
|
||||
{
|
||||
unsigned int stored_crc = 0;
|
||||
unsigned char count;
|
||||
|
||||
inflate_unzip(in, out);
|
||||
|
||||
/* top up the input buffer with the rest of the trailer */
|
||||
count = bytebuffer_size - bytebuffer_offset;
|
||||
if (count < 8) {
|
||||
bb_xread_all(src_fd, &bytebuffer[bytebuffer_size], 8 - count);
|
||||
bb_xread_all(in, &bytebuffer[bytebuffer_size], 8 - count);
|
||||
bytebuffer_size += 8 - count;
|
||||
}
|
||||
for (count = 0; count != 4; count++) {
|
||||
@@ -1027,14 +968,15 @@ extern void check_trailer_gzip(int src_fd)
|
||||
|
||||
/* Validate decompression - crc */
|
||||
if (stored_crc != (gunzip_crc ^ 0xffffffffL)) {
|
||||
bb_error_msg_and_die("crc error");
|
||||
bb_error_msg("crc error");
|
||||
}
|
||||
|
||||
/* Validate decompression - size */
|
||||
if (gunzip_bytes_out !=
|
||||
(bytebuffer[bytebuffer_offset] | (bytebuffer[bytebuffer_offset+1] << 8) |
|
||||
(bytebuffer[bytebuffer_offset+2] << 16) | (bytebuffer[bytebuffer_offset+3] << 24))) {
|
||||
bb_error_msg_and_die("Incorrect length, but crc is correct");
|
||||
bb_error_msg("Incorrect length");
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -40,16 +40,13 @@ extern char filter_accept_list_reassign(archive_handle_t *archive_handle)
|
||||
/* Modify the subarchive handler based on the extension */
|
||||
#ifdef CONFIG_FEATURE_DEB_TAR_GZ
|
||||
if (strcmp(name_ptr, ".gz") == 0) {
|
||||
archive_handle->sub_archive->read = read;
|
||||
archive_handle->action_data_subarchive = get_header_tar_gz;
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_FEATURE_DEB_TAR_BZ2
|
||||
if (strcmp(name_ptr, ".bz2") == 0) {
|
||||
archive_handle->sub_archive->read = read_bz2;
|
||||
BZ2_bzReadOpen(archive_handle->src_fd, NULL, 0);
|
||||
archive_handle->action_data_subarchive = get_header_tar;
|
||||
archive_handle->action_data_subarchive = get_header_tar_bz2;
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@ extern char get_header_ar(archive_handle_t *archive_handle)
|
||||
if (read(archive_handle->src_fd, ar.raw, 60) != 60) {
|
||||
/* End Of File */
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
/* Some ar entries have a trailing '\n' after the previous data entry */
|
||||
if (ar.raw[0] == '\n') {
|
||||
@@ -55,7 +55,7 @@ extern char get_header_ar(archive_handle_t *archive_handle)
|
||||
archive_handle->offset++;
|
||||
}
|
||||
archive_handle->offset += 60;
|
||||
|
||||
|
||||
/* align the headers based on the header magic */
|
||||
if ((ar.formated.magic[0] != '`') || (ar.formated.magic[1] != '\n')) {
|
||||
bb_error_msg_and_die("Invalid ar header");
|
||||
@@ -115,7 +115,9 @@ extern char get_header_ar(archive_handle_t *archive_handle)
|
||||
data_skip(archive_handle);
|
||||
}
|
||||
|
||||
archive_handle->offset += typed->size + 1;
|
||||
archive_handle->offset += typed->size;
|
||||
/* Set the file pointer to the correct spot, we may have been reading a compressed file */
|
||||
lseek(archive_handle->src_fd, archive_handle->offset, SEEK_SET);
|
||||
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
|
||||
int namesize;
|
||||
char dummy[16];
|
||||
int major, minor, nlink, inode;
|
||||
char extract_flag;
|
||||
|
||||
if (pending_hardlinks) { /* Deal with any pending hardlinks */
|
||||
hardlinks_t *tmp;
|
||||
@@ -71,17 +70,7 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
|
||||
}
|
||||
archive_handle->offset += 110;
|
||||
|
||||
if (strncmp(&cpio_header[0], "07070", 5) != 0) {
|
||||
printf("cpio header is %x-%x-%x-%x-%x\n",
|
||||
cpio_header[0],
|
||||
cpio_header[1],
|
||||
cpio_header[2],
|
||||
cpio_header[3],
|
||||
cpio_header[4]);
|
||||
bb_error_msg_and_die("Unsupported cpio format");
|
||||
}
|
||||
|
||||
if ((cpio_header[5] != '1') && (cpio_header[5] != '2')) {
|
||||
if ((strncmp(&cpio_header[0], "07070", 5) != 0) || ((cpio_header[5] != '1') && (cpio_header[5] != '2'))) {
|
||||
bb_error_msg_and_die("Unsupported cpio format, use newc or crc");
|
||||
}
|
||||
|
||||
@@ -154,36 +143,13 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
|
||||
}
|
||||
file_header->device = (major << 8) | minor;
|
||||
|
||||
extract_flag = FALSE;
|
||||
if (archive_handle->filter(archive_handle) == EXIT_SUCCESS) {
|
||||
struct stat statbuf;
|
||||
|
||||
extract_flag = TRUE;
|
||||
|
||||
/* Check if the file already exists */
|
||||
if (lstat (file_header->name, &statbuf) == 0) {
|
||||
if ((archive_handle->flags & ARCHIVE_EXTRACT_UNCONDITIONAL) || (statbuf.st_mtime < file_header->mtime)) {
|
||||
/* Remove file if flag set or its older than the file to be extracted */
|
||||
if (unlink(file_header->name) == -1) {
|
||||
bb_perror_msg_and_die("Couldnt remove old file");
|
||||
}
|
||||
} else {
|
||||
if (! archive_handle->flags & ARCHIVE_EXTRACT_QUIET) {
|
||||
bb_error_msg("%s not created: newer or same age file exists", file_header->name);
|
||||
}
|
||||
extract_flag = FALSE;
|
||||
}
|
||||
}
|
||||
archive_handle->action_header(file_header);
|
||||
}
|
||||
|
||||
archive_handle->action_header(file_header);
|
||||
if (extract_flag) {
|
||||
archive_handle->action_data(archive_handle);
|
||||
archive_handle->action_header(archive_handle->file_header);
|
||||
} else {
|
||||
data_skip(archive_handle);
|
||||
data_skip(archive_handle);
|
||||
}
|
||||
|
||||
archive_handle->offset += file_header->size;
|
||||
return (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ extern char get_header_tar(archive_handle_t *archive_handle)
|
||||
{
|
||||
file_header_t *file_header = archive_handle->file_header;
|
||||
union {
|
||||
/* ustar header, Posix 1003.1 */
|
||||
unsigned char raw[512];
|
||||
struct {
|
||||
char name[100]; /* 0-99 */
|
||||
@@ -52,12 +53,11 @@ extern char get_header_tar(archive_handle_t *archive_handle)
|
||||
} tar;
|
||||
long sum = 0;
|
||||
long i;
|
||||
char *tmp;
|
||||
|
||||
/* Align header */
|
||||
data_align(archive_handle, 512);
|
||||
|
||||
if (archive_xread(archive_handle, tar.raw, 512) != 512) {
|
||||
if (bb_full_read(archive_handle->src_fd, tar.raw, 512) != 512) {
|
||||
/* Assume end of file */
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
@@ -105,11 +105,15 @@ extern char get_header_tar(archive_handle_t *archive_handle)
|
||||
} else {
|
||||
file_header->name = concat_path_file(tar.formated.prefix, tar.formated.name);
|
||||
}
|
||||
tmp = last_char_is(archive_handle->file_header->name, '/');
|
||||
if (tmp) {
|
||||
*tmp = '\0';
|
||||
|
||||
{ /* Strip trailing '/' in directories */
|
||||
char *tmp = last_char_is(file_header->name, '/');
|
||||
if (tmp) {
|
||||
*tmp = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
file_header->mode = strtol(tar.formated.mode, NULL, 8);
|
||||
file_header->uid = strtol(tar.formated.uid, NULL, 8);
|
||||
file_header->gid = strtol(tar.formated.gid, NULL, 8);
|
||||
@@ -120,16 +124,17 @@ extern char get_header_tar(archive_handle_t *archive_handle)
|
||||
file_header->device = (dev_t) ((strtol(tar.formated.devmajor, NULL, 8) << 8) +
|
||||
strtol(tar.formated.devminor, NULL, 8));
|
||||
|
||||
#if defined CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY || defined CONFIG_FEATURE_TAR_GNU_EXTENSIONS
|
||||
/* Fix mode, used by the old format */
|
||||
switch (tar.formated.typeflag) {
|
||||
# ifdef CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY
|
||||
case 0:
|
||||
case '0':
|
||||
file_header->mode |= S_IFREG;
|
||||
if (last_char_is(file_header->name, '/')) {
|
||||
file_header->mode |= S_IFDIR;
|
||||
} else {
|
||||
file_header->mode |= S_IFREG;
|
||||
}
|
||||
break;
|
||||
case '1':
|
||||
bb_error_msg("WARNING: Converting hard link to symlink");
|
||||
case '2':
|
||||
file_header->mode |= S_IFLNK;
|
||||
break;
|
||||
@@ -146,6 +151,10 @@ extern char get_header_tar(archive_handle_t *archive_handle)
|
||||
file_header->mode |= S_IFIFO;
|
||||
break;
|
||||
# endif
|
||||
/* hard links are detected as regular files with 0 size and a link name */
|
||||
case '1':
|
||||
file_header->mode &= (S_IFREG | 07777);
|
||||
break;
|
||||
# ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS
|
||||
case 'L': {
|
||||
longname = xmalloc(file_header->size + 1);
|
||||
@@ -172,17 +181,18 @@ extern char get_header_tar(archive_handle_t *archive_handle)
|
||||
bb_error_msg("Ignoring GNU extension type %c", tar.formated.typeflag);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (archive_handle->filter(archive_handle) == EXIT_SUCCESS) {
|
||||
archive_handle->action_header(archive_handle->file_header);
|
||||
archive_handle->flags |= ARCHIVE_EXTRACT_QUIET;
|
||||
archive_handle->action_data(archive_handle);
|
||||
archive_handle->passed = llist_add_to(archive_handle->passed, archive_handle->file_header->name);
|
||||
archive_handle->passed = llist_add_to(archive_handle->passed, file_header->name);
|
||||
} else {
|
||||
data_skip(archive_handle);
|
||||
}
|
||||
archive_handle->offset += file_header->size;
|
||||
|
||||
free(file_header->link_name);
|
||||
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -25,18 +26,13 @@
|
||||
|
||||
extern char get_header_tar_bz2(archive_handle_t *archive_handle)
|
||||
{
|
||||
BZ2_bzReadOpen(archive_handle->src_fd, NULL, 0);
|
||||
|
||||
archive_handle->read = read_bz2;
|
||||
/* Cant lseek over pipe's */
|
||||
archive_handle->seek = seek_by_char;
|
||||
|
||||
archive_handle->src_fd = open_transformer(archive_handle->src_fd, uncompressStream);
|
||||
archive_handle->offset = 0;
|
||||
while (get_header_tar(archive_handle) == EXIT_SUCCESS);
|
||||
|
||||
/* Cleanup */
|
||||
BZ2_bzReadClose();
|
||||
|
||||
/* Can only do one tar.bz2 per archive */
|
||||
/* Can only do one file at a time */
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ extern char get_header_tar_gz(archive_handle_t *archive_handle)
|
||||
{
|
||||
unsigned char magic[2];
|
||||
|
||||
/* Cant lseek over pipe's */
|
||||
archive_handle->seek = seek_by_char;
|
||||
|
||||
archive_xread_all(archive_handle, &magic, 2);
|
||||
if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) {
|
||||
bb_error_msg_and_die("Invalid gzip magic");
|
||||
@@ -30,20 +33,10 @@ extern char get_header_tar_gz(archive_handle_t *archive_handle)
|
||||
|
||||
check_header_gzip(archive_handle->src_fd);
|
||||
|
||||
GZ_gzReadOpen(archive_handle->src_fd, 0, 0);
|
||||
|
||||
archive_handle->read = read_gz;
|
||||
archive_handle->seek = seek_by_char;
|
||||
|
||||
archive_handle->src_fd = open_transformer(archive_handle->src_fd, inflate_gunzip);
|
||||
archive_handle->offset = 0;
|
||||
while (get_header_tar(archive_handle) == EXIT_SUCCESS);
|
||||
|
||||
/* Cleanup */
|
||||
GZ_gzReadClose();
|
||||
|
||||
check_trailer_gzip(archive_handle->src_fd);
|
||||
|
||||
/* Can only do one tar.bz2 per archive */
|
||||
/* Can only do one file at a time */
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ archive_handle_t *init_handle(void)
|
||||
archive_handle->action_header = header_skip;
|
||||
archive_handle->action_data = data_skip;
|
||||
archive_handle->filter = filter_accept_all;
|
||||
archive_handle->read = bb_full_read;
|
||||
archive_handle->seek = seek_by_jump;
|
||||
|
||||
return(archive_handle);
|
||||
|
||||
@@ -14,20 +14,38 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "unarchive.h"
|
||||
#include <unistd.h>
|
||||
|
||||
#include "libbb.h"
|
||||
|
||||
extern ssize_t archive_xread(const archive_handle_t *archive_handle, unsigned char *buf, const size_t count)
|
||||
/* transformer(), more than meets the eye */
|
||||
extern int open_transformer(int src_fd, int (*transformer)(int src_fd, int dst_fd))
|
||||
{
|
||||
ssize_t size;
|
||||
int fd_pipe[2];
|
||||
int pid;
|
||||
|
||||
size = archive_handle->read(archive_handle->src_fd, buf, count);
|
||||
if (size < 0) {
|
||||
bb_perror_msg_and_die("Read error");
|
||||
if (pipe(fd_pipe) != 0) {
|
||||
bb_perror_msg_and_die("Can't create pipe");
|
||||
}
|
||||
|
||||
return(size);
|
||||
pid = fork();
|
||||
if (pid == -1) {
|
||||
bb_perror_msg_and_die("Fork failed");
|
||||
}
|
||||
|
||||
if (pid == 0) {
|
||||
/* child process */
|
||||
close(fd_pipe[0]); /* We don't wan't to read from the parent */
|
||||
transformer(src_fd, fd_pipe[1]);
|
||||
close(fd_pipe[1]); /* Send EOF */
|
||||
close(src_fd);
|
||||
exit(0);
|
||||
/* notreached */
|
||||
}
|
||||
|
||||
/* parent process */
|
||||
close(fd_pipe[1]); /* Don't want to write to the child */
|
||||
|
||||
return(fd_pipe[0]);
|
||||
}
|
||||
@@ -14,12 +14,19 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "unarchive.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
extern void seek_by_char(const archive_handle_t *archive_handle, const unsigned int amount)
|
||||
#include "unarchive.h"
|
||||
#include "busybox.h"
|
||||
|
||||
/* If we are reading through a pipe(), or from stdin then we cant lseek,
|
||||
* we must read and discard the data to skip over it.
|
||||
*
|
||||
* TODO: rename to seek_by_read
|
||||
*/
|
||||
extern void seek_by_char(const archive_handle_t *archive_handle, const unsigned int jump_size)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < amount; i++) {
|
||||
archive_xread_char(archive_handle);
|
||||
if (jump_size) {
|
||||
bb_full_fd_action(archive_handle->src_fd, -1, jump_size, NULL);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "config.h"
|
||||
#include "libbb.h"
|
||||
|
||||
#if defined CONFIG_UNCOMPRESS || defined CONFIG_FEATURE_GUNZIP_UNCOMPRESS
|
||||
|
||||
/* uncompress for busybox -- (c) 2002 Robert Griebl
|
||||
*
|
||||
* based on the original compress42.c source
|
||||
@@ -166,7 +164,7 @@ extern int uncompress(int fd_in, int fd_out)
|
||||
}
|
||||
|
||||
if (insize < (int) sizeof(inbuf) - IBUFSIZ) {
|
||||
rsize = read(fd_in, inbuf + insize, IBUFSIZ);
|
||||
rsize = safe_read(fd_in, inbuf + insize, IBUFSIZ);
|
||||
insize += rsize;
|
||||
}
|
||||
|
||||
@@ -293,6 +291,3 @@ extern int uncompress(int fd_in, int fd_out)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -103,7 +103,7 @@ static unsigned int gunzip_bb; /* bit buffer */
|
||||
static unsigned char gunzip_bk; /* bits in bit buffer */
|
||||
|
||||
/* These control the size of the bytebuffer */
|
||||
#define BYTEBUFFER_MAX 0x8000
|
||||
static unsigned int bytebuffer_max = 0x8000;
|
||||
static unsigned char *bytebuffer = NULL;
|
||||
static unsigned int bytebuffer_offset = 0;
|
||||
static unsigned int bytebuffer_size = 0;
|
||||
@@ -144,21 +144,16 @@ static const unsigned char border[] = {
|
||||
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
|
||||
};
|
||||
|
||||
static void fill_bytebuffer(void)
|
||||
{
|
||||
if (bytebuffer_offset >= bytebuffer_size) {
|
||||
/* 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);
|
||||
bytebuffer_offset = 4;
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int fill_bitbuffer(unsigned int bitbuffer, unsigned int *current, const unsigned int required)
|
||||
{
|
||||
while (*current < required) {
|
||||
fill_bytebuffer();
|
||||
if (bytebuffer_offset >= bytebuffer_size) {
|
||||
/* 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);
|
||||
bytebuffer_offset = 4;
|
||||
}
|
||||
bitbuffer |= ((unsigned int) bytebuffer[bytebuffer_offset]) << *current;
|
||||
bytebuffer_offset++;
|
||||
*current += 8;
|
||||
@@ -861,9 +856,9 @@ static void calculate_gunzip_crc(void)
|
||||
|
||||
static int inflate_get_next_window(void)
|
||||
{
|
||||
static int needAnotherBlock = 1;
|
||||
static int method = -1; // Method == -1 for stored, -2 for codes
|
||||
static int e = 0;
|
||||
static int needAnotherBlock = 1;
|
||||
|
||||
gunzip_outbuf_count = 0;
|
||||
|
||||
@@ -873,6 +868,8 @@ static int inflate_get_next_window(void)
|
||||
if (needAnotherBlock) {
|
||||
if(e) {
|
||||
calculate_gunzip_crc();
|
||||
e = 0;
|
||||
needAnotherBlock = 1;
|
||||
return 0;
|
||||
} // Last block
|
||||
method = inflate_block(&e);
|
||||
@@ -895,54 +892,25 @@ static int inflate_get_next_window(void)
|
||||
/* Doesnt get here */
|
||||
}
|
||||
|
||||
/*
|
||||
* User functions
|
||||
*
|
||||
* read_gz, GZ_gzReadOpen, GZ_gzReadClose, inflate
|
||||
*/
|
||||
|
||||
extern ssize_t read_gz(int fd, void *buf, size_t count)
|
||||
/* Initialise bytebuffer, be carefull not to overfill the buffer */
|
||||
extern void inflate_init(unsigned int bufsize)
|
||||
{
|
||||
static int morebytes = 0, finished = 0;
|
||||
|
||||
if (morebytes) {
|
||||
int bytesRead = morebytes > count ? count : morebytes;
|
||||
memcpy(buf, gunzip_window + (gunzip_outbuf_count - morebytes), bytesRead);
|
||||
morebytes -= bytesRead;
|
||||
return bytesRead;
|
||||
} else if (finished) {
|
||||
return 0;
|
||||
} else if (count >= 0x8000) { // We can decompress direcly to the buffer, 32k at a time
|
||||
// Could decompress to larger buffer, but it must be a power of 2, and calculating that is probably more expensive than the benefit
|
||||
unsigned char *old_gunzip_window = gunzip_window; // Save old window
|
||||
gunzip_window = buf;
|
||||
if (inflate_get_next_window() == 0) finished = 1;
|
||||
gunzip_window = old_gunzip_window; // Restore old window
|
||||
return gunzip_outbuf_count;
|
||||
} else { // Oh well, need to split up the gunzip_window
|
||||
int bytesRead;
|
||||
if (inflate_get_next_window() == 0) finished = 1;
|
||||
morebytes = gunzip_outbuf_count;
|
||||
bytesRead = morebytes > count ? count : morebytes;
|
||||
memcpy(buf, gunzip_window, bytesRead);
|
||||
morebytes -= bytesRead;
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
/* Set the bytebuffer size, default is same as gunzip_wsize */
|
||||
bytebuffer_max = bufsize + 8;
|
||||
bytebuffer_offset = 4;
|
||||
bytebuffer_size = 0;
|
||||
}
|
||||
|
||||
extern void GZ_gzReadOpen(int fd, void *unused, int nUnused)
|
||||
extern int inflate_unzip(int in, int out)
|
||||
{
|
||||
ssize_t nwrote;
|
||||
typedef void (*sig_type) (int);
|
||||
|
||||
/* Allocate all global buffers (for DYN_ALLOC option) */
|
||||
gunzip_window = xmalloc(gunzip_wsize);
|
||||
gunzip_outbuf_count = 0;
|
||||
gunzip_bytes_out = 0;
|
||||
gunzip_src_fd = fd;
|
||||
|
||||
/* Input buffer */
|
||||
bytebuffer = xmalloc(BYTEBUFFER_MAX);
|
||||
gunzip_src_fd = in;
|
||||
|
||||
/* initialize gunzip_window, bit buffer */
|
||||
gunzip_bk = 0;
|
||||
@@ -950,10 +918,20 @@ extern void GZ_gzReadOpen(int fd, void *unused, int nUnused)
|
||||
|
||||
/* Create the crc table */
|
||||
make_gunzip_crc_table();
|
||||
}
|
||||
|
||||
extern void GZ_gzReadClose(void)
|
||||
{
|
||||
/* Allocate space for buffer */
|
||||
bytebuffer = xmalloc(bytebuffer_max);
|
||||
|
||||
while(1) {
|
||||
int ret = inflate_get_next_window();
|
||||
nwrote = bb_full_write(out, gunzip_window, gunzip_outbuf_count);
|
||||
if (nwrote == -1) {
|
||||
bb_perror_msg("write");
|
||||
return -1;
|
||||
}
|
||||
if (ret == 0) break;
|
||||
}
|
||||
|
||||
/* Cleanup */
|
||||
free(gunzip_window);
|
||||
free(gunzip_crc_table);
|
||||
@@ -967,57 +945,20 @@ extern void GZ_gzReadClose(void)
|
||||
gunzip_bb >>= 8;
|
||||
gunzip_bk -= 8;
|
||||
}
|
||||
}
|
||||
|
||||
/*extern int inflate(int in, int out) // Useful for testing read_gz
|
||||
{
|
||||
char buf[8192];
|
||||
ssize_t nread, nwrote;
|
||||
|
||||
GZ_gzReadOpen(in, 0, 0);
|
||||
while(1) { // Robbed from bb_copyfd.c
|
||||
nread = read_gz(in, buf, sizeof(buf));
|
||||
if (nread == 0) break; // no data to write
|
||||
else if (nread == -1) {
|
||||
bb_perror_msg("read");
|
||||
return -1;
|
||||
}
|
||||
nwrote = bb_full_write(out, buf, nread);
|
||||
if (nwrote == -1) {
|
||||
bb_perror_msg("write");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
GZ_gzReadClose();
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
extern int inflate(int in, int out)
|
||||
{
|
||||
ssize_t nwrote;
|
||||
GZ_gzReadOpen(in, 0, 0);
|
||||
while(1) {
|
||||
int ret = inflate_get_next_window();
|
||||
nwrote = bb_full_write(out, gunzip_window, gunzip_outbuf_count);
|
||||
if (nwrote == -1) {
|
||||
bb_perror_msg("write");
|
||||
return -1;
|
||||
}
|
||||
if (ret == 0) break;
|
||||
}
|
||||
GZ_gzReadClose();
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern void check_trailer_gzip(int src_fd)
|
||||
extern int inflate_gunzip(int in, int out)
|
||||
{
|
||||
unsigned int stored_crc = 0;
|
||||
unsigned char count;
|
||||
|
||||
inflate_unzip(in, out);
|
||||
|
||||
/* top up the input buffer with the rest of the trailer */
|
||||
count = bytebuffer_size - bytebuffer_offset;
|
||||
if (count < 8) {
|
||||
bb_xread_all(src_fd, &bytebuffer[bytebuffer_size], 8 - count);
|
||||
bb_xread_all(in, &bytebuffer[bytebuffer_size], 8 - count);
|
||||
bytebuffer_size += 8 - count;
|
||||
}
|
||||
for (count = 0; count != 4; count++) {
|
||||
@@ -1027,14 +968,15 @@ extern void check_trailer_gzip(int src_fd)
|
||||
|
||||
/* Validate decompression - crc */
|
||||
if (stored_crc != (gunzip_crc ^ 0xffffffffL)) {
|
||||
bb_error_msg_and_die("crc error");
|
||||
bb_error_msg("crc error");
|
||||
}
|
||||
|
||||
/* Validate decompression - size */
|
||||
if (gunzip_bytes_out !=
|
||||
(bytebuffer[bytebuffer_offset] | (bytebuffer[bytebuffer_offset+1] << 8) |
|
||||
(bytebuffer[bytebuffer_offset+2] << 16) | (bytebuffer[bytebuffer_offset+3] << 24))) {
|
||||
bb_error_msg_and_die("Incorrect length, but crc is correct");
|
||||
bb_error_msg("Incorrect length");
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
+2
-5
@@ -197,7 +197,6 @@ void extract_cpio_gz(int fd) {
|
||||
|
||||
/* Initialise */
|
||||
archive_handle = init_handle();
|
||||
archive_handle->read = read_gz;
|
||||
archive_handle->seek = seek_by_char;
|
||||
//archive_handle->action_header = header_list;
|
||||
archive_handle->action_data = data_extract_all;
|
||||
@@ -213,11 +212,9 @@ void extract_cpio_gz(int fd) {
|
||||
check_header_gzip(archive_handle->src_fd);
|
||||
chdir("/"); // Install RPM's to root
|
||||
|
||||
GZ_gzReadOpen(archive_handle->src_fd, 0, 0);
|
||||
archive_handle->src_fd = open_transformer(archive_handle->src_fd, inflate_gunzip);
|
||||
archive_handle->offset = 0;
|
||||
while (get_header_cpio(archive_handle) == EXIT_SUCCESS);
|
||||
GZ_gzReadClose();
|
||||
|
||||
check_trailer_gzip(archive_handle->src_fd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-2
@@ -96,10 +96,9 @@ extern int rpm2cpio_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
check_header_gzip(rpm_fd);
|
||||
if (inflate(rpm_fd, fileno(stdout)) != 0) {
|
||||
if (inflate_gunzip(rpm_fd, fileno(stdout)) != 0) {
|
||||
bb_error_msg("Error inflating");
|
||||
}
|
||||
check_trailer_gzip(rpm_fd);
|
||||
|
||||
close(rpm_fd);
|
||||
|
||||
|
||||
+117
-75
@@ -308,8 +308,9 @@ static inline int writeTarHeader(struct TarBallInfo *tbInfo,
|
||||
if (tbInfo->verboseFlag) {
|
||||
FILE *vbFd = stdout;
|
||||
|
||||
if (tbInfo->verboseFlag == 2) /* If the archive goes to stdout, verbose to stderr */
|
||||
if (tbInfo->tarFd == fileno(stdout)) /* If the archive goes to stdout, verbose to stderr */
|
||||
vbFd = stderr;
|
||||
|
||||
fprintf(vbFd, "%s\n", header.name);
|
||||
}
|
||||
|
||||
@@ -413,8 +414,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf,
|
||||
if ((tbInfo->hlInfo == NULL)
|
||||
&& (S_ISREG(statbuf->st_mode))) {
|
||||
int inputFileFd;
|
||||
char buffer[BUFSIZ];
|
||||
ssize_t size = 0, readSize = 0;
|
||||
ssize_t readSize = 0;
|
||||
|
||||
/* open the file we want to archive, and make sure all is well */
|
||||
if ((inputFileFd = open(fileName, O_RDONLY)) < 0) {
|
||||
@@ -423,18 +423,8 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf,
|
||||
}
|
||||
|
||||
/* write the file to the archive */
|
||||
while ((size = bb_full_read(inputFileFd, buffer, sizeof(buffer))) > 0) {
|
||||
if (bb_full_write(tbInfo->tarFd, buffer, size) != size) {
|
||||
/* Output file seems to have a problem */
|
||||
bb_error_msg(bb_msg_io_error, fileName);
|
||||
return (FALSE);
|
||||
}
|
||||
readSize += size;
|
||||
}
|
||||
if (size == -1) {
|
||||
bb_error_msg(bb_msg_io_error, fileName);
|
||||
return (FALSE);
|
||||
}
|
||||
readSize = bb_copyfd_eof(inputFileFd, tbInfo->tarFd);
|
||||
|
||||
/* Pad the file up to the tar block size */
|
||||
for (; (readSize % TAR_BLOCK_SIZE) != 0; readSize++) {
|
||||
write(tbInfo->tarFd, "\0", 1);
|
||||
@@ -445,7 +435,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf,
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
static inline int writeTarFile(const char *tarName, const int verboseFlag,
|
||||
static inline int writeTarFile(const int tar_fd, const int verboseFlag,
|
||||
const llist_t *include, const llist_t *exclude, const int gzip)
|
||||
{
|
||||
#ifdef CONFIG_FEATURE_TAR_GZIP
|
||||
@@ -461,31 +451,14 @@ static inline int writeTarFile(const char *tarName, const int verboseFlag,
|
||||
|
||||
tbInfo.hlInfoHead = NULL;
|
||||
|
||||
/* Make sure there is at least one file to tar up. */
|
||||
if (include == NULL) {
|
||||
bb_error_msg_and_die("Cowardly refusing to create an empty archive");
|
||||
}
|
||||
|
||||
/* Open the tar file for writing. */
|
||||
if (tarName == NULL || (tarName[0] == '-' && tarName[1] == '\0')) {
|
||||
tbInfo.tarFd = fileno(stdout);
|
||||
tbInfo.verboseFlag = verboseFlag ? 2 : 0;
|
||||
} else {
|
||||
unlink(tarName);
|
||||
tbInfo.tarFd = open(tarName, O_WRONLY | O_CREAT | O_EXCL, 0644);
|
||||
tbInfo.verboseFlag = verboseFlag ? 1 : 0;
|
||||
}
|
||||
|
||||
if (tbInfo.tarFd < 0) {
|
||||
bb_perror_msg("%s: Cannot open", tarName);
|
||||
freeHardLinkInfo(&tbInfo.hlInfoHead);
|
||||
return (FALSE);
|
||||
}
|
||||
fchmod(tar_fd, 0644);
|
||||
tbInfo.tarFd = tar_fd;
|
||||
tbInfo.verboseFlag = verboseFlag;
|
||||
|
||||
/* Store the stat info for the tarball's file, so
|
||||
* can avoid including the tarball into itself.... */
|
||||
if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0)
|
||||
bb_error_msg_and_die(bb_msg_io_error, tarName);
|
||||
bb_perror_msg_and_die("Couldnt stat tar file");
|
||||
|
||||
#ifdef CONFIG_FEATURE_TAR_GZIP
|
||||
if (gzip) {
|
||||
@@ -605,8 +578,28 @@ static llist_t *append_file_list_to_list(llist_t *list)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FEATURE_TAR_COMPRESS
|
||||
static char get_header_tar_Z(archive_handle_t *archive_handle)
|
||||
{
|
||||
/* Cant lseek over pipe's */
|
||||
archive_handle->seek = seek_by_char;
|
||||
|
||||
/* do the decompression, and cleanup */
|
||||
if ((bb_xread_char(archive_handle->src_fd) != 0x1f) || (bb_xread_char(archive_handle->src_fd) != 0x9d)) {
|
||||
bb_error_msg_and_die("Invalid magic");
|
||||
}
|
||||
|
||||
archive_handle->src_fd = open_transformer(archive_handle->src_fd, uncompress);
|
||||
archive_handle->offset = 0;
|
||||
while (get_header_tar(archive_handle) == EXIT_SUCCESS);
|
||||
|
||||
/* Can only do one file at a time */
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char tar_options[]="ctxjT:X:C:f:OpvzkZ";
|
||||
|
||||
static const char tar_options[]="ctxjT:X:C:f:Opvz";
|
||||
#define CTX_CREATE 1
|
||||
#define CTX_TEST 2
|
||||
#define CTX_EXTRACT 4
|
||||
@@ -619,6 +612,8 @@ static const char tar_options[]="ctxjT:X:C:f:Opvz";
|
||||
#define TAR_OPT_P 512
|
||||
#define TAR_OPT_VERBOSE 1024
|
||||
#define TAR_OPT_GZIP 2048
|
||||
#define TAR_OPT_KEEP_OLD 4096
|
||||
#define TAR_OPT_UNCOMPRESS 8192
|
||||
|
||||
int tar_main(int argc, char **argv)
|
||||
{
|
||||
@@ -643,7 +638,7 @@ int tar_main(int argc, char **argv)
|
||||
|
||||
/* Initialise default values */
|
||||
tar_handle = init_handle();
|
||||
tar_handle->flags = ARCHIVE_CREATE_LEADING_DIRS | ARCHIVE_PRESERVE_DATE;
|
||||
tar_handle->flags = ARCHIVE_CREATE_LEADING_DIRS | ARCHIVE_PRESERVE_DATE | ARCHIVE_EXTRACT_UNCONDITIONAL;
|
||||
|
||||
bb_opt_complementaly = "c~tx:t~cx:x~ct:X*";
|
||||
opt = bb_getopt_ulflags(argc, argv, tar_options,
|
||||
@@ -656,46 +651,66 @@ int tar_main(int argc, char **argv)
|
||||
if(opt & 0x80000000UL)
|
||||
bb_show_usage();
|
||||
ctx_flag = opt & (CTX_CREATE | CTX_TEST | CTX_EXTRACT);
|
||||
if (ctx_flag == 0) {
|
||||
bb_show_usage();
|
||||
}
|
||||
if(ctx_flag & CTX_TEST) {
|
||||
if ((tar_handle->action_header == header_list) ||
|
||||
(tar_handle->action_header == header_verbose_list)) {
|
||||
tar_handle->action_header = header_verbose_list;
|
||||
} else {
|
||||
tar_handle->action_header = header_list;
|
||||
}
|
||||
if ((tar_handle->action_header == header_list) ||
|
||||
(tar_handle->action_header == header_verbose_list)) {
|
||||
tar_handle->action_header = header_verbose_list;
|
||||
} else {
|
||||
tar_handle->action_header = header_list;
|
||||
}
|
||||
}
|
||||
if(ctx_flag & CTX_EXTRACT) {
|
||||
if (tar_handle->action_data != data_extract_to_stdout)
|
||||
tar_handle->action_data = data_extract_all;
|
||||
}
|
||||
tar_handle->action_data = data_extract_all;
|
||||
}
|
||||
if(opt & TAR_OPT_2STDOUT) {
|
||||
/* To stdout */
|
||||
tar_handle->action_data = data_extract_to_stdout;
|
||||
tar_handle->action_data = data_extract_to_stdout;
|
||||
}
|
||||
if(opt & TAR_OPT_VERBOSE) {
|
||||
if ((tar_handle->action_header == header_list) ||
|
||||
(tar_handle->action_header == header_verbose_list))
|
||||
{
|
||||
tar_handle->action_header = header_verbose_list;
|
||||
} else {
|
||||
tar_handle->action_header = header_list;
|
||||
}
|
||||
if ((tar_handle->action_header == header_list) ||
|
||||
(tar_handle->action_header == header_verbose_list))
|
||||
{
|
||||
tar_handle->action_header = header_verbose_list;
|
||||
} else {
|
||||
tar_handle->action_header = header_list;
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_FEATURE_TAR_GZIP
|
||||
if (opt & TAR_OPT_KEEP_OLD) {
|
||||
tar_handle->flags &= ~ARCHIVE_EXTRACT_UNCONDITIONAL;
|
||||
}
|
||||
|
||||
if(opt & TAR_OPT_GZIP) {
|
||||
get_header_ptr = get_header_tar_gz;
|
||||
}
|
||||
#ifdef CONFIG_FEATURE_TAR_GZIP
|
||||
get_header_ptr = get_header_tar_gz;
|
||||
#else
|
||||
bb_show_usage();
|
||||
#endif
|
||||
#ifdef CONFIG_FEATURE_TAR_BZIP2
|
||||
}
|
||||
if(opt & TAR_OPT_BZIP2) {
|
||||
get_header_ptr = get_header_tar_bz2;
|
||||
}
|
||||
#ifdef CONFIG_FEATURE_TAR_BZIP2
|
||||
get_header_ptr = get_header_tar_bz2;
|
||||
#else
|
||||
bb_show_usage();
|
||||
#endif
|
||||
#ifdef CONFIG_FEATURE_TAR_EXCLUDE
|
||||
}
|
||||
if(opt & TAR_OPT_UNCOMPRESS) {
|
||||
#ifdef CONFIG_FEATURE_TAR_COMPRESS
|
||||
get_header_ptr = get_header_tar_Z;
|
||||
#else
|
||||
bb_show_usage();
|
||||
#endif
|
||||
}
|
||||
if(opt & TAR_OPT_EXCLUDE) {
|
||||
#ifdef CONFIG_FEATURE_TAR_EXCLUDE
|
||||
tar_handle->reject = append_file_list_to_list(tar_handle->reject);
|
||||
}
|
||||
#else
|
||||
bb_show_usage();
|
||||
#endif
|
||||
}
|
||||
/* Check if we are reading from stdin */
|
||||
if ((argv[optind]) && (*argv[optind] == '-')) {
|
||||
/* Default is to read from stdin, so just skip to next arg */
|
||||
@@ -705,6 +720,11 @@ int tar_main(int argc, char **argv)
|
||||
/* Setup an array of filenames to work with */
|
||||
/* TODO: This is the same as in ar, seperate function ? */
|
||||
while (optind < argc) {
|
||||
char *filename_ptr;
|
||||
filename_ptr = last_char_is(argv[optind], '/');
|
||||
if (filename_ptr) {
|
||||
*filename_ptr = '\0';
|
||||
}
|
||||
tar_handle->accept = llist_add_to(tar_handle->accept, argv[optind]);
|
||||
optind++;
|
||||
}
|
||||
@@ -713,6 +733,39 @@ int tar_main(int argc, char **argv)
|
||||
tar_handle->filter = filter_accept_reject_list;
|
||||
}
|
||||
|
||||
/* Open the tar file */
|
||||
{
|
||||
FILE *tar_stream;
|
||||
int flags;
|
||||
|
||||
#ifdef CONFIG_FEATURE_TAR_CREATE
|
||||
if (ctx_flag == CTX_CREATE) {
|
||||
/* Make sure there is at least one file to tar up. */
|
||||
if (tar_handle->accept == NULL) {
|
||||
bb_error_msg_and_die("Cowardly refusing to create an empty archive");
|
||||
}
|
||||
tar_stream = stdout;
|
||||
flags = O_WRONLY | O_CREAT | O_EXCL;
|
||||
unlink(tar_filename);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
tar_stream = stdin;
|
||||
flags = O_RDONLY;
|
||||
}
|
||||
|
||||
if ((tar_filename[0] == '-') && (tar_filename[1] == '\0')) {
|
||||
tar_handle->src_fd = fileno(tar_stream);
|
||||
tar_handle->seek = seek_by_char;
|
||||
} else {
|
||||
tar_handle->src_fd = bb_xopen(tar_filename, flags);
|
||||
}
|
||||
}
|
||||
|
||||
if ((base_dir) && (chdir(base_dir))) {
|
||||
bb_perror_msg_and_die("Couldnt chdir to %s", base_dir);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FEATURE_TAR_CREATE
|
||||
/* create an archive */
|
||||
if (ctx_flag == CTX_CREATE) {
|
||||
@@ -734,22 +787,11 @@ int tar_main(int argc, char **argv)
|
||||
(tar_handle->action_header == header_verbose_list)) {
|
||||
verboseFlag = TRUE;
|
||||
}
|
||||
writeTarFile(tar_filename, verboseFlag, tar_handle->accept,
|
||||
writeTarFile(tar_handle->src_fd, verboseFlag, tar_handle->accept,
|
||||
tar_handle->reject, gzipFlag);
|
||||
} else
|
||||
#endif /* CONFIG_FEATURE_TAR_CREATE */
|
||||
{
|
||||
if ((tar_filename[0] == '-') && (tar_filename[1] == '\0')) {
|
||||
tar_handle->src_fd = fileno(stdin);
|
||||
tar_handle->seek = seek_by_char;
|
||||
} else {
|
||||
tar_handle->src_fd = bb_xopen(tar_filename, O_RDONLY);
|
||||
}
|
||||
|
||||
if ((base_dir) && (chdir(base_dir))) {
|
||||
bb_perror_msg_and_die("Couldnt chdir");
|
||||
}
|
||||
|
||||
while (get_header_ptr(tar_handle) == EXIT_SUCCESS);
|
||||
|
||||
/* Ckeck that every file that should have been extracted was */
|
||||
|
||||
+4
-5
@@ -199,7 +199,8 @@ extern int unzip_main(int argc, char **argv)
|
||||
archive_handle->action_data(archive_handle);
|
||||
} else {
|
||||
dst_fd = bb_xopen(archive_handle->file_header->name, O_WRONLY | O_CREAT);
|
||||
inflate(archive_handle->src_fd, dst_fd);
|
||||
inflate_init(zip_header.formated.cmpsize);
|
||||
inflate_unzip(archive_handle->src_fd, dst_fd);
|
||||
close(dst_fd);
|
||||
chmod(archive_handle->file_header->name, archive_handle->file_header->mode);
|
||||
|
||||
@@ -227,10 +228,8 @@ extern int unzip_main(int argc, char **argv)
|
||||
/* Data descriptor section */
|
||||
if (zip_header.formated.flags & 4) {
|
||||
/* skip over duplicate crc, compressed size and uncompressed size */
|
||||
unsigned short i;
|
||||
for (i = 0; i != 12; i++) {
|
||||
archive_xread_char(archive_handle);
|
||||
}
|
||||
unsigned char data_description[12];
|
||||
archive_xread_all(archive_handle, data_description, 12);
|
||||
archive_handle->offset += 12;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,12 +31,6 @@ config CONFIG_DUMPKMAP
|
||||
This program dumps the kernel's keyboard translation table to
|
||||
stdout, in binary format. You can then use loadkmap to load it.
|
||||
|
||||
config CONFIG_LOADACM
|
||||
bool "loadacm"
|
||||
default n
|
||||
help
|
||||
This program loads an acm from standard input.
|
||||
|
||||
config CONFIG_LOADFONT
|
||||
bool "loadfont"
|
||||
default n
|
||||
|
||||
@@ -27,7 +27,6 @@ CONSOLETOOLS_DIR-$(CONFIG_CHVT) += chvt.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_CLEAR) += clear.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_DEALLOCVT) += deallocvt.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_DUMPKMAP) += dumpkmap.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_LOADACM) += loadacm.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_LOADFONT) += loadfont.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_LOADKMAP) += loadkmap.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_OPENVT) += openvt.o
|
||||
|
||||
+24
-6
@@ -1,11 +1,25 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* chvt.c - aeb - 940227 - Change virtual terminal
|
||||
* Mini chvt implementation for busybox
|
||||
*
|
||||
* busyboxed by Erik Andersen
|
||||
* Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
|
||||
*
|
||||
* 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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* getopt not needed */
|
||||
/* no options, no getopt */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -22,14 +36,18 @@ int chvt_main(int argc, char **argv)
|
||||
{
|
||||
int fd, num;
|
||||
|
||||
if ((argc != 2) || (**(argv + 1) == '-'))
|
||||
if ((argc != 2) || (**(argv + 1) == '-')) {
|
||||
bb_show_usage();
|
||||
}
|
||||
|
||||
fd = get_console_fd();
|
||||
num = atoi(argv[1]);
|
||||
if (ioctl(fd, VT_ACTIVATE, num))
|
||||
if (ioctl(fd, VT_ACTIVATE, num)) {
|
||||
bb_perror_msg_and_die("VT_ACTIVATE");
|
||||
if (ioctl(fd, VT_WAITACTIVE, num))
|
||||
}
|
||||
if (ioctl(fd, VT_WAITACTIVE, num)) {
|
||||
bb_perror_msg_and_die("VT_WAITACTIVE");
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* no options, no getopt */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "busybox.h"
|
||||
|
||||
+30
-10
@@ -1,8 +1,27 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* disalloc.c - aeb - 940501 - Disallocate virtual terminal(s)
|
||||
* Renamed deallocvt.
|
||||
* Disallocate virtual terminal(s)
|
||||
*
|
||||
* Copyright (C) 2003 by Tito Ragusa <farmatito@tiscali.it>
|
||||
* Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
|
||||
*
|
||||
* 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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* no options, no getopt */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
@@ -15,21 +34,21 @@ static const int VT_DISALLOCATE = 0x5608; /* free memory associated to vt */
|
||||
|
||||
int deallocvt_main(int argc, char *argv[])
|
||||
{
|
||||
int fd, num=0;
|
||||
int fd, num = 0;
|
||||
|
||||
if (argc > 2)
|
||||
if (argc > 2) {
|
||||
bb_show_usage();
|
||||
}
|
||||
|
||||
fd = get_console_fd();
|
||||
|
||||
/* num=0 deallocate all unused consoles */
|
||||
if (argc == 1)
|
||||
if (argc == 1) {
|
||||
goto disallocate_all;
|
||||
}
|
||||
|
||||
num=bb_xgetlarg(argv[1], 10, 0, INT_MAX);
|
||||
|
||||
switch(num)
|
||||
{
|
||||
num = bb_xgetlarg(argv[1], 10, 0, INT_MAX);
|
||||
switch (num) {
|
||||
case 0:
|
||||
bb_error_msg("0: illegal VT number");
|
||||
break;
|
||||
@@ -38,8 +57,9 @@ int deallocvt_main(int argc, char *argv[])
|
||||
break;
|
||||
default:
|
||||
disallocate_all:
|
||||
if (ioctl(fd, VT_DISALLOCATE, num))
|
||||
if (ioctl(fd, VT_DISALLOCATE, num)) {
|
||||
bb_perror_msg_and_die("VT_DISALLOCATE");
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
return EXIT_FAILURE;
|
||||
|
||||
@@ -51,11 +51,7 @@ int dumpkmap_main(int argc, char **argv)
|
||||
bb_show_usage();
|
||||
}
|
||||
|
||||
fd = open(CURRENT_VC, O_RDWR);
|
||||
if (fd < 0) {
|
||||
bb_perror_msg("Error opening " CURRENT_VC);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
fd=bb_xopen(CURRENT_VC, O_RDWR);
|
||||
|
||||
write(1, magic, 7);
|
||||
|
||||
|
||||
@@ -1,357 +0,0 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* Derived from
|
||||
* mapscrn.c - version 0.92
|
||||
*
|
||||
* Was taken from console-tools and adapted by
|
||||
* Peter Novodvorsky <petya@logic.ru>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <sys/kd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "busybox.h"
|
||||
|
||||
typedef unsigned short unicode;
|
||||
|
||||
static long int ctoi(unsigned char *s, int *is_unicode);
|
||||
static int old_screen_map_read_ascii(FILE * fp, unsigned char buf[]);
|
||||
static int uni_screen_map_read_ascii(FILE * fp, unicode buf[], int *is_unicode);
|
||||
static unicode utf8_to_ucs2(char *buf);
|
||||
static int screen_map_load(int fd, FILE * fp);
|
||||
|
||||
int loadacm_main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
if (argc>=2 && *argv[1]=='-') {
|
||||
bb_show_usage();
|
||||
}
|
||||
|
||||
fd = open(CURRENT_VC, O_RDWR);
|
||||
if (fd < 0) {
|
||||
bb_perror_msg_and_die("Error opening " CURRENT_VC);
|
||||
}
|
||||
|
||||
if (screen_map_load(fd, stdin)) {
|
||||
bb_perror_msg_and_die("Error loading acm");
|
||||
}
|
||||
|
||||
write(fd, "\033(K", 3);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
static int screen_map_load(int fd, FILE * fp)
|
||||
{
|
||||
struct stat stbuf;
|
||||
unicode wbuf[E_TABSZ];
|
||||
unsigned char buf[E_TABSZ];
|
||||
int parse_failed = 0;
|
||||
int is_unicode;
|
||||
|
||||
if (fstat(fileno(fp), &stbuf))
|
||||
bb_perror_msg_and_die("Cannot stat map file");
|
||||
|
||||
/* first try a UTF screen-map: either ASCII (no restriction) or binary (regular file) */
|
||||
if (!
|
||||
(parse_failed =
|
||||
(-1 == uni_screen_map_read_ascii(fp, wbuf, &is_unicode)))
|
||||
|| (S_ISREG(stbuf.st_mode) && (stbuf.st_size == (sizeof(unicode) * E_TABSZ)))) { /* test for binary UTF map by size */
|
||||
if (parse_failed) {
|
||||
if (-1 == fseek(fp, 0, SEEK_SET)) {
|
||||
if (errno == ESPIPE)
|
||||
bb_error_msg_and_die("16bit screen-map MUST be a regular file.");
|
||||
else
|
||||
bb_perror_msg_and_die("fseek failed reading binary 16bit screen-map");
|
||||
}
|
||||
|
||||
if (fread(wbuf, sizeof(unicode) * E_TABSZ, 1, fp) != 1)
|
||||
bb_perror_msg_and_die("Cannot read [new] map from file");
|
||||
#if 0
|
||||
else
|
||||
bb_error_msg("Input screen-map is binary.");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* if it was effectively a 16-bit ASCII, OK, else try to read as 8-bit map */
|
||||
/* same if it was binary, ie. if parse_failed */
|
||||
if (parse_failed || is_unicode) {
|
||||
if (ioctl(fd, PIO_UNISCRNMAP, wbuf))
|
||||
bb_perror_msg_and_die("PIO_UNISCRNMAP ioctl");
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* rewind... */
|
||||
if (-1 == fseek(fp, 0, SEEK_SET)) {
|
||||
if (errno == ESPIPE)
|
||||
bb_error_msg("Assuming 8bit screen-map - MUST be a regular file."),
|
||||
exit(1);
|
||||
else
|
||||
bb_perror_msg_and_die("fseek failed assuming 8bit screen-map");
|
||||
}
|
||||
|
||||
/* ... and try an old 8-bit screen-map */
|
||||
if (!(parse_failed = (-1 == old_screen_map_read_ascii(fp, buf))) ||
|
||||
(S_ISREG(stbuf.st_mode) && (stbuf.st_size == E_TABSZ))) { /* test for binary old 8-bit map by size */
|
||||
if (parse_failed) {
|
||||
if (-1 == fseek(fp, 0, SEEK_SET)) {
|
||||
if (errno == ESPIPE)
|
||||
/* should not - it succedeed above */
|
||||
bb_error_msg_and_die("fseek() returned ESPIPE !");
|
||||
else
|
||||
bb_perror_msg_and_die("fseek for binary 8bit screen-map");
|
||||
}
|
||||
|
||||
if (fread(buf, E_TABSZ, 1, fp) != 1)
|
||||
bb_perror_msg_and_die("Cannot read [old] map from file");
|
||||
#if 0
|
||||
else
|
||||
bb_error_msg("Input screen-map is binary.");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ioctl(fd, PIO_SCRNMAP, buf))
|
||||
bb_perror_msg_and_die("PIO_SCRNMAP ioctl");
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
bb_error_msg("Error parsing symbolic map");
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* - reads `fp' as a 16-bit ASCII SFM file.
|
||||
* - returns -1 on error.
|
||||
* - returns it in `unicode' in an E_TABSZ-elements array.
|
||||
* - sets `*is_unicode' flagiff there were any non-8-bit
|
||||
* (ie. real 16-bit) mapping.
|
||||
*
|
||||
* FIXME: ignores everything after second word
|
||||
*/
|
||||
static int uni_screen_map_read_ascii(FILE * fp, unicode buf[], int *is_unicode)
|
||||
{
|
||||
char buffer[256]; /* line buffer reading file */
|
||||
char *p, *q; /* 1st + 2nd words in line */
|
||||
int in, on; /* the same, as numbers */
|
||||
int tmp_is_unicode; /* tmp for is_unicode calculation */
|
||||
int i; /* loop index - result holder */
|
||||
int ret_code = 0; /* return code */
|
||||
sigset_t acmsigset, old_sigset;
|
||||
|
||||
assert(is_unicode);
|
||||
|
||||
*is_unicode = 0;
|
||||
|
||||
/* first 128 codes defaults to ASCII */
|
||||
for (i = 0; i < 128; i++)
|
||||
buf[i] = i;
|
||||
/* remaining defaults to replacement char (usually E_TABSZ = 256) */
|
||||
for (; i < E_TABSZ; i++)
|
||||
buf[i] = 0xfffd;
|
||||
|
||||
/* block SIGCHLD */
|
||||
sigemptyset(&acmsigset);
|
||||
sigaddset(&acmsigset, SIGCHLD);
|
||||
sigprocmask(SIG_BLOCK, &acmsigset, &old_sigset);
|
||||
|
||||
do {
|
||||
if (NULL == fgets(buffer, sizeof(buffer), fp)) {
|
||||
if (feof(fp))
|
||||
break;
|
||||
else
|
||||
bb_perror_msg_and_die("uni_screen_map_read_ascii() can't read line");
|
||||
}
|
||||
|
||||
/* get "charset-relative charcode", stripping leading spaces */
|
||||
p = strtok(buffer, " \t\n");
|
||||
|
||||
/* skip empty lines and comments */
|
||||
if (!p || *p == '#')
|
||||
continue;
|
||||
|
||||
/* get unicode mapping */
|
||||
q = strtok(NULL, " \t\n");
|
||||
if (q) {
|
||||
in = ctoi(p, NULL);
|
||||
if (in < 0 || in > 255) {
|
||||
ret_code = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
on = ctoi(q, &tmp_is_unicode);
|
||||
if (in < 0 && on > 65535) {
|
||||
ret_code = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
*is_unicode |= tmp_is_unicode;
|
||||
buf[in] = on;
|
||||
} else {
|
||||
ret_code = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (1); /* terminated by break on feof() */
|
||||
|
||||
/* restore sig mask */
|
||||
sigprocmask(SIG_SETMASK, &old_sigset, NULL);
|
||||
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
|
||||
static int old_screen_map_read_ascii(FILE * fp, unsigned char buf[])
|
||||
{
|
||||
char buffer[256];
|
||||
int in, on;
|
||||
char *p, *q;
|
||||
|
||||
for (in = 0; in < 256; in++)
|
||||
buf[in] = in;
|
||||
|
||||
while (fgets(buffer, sizeof(buffer) - 1, fp)) {
|
||||
p = strtok(buffer, " \t\n");
|
||||
|
||||
if (!p || *p == '#')
|
||||
continue;
|
||||
|
||||
q = strtok(NULL, " \t\n#");
|
||||
if (q) {
|
||||
in = ctoi(p, NULL);
|
||||
if (in < 0 || in > 255)
|
||||
return -1;
|
||||
|
||||
on = ctoi(q, NULL);
|
||||
if (in < 0 && on > 255)
|
||||
return -1;
|
||||
|
||||
buf[in] = on;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* - converts a string into an int.
|
||||
* - supports dec and hex bytes, hex UCS2, single-quoted byte and UTF8 chars.
|
||||
* - returns the converted value
|
||||
* - if `is_unicode != NULL', use it to tell whether it was unicode
|
||||
*
|
||||
* CAVEAT: will report valid UTF mappings using only 1 byte as 8-bit ones.
|
||||
*/
|
||||
static long int ctoi(unsigned char *s, int *is_unicode)
|
||||
{
|
||||
int i;
|
||||
size_t ls;
|
||||
|
||||
ls = strlen(s);
|
||||
if (is_unicode)
|
||||
*is_unicode = 0;
|
||||
|
||||
/* hex-specified UCS2 */
|
||||
if ((strncmp(s, "U+", 2) == 0) &&
|
||||
(strspn(s + 2, "0123456789abcdefABCDEF") == ls - 2)) {
|
||||
sscanf(s + 2, "%x", &i);
|
||||
if (is_unicode)
|
||||
*is_unicode = 1;
|
||||
}
|
||||
|
||||
/* hex-specified byte */
|
||||
else if ((ls <= 4) && (strncmp(s, "0x", 2) == 0) &&
|
||||
(strspn(s + 2, "0123456789abcdefABCDEF") == ls - 2))
|
||||
sscanf(s + 2, "%x", &i);
|
||||
|
||||
/* oct-specified number (byte) */
|
||||
else if ((*s == '0') && (strspn(s, "01234567") == ls))
|
||||
sscanf(s, "%o", &i);
|
||||
|
||||
/* dec-specified number (byte) */
|
||||
else if (strspn(s, "0123456789") == ls)
|
||||
sscanf(s, "%d", &i);
|
||||
|
||||
/* single-byte quoted char */
|
||||
else if ((strlen(s) == 3) && (s[0] == '\'') && (s[2] == '\''))
|
||||
i = s[1];
|
||||
|
||||
/* multi-byte UTF8 quoted char */
|
||||
else if ((s[0] == '\'') && (s[ls - 1] == '\'')) {
|
||||
s[ls - 1] = 0; /* ensure we'll not "parse UTF too far" */
|
||||
i = utf8_to_ucs2(s + 1);
|
||||
if (is_unicode)
|
||||
*is_unicode = 1;
|
||||
} else
|
||||
return (-1);
|
||||
|
||||
return (i);
|
||||
}
|
||||
|
||||
|
||||
static unicode utf8_to_ucs2(char *buf)
|
||||
{
|
||||
int utf_count = 0;
|
||||
long utf_char = 0;
|
||||
unicode tc = 0;
|
||||
unsigned char c;
|
||||
|
||||
do {
|
||||
c = *buf;
|
||||
buf++;
|
||||
|
||||
/* if byte should be part of multi-byte sequence */
|
||||
if (c & 0x80) {
|
||||
/* if we have already started to parse a UTF8 sequence */
|
||||
if (utf_count > 0 && (c & 0xc0) == 0x80) {
|
||||
utf_char = (utf_char << 6) | (c & 0x3f);
|
||||
utf_count--;
|
||||
if (utf_count == 0)
|
||||
tc = utf_char;
|
||||
else
|
||||
continue;
|
||||
} else { /* Possibly 1st char of a UTF8 sequence */
|
||||
|
||||
if ((c & 0xe0) == 0xc0) {
|
||||
utf_count = 1;
|
||||
utf_char = (c & 0x1f);
|
||||
} else if ((c & 0xf0) == 0xe0) {
|
||||
utf_count = 2;
|
||||
utf_char = (c & 0x0f);
|
||||
} else if ((c & 0xf8) == 0xf0) {
|
||||
utf_count = 3;
|
||||
utf_char = (c & 0x07);
|
||||
} else if ((c & 0xfc) == 0xf8) {
|
||||
utf_count = 4;
|
||||
utf_char = (c & 0x03);
|
||||
} else if ((c & 0xfe) == 0xfc) {
|
||||
utf_count = 5;
|
||||
utf_char = (c & 0x01);
|
||||
} else
|
||||
utf_count = 0;
|
||||
continue;
|
||||
}
|
||||
} else { /* not part of multi-byte sequence - treat as ASCII
|
||||
* this makes incomplete sequences to be ignored
|
||||
*/
|
||||
tc = c;
|
||||
utf_count = 0;
|
||||
}
|
||||
}
|
||||
while (utf_count);
|
||||
|
||||
return tc;
|
||||
}
|
||||
@@ -46,9 +46,7 @@ extern int loadfont_main(int argc, char **argv)
|
||||
if (argc != 1)
|
||||
bb_show_usage();
|
||||
|
||||
fd = open(CURRENT_VC, O_RDWR);
|
||||
if (fd < 0)
|
||||
bb_perror_msg_and_die("Error opening " CURRENT_VC);
|
||||
fd = bb_xopen(CURRENT_VC, O_RDWR);
|
||||
loadnewfont(fd);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
+13
-20
@@ -37,43 +37,35 @@ struct kbentry {
|
||||
unsigned char kb_index;
|
||||
unsigned short kb_value;
|
||||
};
|
||||
static const int KDSKBENT = 0x4B47; /* sets one entry in translation table */
|
||||
/* sets one entry in translation table */
|
||||
#define KDSKBENT 0x4B47
|
||||
|
||||
/* 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 loadkmap_main(int argc, char **argv)
|
||||
{
|
||||
struct kbentry ke;
|
||||
u_short *ibuff;
|
||||
int i, j, fd, readsz, pos, ibuffsz = NR_KEYS * sizeof(u_short);
|
||||
char flags[MAX_NR_KEYMAPS], buff[7];
|
||||
int i, j, fd;
|
||||
u_short ibuff[NR_KEYS];
|
||||
char flags[MAX_NR_KEYMAPS];
|
||||
char buff[7];
|
||||
|
||||
if (argc != 1)
|
||||
bb_show_usage();
|
||||
|
||||
fd = open(CURRENT_VC, O_RDWR);
|
||||
if (fd < 0)
|
||||
bb_perror_msg_and_die("Error opening " CURRENT_VC);
|
||||
fd = bb_xopen(CURRENT_VC, O_RDWR);
|
||||
|
||||
read(0, buff, 7);
|
||||
if (0 != strncmp(buff, BINARY_KEYMAP_MAGIC, 7))
|
||||
if ((bb_full_read(0, buff, 7) != 7) || (strncmp(buff, BINARY_KEYMAP_MAGIC, 7) != 0))
|
||||
bb_error_msg_and_die("This is not a valid binary keymap.");
|
||||
|
||||
if (MAX_NR_KEYMAPS != read(0, flags, MAX_NR_KEYMAPS))
|
||||
if (bb_full_read(0, flags, MAX_NR_KEYMAPS) != MAX_NR_KEYMAPS)
|
||||
bb_perror_msg_and_die("Error reading keymap flags");
|
||||
|
||||
ibuff = (u_short *) xmalloc(ibuffsz);
|
||||
|
||||
for (i = 0; i < MAX_NR_KEYMAPS; i++) {
|
||||
if (flags[i] == 1) {
|
||||
pos = 0;
|
||||
while (pos < ibuffsz) {
|
||||
if ((readsz = read(0, (char *) ibuff + pos, ibuffsz - pos)) < 0)
|
||||
bb_perror_msg_and_die("Error reading keymap");
|
||||
pos += readsz;
|
||||
}
|
||||
bb_full_read(0, ibuff, NR_KEYS * sizeof(u_short));
|
||||
for (j = 0; j < NR_KEYS; j++) {
|
||||
ke.kb_index = j;
|
||||
ke.kb_table = i;
|
||||
@@ -82,6 +74,7 @@ int loadkmap_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Don't bother to close files. Exit does that
|
||||
* automagically, so we can save a few bytes */
|
||||
/* close(fd); */
|
||||
|
||||
@@ -48,11 +48,8 @@ int openvt_main(int argc, char **argv)
|
||||
if (!isdigit(argv[1][0]))
|
||||
bb_show_usage();
|
||||
|
||||
vtno = (int) atol(argv[1]);
|
||||
|
||||
/* if (vtno <= 0 || vtno > 63) */
|
||||
if (vtno <= 0 || vtno > 12)
|
||||
bb_error_msg_and_die("Illegal vt number (%d)", vtno);
|
||||
/* check for Illegal vt number */
|
||||
vtno=bb_xgetlarg(argv[1], 10, 1, 12);
|
||||
|
||||
sprintf(vtname, VTNAME, vtno);
|
||||
|
||||
@@ -73,8 +70,7 @@ int openvt_main(int argc, char **argv)
|
||||
close(0); /* so that new vt becomes stdin */
|
||||
|
||||
/* and grab new one */
|
||||
if ((fd = open(vtname, O_RDWR)) == -1)
|
||||
bb_perror_msg_and_die("could not open %s", vtname);
|
||||
fd = bb_xopen(vtname, O_RDWR);
|
||||
|
||||
/* Reassign stdout and sterr */
|
||||
close(1);
|
||||
|
||||
+14
-2
@@ -21,13 +21,25 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* no options, no getopt */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "busybox.h"
|
||||
|
||||
extern int reset_main(int argc, char **argv)
|
||||
{
|
||||
printf("\033[?25h\033c\033[J");
|
||||
return EXIT_SUCCESS;
|
||||
if (isatty(0) || isatty(0) || isatty(0)) {
|
||||
/* See 'man 4 console_codes' for details:
|
||||
* "ESC c" -- Reset
|
||||
* "ESC ( K" -- Select user mapping
|
||||
* "ESC [ J" -- Erase display
|
||||
* "ESC [ 0 m" -- Reset all Graphics Rendition display attributes
|
||||
* "ESC [ ? 25 h" -- Make cursor visible.
|
||||
*/
|
||||
printf("\033c\033(K\033[J\033[0m\033[?25h");
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
+30
-33
@@ -17,7 +17,7 @@ config CONFIG_CAL
|
||||
bool "cal"
|
||||
default n
|
||||
help
|
||||
cal is used to display a montly calender.
|
||||
cal is used to display a monthly calender.
|
||||
|
||||
config CONFIG_CAT
|
||||
bool "cat"
|
||||
@@ -30,7 +30,7 @@ config CONFIG_CHGRP
|
||||
bool "chgrp"
|
||||
default n
|
||||
help
|
||||
chgrp is used to change the group owership of files.
|
||||
chgrp is used to change the group ownership of files.
|
||||
|
||||
config CONFIG_CHMOD
|
||||
bool "chmod"
|
||||
@@ -42,7 +42,7 @@ config CONFIG_CHOWN
|
||||
bool "chown"
|
||||
default n
|
||||
help
|
||||
chown is used too change the user and/or group ownership
|
||||
chown is used to change the user and/or group ownership
|
||||
of files.
|
||||
|
||||
config CONFIG_CHROOT
|
||||
@@ -114,14 +114,14 @@ config CONFIG_DIRNAME
|
||||
bool "dirname"
|
||||
default n
|
||||
help
|
||||
dirname is used to strip a non directory suffix from
|
||||
dirname is used to strip a non-directory suffix from
|
||||
a file name.
|
||||
|
||||
config CONFIG_DOS2UNIX
|
||||
bool "dos2unix/unix2dos"
|
||||
default n
|
||||
help
|
||||
dos2unix is uses to convert a text file from DOS format to
|
||||
dos2unix is used to convert a text file from DOS format to
|
||||
UNIX format, and vice versa.
|
||||
|
||||
config CONFIG_UNIX2DOS
|
||||
@@ -161,7 +161,7 @@ config CONFIG_ENV
|
||||
default n
|
||||
help
|
||||
env is used to set an environment variable and run
|
||||
a command, without options it displays the current
|
||||
a command; without options it displays the current
|
||||
environment.
|
||||
|
||||
config CONFIG_EXPR
|
||||
@@ -218,6 +218,12 @@ config CONFIG_ID
|
||||
help
|
||||
id displays the current user and group ID names.
|
||||
|
||||
config CONFIG_INSTALL
|
||||
bool "install"
|
||||
default n
|
||||
help
|
||||
Copy files and set attributes.
|
||||
|
||||
config CONFIG_LENGTH
|
||||
bool "length"
|
||||
default n
|
||||
@@ -347,7 +353,7 @@ config CONFIG_REALPATH
|
||||
default n
|
||||
help
|
||||
Return the canonicalized absolute pathname.
|
||||
This isnt provided by GNU shellutils, but where else does it belong.
|
||||
This isn't provided by GNU shellutils, but where else does it belong.
|
||||
|
||||
config CONFIG_RM
|
||||
bool "rm"
|
||||
@@ -367,13 +373,6 @@ config CONFIG_SHA1SUM
|
||||
help
|
||||
Compute and check SHA1 message digest
|
||||
|
||||
config CONFIG_FEATURE_SHA1SUM_CHECK
|
||||
bool " Enale -c and -w options"
|
||||
default n
|
||||
help
|
||||
Enabling the -c and -w options allow files to be checked
|
||||
against pre-calculated hash values.
|
||||
|
||||
config CONFIG_SLEEP
|
||||
bool "sleep (single integer arg with no suffix)"
|
||||
default n
|
||||
@@ -393,22 +392,6 @@ config CONFIG_SORT
|
||||
help
|
||||
sort is used to sort lines of text in specified files.
|
||||
|
||||
config CONFIG_FEATURE_SORT_REVERSE
|
||||
bool " Enable reverse sort"
|
||||
default y
|
||||
depends on CONFIG_SORT
|
||||
help
|
||||
Enable the `-r' option that allows sort to sort lines of
|
||||
text in reverse.
|
||||
|
||||
config CONFIG_FEATURE_SORT_UNIQUE
|
||||
bool " Enable unique sort"
|
||||
default y
|
||||
depends on CONFIG_SORT
|
||||
help
|
||||
Enable the `-u' option that allows sort to only sort lines
|
||||
that are uniq.
|
||||
|
||||
config CONFIG_STTY
|
||||
bool "stty"
|
||||
default n
|
||||
@@ -429,11 +412,12 @@ config CONFIG_TAIL
|
||||
from files.
|
||||
|
||||
config CONFIG_FEATURE_FANCY_TAIL
|
||||
bool " Enable extra tail options (-c, -q, -s, and -v)"
|
||||
bool " Enable extra tail options (-q, -s, and -v)"
|
||||
default y
|
||||
depends on CONFIG_TAIL
|
||||
help
|
||||
Enable tail options (-c, -q, -s, and -v).
|
||||
The options (-q, -s, and -v) are provided by GNU tail, but
|
||||
are not specific in the SUSv3 standard.
|
||||
|
||||
config CONFIG_TEE
|
||||
bool "tee"
|
||||
@@ -462,7 +446,7 @@ if !CONFIG_ASH && !CONFIG_HUSH && !CONFIG_LASH && !CONFIG_MSH
|
||||
help
|
||||
test is used to check file types and compare values,
|
||||
returning an appropriate exit code. The shells (ash
|
||||
and bash have test builtin).
|
||||
and bash) have test builtin.
|
||||
endif
|
||||
|
||||
config CONFIG_TOUCH
|
||||
@@ -599,4 +583,17 @@ config CONFIG_FEATURE_HUMAN_READABLE
|
||||
help
|
||||
Allow df, du, and ls to have human readable output.
|
||||
|
||||
comment "Common options for md5sum, sha1sum"
|
||||
depends on CONFIG_MD5SUM || CONFIG_SHA1SUM
|
||||
|
||||
config CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
|
||||
bool " Enable -c, -s and -w options"
|
||||
default n
|
||||
depends on CONFIG_MD5SUM || CONFIG_SHA1SUM
|
||||
help
|
||||
Enabling the -c options allows files to be checked
|
||||
against pre-calculated hash values.
|
||||
|
||||
-s and -w are useful options when verifying checksums.
|
||||
|
||||
endmenu
|
||||
@@ -47,11 +47,12 @@ COREUTILS-$(CONFIG_FOLD) += fold.o
|
||||
COREUTILS-$(CONFIG_HEAD) += head.o
|
||||
COREUTILS-$(CONFIG_HOSTID) += hostid.o
|
||||
COREUTILS-$(CONFIG_ID) += id.o
|
||||
COREUTILS-$(CONFIG_INSTALL) += install.o
|
||||
COREUTILS-$(CONFIG_LENGTH) += length.o
|
||||
COREUTILS-$(CONFIG_LN) += ln.o
|
||||
COREUTILS-$(CONFIG_LOGNAME) += logname.o
|
||||
COREUTILS-$(CONFIG_LS) += ls.o
|
||||
COREUTILS-$(CONFIG_MD5SUM) += md5sum.o
|
||||
COREUTILS-$(CONFIG_MD5SUM) += md5_sha1_sum.o
|
||||
COREUTILS-$(CONFIG_MKDIR) += mkdir.o
|
||||
COREUTILS-$(CONFIG_MKFIFO) += mkfifo.o
|
||||
COREUTILS-$(CONFIG_MKNOD) += mknod.o
|
||||
@@ -62,7 +63,7 @@ COREUTILS-$(CONFIG_PWD) += pwd.o
|
||||
COREUTILS-$(CONFIG_REALPATH) += realpath.o
|
||||
COREUTILS-$(CONFIG_RM) += rm.o
|
||||
COREUTILS-$(CONFIG_RMDIR) += rmdir.o
|
||||
COREUTILS-$(CONFIG_SHA1SUM) += sha1sum.o
|
||||
COREUTILS-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
|
||||
COREUTILS-$(CONFIG_SLEEP) += sleep.o
|
||||
COREUTILS-$(CONFIG_SORT) += sort.o
|
||||
COREUTILS-$(CONFIG_STTY) += stty.o
|
||||
|
||||
+1
-14
@@ -1,19 +1,6 @@
|
||||
/* NOTE:
|
||||
*
|
||||
* Apparently, all "Steven J. Merrifield" did was grab the util-linux cal applet,
|
||||
* spend maybe 5 minutes integrating it into busybox, slapped a copyright on it,
|
||||
* and submitted it. I certainly saw no evidence of any attempt at size reduction.
|
||||
* Not only do I consider his copyright below meaningless, I also consider his
|
||||
* actions shameful.
|
||||
*
|
||||
* Manuel Novoa III (mjn3@codepoet.org)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Calendar implementation for busybox
|
||||
*
|
||||
* Copyright (C) 2001 by Steven J. Merrifield <steve@labyrinth.net.au>
|
||||
*
|
||||
* See original copyright at the end of this file
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -337,7 +324,7 @@ static char *build_row(char *p, int *dp)
|
||||
do {
|
||||
if ((day = *dp++) != SPACE) {
|
||||
if (julian) {
|
||||
*++p;
|
||||
++p;
|
||||
if (day >= 100) {
|
||||
*p = '0';
|
||||
p[-1] = (day / 100) + '0';
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ extern int cat_main(int argc, char **argv)
|
||||
|
||||
do {
|
||||
if ((f = bb_wfopen_input(*argv)) != NULL) {
|
||||
int r = bb_copyfd(fileno(f), STDOUT_FILENO, 0);
|
||||
int r = bb_copyfd_eof(fileno(f), STDOUT_FILENO);
|
||||
bb_fclose_nonstdin(f);
|
||||
if (r >= 0) {
|
||||
continue;
|
||||
|
||||
+1
-5
@@ -48,7 +48,6 @@ int chgrp_main(int argc, char **argv)
|
||||
long gid;
|
||||
int recursiveFlag;
|
||||
int retval = EXIT_SUCCESS;
|
||||
char *p;
|
||||
|
||||
recursiveFlag = bb_getopt_ulflags(argc, argv, "R");
|
||||
|
||||
@@ -59,10 +58,7 @@ int chgrp_main(int argc, char **argv)
|
||||
argv += optind;
|
||||
|
||||
/* Find the selected group */
|
||||
gid = strtoul(*argv, &p, 10); /* maybe it's already numeric */
|
||||
if (*p || (p == *argv)) { /* trailing chars or nonnumeric */
|
||||
gid = my_getgrnam(*argv);
|
||||
}
|
||||
gid = get_ug_id(*argv, my_getgrnam);
|
||||
++argv;
|
||||
|
||||
/* Ok, ready to do the deed now */
|
||||
|
||||
+1
-13
@@ -43,6 +43,7 @@ static int (*chown_func)(const char *, uid_t, gid_t) = chown;
|
||||
static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
|
||||
{
|
||||
if (chown_func(fileName, uid, (gid == -1) ? statbuf->st_gid : gid) == 0) {
|
||||
chmod(fileName, statbuf->st_mode);
|
||||
return (TRUE);
|
||||
}
|
||||
bb_perror_msg("%s", fileName); /* Avoid multibyte problems. */
|
||||
@@ -52,19 +53,6 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
|
||||
#define FLAG_R 1
|
||||
#define FLAG_h 2
|
||||
|
||||
static unsigned long get_ug_id(const char *s, long (*my_getxxnam)(const char *))
|
||||
{
|
||||
unsigned long r;
|
||||
char *p;
|
||||
|
||||
r = strtoul(s, &p, 10);
|
||||
if (*p || (s == p)) {
|
||||
r = my_getxxnam(s);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
int chown_main(int argc, char **argv)
|
||||
{
|
||||
int flags;
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ int chroot_main(int argc, char **argv)
|
||||
if (argc == 2) {
|
||||
argv -= 2;
|
||||
if (!(*argv = getenv("SHELL"))) {
|
||||
*argv = (char *) "/bin/sh";
|
||||
*argv = (char *) DEFAULT_SHELL;
|
||||
}
|
||||
argv[1] = (char *) "-i";
|
||||
}
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ extern int env_main(int argc, char** argv)
|
||||
char **ep, *p;
|
||||
char *cleanenv[1] = { NULL };
|
||||
unsigned long opt;
|
||||
llist_t *unset_env;
|
||||
llist_t *unset_env = NULL;
|
||||
extern char **environ;
|
||||
|
||||
bb_opt_complementaly = "u*";
|
||||
|
||||
+69
-72
@@ -7,6 +7,7 @@
|
||||
*
|
||||
* Busybox modifications
|
||||
* Copyright (c) 2000 Edward Betts <edward@debian.org>.
|
||||
* Aug 2003 Vladimir Oleynik - reduced 464 bytes.
|
||||
*
|
||||
* 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
|
||||
@@ -40,6 +41,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <regex.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include "busybox.h"
|
||||
|
||||
|
||||
@@ -135,10 +137,8 @@ static int null (VALUE *v)
|
||||
switch (v->type) {
|
||||
case integer:
|
||||
return v->u.i == 0;
|
||||
case string:
|
||||
default: /* string: */
|
||||
return v->u.s[0] == '\0' || strcmp (v->u.s, "0") == 0;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,13 +156,9 @@ static void tostring (VALUE *v)
|
||||
|
||||
static int toarith (VALUE *v)
|
||||
{
|
||||
if(v->type == string) {
|
||||
int i;
|
||||
|
||||
switch (v->type) {
|
||||
case integer:
|
||||
return 1;
|
||||
case string:
|
||||
i = 0;
|
||||
/* Don't interpret the empty string as an integer. */
|
||||
if (v->u.s == 0)
|
||||
return 0;
|
||||
@@ -170,10 +166,8 @@ static int toarith (VALUE *v)
|
||||
free (v->u.s);
|
||||
v->u.i = i;
|
||||
v->type = integer;
|
||||
return 1;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Return nonzero if the next token matches STR exactly.
|
||||
@@ -189,56 +183,59 @@ nextarg (char *str)
|
||||
|
||||
/* The comparison operator handling functions. */
|
||||
|
||||
#define cmpf(name, rel) \
|
||||
static int name (VALUE *l, VALUE *r) \
|
||||
{ \
|
||||
if (l->type == string || r->type == string) { \
|
||||
tostring (l); \
|
||||
tostring (r); \
|
||||
return strcmp (l->u.s, r->u.s) rel 0; \
|
||||
} \
|
||||
else \
|
||||
return l->u.i rel r->u.i; \
|
||||
}
|
||||
cmpf (less_than, <)
|
||||
cmpf (less_equal, <=)
|
||||
cmpf (equal, ==)
|
||||
cmpf (not_equal, !=)
|
||||
cmpf (greater_equal, >=)
|
||||
cmpf (greater_than, >)
|
||||
static int cmp_common (VALUE *l, VALUE *r, int op)
|
||||
{
|
||||
int cmpval;
|
||||
|
||||
#undef cmpf
|
||||
if (l->type == string || r->type == string) {
|
||||
tostring (l);
|
||||
tostring (r);
|
||||
cmpval = strcmp (l->u.s, r->u.s);
|
||||
}
|
||||
else
|
||||
cmpval = l->u.i - r->u.i;
|
||||
switch(op) {
|
||||
case '<':
|
||||
return cmpval < 0;
|
||||
case ('L'+'E'):
|
||||
return cmpval <= 0;
|
||||
case '=':
|
||||
return cmpval == 0;
|
||||
case '!':
|
||||
return cmpval != 0;
|
||||
case '>':
|
||||
return cmpval > 0;
|
||||
default: /* >= */
|
||||
return cmpval >= 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* The arithmetic operator handling functions. */
|
||||
|
||||
#define arithf(name, op) \
|
||||
static \
|
||||
int name (VALUE *l, VALUE *r) \
|
||||
{ \
|
||||
if (!toarith (l) || !toarith (r)) \
|
||||
bb_error_msg_and_die ("non-numeric argument"); \
|
||||
return l->u.i op r->u.i; \
|
||||
static int arithmetic_common (VALUE *l, VALUE *r, int op)
|
||||
{
|
||||
int li, ri;
|
||||
|
||||
if (!toarith (l) || !toarith (r))
|
||||
bb_error_msg_and_die ("non-numeric argument");
|
||||
li = l->u.i;
|
||||
ri = r->u.i;
|
||||
if((op == '/' || op == '%') && ri == 0)
|
||||
bb_error_msg_and_die ( "division by zero");
|
||||
switch(op) {
|
||||
case '+':
|
||||
return li + ri;
|
||||
case '-':
|
||||
return li - ri;
|
||||
case '*':
|
||||
return li * ri;
|
||||
case '/':
|
||||
return li / ri;
|
||||
default:
|
||||
return li % ri;
|
||||
}
|
||||
}
|
||||
|
||||
#define arithdivf(name, op) \
|
||||
static int name (VALUE *l, VALUE *r) \
|
||||
{ \
|
||||
if (!toarith (l) || !toarith (r)) \
|
||||
bb_error_msg_and_die ( "non-numeric argument"); \
|
||||
if (r->u.i == 0) \
|
||||
bb_error_msg_and_die ( "division by zero"); \
|
||||
return l->u.i op r->u.i; \
|
||||
}
|
||||
|
||||
arithf (plus, +)
|
||||
arithf (minus, -)
|
||||
arithf (multiply, *)
|
||||
arithdivf (divide, /)
|
||||
arithdivf (mod, %)
|
||||
|
||||
#undef arithf
|
||||
#undef arithdivf
|
||||
|
||||
/* Do the : operator.
|
||||
SV is the VALUE for the lhs (the string),
|
||||
PV is the VALUE for the rhs (the pattern). */
|
||||
@@ -408,21 +405,21 @@ static VALUE *eval5 (void)
|
||||
static VALUE *eval4 (void)
|
||||
{
|
||||
VALUE *l, *r;
|
||||
int (*fxn) (VALUE *, VALUE *), val;
|
||||
int op, val;
|
||||
|
||||
l = eval5 ();
|
||||
while (1) {
|
||||
if (nextarg ("*"))
|
||||
fxn = multiply;
|
||||
op = '*';
|
||||
else if (nextarg ("/"))
|
||||
fxn = divide;
|
||||
op = '/';
|
||||
else if (nextarg ("%"))
|
||||
fxn = mod;
|
||||
op = '%';
|
||||
else
|
||||
return l;
|
||||
args++;
|
||||
r = eval5 ();
|
||||
val = (*fxn) (l, r);
|
||||
val = arithmetic_common (l, r, op);
|
||||
freev (l);
|
||||
freev (r);
|
||||
l = int_value (val);
|
||||
@@ -434,19 +431,19 @@ static VALUE *eval4 (void)
|
||||
static VALUE *eval3 (void)
|
||||
{
|
||||
VALUE *l, *r;
|
||||
int (*fxn) (VALUE *, VALUE *), val;
|
||||
int op, val;
|
||||
|
||||
l = eval4 ();
|
||||
while (1) {
|
||||
if (nextarg ("+"))
|
||||
fxn = plus;
|
||||
op = '+';
|
||||
else if (nextarg ("-"))
|
||||
fxn = minus;
|
||||
op = '-';
|
||||
else
|
||||
return l;
|
||||
args++;
|
||||
r = eval4 ();
|
||||
val = (*fxn) (l, r);
|
||||
val = arithmetic_common (l, r, op);
|
||||
freev (l);
|
||||
freev (r);
|
||||
l = int_value (val);
|
||||
@@ -458,29 +455,29 @@ static VALUE *eval3 (void)
|
||||
static VALUE *eval2 (void)
|
||||
{
|
||||
VALUE *l, *r;
|
||||
int (*fxn) (VALUE *, VALUE *), val;
|
||||
int op, val;
|
||||
|
||||
l = eval3 ();
|
||||
while (1) {
|
||||
if (nextarg ("<"))
|
||||
fxn = less_than;
|
||||
op = '<';
|
||||
else if (nextarg ("<="))
|
||||
fxn = less_equal;
|
||||
op = 'L'+'E';
|
||||
else if (nextarg ("=") || nextarg ("=="))
|
||||
fxn = equal;
|
||||
op = '=';
|
||||
else if (nextarg ("!="))
|
||||
fxn = not_equal;
|
||||
op = '!';
|
||||
else if (nextarg (">="))
|
||||
fxn = greater_equal;
|
||||
op = 'G'+'E';
|
||||
else if (nextarg (">"))
|
||||
fxn = greater_than;
|
||||
op = '>';
|
||||
else
|
||||
return l;
|
||||
args++;
|
||||
r = eval3 ();
|
||||
toarith (l);
|
||||
toarith (r);
|
||||
val = (*fxn) (l, r);
|
||||
val = cmp_common (l, r, op);
|
||||
freev (l);
|
||||
freev (r);
|
||||
l = int_value (val);
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* Copyright (C) 2003 by Glenn McGrath <bug1@optushome.com.au>
|
||||
*
|
||||
* 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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*
|
||||
* TODO: -d option, need a way of recursively making directories and changing
|
||||
* owner/group, will probably modify bb_make_directory(...)
|
||||
*/
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "busybox.h"
|
||||
#include "libcoreutils/coreutils.h"
|
||||
|
||||
#define INSTALL_OPT_CMD 1
|
||||
#define INSTALL_OPT_DIRECTORY 2
|
||||
#define INSTALL_OPT_PRESERVE_TIME 4
|
||||
#define INSTALL_OPT_STRIP 8
|
||||
#define INSTALL_OPT_GROUP 16
|
||||
#define INSTALL_OPT_MODE 32
|
||||
#define INSTALL_OPT_OWNER 64
|
||||
|
||||
extern int install_main(int argc, char **argv)
|
||||
{
|
||||
struct stat statbuf;
|
||||
mode_t mode = 0755;
|
||||
uid_t uid = -1;
|
||||
gid_t gid = -1;
|
||||
char *gid_str;
|
||||
char *uid_str;
|
||||
char *mode_str;
|
||||
int copy_flags = FILEUTILS_DEREFERENCE | FILEUTILS_FORCE;
|
||||
int ret = EXIT_SUCCESS;
|
||||
int flags;
|
||||
int i;
|
||||
|
||||
/* -c exists for backwards compatability, its needed */
|
||||
flags = bb_getopt_ulflags(argc, argv, "cdpsg:m:o:", &gid_str, &mode_str, &uid_str); /* 'a' must be 2nd */
|
||||
|
||||
/* preserve access and modification time, this is GNU behaviour, BSD only preserves modification time */
|
||||
if (flags & INSTALL_OPT_PRESERVE_TIME) {
|
||||
copy_flags |= FILEUTILS_PRESERVE_STATUS;
|
||||
}
|
||||
if (flags & INSTALL_OPT_GROUP) {
|
||||
gid = get_ug_id(gid_str, my_getgrnam);
|
||||
}
|
||||
if (flags & INSTALL_OPT_MODE) {
|
||||
bb_parse_mode(mode_str, &mode);
|
||||
}
|
||||
if (flags & INSTALL_OPT_OWNER) {
|
||||
uid = get_ug_id(uid_str, my_getpwnam);
|
||||
}
|
||||
|
||||
/* Create directories */
|
||||
if (flags & INSTALL_OPT_DIRECTORY) {
|
||||
|
||||
for (argv += optind; *argv; argv++) {
|
||||
unsigned char *dir_name = *argv;
|
||||
unsigned char *argv_ptr;
|
||||
|
||||
ret |= bb_make_directory(dir_name, mode, FILEUTILS_RECUR);
|
||||
do {
|
||||
argv_ptr = strrchr(dir_name, '/');
|
||||
|
||||
/* Skip the "." and ".." directories */
|
||||
if ((dir_name[0] == '.') && ((dir_name[1] == '\0') || ((dir_name[1] == '.') && (dir_name[2] == '\0')))) {
|
||||
break;
|
||||
}
|
||||
if (lchown(dir_name, uid, gid) == -1) {
|
||||
bb_perror_msg("cannot change ownership of %s", argv_ptr);
|
||||
ret |= EXIT_FAILURE;
|
||||
}
|
||||
if (argv_ptr) {
|
||||
*argv_ptr = '\0';
|
||||
}
|
||||
} while (argv_ptr);
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
cp_mv_stat2(argv[argc - 1], &statbuf, lstat);
|
||||
for (i = optind; i < argc - 1; i++) {
|
||||
unsigned char *dest;
|
||||
|
||||
if (S_ISDIR(statbuf.st_mode)) {
|
||||
dest = concat_path_file(argv[argc - 1], basename(argv[i]));
|
||||
} else {
|
||||
dest = argv[argc - 1];
|
||||
}
|
||||
ret |= copy_file(argv[i], dest, copy_flags);
|
||||
|
||||
/* Set the file mode */
|
||||
if (chmod(dest, mode) == -1) {
|
||||
bb_perror_msg("cannot change permissions of %s", dest);
|
||||
ret |= EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Set the user and group id */
|
||||
if (lchown(dest, uid, gid) == -1) {
|
||||
bb_perror_msg("cannot change ownership of %s", dest);
|
||||
ret |= EXIT_FAILURE;
|
||||
}
|
||||
if (flags & INSTALL_OPT_STRIP) {
|
||||
if (execlp("strip", "strip", dest, NULL) == -1) {
|
||||
bb_error_msg("strip failed");
|
||||
ret |= EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
+5
-8
@@ -203,7 +203,7 @@ static int is_flask_enabled_flag;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FEATURE_AUTOWIDTH
|
||||
static unsigned short terminal_width = TERMINAL_WIDTH;
|
||||
static int terminal_width = TERMINAL_WIDTH;
|
||||
static unsigned short tabstops = COLUMN_GAP;
|
||||
#else
|
||||
#define tabstops COLUMN_GAP
|
||||
@@ -915,10 +915,6 @@ extern int ls_main(int argc, char **argv)
|
||||
is_flask_enabled_flag = is_flask_enabled();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FEATURE_AUTOWIDTH
|
||||
struct winsize win = { 0, 0, 0, 0 };
|
||||
#endif
|
||||
|
||||
all_fmt = LIST_SHORT | DISP_NORMAL | STYLE_AUTO
|
||||
#ifdef CONFIG_FEATURE_LS_TIMESTAMPS
|
||||
| TIME_MOD
|
||||
@@ -928,9 +924,10 @@ extern int ls_main(int argc, char **argv)
|
||||
#endif
|
||||
;
|
||||
#ifdef CONFIG_FEATURE_AUTOWIDTH
|
||||
ioctl(fileno(stdout), TIOCGWINSZ, &win);
|
||||
if (win.ws_col > 0)
|
||||
terminal_width = win.ws_col - 1;
|
||||
/* Obtain the terminal width. */
|
||||
get_terminal_width_height(0, &terminal_width, NULL);
|
||||
/* Go one less... */
|
||||
terminal_width--;
|
||||
#endif
|
||||
nfiles = 0;
|
||||
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
/*
|
||||
* Copyright (C) 2003 Glenn L. McGrath
|
||||
* Copyright (C) 2003 Erik Andersen
|
||||
*
|
||||
* 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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "busybox.h"
|
||||
|
||||
|
||||
#define FLAG_SILENT 1
|
||||
#define FLAG_CHECK 2
|
||||
#define FLAG_WARN 4
|
||||
|
||||
/* This might be usefull elsewhere */
|
||||
static unsigned char *hash_bin_to_hex(unsigned char *hash_value,
|
||||
unsigned char hash_length)
|
||||
{
|
||||
int x, len, max;
|
||||
unsigned char *hex_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]);
|
||||
}
|
||||
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 = fileno(stdin);
|
||||
} 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 {
|
||||
bb_perror_msg("%s", filename);
|
||||
}
|
||||
|
||||
close(src_fd);
|
||||
|
||||
return(hash_value);
|
||||
}
|
||||
|
||||
/* This could become a common function for md5 as well, by using md5_stream */
|
||||
extern int hash_files(int argc, char **argv, const uint8_t hash_algo)
|
||||
{
|
||||
int return_value = EXIT_SUCCESS;
|
||||
uint8_t *hash_value;
|
||||
|
||||
#ifdef CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
|
||||
unsigned int flags;
|
||||
|
||||
flags = bb_getopt_ulflags(argc, argv, "scw");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
|
||||
if (!(flags & FLAG_CHECK)) {
|
||||
if (flags & FLAG_SILENT) {
|
||||
bb_error_msg_and_die
|
||||
("the -s option is meaningful only when verifying checksums");
|
||||
} else if (flags & FLAG_WARN) {
|
||||
bb_error_msg_and_die
|
||||
("the -w option is meaningful only when verifying checksums");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (argc == optind) {
|
||||
argv[argc++] = "-";
|
||||
}
|
||||
#ifdef CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
|
||||
if (flags & FLAG_CHECK) {
|
||||
FILE *pre_computed_stream;
|
||||
int count_total = 0;
|
||||
int count_failed = 0;
|
||||
unsigned char *file_ptr = argv[optind];
|
||||
char *line;
|
||||
|
||||
if (optind + 1 != argc) {
|
||||
bb_error_msg_and_die
|
||||
("only one argument may be specified when using -c");
|
||||
}
|
||||
|
||||
if (strcmp(file_ptr, "-") == 0) {
|
||||
pre_computed_stream = stdin;
|
||||
} else {
|
||||
pre_computed_stream = bb_xfopen(file_ptr, "r");
|
||||
}
|
||||
|
||||
while ((line = bb_get_chomped_line_from_file(pre_computed_stream)) != NULL) {
|
||||
char *filename_ptr;
|
||||
|
||||
count_total++;
|
||||
filename_ptr = strstr(line, " ");
|
||||
if (filename_ptr == NULL) {
|
||||
if (flags & FLAG_WARN) {
|
||||
bb_error_msg("Invalid format");
|
||||
}
|
||||
free(line);
|
||||
continue;
|
||||
}
|
||||
*filename_ptr = '\0';
|
||||
filename_ptr += 2;
|
||||
|
||||
hash_value = hash_file(filename_ptr, hash_algo);
|
||||
|
||||
if (hash_value && (strcmp(hash_value, line) == 0)) {
|
||||
if (!(flags & FLAG_SILENT))
|
||||
printf("%s: OK\n", filename_ptr);
|
||||
} else {
|
||||
if (!(flags & FLAG_SILENT))
|
||||
printf("%s: FAILED\n", filename_ptr);
|
||||
count_failed++;
|
||||
}
|
||||
/* possible free(NULL) */
|
||||
free(hash_value);
|
||||
free(line);
|
||||
}
|
||||
if (count_failed && !(flags & FLAG_SILENT)) {
|
||||
bb_error_msg("WARNING: %d of %d computed checksums did NOT match",
|
||||
count_failed, count_total);
|
||||
}
|
||||
if (bb_fclose_nonstdin(pre_computed_stream) == EOF) {
|
||||
bb_perror_msg_and_die("Couldnt close file %s", file_ptr);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
uint8_t hash_length;
|
||||
|
||||
if (hash_algo == HASH_MD5) {
|
||||
hash_length = 16;
|
||||
} else {
|
||||
hash_length = 20;
|
||||
}
|
||||
hash_value = xmalloc(hash_length);
|
||||
|
||||
while (optind < argc) {
|
||||
unsigned char *file_ptr = argv[optind++];
|
||||
|
||||
hash_value = hash_file(file_ptr, hash_algo);
|
||||
if (hash_value == NULL) {
|
||||
return_value++;
|
||||
} else {
|
||||
printf("%s %s\n", hash_value, file_ptr);
|
||||
free(hash_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (return_value);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MD5SUM
|
||||
extern int md5sum_main(int argc, char **argv)
|
||||
{
|
||||
return(hash_files(argc, argv, HASH_MD5));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SHA1SUM
|
||||
extern int sha1sum_main(int argc, char **argv)
|
||||
{
|
||||
return(hash_files(argc, argv, HASH_SHA1));
|
||||
}
|
||||
#endif
|
||||
-1102
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -411,7 +411,7 @@ static unsigned long xstrtoul(char *arg)
|
||||
assert(arg!=NULL);
|
||||
|
||||
errno = 0;
|
||||
result = strtoul(arg, &endptr, 10);
|
||||
result = strtoul(arg, &endptr, 0);
|
||||
if (errno != 0 || *endptr!='\0' || endptr==arg)
|
||||
fprintf(stderr, "%s", arg);
|
||||
//errno = errno_save;
|
||||
@@ -427,7 +427,7 @@ static long xstrtol(char *arg)
|
||||
assert(arg!=NULL);
|
||||
|
||||
errno = 0;
|
||||
result = strtoul(arg, &endptr, 10);
|
||||
result = strtoul(arg, &endptr, 0);
|
||||
if (errno != 0 || *endptr!='\0' || endptr==arg)
|
||||
fprintf(stderr, "%s", arg);
|
||||
//errno = errno_save;
|
||||
|
||||
@@ -1,492 +0,0 @@
|
||||
/*
|
||||
* Based on shasum from http://www.netsw.org/crypto/hash/
|
||||
* Majorly hacked up to use Dr Brian Gladman's sha1 code
|
||||
*
|
||||
* Copyright (C) 1999 Scott G. Miller
|
||||
* Copyright (C) 2003 Glenn L. McGrath
|
||||
* Copyright (C) 2003 Erik Andersen
|
||||
*
|
||||
* 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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include <endian.h>
|
||||
#include <byteswap.h>
|
||||
#include "busybox.h"
|
||||
|
||||
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Begin Dr. Gladman's sha1 code
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Copyright (c) 2002, Dr Brian Gladman <brg@gladman.me.uk>, Worcester, UK.
|
||||
All rights reserved.
|
||||
|
||||
LICENSE TERMS
|
||||
|
||||
The free distribution and use of this software in both source and binary
|
||||
form is allowed (with or without changes) provided that:
|
||||
|
||||
1. distributions of this source code include the above copyright
|
||||
notice, this list of conditions and the following disclaimer;
|
||||
|
||||
2. distributions in binary form include the above copyright
|
||||
notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other associated materials;
|
||||
|
||||
3. the copyright holder's name is not used to endorse products
|
||||
built using this software without specific written permission.
|
||||
|
||||
ALTERNATIVELY, provided that this notice is retained in full, this product
|
||||
may be distributed under the terms of the GNU General Public License (GPL),
|
||||
in which case the provisions of the GPL apply INSTEAD OF those given above.
|
||||
|
||||
DISCLAIMER
|
||||
|
||||
This software is provided 'as is' with no explicit or implied warranties
|
||||
in respect of its properties, including, but not limited to, correctness
|
||||
and/or fitness for purpose.
|
||||
---------------------------------------------------------------------------
|
||||
Issue Date: 10/11/2002
|
||||
|
||||
This is a byte oriented version of SHA1 that operates on arrays of bytes
|
||||
stored in memory. It runs at 22 cycles per byte on a Pentium P4 processor
|
||||
*/
|
||||
|
||||
#define SHA1_BLOCK_SIZE 64
|
||||
#define SHA1_DIGEST_SIZE 20
|
||||
#define SHA1_HASH_SIZE SHA1_DIGEST_SIZE
|
||||
#define SHA2_GOOD 0
|
||||
#define SHA2_BAD 1
|
||||
|
||||
/* type to hold the SHA1 context */
|
||||
typedef struct
|
||||
{ uint32_t count[2];
|
||||
uint32_t hash[5];
|
||||
uint32_t wbuf[16];
|
||||
} sha1_ctx;
|
||||
|
||||
#define rotl32(x,n) (((x) << n) | ((x) >> (32 - n)))
|
||||
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
# define swap_b32(x) (x)
|
||||
#elif defined(bswap_32)
|
||||
# define swap_b32(x) bswap_32(x)
|
||||
#else
|
||||
# define swap_b32(x) ((rotl32((x), 8) & 0x00ff00ff) | (rotl32((x), 24) & 0xff00ff00))
|
||||
#endif
|
||||
|
||||
#define SHA1_MASK (SHA1_BLOCK_SIZE - 1)
|
||||
|
||||
/* reverse byte order in 32-bit words */
|
||||
#define ch(x,y,z) (((x) & (y)) ^ (~(x) & (z)))
|
||||
#define parity(x,y,z) ((x) ^ (y) ^ (z))
|
||||
#define maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
|
||||
|
||||
/* A normal version as set out in the FIPS. This version uses */
|
||||
/* partial loop unrolling and is optimised for the Pentium 4 */
|
||||
#define rnd(f,k) \
|
||||
t = a; a = rotl32(a,5) + f(b,c,d) + e + k + w[i]; \
|
||||
e = d; d = c; c = rotl32(b, 30); b = t
|
||||
|
||||
void sha1_compile(sha1_ctx ctx[1])
|
||||
{
|
||||
uint32_t w[80], i, a, b, c, d, e, t;
|
||||
|
||||
/* note that words are compiled from the buffer into 32-bit */
|
||||
/* words in big-endian order so an order reversal is needed */
|
||||
/* here on little endian machines */
|
||||
for(i = 0; i < SHA1_BLOCK_SIZE / 4; ++i)
|
||||
w[i] = swap_b32(ctx->wbuf[i]);
|
||||
|
||||
for(i = SHA1_BLOCK_SIZE / 4; i < 80; ++i)
|
||||
w[i] = rotl32(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16], 1);
|
||||
|
||||
a = ctx->hash[0];
|
||||
b = ctx->hash[1];
|
||||
c = ctx->hash[2];
|
||||
d = ctx->hash[3];
|
||||
e = ctx->hash[4];
|
||||
|
||||
for(i = 0; i < 20; ++i)
|
||||
{
|
||||
rnd(ch, 0x5a827999);
|
||||
}
|
||||
|
||||
for(i = 20; i < 40; ++i)
|
||||
{
|
||||
rnd(parity, 0x6ed9eba1);
|
||||
}
|
||||
|
||||
for(i = 40; i < 60; ++i)
|
||||
{
|
||||
rnd(maj, 0x8f1bbcdc);
|
||||
}
|
||||
|
||||
for(i = 60; i < 80; ++i)
|
||||
{
|
||||
rnd(parity, 0xca62c1d6);
|
||||
}
|
||||
|
||||
ctx->hash[0] += a;
|
||||
ctx->hash[1] += b;
|
||||
ctx->hash[2] += c;
|
||||
ctx->hash[3] += d;
|
||||
ctx->hash[4] += e;
|
||||
}
|
||||
|
||||
void sha1_begin(sha1_ctx ctx[1])
|
||||
{
|
||||
ctx->count[0] = ctx->count[1] = 0;
|
||||
ctx->hash[0] = 0x67452301;
|
||||
ctx->hash[1] = 0xefcdab89;
|
||||
ctx->hash[2] = 0x98badcfe;
|
||||
ctx->hash[3] = 0x10325476;
|
||||
ctx->hash[4] = 0xc3d2e1f0;
|
||||
}
|
||||
|
||||
/* SHA1 hash data in an array of bytes into hash buffer and call the */
|
||||
/* hash_compile function as required. */
|
||||
void sha1_hash(const unsigned char data[], unsigned int len, sha1_ctx ctx[1])
|
||||
{
|
||||
uint32_t pos = (uint32_t)(ctx->count[0] & SHA1_MASK),
|
||||
freeb = SHA1_BLOCK_SIZE - pos;
|
||||
const unsigned char *sp = data;
|
||||
|
||||
if((ctx->count[0] += len) < len)
|
||||
++(ctx->count[1]);
|
||||
|
||||
while(len >= freeb) /* tranfer whole blocks while possible */
|
||||
{
|
||||
memcpy(((unsigned char*)ctx->wbuf) + pos, sp, freeb);
|
||||
sp += freeb; len -= freeb; freeb = SHA1_BLOCK_SIZE; pos = 0;
|
||||
sha1_compile(ctx);
|
||||
}
|
||||
|
||||
memcpy(((unsigned char*)ctx->wbuf) + pos, sp, len);
|
||||
}
|
||||
|
||||
/* SHA1 Final padding and digest calculation */
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
static uint32_t mask[4] =
|
||||
{ 0x00000000, 0x000000ff, 0x0000ffff, 0x00ffffff };
|
||||
static uint32_t bits[4] =
|
||||
{ 0x00000080, 0x00008000, 0x00800000, 0x80000000 };
|
||||
#else
|
||||
static uint32_t mask[4] =
|
||||
{ 0x00000000, 0xff000000, 0xffff0000, 0xffffff00 };
|
||||
static uint32_t bits[4] =
|
||||
{ 0x80000000, 0x00800000, 0x00008000, 0x00000080 };
|
||||
#endif
|
||||
|
||||
void sha1_end(unsigned char hval[], sha1_ctx ctx[1])
|
||||
{
|
||||
uint32_t i, cnt = (uint32_t)(ctx->count[0] & SHA1_MASK);
|
||||
|
||||
/* mask out the rest of any partial 32-bit word and then set */
|
||||
/* the next byte to 0x80. On big-endian machines any bytes in */
|
||||
/* the buffer will be at the top end of 32 bit words, on little */
|
||||
/* endian machines they will be at the bottom. Hence the AND */
|
||||
/* and OR masks above are reversed for little endian systems */
|
||||
ctx->wbuf[cnt >> 2] = (ctx->wbuf[cnt >> 2] & mask[cnt & 3]) | bits[cnt & 3];
|
||||
|
||||
/* we need 9 or more empty positions, one for the padding byte */
|
||||
/* (above) and eight for the length count. If there is not */
|
||||
/* enough space pad and empty the buffer */
|
||||
if(cnt > SHA1_BLOCK_SIZE - 9)
|
||||
{
|
||||
if(cnt < 60) ctx->wbuf[15] = 0;
|
||||
sha1_compile(ctx);
|
||||
cnt = 0;
|
||||
}
|
||||
else /* compute a word index for the empty buffer positions */
|
||||
cnt = (cnt >> 2) + 1;
|
||||
|
||||
while(cnt < 14) /* and zero pad all but last two positions */
|
||||
ctx->wbuf[cnt++] = 0;
|
||||
|
||||
/* assemble the eight byte counter in the buffer in big-endian */
|
||||
/* format */
|
||||
|
||||
ctx->wbuf[14] = swap_b32((ctx->count[1] << 3) | (ctx->count[0] >> 29));
|
||||
ctx->wbuf[15] = swap_b32(ctx->count[0] << 3);
|
||||
|
||||
sha1_compile(ctx);
|
||||
|
||||
/* extract the hash value as bytes in case the hash buffer is */
|
||||
/* misaligned for 32-bit words */
|
||||
|
||||
for(i = 0; i < SHA1_DIGEST_SIZE; ++i)
|
||||
hval[i] = (unsigned char)(ctx->hash[i >> 2] >> 8 * (~i & 3));
|
||||
}
|
||||
|
||||
#if 0
|
||||
void sha1(unsigned char hval[], const unsigned char data[], unsigned int len)
|
||||
{ sha1_ctx cx[1];
|
||||
|
||||
sha1_begin(cx); sha1_hash(data, len, cx); sha1_end(hval, cx);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
End of Dr. Gladman's sha1 code
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Using a larger blocksize can make things _much_ faster
|
||||
* by avoiding a zillion tiny little reads */
|
||||
#define BLOCKSIZE 65536
|
||||
/* Ensure that BLOCKSIZE is a multiple of 64. */
|
||||
#if BLOCKSIZE % SHA1_BLOCK_SIZE != 0
|
||||
# error "BLOCKSIZE not a multiple of 64"
|
||||
#endif
|
||||
|
||||
static int sha1sum_stream(FILE *stream, unsigned char *hashval)
|
||||
{
|
||||
int result = 0;
|
||||
sha1_ctx cx[1];
|
||||
size_t sum, n;
|
||||
RESERVE_CONFIG_BUFFER(buffer, BLOCKSIZE + 72);
|
||||
|
||||
/* Initialize the computation context. */
|
||||
sha1_begin(cx);
|
||||
|
||||
/* Iterate over full file contents. */
|
||||
while (1)
|
||||
{
|
||||
/* We read the file in blocks of BLOCKSIZE bytes. One call of the
|
||||
computation function processes the whole buffer so that with the
|
||||
next round of the loop another block can be read. */
|
||||
sum = 0;
|
||||
|
||||
/* Read block. Take care for partial reads. */
|
||||
while (1)
|
||||
{
|
||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||
sum += n;
|
||||
|
||||
if (sum == BLOCKSIZE)
|
||||
break;
|
||||
|
||||
if (n == 0) {
|
||||
/* Check for the error flag IFF N == 0, so that we don't
|
||||
exit the loop after a partial read due to e.g., EAGAIN
|
||||
or EWOULDBLOCK. */
|
||||
if (feof (stream)) {
|
||||
sum = 0;
|
||||
goto process_partial_block;
|
||||
}
|
||||
if (ferror (stream)) {
|
||||
result++;
|
||||
goto all_done;
|
||||
}
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* We've read at least one byte, so ignore errors. But always
|
||||
check for EOF, since feof may be true even though N > 0.
|
||||
Otherwise, we could end up calling fread after EOF. */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* Process buffer */
|
||||
sha1_hash(buffer, BLOCKSIZE, cx);
|
||||
}
|
||||
|
||||
process_partial_block:
|
||||
|
||||
/* Process any remaining bytes. */
|
||||
if (sum > 0)
|
||||
sha1_hash(buffer, sum, cx);
|
||||
|
||||
/* Finalize and write the hash into our buffer. */
|
||||
sha1_end(hashval, cx);
|
||||
|
||||
all_done:
|
||||
|
||||
RELEASE_CONFIG_BUFFER(buffer);
|
||||
return result;
|
||||
}
|
||||
|
||||
#define FLAG_SILENT 1
|
||||
#define FLAG_CHECK 2
|
||||
#define FLAG_WARN 4
|
||||
|
||||
static unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned char hash_length)
|
||||
{
|
||||
int x, len, max;
|
||||
unsigned char *hex_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]);
|
||||
}
|
||||
return(hex_value);
|
||||
}
|
||||
|
||||
FILE *wfopen_file_or_stdin(const char *file_ptr)
|
||||
{
|
||||
FILE *stream;
|
||||
|
||||
if ((file_ptr[0] == '-') && (file_ptr[1] == '\0')) {
|
||||
stream = stdin;
|
||||
} else {
|
||||
stream = bb_wfopen(file_ptr, "r");
|
||||
}
|
||||
|
||||
return(stream);
|
||||
}
|
||||
|
||||
/* This could become a common function for md5 as well, by using md5_stream */
|
||||
extern int authenticate(int argc, char **argv,
|
||||
int (*hash_ptr)(FILE *stream, unsigned char *hashval),
|
||||
const unsigned char hash_length)
|
||||
{
|
||||
unsigned char hash_value[hash_length];
|
||||
unsigned int flags;
|
||||
int return_value = EXIT_SUCCESS;
|
||||
|
||||
#ifdef CONFIG_FEATURE_SHA1SUM_CHECK
|
||||
flags = bb_getopt_ulflags(argc, argv, "scw");
|
||||
#else
|
||||
flags = bb_getopt_ulflags(argc, argv, "s");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FEATURE_SHA1SUM_CHECK
|
||||
if (!(flags & FLAG_CHECK)) {
|
||||
if (flags & FLAG_SILENT) {
|
||||
bb_error_msg_and_die("the -s option is meaningful only when verifying checksums");
|
||||
}
|
||||
else if (flags & FLAG_WARN) {
|
||||
bb_error_msg_and_die("the -w option is meaningful only when verifying checksums");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (argc == optind) {
|
||||
argv[argc++] = "-";
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FEATURE_SHA1SUM_CHECK
|
||||
if (flags & FLAG_CHECK) {
|
||||
FILE *pre_computed_stream;
|
||||
int count_total = 0;
|
||||
int count_failed = 0;
|
||||
unsigned char *file_ptr = argv[optind];
|
||||
|
||||
if (optind + 1 != argc) {
|
||||
bb_error_msg_and_die("only one argument may be specified when using -c");
|
||||
}
|
||||
pre_computed_stream = wfopen_file_or_stdin(file_ptr);
|
||||
while (!feof(pre_computed_stream) && !ferror(pre_computed_stream)) {
|
||||
FILE *stream;
|
||||
char *line;
|
||||
char *line_ptr;
|
||||
char *hex_value;
|
||||
|
||||
line = bb_get_chomped_line_from_file(pre_computed_stream);
|
||||
if (line == NULL) {
|
||||
break;
|
||||
}
|
||||
count_total++;
|
||||
line_ptr = strchr(line, ' ');
|
||||
if (line_ptr == NULL) {
|
||||
if (flags & FLAG_WARN) {
|
||||
bb_error_msg("Invalid format");
|
||||
}
|
||||
free(line);
|
||||
continue;
|
||||
}
|
||||
*line_ptr = '\0';
|
||||
line_ptr++;
|
||||
if ((flags & FLAG_WARN) && (*line_ptr != ' ')) {
|
||||
bb_error_msg("Invalid format");
|
||||
free(line);
|
||||
continue;
|
||||
}
|
||||
line_ptr++;
|
||||
stream = bb_wfopen(line_ptr, "r");
|
||||
if (hash_ptr(stream, hash_value) == EXIT_FAILURE) {
|
||||
bb_perror_msg("%s", file_ptr);
|
||||
return_value = EXIT_FAILURE;
|
||||
}
|
||||
if (fclose(stream) == EOF) {
|
||||
bb_perror_msg("Couldnt close file %s", file_ptr);
|
||||
}
|
||||
hex_value = hash_bin_to_hex(hash_value, hash_length);
|
||||
printf("%s: ", line_ptr);
|
||||
if (strcmp(hex_value, line) != 0) {
|
||||
puts("FAILED");
|
||||
count_failed++;
|
||||
} else {
|
||||
puts("ok");
|
||||
}
|
||||
free(line);
|
||||
}
|
||||
if (count_failed) {
|
||||
bb_error_msg("WARNING: %d of %d computed checksum did NOT match", count_failed, count_total);
|
||||
}
|
||||
if (bb_fclose_nonstdin(pre_computed_stream) == EOF) {
|
||||
bb_perror_msg_and_die("Couldnt close file %s", file_ptr);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
while (optind < argc) {
|
||||
FILE *stream;
|
||||
unsigned char *file_ptr = argv[optind];
|
||||
|
||||
optind++;
|
||||
|
||||
stream = wfopen_file_or_stdin(file_ptr);
|
||||
if (stream == NULL) {
|
||||
return_value = EXIT_FAILURE;
|
||||
continue;
|
||||
}
|
||||
if (hash_ptr(stream, hash_value) == EXIT_FAILURE) {
|
||||
bb_perror_msg("%s", file_ptr);
|
||||
return_value = EXIT_FAILURE;
|
||||
}
|
||||
else if (!flags & FLAG_SILENT) {
|
||||
char *hex_value = hash_bin_to_hex(hash_value, hash_length);
|
||||
printf("%s %s\n", hex_value, file_ptr);
|
||||
free(hex_value);
|
||||
}
|
||||
|
||||
if (bb_fclose_nonstdin(stream) == EOF) {
|
||||
bb_perror_msg("Couldnt close file %s", file_ptr);
|
||||
return_value = EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return(return_value);
|
||||
}
|
||||
|
||||
extern int sha1sum_main(int argc, char **argv)
|
||||
{
|
||||
return (authenticate(argc, argv, sha1sum_stream, SHA1_HASH_SIZE));
|
||||
}
|
||||
+6
-16
@@ -89,9 +89,9 @@ static ssize_t tail_read(int fd, char *buf, size_t count)
|
||||
}
|
||||
|
||||
static const char tail_opts[] =
|
||||
"fn:"
|
||||
"fn:c:"
|
||||
#ifdef CONFIG_FEATURE_FANCY_TAIL
|
||||
"c:qs:v"
|
||||
"qs:v"
|
||||
#endif
|
||||
;
|
||||
|
||||
@@ -104,9 +104,7 @@ int tail_main(int argc, char **argv)
|
||||
int from_top = 0;
|
||||
int follow = 0;
|
||||
int header_threshhold = 1;
|
||||
#ifdef CONFIG_FEATURE_FANCY_TAIL
|
||||
int count_bytes = 0;
|
||||
#endif
|
||||
|
||||
char *tailbuf;
|
||||
size_t tailbufsize;
|
||||
@@ -132,11 +130,9 @@ int tail_main(int argc, char **argv)
|
||||
case 'f':
|
||||
follow = 1;
|
||||
break;
|
||||
#ifdef CONFIG_FEATURE_FANCY_TAIL
|
||||
case 'c':
|
||||
count_bytes = 1;
|
||||
/* FALLS THROUGH */
|
||||
#endif
|
||||
case 'n':
|
||||
GET_COUNT:
|
||||
count = bb_xgetlarg10_sfx(optarg, tail_suffixes);
|
||||
@@ -201,7 +197,7 @@ int tail_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
tailbufsize = BUFSIZ;
|
||||
#ifdef CONFIG_FEATURE_FANCY_TAIL
|
||||
|
||||
/* tail the files */
|
||||
if (from_top < count_bytes) { /* Each is 0 or 1, so true iff 0 < 1. */
|
||||
/* Hence, !from_top && count_bytes */
|
||||
@@ -209,7 +205,7 @@ int tail_main(int argc, char **argv)
|
||||
tailbufsize = count + BUFSIZ;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
buf = tailbuf = xmalloc(tailbufsize);
|
||||
|
||||
fmt = header_fmt + 1; /* Skip header leading newline on first output. */
|
||||
@@ -237,13 +233,10 @@ int tail_main(int argc, char **argv)
|
||||
if (from_top) {
|
||||
nwrite = nread;
|
||||
if (seen < count) {
|
||||
#ifdef CONFIG_FEATURE_FANCY_TAIL
|
||||
if (count_bytes) {
|
||||
nwrite -= (count - seen);
|
||||
seen = count;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
s = buf;
|
||||
do {
|
||||
--nwrite;
|
||||
@@ -255,16 +248,13 @@ int tail_main(int argc, char **argv)
|
||||
}
|
||||
tail_xbb_full_write(buf + nread - nwrite, nwrite);
|
||||
} else if (count) {
|
||||
#ifdef CONFIG_FEATURE_FANCY_TAIL
|
||||
if (count_bytes) {
|
||||
taillen += nread;
|
||||
if (taillen > count) {
|
||||
memmove(tailbuf, tailbuf + taillen - count, count);
|
||||
taillen = count;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
int k = nread;
|
||||
int nbuf = 0;
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ int tee_main(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
#else
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
while ((c = getchar()) != EOF) {
|
||||
for (p=files ; *p ; p++) {
|
||||
putc(c, *p);
|
||||
|
||||
+160
-312
@@ -1,353 +1,201 @@
|
||||
/* uudecode.c -- uudecode utility.
|
||||
* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
||||
/*
|
||||
* GPLv2
|
||||
* Copyright 2003, Glenn McGrath <bug1@optushome.com.au>
|
||||
*
|
||||
* This product 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, or (at your option)
|
||||
* any later version.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as published
|
||||
* by the Free Software Foundation; either version 2 of the License.
|
||||
*
|
||||
* This product is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this product; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Reworked to GNU style by Ian Lance Taylor, ian@airs.com, August 93.
|
||||
* Based on specification from
|
||||
* http://www.opengroup.org/onlinepubs/007904975/utilities/uuencode.html
|
||||
*
|
||||
* Original copyright notice is retained at the end of this file.
|
||||
* Bugs: the spec doesnt mention anything about "`\n`\n" prior to the "end" line
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "busybox.h"
|
||||
#include "pwd_.h"
|
||||
#include "grp_.h"
|
||||
|
||||
/*struct passwd *getpwnam();*/
|
||||
#include "libbb.h"
|
||||
|
||||
/* Single character decode. */
|
||||
#define DEC(Char) (((Char) - ' ') & 077)
|
||||
|
||||
static int read_stduu (const char *inname)
|
||||
static int read_stduu(FILE *src_stream, FILE *dst_stream)
|
||||
{
|
||||
char buf[2 * BUFSIZ];
|
||||
char *line;
|
||||
|
||||
while (1) {
|
||||
int n;
|
||||
char *p;
|
||||
while ((line = bb_get_chomped_line_from_file(src_stream)) != NULL) {
|
||||
int length;
|
||||
char *line_ptr = line;
|
||||
|
||||
if (fgets (buf, sizeof(buf), stdin) == NULL) {
|
||||
bb_error_msg("%s: Short file", inname);
|
||||
return FALSE;
|
||||
}
|
||||
p = buf;
|
||||
if (strcmp(line, "end") == 0) {
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
length = ((*line_ptr - 0x20) & 0x3f)* 4 / 3;
|
||||
|
||||
/* N is used to avoid writing out all the characters at the end of
|
||||
the file. */
|
||||
n = DEC (*p);
|
||||
if (n <= 0)
|
||||
break;
|
||||
for (++p; n > 0; p += 4, n -= 3) {
|
||||
char ch;
|
||||
if (length <= 0) {
|
||||
/* Ignore the "`\n" line, why is it even in the encode file ? */
|
||||
continue;
|
||||
}
|
||||
if (length > 60) {
|
||||
bb_error_msg_and_die("Line too long");
|
||||
}
|
||||
|
||||
line_ptr++;
|
||||
/* Tolerate an overly long line to acomadate a possible exta '`' */
|
||||
if (strlen(line_ptr) < length) {
|
||||
bb_error_msg_and_die("Short file");
|
||||
}
|
||||
|
||||
if (n >= 3) {
|
||||
ch = DEC (p[0]) << 2 | DEC (p[1]) >> 4;
|
||||
putchar (ch);
|
||||
ch = DEC (p[1]) << 4 | DEC (p[2]) >> 2;
|
||||
putchar (ch);
|
||||
ch = DEC (p[2]) << 6 | DEC (p[3]);
|
||||
putchar (ch);
|
||||
} else {
|
||||
if (n >= 1) {
|
||||
ch = DEC (p[0]) << 2 | DEC (p[1]) >> 4;
|
||||
putchar (ch);
|
||||
}
|
||||
if (n >= 2) {
|
||||
ch = DEC (p[1]) << 4 | DEC (p[2]) >> 2;
|
||||
putchar (ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (length > 0) {
|
||||
/* Merge four 6 bit chars to three 8 bit chars */
|
||||
fputc(((line_ptr[0] - 0x20) & 077) << 2 | ((line_ptr[1] - 0x20) & 077) >> 4, dst_stream);
|
||||
line_ptr++;
|
||||
length--;
|
||||
if (length == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (fgets (buf, sizeof(buf), stdin) == NULL
|
||||
|| strcmp (buf, "end\n")) {
|
||||
bb_error_msg("%s: No `end' line", inname);
|
||||
return FALSE;
|
||||
}
|
||||
fputc(((line_ptr[0] - 0x20) & 077) << 4 | ((line_ptr[1] - 0x20) & 077) >> 2, dst_stream);
|
||||
line_ptr++;
|
||||
length--;
|
||||
if (length == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
fputc(((line_ptr[0] - 0x20) & 077) << 6 | ((line_ptr[1] - 0x20) & 077), dst_stream);
|
||||
line_ptr += 2;
|
||||
length -= 2;
|
||||
}
|
||||
free(line);
|
||||
}
|
||||
bb_error_msg_and_die("Short file");
|
||||
}
|
||||
|
||||
static int read_base64 (const char *inname)
|
||||
static int read_base64(FILE *src_stream, FILE *dst_stream)
|
||||
{
|
||||
static const char b64_tab[256] = {
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*000-007*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*010-017*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*020-027*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*030-037*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*040-047*/
|
||||
'\177', '\177', '\177', '\76', '\177', '\177', '\177', '\77', /*050-057*/
|
||||
'\64', '\65', '\66', '\67', '\70', '\71', '\72', '\73', /*060-067*/
|
||||
'\74', '\75', '\177', '\177', '\177', '\100', '\177', '\177', /*070-077*/
|
||||
'\177', '\0', '\1', '\2', '\3', '\4', '\5', '\6', /*100-107*/
|
||||
'\7', '\10', '\11', '\12', '\13', '\14', '\15', '\16', /*110-117*/
|
||||
'\17', '\20', '\21', '\22', '\23', '\24', '\25', '\26', /*120-127*/
|
||||
'\27', '\30', '\31', '\177', '\177', '\177', '\177', '\177', /*130-137*/
|
||||
'\177', '\32', '\33', '\34', '\35', '\36', '\37', '\40', /*140-147*/
|
||||
'\41', '\42', '\43', '\44', '\45', '\46', '\47', '\50', /*150-157*/
|
||||
'\51', '\52', '\53', '\54', '\55', '\56', '\57', '\60', /*160-167*/
|
||||
'\61', '\62', '\63', '\177', '\177', '\177', '\177', '\177', /*170-177*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*200-207*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*210-217*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*220-227*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*230-237*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*240-247*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*250-257*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*260-267*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*270-277*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*300-307*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*310-317*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*320-327*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*330-337*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*340-347*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*350-357*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*360-367*/
|
||||
'\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*370-377*/
|
||||
};
|
||||
unsigned char buf[2 * BUFSIZ];
|
||||
const char *base64_table =
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n";
|
||||
char term_count = 0;
|
||||
|
||||
while (1) {
|
||||
int last_data = 0;
|
||||
unsigned char *p;
|
||||
while (1) {
|
||||
char translated[4];
|
||||
int count = 0;
|
||||
|
||||
if (fgets (buf, sizeof(buf), stdin) == NULL) {
|
||||
bb_error_msg("%s: Short file", inname);
|
||||
return FALSE;
|
||||
}
|
||||
p = buf;
|
||||
while (count < 4) {
|
||||
char *table_ptr;
|
||||
char ch;
|
||||
|
||||
if (memcmp (buf, "====", 4) == 0)
|
||||
break;
|
||||
if (last_data != 0) {
|
||||
bb_error_msg("%s: data following `=' padding character", inname);
|
||||
return FALSE;
|
||||
}
|
||||
/* Get next _valid_ character */
|
||||
do {
|
||||
ch = fgetc(src_stream);
|
||||
if (ch == EOF) {
|
||||
bb_error_msg_and_die("Short file");
|
||||
}
|
||||
} while ((table_ptr = strchr(base64_table, ch)) == NULL);
|
||||
|
||||
/* The following implementation of the base64 decoding might look
|
||||
a bit clumsy but I only try to follow the POSIX standard:
|
||||
``All line breaks or other characters not found in the table
|
||||
[with base64 characters] shall be ignored by decoding
|
||||
software.'' */
|
||||
while (*p != '\n') {
|
||||
char c1, c2, c3;
|
||||
/* Convert encoded charcter to decimal */
|
||||
ch = table_ptr - base64_table;
|
||||
|
||||
while ((b64_tab[*p] & '\100') != 0)
|
||||
if (*p == '\n' || *p++ == '=')
|
||||
break;
|
||||
if (*p == '\n')
|
||||
/* This leaves the loop. */
|
||||
continue;
|
||||
c1 = b64_tab[*p++];
|
||||
if (*table_ptr == '=') {
|
||||
if (term_count == 0) {
|
||||
translated[count] = 0;
|
||||
break;
|
||||
}
|
||||
term_count++;
|
||||
}
|
||||
else if (*table_ptr == '\n') {
|
||||
/* Check for terminating line */
|
||||
if (term_count == 5) {
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
term_count = 1;
|
||||
continue;
|
||||
} else {
|
||||
translated[count] = ch;
|
||||
count++;
|
||||
term_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
while ((b64_tab[*p] & '\100') != 0)
|
||||
if (*p == '\n' || *p++ == '=') {
|
||||
bb_error_msg("%s: illegal line", inname);
|
||||
return FALSE;
|
||||
}
|
||||
c2 = b64_tab[*p++];
|
||||
|
||||
while (b64_tab[*p] == '\177')
|
||||
if (*p++ == '\n') {
|
||||
bb_error_msg("%s: illegal line", inname);
|
||||
return FALSE;
|
||||
}
|
||||
if (*p == '=') {
|
||||
putchar (c1 << 2 | c2 >> 4);
|
||||
last_data = 1;
|
||||
break;
|
||||
}
|
||||
c3 = b64_tab[*p++];
|
||||
|
||||
while (b64_tab[*p] == '\177')
|
||||
if (*p++ == '\n') {
|
||||
bb_error_msg("%s: illegal line", inname);
|
||||
return FALSE;
|
||||
}
|
||||
putchar (c1 << 2 | c2 >> 4);
|
||||
putchar (c2 << 4 | c3 >> 2);
|
||||
if (*p == '=') {
|
||||
last_data = 1;
|
||||
break;
|
||||
}
|
||||
else
|
||||
putchar (c3 << 6 | b64_tab[*p++]);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
/* Merge 6 bit chars to 8 bit */
|
||||
fputc(translated[0] << 2 | translated[1] >> 4, dst_stream);
|
||||
if (count > 2) {
|
||||
fputc(translated[1] << 4 | translated[2] >> 2, dst_stream);
|
||||
}
|
||||
if (count > 3) {
|
||||
fputc(translated[2] << 6 | translated[3], dst_stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int decode (const char *inname,
|
||||
const char *forced_outname)
|
||||
extern int uudecode_main(int argc, char **argv)
|
||||
{
|
||||
struct passwd *pw;
|
||||
register char *p;
|
||||
int mode;
|
||||
char buf[2 * BUFSIZ];
|
||||
char *outname;
|
||||
int do_base64 = 0;
|
||||
int res;
|
||||
int dofre;
|
||||
int (*decode_fn_ptr) (FILE * src, FILE * dst);
|
||||
FILE *src_stream;
|
||||
char *outname = NULL;
|
||||
char *line;
|
||||
int opt;
|
||||
|
||||
/* Search for header line. */
|
||||
opt = bb_getopt_ulflags(argc, argv, "o:", &outname);
|
||||
|
||||
while (1) {
|
||||
if (fgets (buf, sizeof (buf), stdin) == NULL) {
|
||||
bb_error_msg("%s: No `begin' line", inname);
|
||||
return FALSE;
|
||||
}
|
||||
if (optind == argc) {
|
||||
src_stream = stdin;
|
||||
} else if (optind + 1 == argc) {
|
||||
src_stream = bb_xfopen(argv[optind], "r");
|
||||
} else {
|
||||
bb_show_usage();
|
||||
}
|
||||
|
||||
if (strncmp (buf, "begin", 5) == 0) {
|
||||
if (sscanf (buf, "begin-base64 %o %s", &mode, buf) == 2) {
|
||||
do_base64 = 1;
|
||||
break;
|
||||
} else if (sscanf (buf, "begin %o %s", &mode, buf) == 2)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Search for the start of the encoding */
|
||||
while ((line = bb_get_chomped_line_from_file(src_stream)) != NULL) {
|
||||
char *line_ptr = NULL;
|
||||
|
||||
/* If the output file name is given on the command line this rules. */
|
||||
dofre = FALSE;
|
||||
if (forced_outname != NULL)
|
||||
outname = (char *) forced_outname;
|
||||
else {
|
||||
/* Handle ~user/file format. */
|
||||
if (buf[0] != '~')
|
||||
outname = buf;
|
||||
else {
|
||||
p = buf + 1;
|
||||
while (*p != '/')
|
||||
++p;
|
||||
if (*p == '\0') {
|
||||
bb_error_msg("%s: Illegal ~user", inname);
|
||||
return FALSE;
|
||||
}
|
||||
*p++ = '\0';
|
||||
pw = getpwnam (buf + 1);
|
||||
if (pw == NULL) {
|
||||
bb_error_msg("%s: No user `%s'", inname, buf + 1);
|
||||
return FALSE;
|
||||
}
|
||||
outname = concat_path_file(pw->pw_dir, p);
|
||||
dofre = TRUE;
|
||||
}
|
||||
}
|
||||
if (line == NULL) {
|
||||
break;
|
||||
} else if (strncmp(line, "begin-base64 ", 13) == 0) {
|
||||
line_ptr = line + 13;
|
||||
decode_fn_ptr = read_base64;
|
||||
} else if (strncmp(line, "begin ", 6) == 0) {
|
||||
line_ptr = line + 6;
|
||||
decode_fn_ptr = read_stduu;
|
||||
}
|
||||
|
||||
/* Create output file and set mode. */
|
||||
if (strcmp (outname, "/dev/stdout") != 0 && strcmp (outname, "-") != 0
|
||||
&& (freopen (outname, "w", stdout) == NULL
|
||||
|| chmod (outname, mode & (S_IRWXU | S_IRWXG | S_IRWXO))
|
||||
)) {
|
||||
bb_perror_msg("%s", outname); /* */
|
||||
if (dofre)
|
||||
free(outname);
|
||||
return FALSE;
|
||||
}
|
||||
if (line_ptr) {
|
||||
FILE *dst_stream;
|
||||
int mode;
|
||||
int ret;
|
||||
|
||||
/* We differenciate decoding standard UU encoding and base64. A
|
||||
common function would only slow down the program. */
|
||||
|
||||
/* For each input line: */
|
||||
if (do_base64)
|
||||
res = read_base64 (inname);
|
||||
else
|
||||
res = read_stduu (inname);
|
||||
if (dofre)
|
||||
free(outname);
|
||||
return res;
|
||||
mode = strtoul(line_ptr, NULL, 8);
|
||||
if (outname == NULL) {
|
||||
outname = strchr(line_ptr, ' ');
|
||||
if ((outname == NULL) || (*outname == '\0')) {
|
||||
break;
|
||||
}
|
||||
outname++;
|
||||
}
|
||||
if (strcmp(outname, "-") == 0) {
|
||||
dst_stream = stdout;
|
||||
} else {
|
||||
dst_stream = bb_xfopen(outname, "w");
|
||||
chmod(outname, mode & (S_IRWXU | S_IRWXG | S_IRWXO));
|
||||
}
|
||||
free(line);
|
||||
ret = decode_fn_ptr(src_stream, dst_stream);
|
||||
bb_fclose_nonstdin(src_stream);
|
||||
return(ret);
|
||||
}
|
||||
free(line);
|
||||
}
|
||||
bb_error_msg_and_die("No `begin' line");
|
||||
}
|
||||
|
||||
int uudecode_main (int argc,
|
||||
char **argv)
|
||||
{
|
||||
int opt;
|
||||
int exit_status;
|
||||
const char *outname;
|
||||
outname = NULL;
|
||||
|
||||
while ((opt = getopt(argc, argv, "o:")) != EOF) {
|
||||
switch (opt) {
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
outname = optarg;
|
||||
break;
|
||||
|
||||
default:
|
||||
bb_show_usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (optind == argc)
|
||||
exit_status = decode ("stdin", outname) == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
else {
|
||||
exit_status = EXIT_SUCCESS;
|
||||
do {
|
||||
if (freopen (argv[optind], "r", stdin) != NULL) {
|
||||
if (decode (argv[optind], outname) != 0)
|
||||
exit_status = FALSE;
|
||||
} else {
|
||||
bb_perror_msg("%s", argv[optind]);
|
||||
exit_status = EXIT_FAILURE;
|
||||
}
|
||||
optind++;
|
||||
}
|
||||
while (optind < argc);
|
||||
}
|
||||
return(exit_status);
|
||||
}
|
||||
|
||||
/* Copyright (c) 1983 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. <BSD Advertising Clause omitted per the July 22, 1999 licensing change
|
||||
* ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change>
|
||||
*
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
Vendored
+122
-3
@@ -1,9 +1,129 @@
|
||||
busybox-cvs (0.60.99.cvs20030819-3) unstable; urgency=low
|
||||
|
||||
* shell/ash.c
|
||||
- fix signal handling (upstream)
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Mon, 15 Sep 2003 18:12:09 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030819-2) unstable; urgency=low
|
||||
|
||||
* Fix configure permisions
|
||||
* Set source Section to embedded
|
||||
|
||||
-- Glenn McGrath <bug1@debian.org> Mon, 25 Aug 2003 06:33:19 +0000
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030819-1) unstable; urgency=low
|
||||
|
||||
* new cvs version
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Tue, 19 Aug 2003 13:18:54 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-10) unstable; urgency=low
|
||||
|
||||
* archival/libunarchive/*
|
||||
- add hardlink support (pending)
|
||||
* debian/config-*udeb*
|
||||
- add support for oldgnu tar format
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Tue, 10 Jun 2003 12:06:41 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-9) unstable; urgency=low
|
||||
|
||||
* modutils/depmod.c
|
||||
- fix base_dir for modules.dep
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Sat, 07 Jun 2003 14:52:54 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-8) unstable; urgency=low
|
||||
|
||||
* util-linux/fdisk.c
|
||||
- fix syscalls. (pending)
|
||||
* libpwd/*
|
||||
- don't build setgroups.o
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Tue, 03 Jun 2003 11:26:28 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-7) unstable; urgency=low
|
||||
|
||||
* libbb/*syscallc.c
|
||||
- fix syscalls. (upstream) (closes: #194631)
|
||||
* modutils/*
|
||||
- update complete objects code from upstream. (pending)
|
||||
* debian/config-*udeb*
|
||||
- update to busybox-applets.txt:1.14
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Thu, 29 May 2003 16:17:14 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-6) unstable; urgency=low
|
||||
|
||||
* modutils/Makefile.in
|
||||
- don't build anything if deactivated
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Sat, 24 May 2003 18:57:14 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-5) unstable; urgency=low
|
||||
|
||||
* debian/config-*udeb*
|
||||
- revert changes (closes: #192717, #192753)
|
||||
- readd initrd support (workaround)
|
||||
- make init quiet
|
||||
* archival/tar.c
|
||||
- fix usage of tar -O (upstream) (closes: #193788)
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Sat, 24 May 2003 13:25:36 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-4) unstable; urgency=low
|
||||
|
||||
* debian/config-*udeb*
|
||||
- update to busybox-applets.txt:1.12
|
||||
* debian/rules
|
||||
- use system instead of arch to determine which config file to use
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Fri, 09 May 2003 11:21:13 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-3) unstable; urgency=low
|
||||
|
||||
* debian/config-udeb*
|
||||
- update to busybox-applets.txt:1.11
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Wed, 07 May 2003 10:37:40 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-2) unstable; urgency=low
|
||||
|
||||
* modutils/*
|
||||
- modprobe failes gracefully if the module is already loaded. (pending)
|
||||
- implement depmod. (pending)
|
||||
* debian/config*
|
||||
- update
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Wed, 30 Apr 2003 14:12:36 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030426-1) unstable; urgency=low
|
||||
|
||||
* new cvs version
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Sat, 26 Apr 2003 18:33:17 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030420-4) unstable; urgency=low
|
||||
|
||||
* network/libiproute/iproute.c
|
||||
- fix usage of ip route flush (upstream)
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Fri, 25 Apr 2003 16:48:43 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030420-3) unstable; urgency=low
|
||||
|
||||
* debian/config-*udeb*
|
||||
- update to busybox-applets.txt:1.10
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Fri, 25 Apr 2003 14:03:23 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030420-2) unstable; urgency=low
|
||||
|
||||
* archival/tar.c
|
||||
* archival/tar.c, archival/libunarchive/data_extract_all.c
|
||||
- unlink files first (upstream patch)
|
||||
|
||||
-- Bastian Blank <waldi@debian.org> Mon, 21 Apr 2003 12:06:57 +0200
|
||||
-- Bastian Blank <waldi@debian.org> Mon, 21 Apr 2003 12:42:06 +0200
|
||||
|
||||
busybox-cvs (0.60.99.cvs20030420-1) unstable; urgency=low
|
||||
|
||||
@@ -286,4 +406,3 @@ busybox (0.45-1) unstable; urgency=low
|
||||
(i.e. when libc gets screwed up.)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Tue, 27 Jun 2000 12:26:41 -0600
|
||||
|
||||
Vendored
+12
-8
@@ -16,6 +16,7 @@ CONFIG_FEATURE_INSTALLER=y
|
||||
# CONFIG_FEATURE_DEVPTS is not set
|
||||
# CONFIG_FEATURE_CLEAN_UP is not set
|
||||
# CONFIG_FEATURE_SUID is not set
|
||||
# CONFIG_SELINUX is not set
|
||||
|
||||
#
|
||||
# Build Options
|
||||
@@ -80,10 +81,12 @@ CONFIG_FEATURE_FANCY_ECHO=y
|
||||
# CONFIG_ENV is not set
|
||||
CONFIG_EXPR=y
|
||||
CONFIG_FALSE=y
|
||||
# CONFIG_FOLD is not set
|
||||
CONFIG_HEAD=y
|
||||
# CONFIG_FEATURE_FANCY_HEAD is not set
|
||||
# CONFIG_HOSTID is not set
|
||||
CONFIG_ID=y
|
||||
# CONFIG_INSTALL is not set
|
||||
# CONFIG_LENGTH is not set
|
||||
CONFIG_LN=y
|
||||
# CONFIG_LOGNAME is not set
|
||||
@@ -155,7 +158,6 @@ CONFIG_FEATURE_HUMAN_READABLE=y
|
||||
CONFIG_CLEAR=y
|
||||
# CONFIG_DEALLOCVT is not set
|
||||
# CONFIG_DUMPKMAP is not set
|
||||
# CONFIG_LOADACM is not set
|
||||
# CONFIG_LOADFONT is not set
|
||||
CONFIG_LOADKMAP=y
|
||||
# CONFIG_OPENVT is not set
|
||||
@@ -168,14 +170,17 @@ CONFIG_RESET=y
|
||||
# CONFIG_MKTEMP is not set
|
||||
# CONFIG_READLINK is not set
|
||||
# CONFIG_RUN_PARTS is not set
|
||||
# CONFIG_START_STOP_DAEMON is not set
|
||||
CONFIG_WHICH=y
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
# CONFIG_AWK is not set
|
||||
# CONFIG_PATCH is not set
|
||||
CONFIG_SED=y
|
||||
# CONFIG_FEATURE_SED_EMBEDED_NEWLINE is not set
|
||||
CONFIG_FEATURE_SED_GNU_COMPATABILITY=y
|
||||
# CONFIG_VI is not set
|
||||
|
||||
#
|
||||
@@ -190,6 +195,7 @@ CONFIG_FEATURE_FIND_NEWER=y
|
||||
CONFIG_FEATURE_FIND_INUM=y
|
||||
CONFIG_GREP=y
|
||||
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
|
||||
CONFIG_FEATURE_GREP_FGREP_ALIAS=y
|
||||
# CONFIG_FEATURE_GREP_CONTEXT is not set
|
||||
# CONFIG_XARGS is not set
|
||||
|
||||
@@ -204,7 +210,6 @@ CONFIG_FEATURE_INITRD=y
|
||||
CONFIG_HALT=y
|
||||
CONFIG_POWEROFF=y
|
||||
CONFIG_REBOOT=y
|
||||
# CONFIG_START_STOP_DAEMON is not set
|
||||
# CONFIG_MESG is not set
|
||||
|
||||
#
|
||||
@@ -229,17 +234,18 @@ CONFIG_REBOOT=y
|
||||
# CONFIG_CROND is not set
|
||||
# CONFIG_CRONTAB is not set
|
||||
# CONFIG_DC is not set
|
||||
# CONFIG_DUTMP is not set
|
||||
# CONFIG_LAST is not set
|
||||
# CONFIG_HDPARM is not set
|
||||
# CONFIG_MAKEDEVS is not set
|
||||
# CONFIG_MT is not set
|
||||
# CONFIG_STRINGS is not set
|
||||
# CONFIG_TIME is not set
|
||||
# CONFIG_UPDATE is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Linux Module Utilities
|
||||
#
|
||||
# CONFIG_DEPMOD is not set
|
||||
# CONFIG_INSMOD is not set
|
||||
# CONFIG_LSMOD is not set
|
||||
# CONFIG_MODPROBE is not set
|
||||
@@ -283,6 +289,7 @@ CONFIG_ROUTE=y
|
||||
CONFIG_WGET=y
|
||||
CONFIG_FEATURE_WGET_STATUSBAR=y
|
||||
CONFIG_FEATURE_WGET_AUTHENTICATION=y
|
||||
# CONFIG_FEATURE_WGET_IP6_LITERAL is not set
|
||||
|
||||
#
|
||||
# udhcp Server/Client
|
||||
@@ -330,6 +337,7 @@ CONFIG_LOGGER=y
|
||||
CONFIG_DMESG=y
|
||||
# CONFIG_FBSET is not set
|
||||
# CONFIG_FDFLUSH is not set
|
||||
# CONFIG_FDFORMAT is not set
|
||||
# CONFIG_FDISK is not set
|
||||
# CONFIG_FREERAMDISK is not set
|
||||
# CONFIG_FSCK_MINIX is not set
|
||||
@@ -341,10 +349,6 @@ CONFIG_LOSETUP=y
|
||||
CONFIG_MKSWAP=y
|
||||
CONFIG_MORE=y
|
||||
CONFIG_FEATURE_USE_TERMIOS=y
|
||||
|
||||
#
|
||||
# Common options for ls and more
|
||||
#
|
||||
# CONFIG_PIVOT_ROOT is not set
|
||||
# CONFIG_RDATE is not set
|
||||
CONFIG_SWAPONOFF=y
|
||||
|
||||
Vendored
-369
@@ -1,369 +0,0 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
#
|
||||
HAVE_DOT_CONFIG=y
|
||||
|
||||
#
|
||||
# General Configuration
|
||||
#
|
||||
# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
|
||||
CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
|
||||
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
|
||||
# CONFIG_FEATURE_VERBOSE_USAGE is not set
|
||||
# CONFIG_FEATURE_INSTALLER is not set
|
||||
# CONFIG_LOCALE_SUPPORT is not set
|
||||
CONFIG_FEATURE_DEVFS=y
|
||||
CONFIG_FEATURE_DEVPTS=y
|
||||
# CONFIG_FEATURE_CLEAN_UP is not set
|
||||
# CONFIG_FEATURE_SUID is not set
|
||||
|
||||
#
|
||||
# Build Options
|
||||
#
|
||||
# CONFIG_STATIC is not set
|
||||
# CONFIG_LFS is not set
|
||||
# USING_CROSS_COMPILER is not set
|
||||
EXTRA_CFLAGS_OPTIONS=""
|
||||
|
||||
#
|
||||
# Installation Options
|
||||
#
|
||||
# CONFIG_INSTALL_NO_USR is not set
|
||||
PREFIX="./_install"
|
||||
|
||||
#
|
||||
# Archival Utilities
|
||||
#
|
||||
CONFIG_AR=y
|
||||
# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
|
||||
# CONFIG_BUNZIP2 is not set
|
||||
# CONFIG_CPIO is not set
|
||||
# CONFIG_DPKG is not set
|
||||
# CONFIG_DPKG_DEB is not set
|
||||
CONFIG_GUNZIP=y
|
||||
# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
|
||||
# CONFIG_GZIP is not set
|
||||
# CONFIG_RPM2CPIO is not set
|
||||
# CONFIG_RPM is not set
|
||||
CONFIG_TAR=y
|
||||
# CONFIG_FEATURE_TAR_CREATE is not set
|
||||
# CONFIG_FEATURE_TAR_BZIP2 is not set
|
||||
# CONFIG_FEATURE_TAR_EXCLUDE is not set
|
||||
CONFIG_FEATURE_TAR_GZIP=y
|
||||
# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set
|
||||
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
|
||||
# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
|
||||
# CONFIG_UNCOMPRESS is not set
|
||||
# CONFIG_UNZIP is not set
|
||||
|
||||
#
|
||||
# Coreutils
|
||||
#
|
||||
# CONFIG_BASENAME is not set
|
||||
# CONFIG_CAL is not set
|
||||
CONFIG_CAT=y
|
||||
# CONFIG_CHGRP is not set
|
||||
# CONFIG_CHMOD is not set
|
||||
CONFIG_CHOWN=y
|
||||
CONFIG_CHROOT=y
|
||||
# CONFIG_CMP is not set
|
||||
# CONFIG_CP is not set
|
||||
CONFIG_CUT=y
|
||||
# CONFIG_DATE is not set
|
||||
# CONFIG_DD is not set
|
||||
# CONFIG_DF is not set
|
||||
# CONFIG_DIRNAME is not set
|
||||
# CONFIG_DOS2UNIX is not set
|
||||
# CONFIG_DU is not set
|
||||
CONFIG_ECHO=y
|
||||
# CONFIG_FEATURE_FANCY_ECHO is not set
|
||||
# CONFIG_ENV is not set
|
||||
# CONFIG_EXPR is not set
|
||||
CONFIG_FALSE=y
|
||||
# CONFIG_HEAD is not set
|
||||
# CONFIG_HOSTID is not set
|
||||
# CONFIG_ID is not set
|
||||
# CONFIG_LENGTH is not set
|
||||
CONFIG_LN=y
|
||||
# CONFIG_LOGNAME is not set
|
||||
# CONFIG_LS is not set
|
||||
CONFIG_MD5SUM=y
|
||||
CONFIG_MKDIR=y
|
||||
# CONFIG_MKFIFO is not set
|
||||
# CONFIG_MKNOD is not set
|
||||
# CONFIG_MV is not set
|
||||
# CONFIG_OD is not set
|
||||
# CONFIG_PRINTF is not set
|
||||
# CONFIG_PWD is not set
|
||||
# CONFIG_REALPATH is not set
|
||||
CONFIG_RM=y
|
||||
# CONFIG_RMDIR is not set
|
||||
# CONFIG_SHA1SUM is not set
|
||||
# CONFIG_SLEEP is not set
|
||||
# CONFIG_SORT is not set
|
||||
# CONFIG_STTY is not set
|
||||
CONFIG_SYNC=y
|
||||
# CONFIG_TAIL is not set
|
||||
# CONFIG_TEE is not set
|
||||
CONFIG_TEST=y
|
||||
|
||||
#
|
||||
# test (forced enabled for use with shell)
|
||||
#
|
||||
CONFIG_TOUCH=y
|
||||
# CONFIG_TR is not set
|
||||
CONFIG_TRUE=y
|
||||
# CONFIG_TTY is not set
|
||||
# CONFIG_UNAME is not set
|
||||
# CONFIG_UNIQ is not set
|
||||
# CONFIG_USLEEP is not set
|
||||
# CONFIG_UUDECODE is not set
|
||||
# CONFIG_UUENCODE is not set
|
||||
# CONFIG_WATCH is not set
|
||||
# CONFIG_WC is not set
|
||||
# CONFIG_WHO is not set
|
||||
# CONFIG_WHOAMI is not set
|
||||
# CONFIG_YES is not set
|
||||
|
||||
#
|
||||
# Console Utilities
|
||||
#
|
||||
# CONFIG_CHVT is not set
|
||||
# CONFIG_CLEAR is not set
|
||||
# CONFIG_DEALLOCVT is not set
|
||||
# CONFIG_DUMPKMAP is not set
|
||||
# CONFIG_LOADACM is not set
|
||||
# CONFIG_LOADFONT is not set
|
||||
# CONFIG_LOADKMAP is not set
|
||||
# CONFIG_OPENVT is not set
|
||||
# CONFIG_RESET is not set
|
||||
# CONFIG_SETKEYCODES is not set
|
||||
|
||||
#
|
||||
# Debian Utilities
|
||||
#
|
||||
# CONFIG_MKTEMP is not set
|
||||
# CONFIG_READLINK is not set
|
||||
# CONFIG_RUN_PARTS is not set
|
||||
# CONFIG_WHICH is not set
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
# CONFIG_AWK is not set
|
||||
CONFIG_SED=y
|
||||
# CONFIG_FEATURE_SED_EMBEDED_NEWLINE is not set
|
||||
# CONFIG_VI is not set
|
||||
|
||||
#
|
||||
# Finding Utilities
|
||||
#
|
||||
# CONFIG_FIND is not set
|
||||
CONFIG_GREP=y
|
||||
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_CONTEXT is not set
|
||||
# CONFIG_XARGS is not set
|
||||
|
||||
#
|
||||
# Init Utilities
|
||||
#
|
||||
CONFIG_INIT=y
|
||||
CONFIG_FEATURE_USE_INITTAB=y
|
||||
# CONFIG_FEATURE_INITRD is not set
|
||||
# CONFIG_FEATURE_INIT_COREDUMPS is not set
|
||||
# CONFIG_FEATURE_EXTRA_QUIET is not set
|
||||
# CONFIG_HALT is not set
|
||||
# CONFIG_POWEROFF is not set
|
||||
CONFIG_REBOOT=y
|
||||
# CONFIG_START_STOP_DAEMON is not set
|
||||
# CONFIG_MESG is not set
|
||||
|
||||
#
|
||||
# Login/Password Management Utilities
|
||||
#
|
||||
CONFIG_USE_BB_PWD_GRP=y
|
||||
# CONFIG_ADDGROUP is not set
|
||||
# CONFIG_DELGROUP is not set
|
||||
# CONFIG_ADDUSER is not set
|
||||
# CONFIG_DELUSER is not set
|
||||
# CONFIG_GETTY is not set
|
||||
# CONFIG_LOGIN is not set
|
||||
# CONFIG_PASSWD is not set
|
||||
# CONFIG_SU is not set
|
||||
# CONFIG_SULOGIN is not set
|
||||
# CONFIG_VLOCK is not set
|
||||
|
||||
#
|
||||
# Miscellaneous Utilities
|
||||
#
|
||||
# CONFIG_ADJTIMEX is not set
|
||||
# CONFIG_CROND is not set
|
||||
# CONFIG_CRONTAB is not set
|
||||
# CONFIG_DC is not set
|
||||
# CONFIG_DUTMP is not set
|
||||
# CONFIG_MAKEDEVS is not set
|
||||
# CONFIG_MT is not set
|
||||
# CONFIG_STRINGS is not set
|
||||
# CONFIG_TIME is not set
|
||||
# CONFIG_UPDATE is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Linux Module Utilities
|
||||
#
|
||||
CONFIG_INSMOD=y
|
||||
# CONFIG_FEATURE_OLD_MODULE_INTERFACE is not set
|
||||
CONFIG_FEATURE_NEW_MODULE_INTERFACE=y
|
||||
|
||||
#
|
||||
# Support new (post 2.1) Linux kernels (Forced enabled)
|
||||
#
|
||||
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
|
||||
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
|
||||
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
|
||||
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
|
||||
# CONFIG_LSMOD is not set
|
||||
# CONFIG_MODPROBE is not set
|
||||
# CONFIG_RMMOD is not set
|
||||
# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set
|
||||
|
||||
#
|
||||
# Networking Utilities
|
||||
#
|
||||
# CONFIG_FEATURE_IPV6 is not set
|
||||
# CONFIG_ARPING is not set
|
||||
# CONFIG_FTPGET is not set
|
||||
# CONFIG_FTPPUT is not set
|
||||
# CONFIG_HOSTNAME is not set
|
||||
# CONFIG_HTTPD is not set
|
||||
# CONFIG_IFCONFIG is not set
|
||||
# CONFIG_IFUPDOWN is not set
|
||||
# CONFIG_INETD is not set
|
||||
CONFIG_IP=y
|
||||
CONFIG_FEATURE_IP_ADDRESS=y
|
||||
CONFIG_FEATURE_IP_LINK=y
|
||||
CONFIG_FEATURE_IP_ROUTE=y
|
||||
# CONFIG_FEATURE_IP_TUNNEL is not set
|
||||
# CONFIG_IPCALC is not set
|
||||
# CONFIG_IPADDR is not set
|
||||
# CONFIG_IPLINK is not set
|
||||
# CONFIG_IPROUTE is not set
|
||||
# CONFIG_IPTUNNEL is not set
|
||||
# CONFIG_NAMEIF is not set
|
||||
# CONFIG_NC is not set
|
||||
# CONFIG_NETSTAT is not set
|
||||
# CONFIG_NSLOOKUP is not set
|
||||
# CONFIG_PING is not set
|
||||
# CONFIG_ROUTE is not set
|
||||
# CONFIG_TELNET is not set
|
||||
# CONFIG_TELNETD is not set
|
||||
# CONFIG_TFTP is not set
|
||||
# CONFIG_TRACEROUTE is not set
|
||||
# CONFIG_VCONFIG is not set
|
||||
CONFIG_WGET=y
|
||||
# CONFIG_FEATURE_WGET_STATUSBAR is not set
|
||||
# CONFIG_FEATURE_WGET_AUTHENTICATION is not set
|
||||
|
||||
#
|
||||
# udhcp Server/Client
|
||||
#
|
||||
# CONFIG_UDHCPD is not set
|
||||
CONFIG_UDHCPC=y
|
||||
CONFIG_FEATURE_UDHCP_SYSLOG=y
|
||||
# CONFIG_FEATURE_UDHCP_DEBUG is not set
|
||||
|
||||
#
|
||||
# Process Utilities
|
||||
#
|
||||
# CONFIG_FREE is not set
|
||||
# CONFIG_KILL is not set
|
||||
# CONFIG_PIDOF is not set
|
||||
# CONFIG_PS is not set
|
||||
# CONFIG_RENICE is not set
|
||||
# CONFIG_TOP is not set
|
||||
# CONFIG_UPTIME is not set
|
||||
|
||||
#
|
||||
# Another Bourne-like Shell
|
||||
#
|
||||
CONFIG_FEATURE_SH_IS_ASH=y
|
||||
# CONFIG_FEATURE_SH_IS_HUSH is not set
|
||||
# CONFIG_FEATURE_SH_IS_LASH is not set
|
||||
# CONFIG_FEATURE_SH_IS_MSH is not set
|
||||
# CONFIG_FEATURE_SH_IS_NONE is not set
|
||||
CONFIG_ASH=y
|
||||
|
||||
#
|
||||
# ash (forced enabled as default shell)
|
||||
#
|
||||
|
||||
#
|
||||
# Ash Shell Options
|
||||
#
|
||||
CONFIG_ASH_JOB_CONTROL=y
|
||||
CONFIG_ASH_ALIAS=y
|
||||
CONFIG_ASH_MATH_SUPPORT=y
|
||||
# CONFIG_ASH_GETOPTS is not set
|
||||
# CONFIG_ASH_CMDCMD is not set
|
||||
# CONFIG_ASH_MAIL is not set
|
||||
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_HUSH is not set
|
||||
# CONFIG_LASH is not set
|
||||
# CONFIG_MSH is not set
|
||||
|
||||
#
|
||||
# Bourne Shell Options
|
||||
#
|
||||
CONFIG_FEATURE_COMMAND_EDITING=y
|
||||
# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set
|
||||
CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y
|
||||
# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set
|
||||
CONFIG_FEATURE_COMMAND_HISTORY=15
|
||||
# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set
|
||||
# CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN is not set
|
||||
# CONFIG_FEATURE_SH_FANCY_PROMPT is not set
|
||||
# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
|
||||
|
||||
#
|
||||
# System Logging Utilities
|
||||
#
|
||||
CONFIG_SYSLOGD=y
|
||||
# CONFIG_FEATURE_REMOTE_LOG is not set
|
||||
# CONFIG_FEATURE_IPC_SYSLOG is not set
|
||||
CONFIG_KLOGD=y
|
||||
# CONFIG_LOGGER is not set
|
||||
|
||||
#
|
||||
# Linux System Utilities
|
||||
#
|
||||
# CONFIG_DMESG is not set
|
||||
# CONFIG_FBSET is not set
|
||||
# CONFIG_FDFLUSH is not set
|
||||
# CONFIG_FDISK is not set
|
||||
# CONFIG_FREERAMDISK is not set
|
||||
# CONFIG_FSCK_MINIX is not set
|
||||
# CONFIG_MKFS_MINIX is not set
|
||||
# CONFIG_GETOPT is not set
|
||||
# CONFIG_HEXDUMP is not set
|
||||
# CONFIG_HWCLOCK is not set
|
||||
# CONFIG_LOSETUP is not set
|
||||
# CONFIG_MKSWAP is not set
|
||||
# CONFIG_MORE is not set
|
||||
CONFIG_PIVOT_ROOT=y
|
||||
# CONFIG_RDATE is not set
|
||||
# CONFIG_SWAPONOFF is not set
|
||||
CONFIG_MOUNT=y
|
||||
# CONFIG_NFSMOUNT is not set
|
||||
CONFIG_UMOUNT=y
|
||||
# CONFIG_FEATURE_MOUNT_FORCE is not set
|
||||
|
||||
#
|
||||
# Common options for mount/umount
|
||||
#
|
||||
# CONFIG_FEATURE_MOUNT_LOOP is not set
|
||||
# CONFIG_FEATURE_MTAB_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Debugging Options
|
||||
#
|
||||
# CONFIG_DEBUG is not set
|
||||
Vendored
-374
@@ -1,374 +0,0 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
#
|
||||
HAVE_DOT_CONFIG=y
|
||||
|
||||
#
|
||||
# General Configuration
|
||||
#
|
||||
# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
|
||||
CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
|
||||
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
|
||||
# CONFIG_FEATURE_VERBOSE_USAGE is not set
|
||||
# CONFIG_FEATURE_INSTALLER is not set
|
||||
# CONFIG_LOCALE_SUPPORT is not set
|
||||
CONFIG_FEATURE_DEVFS=y
|
||||
CONFIG_FEATURE_DEVPTS=y
|
||||
# CONFIG_FEATURE_CLEAN_UP is not set
|
||||
# CONFIG_FEATURE_SUID is not set
|
||||
|
||||
#
|
||||
# Build Options
|
||||
#
|
||||
# CONFIG_STATIC is not set
|
||||
CONFIG_LFS=y
|
||||
# USING_CROSS_COMPILER is not set
|
||||
EXTRA_CFLAGS_OPTIONS=""
|
||||
|
||||
#
|
||||
# Installation Options
|
||||
#
|
||||
# CONFIG_INSTALL_NO_USR is not set
|
||||
PREFIX="./_install"
|
||||
|
||||
#
|
||||
# Archival Utilities
|
||||
#
|
||||
CONFIG_AR=y
|
||||
# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
|
||||
# CONFIG_BUNZIP2 is not set
|
||||
# CONFIG_CPIO is not set
|
||||
# CONFIG_DPKG is not set
|
||||
# CONFIG_DPKG_DEB is not set
|
||||
CONFIG_GUNZIP=y
|
||||
# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
|
||||
# CONFIG_GZIP is not set
|
||||
# CONFIG_RPM2CPIO is not set
|
||||
# CONFIG_RPM is not set
|
||||
CONFIG_TAR=y
|
||||
# CONFIG_FEATURE_TAR_CREATE is not set
|
||||
# CONFIG_FEATURE_TAR_BZIP2 is not set
|
||||
# CONFIG_FEATURE_TAR_EXCLUDE is not set
|
||||
CONFIG_FEATURE_TAR_GZIP=y
|
||||
# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set
|
||||
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
|
||||
# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
|
||||
# CONFIG_UNCOMPRESS is not set
|
||||
# CONFIG_UNZIP is not set
|
||||
|
||||
#
|
||||
# Coreutils
|
||||
#
|
||||
# CONFIG_BASENAME is not set
|
||||
# CONFIG_CAL is not set
|
||||
CONFIG_CAT=y
|
||||
# CONFIG_CHGRP is not set
|
||||
# CONFIG_CHMOD is not set
|
||||
CONFIG_CHOWN=y
|
||||
CONFIG_CHROOT=y
|
||||
# CONFIG_CMP is not set
|
||||
# CONFIG_CP is not set
|
||||
CONFIG_CUT=y
|
||||
# CONFIG_DATE is not set
|
||||
# CONFIG_DD is not set
|
||||
# CONFIG_DF is not set
|
||||
# CONFIG_DIRNAME is not set
|
||||
# CONFIG_DOS2UNIX is not set
|
||||
# CONFIG_DU is not set
|
||||
CONFIG_ECHO=y
|
||||
CONFIG_FEATURE_FANCY_ECHO=y
|
||||
# CONFIG_ENV is not set
|
||||
# CONFIG_EXPR is not set
|
||||
CONFIG_FALSE=y
|
||||
# CONFIG_HEAD is not set
|
||||
# CONFIG_HOSTID is not set
|
||||
# CONFIG_ID is not set
|
||||
# CONFIG_LENGTH is not set
|
||||
CONFIG_LN=y
|
||||
# CONFIG_LOGNAME is not set
|
||||
# CONFIG_LS is not set
|
||||
CONFIG_MD5SUM=y
|
||||
CONFIG_MKDIR=y
|
||||
# CONFIG_MKFIFO is not set
|
||||
# CONFIG_MKNOD is not set
|
||||
# CONFIG_MV is not set
|
||||
# CONFIG_OD is not set
|
||||
# CONFIG_PRINTF is not set
|
||||
# CONFIG_PWD is not set
|
||||
# CONFIG_REALPATH is not set
|
||||
CONFIG_RM=y
|
||||
# CONFIG_RMDIR is not set
|
||||
# CONFIG_SHA1SUM is not set
|
||||
# CONFIG_SLEEP is not set
|
||||
# CONFIG_SORT is not set
|
||||
# CONFIG_STTY is not set
|
||||
CONFIG_SYNC=y
|
||||
# CONFIG_TAIL is not set
|
||||
# CONFIG_TEE is not set
|
||||
CONFIG_TEST=y
|
||||
|
||||
#
|
||||
# test (forced enabled for use with shell)
|
||||
#
|
||||
CONFIG_TOUCH=y
|
||||
# CONFIG_TR is not set
|
||||
CONFIG_TRUE=y
|
||||
# CONFIG_TTY is not set
|
||||
# CONFIG_UNAME is not set
|
||||
# CONFIG_UNIQ is not set
|
||||
# CONFIG_USLEEP is not set
|
||||
# CONFIG_UUDECODE is not set
|
||||
# CONFIG_UUENCODE is not set
|
||||
# CONFIG_WATCH is not set
|
||||
CONFIG_WC=y
|
||||
# CONFIG_WHO is not set
|
||||
# CONFIG_WHOAMI is not set
|
||||
# CONFIG_YES is not set
|
||||
|
||||
#
|
||||
# Console Utilities
|
||||
#
|
||||
# CONFIG_CHVT is not set
|
||||
# CONFIG_CLEAR is not set
|
||||
# CONFIG_DEALLOCVT is not set
|
||||
# CONFIG_DUMPKMAP is not set
|
||||
# CONFIG_LOADACM is not set
|
||||
# CONFIG_LOADFONT is not set
|
||||
# CONFIG_LOADKMAP is not set
|
||||
# CONFIG_OPENVT is not set
|
||||
# CONFIG_RESET is not set
|
||||
# CONFIG_SETKEYCODES is not set
|
||||
|
||||
#
|
||||
# Debian Utilities
|
||||
#
|
||||
# CONFIG_MKTEMP is not set
|
||||
# CONFIG_READLINK is not set
|
||||
# CONFIG_RUN_PARTS is not set
|
||||
# CONFIG_WHICH is not set
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
# CONFIG_AWK is not set
|
||||
CONFIG_SED=y
|
||||
# CONFIG_FEATURE_SED_EMBEDED_NEWLINE is not set
|
||||
# CONFIG_VI is not set
|
||||
|
||||
#
|
||||
# Finding Utilities
|
||||
#
|
||||
# CONFIG_FIND is not set
|
||||
CONFIG_GREP=y
|
||||
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_CONTEXT is not set
|
||||
# CONFIG_XARGS is not set
|
||||
|
||||
#
|
||||
# Init Utilities
|
||||
#
|
||||
CONFIG_INIT=y
|
||||
CONFIG_FEATURE_USE_INITTAB=y
|
||||
# CONFIG_FEATURE_INITRD is not set
|
||||
# CONFIG_FEATURE_INIT_COREDUMPS is not set
|
||||
# CONFIG_FEATURE_EXTRA_QUIET is not set
|
||||
# CONFIG_HALT is not set
|
||||
# CONFIG_POWEROFF is not set
|
||||
CONFIG_REBOOT=y
|
||||
# CONFIG_START_STOP_DAEMON is not set
|
||||
# CONFIG_MESG is not set
|
||||
|
||||
#
|
||||
# Login/Password Management Utilities
|
||||
#
|
||||
CONFIG_USE_BB_PWD_GRP=y
|
||||
# CONFIG_ADDGROUP is not set
|
||||
# CONFIG_DELGROUP is not set
|
||||
# CONFIG_ADDUSER is not set
|
||||
# CONFIG_DELUSER is not set
|
||||
# CONFIG_GETTY is not set
|
||||
# CONFIG_LOGIN is not set
|
||||
# CONFIG_PASSWD is not set
|
||||
# CONFIG_SU is not set
|
||||
# CONFIG_SULOGIN is not set
|
||||
# CONFIG_VLOCK is not set
|
||||
|
||||
#
|
||||
# Miscellaneous Utilities
|
||||
#
|
||||
# CONFIG_ADJTIMEX is not set
|
||||
# CONFIG_CROND is not set
|
||||
# CONFIG_CRONTAB is not set
|
||||
# CONFIG_DC is not set
|
||||
# CONFIG_DUTMP is not set
|
||||
# CONFIG_MAKEDEVS is not set
|
||||
# CONFIG_MT is not set
|
||||
# CONFIG_STRINGS is not set
|
||||
# CONFIG_TIME is not set
|
||||
# CONFIG_UPDATE is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Linux Module Utilities
|
||||
#
|
||||
CONFIG_INSMOD=y
|
||||
# CONFIG_FEATURE_OLD_MODULE_INTERFACE is not set
|
||||
CONFIG_FEATURE_NEW_MODULE_INTERFACE=y
|
||||
|
||||
#
|
||||
# Support new (post 2.1) Linux kernels (Forced enabled)
|
||||
#
|
||||
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
|
||||
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
|
||||
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
|
||||
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
|
||||
# CONFIG_LSMOD is not set
|
||||
# CONFIG_MODPROBE is not set
|
||||
# CONFIG_RMMOD is not set
|
||||
CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
|
||||
|
||||
#
|
||||
# Networking Utilities
|
||||
#
|
||||
# CONFIG_FEATURE_IPV6 is not set
|
||||
# CONFIG_ARPING is not set
|
||||
# CONFIG_FTPGET is not set
|
||||
# CONFIG_FTPPUT is not set
|
||||
# CONFIG_HOSTNAME is not set
|
||||
# CONFIG_HTTPD is not set
|
||||
CONFIG_IFCONFIG=y
|
||||
CONFIG_FEATURE_IFCONFIG_STATUS=y
|
||||
# CONFIG_FEATURE_IFCONFIG_SLIP is not set
|
||||
# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
|
||||
# CONFIG_FEATURE_IFCONFIG_HW is not set
|
||||
# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
|
||||
# CONFIG_IFUPDOWN is not set
|
||||
# CONFIG_INETD is not set
|
||||
CONFIG_IP=y
|
||||
CONFIG_FEATURE_IP_ADDRESS=y
|
||||
CONFIG_FEATURE_IP_LINK=y
|
||||
CONFIG_FEATURE_IP_ROUTE=y
|
||||
# CONFIG_FEATURE_IP_TUNNEL is not set
|
||||
# CONFIG_IPCALC is not set
|
||||
# CONFIG_IPADDR is not set
|
||||
# CONFIG_IPLINK is not set
|
||||
# CONFIG_IPROUTE is not set
|
||||
# CONFIG_IPTUNNEL is not set
|
||||
# CONFIG_NAMEIF is not set
|
||||
# CONFIG_NC is not set
|
||||
# CONFIG_NETSTAT is not set
|
||||
# CONFIG_NSLOOKUP is not set
|
||||
# CONFIG_PING is not set
|
||||
CONFIG_ROUTE=y
|
||||
# CONFIG_TELNET is not set
|
||||
# CONFIG_TELNETD is not set
|
||||
# CONFIG_TFTP is not set
|
||||
# CONFIG_TRACEROUTE is not set
|
||||
# CONFIG_VCONFIG is not set
|
||||
CONFIG_WGET=y
|
||||
# CONFIG_FEATURE_WGET_STATUSBAR is not set
|
||||
CONFIG_FEATURE_WGET_AUTHENTICATION=y
|
||||
|
||||
#
|
||||
# udhcp Server/Client
|
||||
#
|
||||
# CONFIG_UDHCPD is not set
|
||||
CONFIG_UDHCPC=y
|
||||
CONFIG_FEATURE_UDHCP_SYSLOG=y
|
||||
# CONFIG_FEATURE_UDHCP_DEBUG is not set
|
||||
|
||||
#
|
||||
# Process Utilities
|
||||
#
|
||||
# CONFIG_FREE is not set
|
||||
# CONFIG_KILL is not set
|
||||
# CONFIG_PIDOF is not set
|
||||
# CONFIG_PS is not set
|
||||
# CONFIG_RENICE is not set
|
||||
# CONFIG_TOP is not set
|
||||
# CONFIG_UPTIME is not set
|
||||
|
||||
#
|
||||
# Another Bourne-like Shell
|
||||
#
|
||||
CONFIG_FEATURE_SH_IS_ASH=y
|
||||
# CONFIG_FEATURE_SH_IS_HUSH is not set
|
||||
# CONFIG_FEATURE_SH_IS_LASH is not set
|
||||
# CONFIG_FEATURE_SH_IS_MSH is not set
|
||||
# CONFIG_FEATURE_SH_IS_NONE is not set
|
||||
CONFIG_ASH=y
|
||||
|
||||
#
|
||||
# ash (forced enabled as default shell)
|
||||
#
|
||||
|
||||
#
|
||||
# Ash Shell Options
|
||||
#
|
||||
# CONFIG_ASH_JOB_CONTROL is not set
|
||||
# CONFIG_ASH_ALIAS is not set
|
||||
CONFIG_ASH_MATH_SUPPORT=y
|
||||
# CONFIG_ASH_GETOPTS is not set
|
||||
# CONFIG_ASH_CMDCMD is not set
|
||||
# CONFIG_ASH_MAIL is not set
|
||||
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_HUSH is not set
|
||||
# CONFIG_LASH is not set
|
||||
# CONFIG_MSH is not set
|
||||
|
||||
#
|
||||
# Bourne Shell Options
|
||||
#
|
||||
CONFIG_FEATURE_COMMAND_EDITING=y
|
||||
# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set
|
||||
# CONFIG_FEATURE_COMMAND_TAB_COMPLETION is not set
|
||||
# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set
|
||||
CONFIG_FEATURE_COMMAND_HISTORY=15
|
||||
# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set
|
||||
# CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN is not set
|
||||
# CONFIG_FEATURE_SH_FANCY_PROMPT is not set
|
||||
# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
|
||||
|
||||
#
|
||||
# System Logging Utilities
|
||||
#
|
||||
CONFIG_SYSLOGD=y
|
||||
# CONFIG_FEATURE_REMOTE_LOG is not set
|
||||
# CONFIG_FEATURE_IPC_SYSLOG is not set
|
||||
CONFIG_KLOGD=y
|
||||
CONFIG_LOGGER=y
|
||||
|
||||
#
|
||||
# Linux System Utilities
|
||||
#
|
||||
# CONFIG_DMESG is not set
|
||||
# CONFIG_FBSET is not set
|
||||
# CONFIG_FDFLUSH is not set
|
||||
# CONFIG_FDISK is not set
|
||||
# CONFIG_FREERAMDISK is not set
|
||||
# CONFIG_FSCK_MINIX is not set
|
||||
# CONFIG_MKFS_MINIX is not set
|
||||
# CONFIG_GETOPT is not set
|
||||
# CONFIG_HEXDUMP is not set
|
||||
# CONFIG_HWCLOCK is not set
|
||||
# CONFIG_LOSETUP is not set
|
||||
# CONFIG_MKSWAP is not set
|
||||
# CONFIG_MORE is not set
|
||||
CONFIG_PIVOT_ROOT=y
|
||||
# CONFIG_RDATE is not set
|
||||
# CONFIG_SWAPONOFF is not set
|
||||
CONFIG_MOUNT=y
|
||||
# CONFIG_NFSMOUNT is not set
|
||||
CONFIG_UMOUNT=y
|
||||
CONFIG_FEATURE_MOUNT_FORCE=y
|
||||
|
||||
#
|
||||
# Common options for mount/umount
|
||||
#
|
||||
# CONFIG_FEATURE_MOUNT_LOOP is not set
|
||||
# CONFIG_FEATURE_MTAB_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Debugging Options
|
||||
#
|
||||
# CONFIG_DEBUG is not set
|
||||
Vendored
+17
-15
@@ -16,6 +16,7 @@ CONFIG_FEATURE_DEVFS=y
|
||||
CONFIG_FEATURE_DEVPTS=y
|
||||
# CONFIG_FEATURE_CLEAN_UP is not set
|
||||
# CONFIG_FEATURE_SUID is not set
|
||||
# CONFIG_SELINUX is not set
|
||||
|
||||
#
|
||||
# Build Options
|
||||
@@ -82,6 +83,7 @@ CONFIG_DD=y
|
||||
CONFIG_DF=y
|
||||
CONFIG_DIRNAME=y
|
||||
CONFIG_DOS2UNIX=y
|
||||
CONFIG_UNIX2DOS=y
|
||||
CONFIG_DU=y
|
||||
CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y
|
||||
CONFIG_ECHO=y
|
||||
@@ -89,10 +91,12 @@ CONFIG_FEATURE_FANCY_ECHO=y
|
||||
CONFIG_ENV=y
|
||||
CONFIG_EXPR=y
|
||||
CONFIG_FALSE=y
|
||||
# CONFIG_FOLD is not set
|
||||
CONFIG_HEAD=y
|
||||
# CONFIG_FEATURE_FANCY_HEAD is not set
|
||||
CONFIG_HOSTID=y
|
||||
CONFIG_ID=y
|
||||
# CONFIG_INSTALL is not set
|
||||
CONFIG_LENGTH=y
|
||||
CONFIG_LN=y
|
||||
CONFIG_LOGNAME=y
|
||||
@@ -169,7 +173,6 @@ CONFIG_CHVT=y
|
||||
CONFIG_CLEAR=y
|
||||
CONFIG_DEALLOCVT=y
|
||||
CONFIG_DUMPKMAP=y
|
||||
CONFIG_LOADACM=y
|
||||
CONFIG_LOADFONT=y
|
||||
CONFIG_LOADKMAP=y
|
||||
CONFIG_OPENVT=y
|
||||
@@ -182,6 +185,7 @@ CONFIG_SETKEYCODES=y
|
||||
CONFIG_MKTEMP=y
|
||||
CONFIG_READLINK=y
|
||||
CONFIG_RUN_PARTS=y
|
||||
CONFIG_START_STOP_DAEMON=y
|
||||
CONFIG_WHICH=y
|
||||
|
||||
#
|
||||
@@ -189,8 +193,10 @@ CONFIG_WHICH=y
|
||||
#
|
||||
CONFIG_AWK=y
|
||||
CONFIG_FEATURE_AWK_MATH=y
|
||||
CONFIG_PATCH=y
|
||||
CONFIG_SED=y
|
||||
# CONFIG_FEATURE_SED_EMBEDED_NEWLINE is not set
|
||||
CONFIG_FEATURE_SED_GNU_COMPATABILITY=y
|
||||
CONFIG_VI=y
|
||||
CONFIG_FEATURE_VI_COLON=y
|
||||
CONFIG_FEATURE_VI_YANKMARK=y
|
||||
@@ -215,6 +221,7 @@ CONFIG_FEATURE_FIND_NEWER=y
|
||||
CONFIG_FEATURE_FIND_INUM=y
|
||||
CONFIG_GREP=y
|
||||
CONFIG_FEATURE_GREP_EGREP_ALIAS=y
|
||||
CONFIG_FEATURE_GREP_FGREP_ALIAS=y
|
||||
CONFIG_FEATURE_GREP_CONTEXT=y
|
||||
CONFIG_XARGS=y
|
||||
|
||||
@@ -229,7 +236,6 @@ CONFIG_FEATURE_INITRD=y
|
||||
CONFIG_HALT=y
|
||||
CONFIG_POWEROFF=y
|
||||
CONFIG_REBOOT=y
|
||||
CONFIG_START_STOP_DAEMON=y
|
||||
CONFIG_MESG=y
|
||||
|
||||
#
|
||||
@@ -259,19 +265,21 @@ CONFIG_USE_BB_SHADOW=y
|
||||
#
|
||||
CONFIG_ADJTIMEX=y
|
||||
CONFIG_CROND=y
|
||||
CONFIG_FEATURE_CROND_CALL_SENDMAIL=y
|
||||
CONFIG_CRONTAB=y
|
||||
CONFIG_DC=y
|
||||
CONFIG_DUTMP=y
|
||||
CONFIG_LAST=y
|
||||
# CONFIG_HDPARM is not set
|
||||
CONFIG_MAKEDEVS=y
|
||||
CONFIG_MT=y
|
||||
CONFIG_STRINGS=y
|
||||
CONFIG_TIME=y
|
||||
CONFIG_UPDATE=y
|
||||
CONFIG_WATCHDOG=y
|
||||
|
||||
#
|
||||
# Linux Module Utilities
|
||||
#
|
||||
# CONFIG_DEPMOD is not set
|
||||
# CONFIG_INSMOD is not set
|
||||
# CONFIG_LSMOD is not set
|
||||
# CONFIG_MODPROBE is not set
|
||||
@@ -288,11 +296,11 @@ CONFIG_HOSTNAME=y
|
||||
CONFIG_HTTPD=y
|
||||
# CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY is not set
|
||||
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
|
||||
# CONFIG_FEATURE_HTTPD_CGI is not set
|
||||
# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
|
||||
# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
|
||||
# CONFIG_FEATURE_HTTPD_SETUID is not set
|
||||
# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
|
||||
# CONFIG_FEATURE_HTTPD_DECODE_URL_STR is not set
|
||||
# CONFIG_FEATURE_HTTPD_CGI is not set
|
||||
# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
|
||||
CONFIG_IFCONFIG=y
|
||||
CONFIG_FEATURE_IFCONFIG_STATUS=y
|
||||
@@ -302,6 +310,7 @@ CONFIG_FEATURE_IFCONFIG_HW=y
|
||||
CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
|
||||
CONFIG_IFUPDOWN=y
|
||||
# CONFIG_FEATURE_IFUPDOWN_IP is not set
|
||||
CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
|
||||
CONFIG_FEATURE_IFUPDOWN_IPV4=y
|
||||
CONFIG_FEATURE_IFUPDOWN_IPV6=y
|
||||
CONFIG_FEATURE_IFUPDOWN_IPX=y
|
||||
@@ -354,11 +363,11 @@ CONFIG_FEATURE_TFTP_BLOCKSIZE=y
|
||||
CONFIG_FEATURE_TFTP_DEBUG=y
|
||||
CONFIG_TRACEROUTE=y
|
||||
CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
|
||||
CONFIG_FEATURE_TRACEROUTE_SO_DEBUG=y
|
||||
# CONFIG_VCONFIG is not set
|
||||
CONFIG_WGET=y
|
||||
CONFIG_FEATURE_WGET_STATUSBAR=y
|
||||
CONFIG_FEATURE_WGET_AUTHENTICATION=y
|
||||
CONFIG_FEATURE_WGET_IP6_LITERAL=y
|
||||
|
||||
#
|
||||
# udhcp Server/Client
|
||||
@@ -392,10 +401,6 @@ CONFIG_FEATURE_SH_IS_ASH=y
|
||||
# CONFIG_FEATURE_SH_IS_NONE is not set
|
||||
CONFIG_ASH=y
|
||||
|
||||
#
|
||||
# ash (forced enabled as default shell)
|
||||
#
|
||||
|
||||
#
|
||||
# Ash Shell Options
|
||||
#
|
||||
@@ -441,6 +446,7 @@ CONFIG_FBSET=y
|
||||
CONFIG_FEATURE_FBSET_FANCY=y
|
||||
CONFIG_FEATURE_FBSET_READMODE=y
|
||||
CONFIG_FDFLUSH=y
|
||||
# CONFIG_FDFORMAT is not set
|
||||
CONFIG_FDISK=y
|
||||
CONFIG_FEATURE_FDISK_WRITABLE=y
|
||||
CONFIG_FEATURE_AIX_LABEL=y
|
||||
@@ -464,10 +470,6 @@ CONFIG_LOSETUP=y
|
||||
CONFIG_MKSWAP=y
|
||||
CONFIG_MORE=y
|
||||
CONFIG_FEATURE_USE_TERMIOS=y
|
||||
|
||||
#
|
||||
# Common options for ls and more
|
||||
#
|
||||
CONFIG_PIVOT_ROOT=y
|
||||
CONFIG_RDATE=y
|
||||
CONFIG_SWAPONOFF=y
|
||||
|
||||
Vendored
+15
-15
@@ -16,6 +16,7 @@ CONFIG_FEATURE_DEVFS=y
|
||||
CONFIG_FEATURE_DEVPTS=y
|
||||
# CONFIG_FEATURE_CLEAN_UP is not set
|
||||
# CONFIG_FEATURE_SUID is not set
|
||||
# CONFIG_SELINUX is not set
|
||||
|
||||
#
|
||||
# Build Options
|
||||
@@ -50,7 +51,7 @@ CONFIG_TAR=y
|
||||
# CONFIG_FEATURE_TAR_BZIP2 is not set
|
||||
# CONFIG_FEATURE_TAR_EXCLUDE is not set
|
||||
CONFIG_FEATURE_TAR_GZIP=y
|
||||
# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set
|
||||
CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y
|
||||
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
|
||||
# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
|
||||
# CONFIG_UNCOMPRESS is not set
|
||||
@@ -80,10 +81,12 @@ CONFIG_FEATURE_FANCY_ECHO=y
|
||||
CONFIG_ENV=y
|
||||
CONFIG_EXPR=y
|
||||
CONFIG_FALSE=y
|
||||
# CONFIG_FOLD is not set
|
||||
CONFIG_HEAD=y
|
||||
# CONFIG_FEATURE_FANCY_HEAD is not set
|
||||
# CONFIG_HOSTID is not set
|
||||
CONFIG_ID=y
|
||||
# CONFIG_INSTALL is not set
|
||||
# CONFIG_LENGTH is not set
|
||||
CONFIG_LN=y
|
||||
# CONFIG_LOGNAME is not set
|
||||
@@ -101,7 +104,7 @@ CONFIG_MKDIR=y
|
||||
CONFIG_MKNOD=y
|
||||
CONFIG_MV=y
|
||||
# CONFIG_OD is not set
|
||||
# CONFIG_PRINTF is not set
|
||||
CONFIG_PRINTF=y
|
||||
CONFIG_PWD=y
|
||||
CONFIG_REALPATH=y
|
||||
CONFIG_RM=y
|
||||
@@ -158,7 +161,6 @@ CONFIG_FEATURE_HUMAN_READABLE=y
|
||||
# CONFIG_CLEAR is not set
|
||||
# CONFIG_DEALLOCVT is not set
|
||||
# CONFIG_DUMPKMAP is not set
|
||||
# CONFIG_LOADACM is not set
|
||||
# CONFIG_LOADFONT is not set
|
||||
# CONFIG_LOADKMAP is not set
|
||||
# CONFIG_OPENVT is not set
|
||||
@@ -171,14 +173,17 @@ CONFIG_FEATURE_HUMAN_READABLE=y
|
||||
# CONFIG_MKTEMP is not set
|
||||
CONFIG_READLINK=y
|
||||
# CONFIG_RUN_PARTS is not set
|
||||
# CONFIG_START_STOP_DAEMON is not set
|
||||
# CONFIG_WHICH is not set
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
# CONFIG_AWK is not set
|
||||
# CONFIG_PATCH is not set
|
||||
CONFIG_SED=y
|
||||
# CONFIG_FEATURE_SED_EMBEDED_NEWLINE is not set
|
||||
CONFIG_FEATURE_SED_GNU_COMPATABILITY=y
|
||||
# CONFIG_VI is not set
|
||||
|
||||
#
|
||||
@@ -193,6 +198,7 @@ CONFIG_FEATURE_FIND_NEWER=y
|
||||
CONFIG_FEATURE_FIND_INUM=y
|
||||
CONFIG_GREP=y
|
||||
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_FGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_CONTEXT is not set
|
||||
# CONFIG_XARGS is not set
|
||||
|
||||
@@ -201,13 +207,12 @@ CONFIG_GREP=y
|
||||
#
|
||||
CONFIG_INIT=y
|
||||
CONFIG_FEATURE_USE_INITTAB=y
|
||||
# CONFIG_FEATURE_INITRD is not set
|
||||
CONFIG_FEATURE_INITRD=y
|
||||
# CONFIG_FEATURE_INIT_COREDUMPS is not set
|
||||
# CONFIG_FEATURE_EXTRA_QUIET is not set
|
||||
CONFIG_HALT=y
|
||||
# CONFIG_POWEROFF is not set
|
||||
CONFIG_REBOOT=y
|
||||
# CONFIG_START_STOP_DAEMON is not set
|
||||
# CONFIG_MESG is not set
|
||||
|
||||
#
|
||||
@@ -232,17 +237,18 @@ CONFIG_USE_BB_PWD_GRP=y
|
||||
# CONFIG_CROND is not set
|
||||
# CONFIG_CRONTAB is not set
|
||||
# CONFIG_DC is not set
|
||||
# CONFIG_DUTMP is not set
|
||||
# CONFIG_LAST is not set
|
||||
# CONFIG_HDPARM is not set
|
||||
# CONFIG_MAKEDEVS is not set
|
||||
# CONFIG_MT is not set
|
||||
# CONFIG_STRINGS is not set
|
||||
# CONFIG_TIME is not set
|
||||
# CONFIG_UPDATE is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Linux Module Utilities
|
||||
#
|
||||
# CONFIG_DEPMOD is not set
|
||||
# CONFIG_INSMOD is not set
|
||||
# CONFIG_LSMOD is not set
|
||||
# CONFIG_MODPROBE is not set
|
||||
@@ -289,6 +295,7 @@ CONFIG_ROUTE=y
|
||||
CONFIG_WGET=y
|
||||
# CONFIG_FEATURE_WGET_STATUSBAR is not set
|
||||
CONFIG_FEATURE_WGET_AUTHENTICATION=y
|
||||
# CONFIG_FEATURE_WGET_IP6_LITERAL is not set
|
||||
|
||||
#
|
||||
# udhcp Server/Client
|
||||
@@ -320,10 +327,6 @@ CONFIG_FEATURE_SH_IS_ASH=y
|
||||
# CONFIG_FEATURE_SH_IS_NONE is not set
|
||||
CONFIG_ASH=y
|
||||
|
||||
#
|
||||
# ash (forced enabled as default shell)
|
||||
#
|
||||
|
||||
#
|
||||
# Ash Shell Options
|
||||
#
|
||||
@@ -366,6 +369,7 @@ CONFIG_LOGGER=y
|
||||
CONFIG_DMESG=y
|
||||
# CONFIG_FBSET is not set
|
||||
# CONFIG_FDFLUSH is not set
|
||||
# CONFIG_FDFORMAT is not set
|
||||
# CONFIG_FDISK is not set
|
||||
# CONFIG_FREERAMDISK is not set
|
||||
# CONFIG_FSCK_MINIX is not set
|
||||
@@ -377,10 +381,6 @@ CONFIG_DMESG=y
|
||||
CONFIG_MKSWAP=y
|
||||
CONFIG_MORE=y
|
||||
CONFIG_FEATURE_USE_TERMIOS=y
|
||||
|
||||
#
|
||||
# Common options for ls and more
|
||||
#
|
||||
CONFIG_PIVOT_ROOT=y
|
||||
# CONFIG_RDATE is not set
|
||||
CONFIG_SWAPONOFF=y
|
||||
|
||||
+19
-18
@@ -16,6 +16,7 @@ CONFIG_FEATURE_DEVFS=y
|
||||
CONFIG_FEATURE_DEVPTS=y
|
||||
# CONFIG_FEATURE_CLEAN_UP is not set
|
||||
# CONFIG_FEATURE_SUID is not set
|
||||
# CONFIG_SELINUX is not set
|
||||
|
||||
#
|
||||
# Build Options
|
||||
@@ -50,7 +51,7 @@ CONFIG_TAR=y
|
||||
# CONFIG_FEATURE_TAR_BZIP2 is not set
|
||||
# CONFIG_FEATURE_TAR_EXCLUDE is not set
|
||||
CONFIG_FEATURE_TAR_GZIP=y
|
||||
# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set
|
||||
CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY=y
|
||||
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
|
||||
# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
|
||||
# CONFIG_UNCOMPRESS is not set
|
||||
@@ -80,10 +81,12 @@ CONFIG_FEATURE_FANCY_ECHO=y
|
||||
CONFIG_ENV=y
|
||||
CONFIG_EXPR=y
|
||||
CONFIG_FALSE=y
|
||||
# CONFIG_FOLD is not set
|
||||
CONFIG_HEAD=y
|
||||
# CONFIG_FEATURE_FANCY_HEAD is not set
|
||||
# CONFIG_HOSTID is not set
|
||||
CONFIG_ID=y
|
||||
# CONFIG_INSTALL is not set
|
||||
# CONFIG_LENGTH is not set
|
||||
CONFIG_LN=y
|
||||
# CONFIG_LOGNAME is not set
|
||||
@@ -101,7 +104,7 @@ CONFIG_MKDIR=y
|
||||
CONFIG_MKNOD=y
|
||||
CONFIG_MV=y
|
||||
# CONFIG_OD is not set
|
||||
# CONFIG_PRINTF is not set
|
||||
CONFIG_PRINTF=y
|
||||
CONFIG_PWD=y
|
||||
CONFIG_REALPATH=y
|
||||
CONFIG_RM=y
|
||||
@@ -158,7 +161,6 @@ CONFIG_FEATURE_HUMAN_READABLE=y
|
||||
# CONFIG_CLEAR is not set
|
||||
# CONFIG_DEALLOCVT is not set
|
||||
# CONFIG_DUMPKMAP is not set
|
||||
# CONFIG_LOADACM is not set
|
||||
# CONFIG_LOADFONT is not set
|
||||
# CONFIG_LOADKMAP is not set
|
||||
# CONFIG_OPENVT is not set
|
||||
@@ -171,14 +173,17 @@ CONFIG_FEATURE_HUMAN_READABLE=y
|
||||
# CONFIG_MKTEMP is not set
|
||||
CONFIG_READLINK=y
|
||||
# CONFIG_RUN_PARTS is not set
|
||||
# CONFIG_START_STOP_DAEMON is not set
|
||||
# CONFIG_WHICH is not set
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
# CONFIG_AWK is not set
|
||||
# CONFIG_PATCH is not set
|
||||
CONFIG_SED=y
|
||||
# CONFIG_FEATURE_SED_EMBEDED_NEWLINE is not set
|
||||
CONFIG_FEATURE_SED_GNU_COMPATABILITY=y
|
||||
# CONFIG_VI is not set
|
||||
|
||||
#
|
||||
@@ -193,6 +198,7 @@ CONFIG_FEATURE_FIND_NEWER=y
|
||||
CONFIG_FEATURE_FIND_INUM=y
|
||||
CONFIG_GREP=y
|
||||
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
|
||||
CONFIG_FEATURE_GREP_FGREP_ALIAS=y
|
||||
# CONFIG_FEATURE_GREP_CONTEXT is not set
|
||||
# CONFIG_XARGS is not set
|
||||
|
||||
@@ -201,13 +207,12 @@ CONFIG_GREP=y
|
||||
#
|
||||
CONFIG_INIT=y
|
||||
CONFIG_FEATURE_USE_INITTAB=y
|
||||
# CONFIG_FEATURE_INITRD is not set
|
||||
CONFIG_FEATURE_INITRD=y
|
||||
# CONFIG_FEATURE_INIT_COREDUMPS is not set
|
||||
# CONFIG_FEATURE_EXTRA_QUIET is not set
|
||||
CONFIG_FEATURE_EXTRA_QUIET=y
|
||||
CONFIG_HALT=y
|
||||
# CONFIG_POWEROFF is not set
|
||||
CONFIG_REBOOT=y
|
||||
# CONFIG_START_STOP_DAEMON is not set
|
||||
# CONFIG_MESG is not set
|
||||
|
||||
#
|
||||
@@ -232,20 +237,22 @@ CONFIG_USE_BB_PWD_GRP=y
|
||||
# CONFIG_CROND is not set
|
||||
# CONFIG_CRONTAB is not set
|
||||
# CONFIG_DC is not set
|
||||
# CONFIG_DUTMP is not set
|
||||
# CONFIG_LAST is not set
|
||||
# CONFIG_HDPARM is not set
|
||||
# CONFIG_MAKEDEVS is not set
|
||||
# CONFIG_MT is not set
|
||||
# CONFIG_STRINGS is not set
|
||||
# CONFIG_TIME is not set
|
||||
# CONFIG_UPDATE is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Linux Module Utilities
|
||||
#
|
||||
CONFIG_MODUTILS_OBJ=y
|
||||
CONFIG_DEPMOD=y
|
||||
CONFIG_INSMOD=y
|
||||
# CONFIG_FEATURE_OLD_MODULE_INTERFACE is not set
|
||||
CONFIG_FEATURE_NEW_MODULE_INTERFACE=y
|
||||
# CONFIG_FEATURE_2_2_MODULES is not set
|
||||
CONFIG_FEATURE_2_4_MODULES=y
|
||||
|
||||
#
|
||||
# Support new (post 2.1) Linux kernels (Forced enabled)
|
||||
@@ -301,6 +308,7 @@ CONFIG_ROUTE=y
|
||||
CONFIG_WGET=y
|
||||
# CONFIG_FEATURE_WGET_STATUSBAR is not set
|
||||
CONFIG_FEATURE_WGET_AUTHENTICATION=y
|
||||
# CONFIG_FEATURE_WGET_IP6_LITERAL is not set
|
||||
|
||||
#
|
||||
# udhcp Server/Client
|
||||
@@ -332,10 +340,6 @@ CONFIG_FEATURE_SH_IS_ASH=y
|
||||
# CONFIG_FEATURE_SH_IS_NONE is not set
|
||||
CONFIG_ASH=y
|
||||
|
||||
#
|
||||
# ash (forced enabled as default shell)
|
||||
#
|
||||
|
||||
#
|
||||
# Ash Shell Options
|
||||
#
|
||||
@@ -378,6 +382,7 @@ CONFIG_LOGGER=y
|
||||
CONFIG_DMESG=y
|
||||
# CONFIG_FBSET is not set
|
||||
# CONFIG_FDFLUSH is not set
|
||||
# CONFIG_FDFORMAT is not set
|
||||
# CONFIG_FDISK is not set
|
||||
# CONFIG_FREERAMDISK is not set
|
||||
# CONFIG_FSCK_MINIX is not set
|
||||
@@ -389,10 +394,6 @@ CONFIG_DMESG=y
|
||||
CONFIG_MKSWAP=y
|
||||
CONFIG_MORE=y
|
||||
CONFIG_FEATURE_USE_TERMIOS=y
|
||||
|
||||
#
|
||||
# Common options for ls and more
|
||||
#
|
||||
CONFIG_PIVOT_ROOT=y
|
||||
# CONFIG_RDATE is not set
|
||||
CONFIG_SWAPONOFF=y
|
||||
Vendored
+3
-2
@@ -2,8 +2,8 @@ Source: busybox-cvs
|
||||
Priority: optional
|
||||
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
|
||||
Uploaders: Erik Andersen <andersee@debian.org>, Bastian Blank <waldi@debian.org>, Tollef Fog Heen <tfheen@debian.org>, Glenn McGrath <bug1@debian.org>
|
||||
Build-Depends: debhelper (>= 2.1.18)
|
||||
Standards-Version: 3.5.7.0
|
||||
Build-Depends: debhelper (>= 4.0.0)
|
||||
Standards-Version: 3.6.0
|
||||
|
||||
Package: busybox-cvs
|
||||
Architecture: any
|
||||
@@ -52,6 +52,7 @@ Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Section: debian-installer
|
||||
Conflicts: busybox-udeb
|
||||
Enhances: busybox-cvs-net-udeb
|
||||
Priority: extra
|
||||
Description: Tiny utilities for the debian-installer
|
||||
BusyBox combines tiny versions of many common UNIX utilities into a single
|
||||
|
||||
@@ -11,6 +11,12 @@ config CONFIG_MKTEMP
|
||||
help
|
||||
mktemp is used to create unique temporary files
|
||||
|
||||
config CONFIG_PIPE_PROGRESS
|
||||
bool "pipe_progress"
|
||||
default n
|
||||
help
|
||||
Display a dot to indicate pipe activity.
|
||||
|
||||
config CONFIG_READLINK
|
||||
bool "readlink"
|
||||
default n
|
||||
@@ -27,8 +33,8 @@ config CONFIG_RUN_PARTS
|
||||
It is useful to set up a directory like cron.daily, where you need to
|
||||
execute all the scripts in that directory.
|
||||
|
||||
This implementation of run-parts does not accept long options, and
|
||||
some features (such as report mode) are not implemented.
|
||||
In this implementation of run-parts some features (such as report mode)
|
||||
are not implemented.
|
||||
|
||||
Unless you know that run-parts is used in some of your scripts
|
||||
you can safely say N here.
|
||||
|
||||
@@ -25,6 +25,7 @@ endif
|
||||
|
||||
DEBIANUTILS-y:=
|
||||
DEBIANUTILS-$(CONFIG_MKTEMP) += mktemp.o
|
||||
DEBIANUTILS-$(CONFIG_PIPE_PROGRESS) += pipe_progress.o
|
||||
DEBIANUTILS-$(CONFIG_READLINK) += readlink.o
|
||||
DEBIANUTILS-$(CONFIG_RUN_PARTS) += run_parts.o
|
||||
DEBIANUTILS-$(CONFIG_START_STOP_DAEMON) += start_stop_daemon.o
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Monitor a pipe with a simple progress display.
|
||||
*
|
||||
* Copyright (C) 2003 by Rob Landley <rob@landley.net>, Joey Hess
|
||||
*
|
||||
* 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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "busybox.h"
|
||||
|
||||
#define PIPE_PROGRESS_SIZE 4096
|
||||
|
||||
/* Read a block of data from stdin, write it to stdout.
|
||||
* Activity is indicated by a '.' to stderr
|
||||
*/
|
||||
extern int pipe_progress_main(int argc, char **argv)
|
||||
{
|
||||
RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE);
|
||||
time_t t = time(NULL);
|
||||
size_t len;
|
||||
|
||||
while ((len = fread(buf, 1, PIPE_PROGRESS_SIZE, stdin)) > 0) {
|
||||
time_t new_time = time(NULL);
|
||||
if (new_time != t) {
|
||||
t = new_time;
|
||||
fputc('.', stderr);
|
||||
}
|
||||
fwrite(buf, len, 1, stdout);
|
||||
}
|
||||
|
||||
fputc('\n', stderr);
|
||||
|
||||
#ifdef CONFIG_FEATURE_CLEAN_UP
|
||||
RELEASE_CONFIG_BUFFER(buf);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
+32
-12
@@ -26,10 +26,21 @@
|
||||
#include <stdlib.h>
|
||||
#include "busybox.h"
|
||||
|
||||
static int file_exists(char *file)
|
||||
{
|
||||
struct stat filestat;
|
||||
|
||||
if (stat(file, &filestat) == 0 &&
|
||||
S_ISREG(filestat.st_mode) &&
|
||||
filestat.st_mode & S_IXUSR)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern int which_main(int argc, char **argv)
|
||||
{
|
||||
char *path_list, *path_n;
|
||||
struct stat filestat;
|
||||
int i, count=1, found, status = EXIT_SUCCESS;
|
||||
|
||||
if (argc <= 1 || **(argv + 1) == '-')
|
||||
@@ -49,21 +60,30 @@ extern int which_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
while(argc-- > 0) {
|
||||
char *buf;
|
||||
path_n = path_list;
|
||||
argv++;
|
||||
found = 0;
|
||||
for (i = 0; i < count; i++) {
|
||||
char *buf;
|
||||
buf = concat_path_file(path_n, *argv);
|
||||
if (stat (buf, &filestat) == 0
|
||||
&& filestat.st_mode & S_IXUSR)
|
||||
{
|
||||
puts(buf);
|
||||
found = 1;
|
||||
break;
|
||||
|
||||
/*
|
||||
* Check if we were given the full path, first.
|
||||
* Otherwise see if the file exists in our $PATH.
|
||||
*/
|
||||
buf = *argv;
|
||||
if (file_exists(buf)) {
|
||||
puts(buf);
|
||||
found = 1;
|
||||
} else {
|
||||
for (i = 0; i < count; i++) {
|
||||
buf = concat_path_file(path_n, *argv);
|
||||
if (file_exists(buf)) {
|
||||
puts(buf);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
free(buf);
|
||||
path_n += (strlen(path_n) + 1);
|
||||
}
|
||||
free(buf);
|
||||
path_n += (strlen(path_n) + 1);
|
||||
}
|
||||
if (!found)
|
||||
status = EXIT_FAILURE;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
The code and graphics on this website (and it's mirror sites, if any) are
|
||||
Copyright (c) 1999-2003 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.
|
||||
|
||||
@@ -1,39 +1,7 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>BusyBox Anonymous CVS Instructions</title>
|
||||
</HEAD>
|
||||
|
||||
<body text="#000000" alink="#660000" link="#660000" bgcolor="#dee2de" vlink="#660000">
|
||||
|
||||
<basefont face="lucida, helvetica, arial" size="3">
|
||||
<!--#include file="header.html" -->
|
||||
|
||||
|
||||
<H3>Accessing the Busybox CVS Repository</H3>
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2>
|
||||
<TR>
|
||||
<td bgcolor="#000000">
|
||||
<FONT FACE="lucida, helvetica" COLOR="#ccccc0">
|
||||
<B>B u s y B o x</B>
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<a href="/"><IMG SRC="images/busybox2.jpg" alt="BusyBox" border="0" width="360" height="230"></a><BR>
|
||||
|
||||
|
||||
</CENTER>
|
||||
|
||||
<TABLE WIDTH="95%" CELLSPACING=1 CELLPADDING=4 BORDER=1>
|
||||
<TR><TD BGCOLOR="#ccccc0" ALIGN=center>
|
||||
<A NAME="intro"> <BIG><B>
|
||||
Anonymous CVS
|
||||
</B></BIG></A>
|
||||
</TD></TR>
|
||||
<TR><TD BGCOLOR="#eeeee0">
|
||||
<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:
|
||||
@@ -59,6 +27,10 @@ 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:
|
||||
@@ -78,59 +50,8 @@ 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 <a href="http://busybox.net/mailman/listinfo">mailing list</a>.
|
||||
|
||||
|
||||
<!-- End of Table -->
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<!-- Footer -->
|
||||
<HR>
|
||||
<TABLE WIDTH="100%">
|
||||
<TR>
|
||||
<TD>
|
||||
<font size="-1" face="arial, helvetica, sans-serif">
|
||||
Mail all comments, insults, suggestions and bribes to
|
||||
<a href="mailto:andersen@codepoet.org">Erik Andersen</a><BR>
|
||||
The Busybox logo is copyright 1999-2002, Erik Andersen.
|
||||
</font>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.vim.org"><img border=0 width=90 height=36
|
||||
src="images/written.in.vi.png"
|
||||
alt="This site created with the vi editor"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.gimp.org/"><img border=0 width=90 height=36
|
||||
src="images/gfx_by_gimp.png" alt="Graphics by GIMP"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.linuxtoday.com"><img width=90 height=36
|
||||
src="images/ltbutton2.png" alt="Linux Today"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<p><a href="http://slashdot.org"><img width=90 height=36
|
||||
src="images/sdsmall.png" alt="Slashdot"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://freshmeat.net"><img width=90 height=36
|
||||
src="images/fm.mini.png" alt="Freshmeat"></a>
|
||||
</TD>
|
||||
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
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" -->
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<!--#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 < module name ></pre>
|
||||
<dd>Will checkout the named module
|
||||
<dt><pre>cvs co < module name ></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 < file name ></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 < file name ></pre>
|
||||
|
||||
<dd>Adds the named file/directory into CVS
|
||||
<dt><pre>cvs remove < file name ></pre>
|
||||
<dd>Removes the named file/directory from the upstream repository.
|
||||
<dt><pre>cvs rm < file name ></pre>
|
||||
<dd>Same thing
|
||||
<dt><pre>cvs log < file name ></pre>
|
||||
</dl>
|
||||
|
||||
|
||||
<!--#include file="footer.html" -->
|
||||
|
||||
@@ -1,40 +1,7 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>BusyBox CVS Read/Write Instructions</title>
|
||||
</HEAD>
|
||||
|
||||
<body text="#000000" alink="#660000" link="#660000" bgcolor="#dee2de" vlink="#660000">
|
||||
|
||||
<basefont face="lucida, helvetica, arial" size="3">
|
||||
<!--#include file="header.html" -->
|
||||
|
||||
|
||||
<H3>Accessing the Busybox CVS Repository</H3>
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2>
|
||||
<TR>
|
||||
<td bgcolor="#000000">
|
||||
<FONT FACE="lucida, helvetica" COLOR="#ccccc0">
|
||||
<B>B u s y B o x</B>
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<a href="/"><IMG SRC="images/busybox2.jpg" alt="BusyBox" border="0" width="360" height="230"></a><BR>
|
||||
|
||||
|
||||
</CENTER>
|
||||
|
||||
<TABLE WIDTH="95%" CELLSPACING=1 CELLPADDING=4 BORDER=1>
|
||||
<TR><TD BGCOLOR="#ccccc0" ALIGN=center>
|
||||
<A NAME="intro"> <BIG><B>
|
||||
CVS Read/Write Access
|
||||
</B></BIG></A>
|
||||
</TD></TR>
|
||||
<TR><TD BGCOLOR="#eeeee0">
|
||||
|
||||
<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
|
||||
@@ -60,58 +27,6 @@ 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>.
|
||||
|
||||
|
||||
<!-- End of Table -->
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<!-- Footer -->
|
||||
<HR>
|
||||
<TABLE WIDTH="100%">
|
||||
<TR>
|
||||
<TD>
|
||||
<font size="-1" face="arial, helvetica, sans-serif">
|
||||
Mail all comments, insults, suggestions and bribes to
|
||||
<a href="mailto:andersen@codepoet.org">Erik Andersen</a><BR>
|
||||
The Busybox logo is copyright 1999-2002, Erik Andersen.
|
||||
</font>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.vim.org"><img border=0 width=90 height=36
|
||||
src="images/written.in.vi.png"
|
||||
alt="This site created with the vi editor"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.gimp.org/"><img border=0 width=90 height=36
|
||||
src="images/gfx_by_gimp.png" alt="Graphics by GIMP"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.linuxtoday.com"><img width=90 height=36
|
||||
src="images/ltbutton2.png" alt="Linux Today"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<p><a href="http://slashdot.org"><img width=90 height=36
|
||||
src="images/sdsmall.png" alt="Slashdot"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://freshmeat.net"><img width=90 height=36
|
||||
src="images/fm.mini.png" alt="Freshmeat"></a>
|
||||
</TD>
|
||||
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
<!--#include file="footer.html" -->
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<!--#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" -->
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<!--#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" -->
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<!-- Footer -->
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr />
|
||||
|
||||
<p>
|
||||
<font face="arial, helvetica, sans-serif" size="-1">
|
||||
<a HREF="/copyright.txt">Copyright © 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>
|
||||
@@ -0,0 +1,79 @@
|
||||
<!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="/">Home</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>
|
||||
|
||||
<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.
|
After Width: | Height: | Size: 906 B |
+43
-470
@@ -1,490 +1,63 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--#include file="header.html" -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content=
|
||||
"HTML Tidy for Linux/x86 (vers 1st February 2002), see www.w3.org">
|
||||
|
||||
<title>BusyBox</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #DEE2DE;
|
||||
color: #000000;
|
||||
}
|
||||
:link { color: #660000 }
|
||||
:visited { color: #660000 }
|
||||
:active { color: #660000 }
|
||||
div.c3 {text-align: center}
|
||||
td.c2 {font-family: arial, helvetica, sans-serif; font-size: 80%}
|
||||
td.c1 {font-family: lucida, helvetica; font-size: 248%}
|
||||
</style>
|
||||
</head>
|
||||
<!-- Begin Introduction section -->
|
||||
|
||||
<body>
|
||||
<basefont face="lucida, helvetica, arial" size="3">
|
||||
<h3>BusyBox: The Swiss Army Knife of Embedded Linux</h3>
|
||||
|
||||
<div class="c3">
|
||||
<table border="0" cellspacing="1" cellpadding="2">
|
||||
<tr>
|
||||
<td class="c1">BUSYBOX</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a href="/"><img src="images/busybox1.png" alt="BusyBox"
|
||||
border="0" width="164" height="116"></a><br>
|
||||
<!-- Begin Introduction section -->
|
||||
|
||||
|
||||
<table width="95%" cellspacing="1" cellpadding="4" border=
|
||||
"1">
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name= "intro"><big>
|
||||
<b>The Swiss Army Knife of Embedded Linux</b>
|
||||
</big></a></td>
|
||||
</tr>
|
||||
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.
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
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
|
||||
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 POSIX environment for any
|
||||
small or embedded system.
|
||||
<p>
|
||||
|
||||
<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 /dev, /etc, and a kernel.</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>Screenshot</h3>
|
||||
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>Because everybody loves screenshots, a screenshot of
|
||||
BusyBox is now available <a href=
|
||||
"screenshot.html">right here</a>.</p>
|
||||
<p>
|
||||
<p>
|
||||
|
||||
<h3>Mailing List Information</h3>
|
||||
BusyBox has a <a href="/lists/busybox/">mailing list</a>.<br>
|
||||
To subscribe, go and visit <a href="/mailman/listinfo/busybox">this page</a>.
|
||||
<br>
|
||||
Before asking questions on the mailing list
|
||||
you should probably first search the mailing list archives...
|
||||
<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">
|
||||
<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> <input type="text" name="q" size="31" maxlength="255" value=""> <input type="submit" name="sa" value="search the mailing list archives">...
|
||||
</form>
|
||||
<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!
|
||||
|
||||
|
||||
<!-- Begin Latest News section -->
|
||||
</td>
|
||||
</tr>
|
||||
<ul>
|
||||
<li><a href="http://www.penguru.net">Penguru Consulting</a><br>
|
||||
Custom development for embedded Linux systems and multimedia platforms
|
||||
</li>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"news"><big><b>Latest News</b></big></a></td>
|
||||
</tr>
|
||||
<li><a href="http://opensource.se/">opensource.se</a><br>
|
||||
Embedded open source consulting in Europe.
|
||||
</li>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
<ul>
|
||||
<li><a href="http://www.codepoet-consulting.com">Codepoet Consulting</a><br>
|
||||
Custom Linux, embedded Linux, BusyBox, and uClibc
|
||||
development.
|
||||
</li>
|
||||
|
||||
<p>
|
||||
<li><b>30 July 2003 -- BusyBox 1.0.0-pre2 released</b><p>
|
||||
</ul>
|
||||
|
||||
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.
|
||||
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>.
|
||||
|
||||
<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>
|
||||
|
||||
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>Old News</b><br>
|
||||
For the old news, visit <a href="oldnews.html">the
|
||||
old news page</a>.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Begin Sponsors section -->
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"sponsors"><big><b>Sponsors</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
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>
|
||||
Several individuals have also contributed. If you have
|
||||
already contributed and would like your name added
|
||||
here, just let me know. If you would like to be a
|
||||
BusyBox sponsor, email <a href=
|
||||
"mailto:andersen@codepoet.org">Erik</a>.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Begin Download section -->
|
||||
<p>
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"download"><big><b>Download</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
Source for the latest release can always be
|
||||
downloaded from <a href="downloads">http://www.busybox.net/downloads</a>.
|
||||
<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><a href= "downloads/snapshots/">Daily Snapshots of the the latest
|
||||
stable, and the latest development CVS source trees can be found right here</a>.
|
||||
<br>
|
||||
</li><li><a href="/cgi-bin/cvsweb/busybox/">Click here to browse the CVS
|
||||
tree for the 1.0.0-preX development version of BusyBox</a>
|
||||
</li><li><a href="/cgi-bin/cvsweb/busybox.stable/">Click here to browse
|
||||
the 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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Begin Docs section -->
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"docs"><big><b>Documentation</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Begin Links section -->
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"links"><big><b>Important Links</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
<ul>
|
||||
<li><a href="http://perens.com/FreeSoftware/">Free
|
||||
Software from Bruce Perens</a><br>
|
||||
The original idea for BusyBox, and all versions up
|
||||
to 0.26 were written by <a href=
|
||||
"mailto:bruce@perens.com">Bruce Perens</a>. This is
|
||||
his BusyBox website.</li>
|
||||
|
||||
<li><a href=
|
||||
"http://freshmeat.net/projects/busybox/">Freshmeat
|
||||
AppIndex record for BusyBox</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://tinylogin.busybox.net/">TinyLogin</a> is a
|
||||
nice embedded tool for handling authentication,
|
||||
changing passwords, and similar tasks which nicely
|
||||
complements BusyBox.</li>
|
||||
|
||||
<li><a href="http://udhcp.busybox.net/">udhcp</a> is
|
||||
a tiny dhcp client and/or server which is ideal for
|
||||
embedded systems.</li>
|
||||
|
||||
<li><a href="http://www.uclibc.org/">uClibc</a> is a
|
||||
C library for embedded systems. You can actually
|
||||
statically link a "Hello World" application under x86
|
||||
that only takes 4k (as opposed to 200k under GNU
|
||||
libc). It can do dynamic linking too and works nicely
|
||||
with BusyBox to create very small embedded Linux systems.
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Begin Projects section -->
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"projects"><big><b>Products/Projects Using BusyBox</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
<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:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
<li><a href="/cgi-bin/cvsweb/buildroot/">buildroot</a> a configurable
|
||||
means for building your own busybox/uClibc 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 7.2
|
||||
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://www.linuxrouter.org/">Linux
|
||||
Router Project</a>
|
||||
|
||||
</li><li><a href="http://linux-embedded.org/">LEM</a>
|
||||
|
||||
</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://homepages.ihug.co.nz/~ichi/baslinux.html">BasicLinux</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://midori.transmeta.com/">Midori
|
||||
Linux</a> - <a href=
|
||||
"http://www.wired.com/news/technology/0,1282,42399,00.html">
|
||||
Article on Midori Linux</a> on <a href=
|
||||
"http://www.wired.com">Wired</a>. Quote from Erik at
|
||||
the top of <a href=
|
||||
"http://www.wired.com/news/technology/0,1282,42399-2,00.html">
|
||||
this page</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> - 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> -- boots from CD and automatically plays every video file on the CD
|
||||
</li><li><a href="http://katamaran.sourceforge.net">katamaran</a>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>A documentation project on how to make your own uClibc-based systems and floppy.
|
||||
</li><li><a href="http://metadistros.hispalinux.es/">Metadistros</a>a project to allow you easily make Live-CD distributions.
|
||||
</li><li><a href="http://salvare.sourceforge.net/">Salvare</a>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>minimal linux distribution running from a bootable cdrom or via PXE.
|
||||
</li><li><a href="http://thinstation.sourceforge.net/">thinstation</a>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://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.buffalo-technology.com/products/wireless/wbr-g54.htm">Buffalo WBR-G54 wireless router</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>
|
||||
</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>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Do you use BusyBox? I'd love to know about it and
|
||||
I'd be happy to link to you. <!-- End of Table -->
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Footer -->
|
||||
<hr>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="c2">Mail all comments, insults, suggestions
|
||||
and bribes to <a href="mailto:andersen@codepoet.org">Erik
|
||||
Andersen</a><br>
|
||||
The Busybox logo is copyright 1999-2002, Erik
|
||||
Andersen.</td>
|
||||
|
||||
<td><a href="http://www.vim.org"><img border="0" width=
|
||||
"90" height="36" src="images/written.in.vi.png" alt=
|
||||
"This site created with the vi editor"></a></td>
|
||||
|
||||
<td><a href="http://www.gimp.org/"><img border="0" width=
|
||||
"90" height="36" src="images/gfx_by_gimp.png" alt=
|
||||
"Graphics by GIMP"></a></td>
|
||||
|
||||
<td><a href="http://www.linuxtoday.com"><img width="90"
|
||||
height="36" src="images/ltbutton2.png" alt="Linux Today">
|
||||
</a></td>
|
||||
|
||||
<td>
|
||||
<p><a href="http://slashdot.org"><img width="90"
|
||||
height="36" src="images/sdsmall.png" alt="Slashdot">
|
||||
</a></p>
|
||||
</td>
|
||||
|
||||
<td><a href="http://freshmeat.net"><img width="90"
|
||||
height="36" src="images/fm.mini.png" alt="Freshmeat">
|
||||
</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!--#include file="footer.html" -->
|
||||
@@ -0,0 +1,42 @@
|
||||
<!--#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>.
|
||||
|
||||
<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>.
|
||||
|
||||
<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" -->
|
||||
@@ -0,0 +1,78 @@
|
||||
<!--#include file="header.html" -->
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<li><b>Old News</b><p>
|
||||
<a href="/oldnews.html">Click here to read older news</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<!--#include file="footer.html" -->
|
||||
|
||||
+739
-759
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,154 @@
|
||||
<!--#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> 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> 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> the sucessor of the Linux Router Project, supporting all sorts of embedded Linux gateways, routers, wireless routers, and firewalls.
|
||||
|
||||
</li><li><a href="http://linux-embedded.org/">LEM</a>
|
||||
|
||||
</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://homepages.ihug.co.nz/~ichi/baslinux.html">BasicLinux</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://midori.transmeta.com/">Midori
|
||||
Linux</a> - <a href=
|
||||
"http://www.wired.com/news/technology/0,1282,42399,00.html">
|
||||
Article on Midori Linux</a> on <a href=
|
||||
"http://www.wired.com">Wired</a>. Quote from Erik at
|
||||
the top of <a href=
|
||||
"http://www.wired.com/news/technology/0,1282,42399-2,00.html">
|
||||
this page</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> - 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> -- boots from CD and automatically plays every video file on the CD
|
||||
</li><li><a href="http://katamaran.sourceforge.net">katamaran</a>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>A documentation project on how to make your own uClibc-based systems and floppy.
|
||||
</li><li><a href="http://metadistros.hispalinux.es/">Metadistros</a>a project to allow you easily make Live-CD distributions.
|
||||
</li><li><a href="http://salvare.sourceforge.net/">Salvare</a>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>minimal linux distribution running from a bootable cdrom or via PXE.
|
||||
</li><li><a href="http://thinstation.sourceforge.net/">thinstation</a>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>
|
||||
with sources <a href="http://www.netgear.com/support/support_details.asp?dnldID=453">here</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!--#include file="footer.html" -->
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# go away
|
||||
User-agent: *
|
||||
Disallow: /cgi-bin
|
||||
@@ -1,28 +1,19 @@
|
||||
<html>
|
||||
<!--#include file="header.html" -->
|
||||
|
||||
<head>
|
||||
|
||||
<title> Busybox Screenshot! </title>
|
||||
<!-- Begin Screenshot -->
|
||||
|
||||
<meta name="Author" content="Mark Whitley">
|
||||
<meta name="Description" content="A screenshot of Busybox">
|
||||
<h3> Busybox Screenshot! </h3>
|
||||
|
||||
</head>
|
||||
|
||||
<body text="#000000" alink="#660000" link="#660000" bgcolor="#dee2de" vlink="#660000">
|
||||
|
||||
<h1> Busybox Screenshot! </h1>
|
||||
|
||||
<TABLE WIDTH="80%" CELLSPACING=1 CELLPADDING=4 BORDER=1>
|
||||
<TR><TD BGCOLOR="#000000">
|
||||
|
||||
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="80%">
|
||||
font-family: monospace; font-size: smaller;" width="100">
|
||||
|
||||
|
||||
$ ./busybox
|
||||
BusyBox v1.00-pre1 (2003.07.15-06:37+0000) multi-call binary
|
||||
BusyBox v1.00-pre3 (2003.09.12-05:48+0000) multi-call binary
|
||||
|
||||
Usage: busybox [function] [arguments]...
|
||||
or: [function] [arguments]...
|
||||
@@ -33,39 +24,34 @@ Usage: busybox [function] [arguments]...
|
||||
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, df, dirname, dmesg, dos2unix, dpkg,
|
||||
dpkg-deb, du, dumpkmap, dumpleases, dutmp, echo, egrep, env, expr,
|
||||
false, fbset, fdflush, fdformat, fgrep, find, fold, free, freeramdisk,
|
||||
fsck.minix, ftpget, ftpput, getopt, getty, grep, gunzip, gzip,
|
||||
halt, head, hexdump, hostid, hostname, httpd, hush, hwclock, id,
|
||||
ifconfig, ifdown, ifup, inetd, init, insmod, ip, ipcalc, iplink,
|
||||
iproute, iptunnel, kill, killall, klogd, lash, length, linuxrc,
|
||||
ln, loadacm, loadfont, loadkmap, logger, login, logname, logread,
|
||||
losetup, ls, lsmod, makedevs, md5sum, mesg, minit, mkdir, mkfifo,
|
||||
mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, msh,
|
||||
msvc, mt, mv, nameif, nc, netstat, nslookup, od, openvt, passwd,
|
||||
patch, pidfilehack, pidof, ping, ping6, pivot_root, poweroff,
|
||||
printf, ps, pwd, rdate, readlink, realpath, reboot, renice, reset,
|
||||
rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, sed, setkeycodes,
|
||||
sha1sum, sleep, sort, start-stop-daemon, strings, stty, su, sulogin,
|
||||
swapoff, swapon, sync, syslogd, tail, tar, tee, telnet, telnetd,
|
||||
test, tftp, time, top, touch, tr, traceroute, true, tty, udhcpc,
|
||||
udhcpd, umount, uname, uncompress, uniq, unix2dos, unzip, update,
|
||||
uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch,
|
||||
watchdog, wc, wget, which, who, whoami, xargs, yes, zcat
|
||||
|
||||
[, 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, df, dirname, dmesg, dos2unix, dpkg, dpkg-deb, du,
|
||||
dumpkmap, dumpleases, echo, egrep, env, expr, false, fbset, fdflush,
|
||||
fdformat, fgrep, find, fold, free, freeramdisk, fsck.minix, ftpget,
|
||||
ftpput, getopt, getty, grep, gunzip, gzip, halt, head, hexdump, hostid,
|
||||
hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifup, inetd,
|
||||
init, insmod, 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,
|
||||
minit, mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp, modprobe,
|
||||
more, mount, msh, msvc, mt, mv, nameif, nc, netstat, nslookup, od,
|
||||
openvt, passwd, patch, pidfilehack, pidof, ping, ping6, pivot_root,
|
||||
poweroff, printf, ps, pwd, rdate, readlink, realpath, reboot, renice,
|
||||
reset, rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, sed,
|
||||
setkeycodes, sha1sum, sleep, sort, start-stop-daemon, strings, stty,
|
||||
su, sulogin, swapoff, swapon, sync, syslogd, tail, tar, tee, telnet,
|
||||
telnetd, test, tftp, time, top, touch, tr, traceroute, true, tty,
|
||||
udhcpc, udhcpd, umount, uname, uncompress, uniq, unix2dos, unzip,
|
||||
update, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch,
|
||||
watchdog, wc, wget, which, who, whoami, xargs, yes, zcat
|
||||
|
||||
|
||||
$ <blink>_</blink>
|
||||
|
||||
</pre>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<!--#include file="footer.html" -->
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<!--#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 BusyBox license. 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>
|
||||
|
||||
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.hauppauge.co.uk/html/mvp.htm">Hauppauge Media MVP</a>
|
||||
</li><li><a href="http://www.buffalo-technology.com/products/wireless/wbr-g54.htm">Buffalo WBR-G54 wireless router</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>
|
||||
</li><li><a href="http://www.dmmtv.com/">Dreambox DM7000S DVB Satellite Receiver</a>
|
||||
</li><li><a href="http://testing.lkml.org/slashdot.php?mid=331690">Sigma Designs EM8500 based DVD players</a>
|
||||
</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>Undoubtedly there are others... Please report them so we can shame them (or if necessary sue them) into compliance.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!--#include file="footer.html" -->
|
||||
|
||||
+34
-24
@@ -146,7 +146,7 @@
|
||||
halt, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock,
|
||||
id, ifconfig, ifdown, ifup, inetd, init, insmod, ip, ipcalc, iplink,
|
||||
iproute, iptunnel, kill, killall, klogd, lash, length, linuxrc,
|
||||
ln, loadacm, loadfont, loadkmap, logger, login, logname, logread,
|
||||
ln, loadfont, loadkmap, logger, login, logname, logread,
|
||||
losetup, ls, lsmod, makedevs, md5sum, mesg, minit, mkdir, mkfifo,
|
||||
mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, msh,
|
||||
msvc, mt, mv, nameif, nc, netstat, nslookup, od, openvt, passwd,
|
||||
@@ -1851,28 +1851,6 @@
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="loadacm">
|
||||
<title>loadacm</title>
|
||||
|
||||
<para>
|
||||
Usage: loadacm
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Load an acm from stdin.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Example:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<screen>
|
||||
$ loadacm < /etc/i18n/acmname
|
||||
</screen>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="loadfont">
|
||||
<title>loadfont</title>
|
||||
|
||||
@@ -1976,6 +1954,38 @@
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="logread">
|
||||
<title>logread</title>
|
||||
|
||||
<para>
|
||||
Usage: logread [OPTION]...
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Shows the messages from syslogd (using circular buffer).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Options:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<screen>
|
||||
-f Output data as the log grows.
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Example:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<screen>
|
||||
$ logread
|
||||
</screen>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="ls">
|
||||
<title>ls</title>
|
||||
|
||||
@@ -3110,7 +3120,7 @@
|
||||
-O FILE Use an alternate log file (default=/var/log/messages)
|
||||
-R HOST[:PORT] Log remotely to IP or hostname on PORT (default PORT=514/UDP)
|
||||
-L Log locally as well as network logging (default is network only)
|
||||
-C Log to a circular buffer. Read this buffer using 'logread'
|
||||
-C [size(KiB)] Log to a circular buffer. Read this buffer using 'logread'
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
|
||||
+22
-23
@@ -55,29 +55,28 @@ terse runtime description of their behavior.
|
||||
|
||||
Currently defined functions include:
|
||||
|
||||
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, df, dirname, dmesg, dos2unix, dpkg,
|
||||
dpkg-deb, du, dumpkmap, dumpleases, dutmp, echo, egrep, env, expr,
|
||||
false, fbset, fdflush, fdformat, 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, ip, ipcalc, iplink,
|
||||
iproute, iptunnel, kill, killall, klogd, lash, length, linuxrc,
|
||||
ln, loadacm, loadfont, loadkmap, logger, login, logname, logread,
|
||||
losetup, ls, lsmod, makedevs, md5sum, mesg, minit, mkdir, mkfifo,
|
||||
mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, msh,
|
||||
msvc, mt, mv, nameif, nc, netstat, nslookup, od, openvt, passwd,
|
||||
patch, pidfilehack, pidof, ping, ping6, pivot_root, poweroff,
|
||||
printf, ps, pwd, rdate, readlink, realpath, reboot, renice, reset,
|
||||
rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, sed, setkeycodes,
|
||||
sha1sum, sleep, sort, start-stop-daemon, strings, stty, su, sulogin,
|
||||
swapoff, swapon, sync, 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, [
|
||||
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, df, dirname, dmesg, dos2unix, dpkg, dpkg-deb, du, dumpkmap,
|
||||
dumpleases, dutmp, echo, egrep, env, expr, false, fbset, fdflush,
|
||||
fdformat, 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, ip, ipcalc, iplink, iproute, iptunnel, kill,
|
||||
killall, klogd, lash, length, linuxrc, ln, loadfont, loadkmap, logger,
|
||||
login, logname, logread, losetup, ls, lsmod, makedevs, md5sum, mesg,
|
||||
minit, mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp, modprobe,
|
||||
more, mount, msh, msvc, mt, mv, nameif, nc, netstat, nslookup, od,
|
||||
openvt, passwd, patch, pidfilehack, pidof, ping, ping6, pivot_root,
|
||||
poweroff, printf, ps, pwd, rdate, readlink, realpath, reboot, renice,
|
||||
reset, rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, sed,
|
||||
setkeycodes, sha1sum, sleep, sort, start-stop-daemon, strings, stty,
|
||||
su, sulogin, swapoff, swapon, sync, 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, [
|
||||
|
||||
=over 4
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ Consult Existing Sources
|
||||
For a quick listing of "needs work" spots in the sources, cd into the Busybox
|
||||
directory and run the following:
|
||||
|
||||
for i in TODO FIXME XXX; do grep $i *.[ch]; done
|
||||
for i in TODO FIXME XXX; do find -name '*.[ch]'|xargs grep $i; done
|
||||
|
||||
This will show all of the trouble spots or 'questionable' code. Pick a spot,
|
||||
any spot, these are all invitations for you to contribute.
|
||||
@@ -199,16 +199,16 @@ Janitorial Work
|
||||
|
||||
These are dirty jobs, but somebody's gotta do 'em.
|
||||
|
||||
- Converting applets to use getopt() for option processing. Type 'grep -L
|
||||
getopt *.c' to get a listing of the applets that currently don't use
|
||||
getopt. If a .c file processes no options, it should have a line that
|
||||
- Converting applets to use getopt() for option processing. Type 'find -name
|
||||
'*.c'|grep -L getopt' to get a listing of the applets that currently don't
|
||||
use getopt. If a .c file processes no options, it should have a line that
|
||||
reads: /* no options, no getopt */ somewhere in the file.
|
||||
|
||||
- Replace any "naked" calls to malloc, calloc, realloc, str[n]dup, fopen with
|
||||
the x* equivalents found in utility.c.
|
||||
the x* equivalents found in libbb/xfuncs.c.
|
||||
|
||||
- Security audits:
|
||||
http://www.securityfocus.com/frames/?content=/forums/secprog/secure-programming.html
|
||||
http://www.securityfocus.com/popups/forums/secprog/intro.shtml
|
||||
|
||||
- Synthetic code removal: http://www.perl.com/pub/2000/06/commify.html - This
|
||||
is very Perl-specific, but the advice given in here applies equally well to
|
||||
@@ -231,7 +231,7 @@ These are dirty jobs, but somebody's gotta do 'em.
|
||||
|
||||
- "Ten Commandments" compliance: (this is a "maybe", certainly not as
|
||||
important as any of the previous items.)
|
||||
http://web.onetelnet.ch/~twolf/tw/c/ten_commandments.html
|
||||
http://www.lysator.liu.se/c/ten-commandments.html
|
||||
|
||||
Other useful links:
|
||||
|
||||
|
||||
+20
-11
@@ -14,8 +14,9 @@ Initial Write
|
||||
First, write your applet. Be sure to include copyright information at the
|
||||
top, such as who you stole the code from and so forth. Also include the
|
||||
mini-GPL boilerplate. Be sure to name the main function <applet>_main instead
|
||||
of main. And be sure to put it in <applet>.c. For a new applet mu, here is
|
||||
the code that would go in mu.c:
|
||||
of main. And be sure to put it in <applet>.c. Usage do not have to be taken care of by your applet.
|
||||
|
||||
For a new applet mu, here is the code that would go in mu.c:
|
||||
|
||||
----begin example code------
|
||||
|
||||
@@ -86,13 +87,20 @@ Placement / Directory
|
||||
|
||||
Find the appropriate directory for your new applet.
|
||||
|
||||
Add the applet to the applet directory Makefile:
|
||||
Make sure you find the appropriate places in the files, the applets are
|
||||
sorted alphabetically.
|
||||
|
||||
Add the applet to Makefile.in in the chosen applet directory:
|
||||
|
||||
obj-$(CONFIG_MU) += mu.o
|
||||
|
||||
Add the applet to the applet directory config.in:
|
||||
Add the applet to Config.in in the chosen applet directory:
|
||||
|
||||
bool 'mu' CONFIG_MU
|
||||
config CONFIG_MU
|
||||
bool "MU"
|
||||
default n
|
||||
help
|
||||
Returns an indeterminate value.
|
||||
|
||||
|
||||
Usage String(s)
|
||||
@@ -129,9 +137,9 @@ 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 Config.h:
|
||||
Finally, add a define for your applet to include/config.h
|
||||
|
||||
#define CONFIG_MU
|
||||
#undef CONFIG_MU
|
||||
|
||||
|
||||
Documentation
|
||||
@@ -146,9 +154,10 @@ Adding some text to docs/Configure.help is a nice start.
|
||||
The Grand Announcement
|
||||
----------------------
|
||||
|
||||
Then create a diff -urN of the files you added (<applet>.c, usage.c,
|
||||
applets.h, Config.h) and send it to the mailing list:
|
||||
busybox@busybox.net. Sending patches as attachments is preferred, but
|
||||
not required.
|
||||
Then create a diff -urN of the files you added (<appletdir/><applet>.c,
|
||||
include/usage.c, include/applets.h, include/config.h, <appletdir>/Makefile.in, <appletdir>/config.in)
|
||||
and send it to the mailing list:
|
||||
busybox@busybox.net.
|
||||
|
||||
Sending patches as attachments is preferred, but not required.
|
||||
|
||||
Loaded 100 of 270 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user