Denis Vlasenko
c6758a07c6
make compressed help code NOMMU- and NOFORK-friendly -
...
no forking anymore, bunzip2 unpack routine now does all it in memory.
2007-04-10 21:40:19 +00:00
Denis Vlasenko
335b63d8d1
make a few struct bb_applet members conditional
...
rename sllep_and_die -> xfunc_die
make fflush_stdout_and_exit NOFORK-safe
fix some buglets found by randomconfig
2007-04-10 21:38:30 +00:00
Bernhard Reutner-Fischer
99003b8a87
- use enum for the OPs as suggested by vda. No obj-code changes.
2007-04-10 19:30:50 +00:00
Denis Vlasenko
a9d7d24e1f
echo: fix regression ("echo" with no arguments didn't print newline.
...
echo: use fputs if no options are given. Code growth ~15 bytes.
Old:
# time ./busybox find $bigdir -exec echo {} \; >/dev/null
real 0m2.038s
user 0m0.761s
sys 0m0.953s
New:
# time ./busybox find $bigdir -exec echo {} \; >/dev/null
real 0m1.781s
user 0m0.781s
sys 0m0.939s
For comparison: without NOFORK:
# time find $bigdir -exec echo {} \; >/dev/null
real 1m51.129s
user 0m38.442s
sys 1m3.350s
2007-04-10 16:34:00 +00:00
Denis Vlasenko
99912ca733
audit small applets and mark some of them as NOFORK.
...
Put big scary warnings in relevant places.
2007-04-10 15:43:37 +00:00
Denis Vlasenko
ff131b980d
style fixes. No code changes.
2007-04-10 15:42:06 +00:00
Bernhard Reutner-Fischer
de17ece1db
- use skip_non_whitespace() where appropriate
2007-04-10 09:38:35 +00:00
Denis Vlasenko
3f3aa2a57d
make xfunctions optionally longjump instead of exit.
...
use it for making NOFORK more practical.
touch: make it a NOFORK applet
2007-04-09 21:35:07 +00:00
Denis Vlasenko
7e754f12d3
Implement first instance of NOFORK applet - echo
...
find: use NOFORK/NOEXEC; small -exec buglet also eliminated
vfork_daemon_rexec: honor PREFER_APPLETS
echo: small size improvements
find -exec echo {} \; with PREFER_APPLETS=y runs 4 times faster
2007-04-09 13:04:50 +00:00
Denis Vlasenko
240a1cfbbe
add some missed statics on constant objects.
...
fix few #ifndef ENABLE_xxx
# size busybox_old busybox_unstripped
text data bss dec hex filename
677152 2920 18208 698280 aa7a8 busybox_old
676420 2920 18208 697548 aa4cc busybox_unstripped
2007-04-08 16:07:02 +00:00
Denis Vlasenko
8d9f495d68
getopt32: fix llist_t options ordering. llist_rev is not unused.
...
function old new delta
tar_main 705 695 -10
sort_main 928 918 -10
decode_format_string 886 876 -10
run_parts_main 197 185 -12
ps_main 513 500 -13
wget_main 2764 2750 -14
awk_main 1014 1000 -14
od_main 2886 2866 -20
llist_rev 25 - -25
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/8 up/down: 0/-128) Total: -128 bytes
2007-04-08 15:08:42 +00:00
Denis Vlasenko
bbd695d801
find: fix handling of -prune
...
recursive_actions: uppercase flag constants
2007-04-08 10:52:28 +00:00
Denis Vlasenko
bb5b01c7c7
comm: eliminate statics
2007-04-07 00:45:27 +00:00
Denis Vlasenko
df5bbb938a
diff: fix segfault on empty dirs (Peter Korsgaard <peter.korsgaard@barco.com>)
2007-04-05 21:29:42 +00:00
Bernhard Reutner-Fischer
bdd253e450
- fix segfault in reset_ino_dev_hashtable() when *hashtable was null.
...
Seen in the testsuite for du -l .../testsuite on exit with CLEAN_UP enabled.
2007-04-05 09:21:24 +00:00
Bernhard Reutner-Fischer
febe3c4211
- sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"
2007-04-04 20:52:03 +00:00
Bernhard Reutner-Fischer
d9c2d5fe4f
- minor shrinkage
...
text data bss dec hex filename
1431 0 4 1435 59b tail.o.orig
1396 0 0 1396 574 tail.o
2007-04-04 20:29:15 +00:00
Bernhard Reutner-Fischer
2a47dea263
- remove bss users. Shrinkage while at it. See XXX for further, pre-existing bugs
...
text data bss dec hex filename
1969 0 32 2001 7d1 dd.o.oorig
1941 0 0 1941 795 dd.o
2007-04-04 14:01:23 +00:00
Bernhard Reutner-Fischer
3a60244ae9
- remove some bss users.
...
text data bss dec hex filename
6220 8 14 6242 1862 stty.o.oorig
6219 8 0 6227 1853 stty.o
2007-04-04 13:59:49 +00:00
Bernhard Reutner-Fischer
0e6ab01c5a
- remove superfluous bss user (flags) and manually unswitch some areas:
...
text data bss dec hex filename
4517 0 34 4551 11c7 stat.o.oorig
4300 0 30 4330 10ea stat.o
2007-04-04 13:58:33 +00:00
Bernhard Reutner-Fischer
cea0a8bccb
- use bb_error_msg
2007-04-02 17:01:22 +00:00
Bernhard Reutner-Fischer
8025afad8a
- use xregcomp. Untested. vda, isn't there a regfree missing here?
...
text data bss dec hex filename
2522 0 0 2522 9da expr.o.r18305
2478 0 0 2478 9ae expr.o
2007-04-02 16:54:41 +00:00
Bernhard Reutner-Fischer
3c5929a53b
- remove some unneeded forward declarations. No obj-code changes.
2007-04-02 16:41:24 +00:00
Bernhard Reutner-Fischer
adb01b1583
- remove args from bss, minor misc shrinkage while at it.
...
text data bss dec hex filename
2577 0 4 2581 a15 expr.o
2522 0 0 2522 9da expr.o
2007-04-02 16:38:13 +00:00
Denis Vlasenko
729bd9e0b0
test: comment out unused code
...
udpsvd: fake it compile
tcpsvd: more optimal memorizing of IP's for -C
2007-04-02 12:37:28 +00:00
Denis Vlasenko
4caa09a782
uniq: getopt32-ization. -38 bytes.
2007-03-31 10:19:11 +00:00
Bernhard Reutner-Fischer
7b881c7168
- fix compilation if FEATURE_TR_CLASSES is off. Sorry for that..
2007-03-30 18:26:46 +00:00
Bernhard Reutner-Fischer
cc890264d9
- debloat test. untested.
...
text data bss dec hex filename
3154 0 172 3326 cfe test.o.oorig
2683 0 172 2855 b27 test.o
This applet should be rewritten not to use such odd lexer semantics.
It duplicates code from all over the place (see XXX).
brrr
2007-03-30 18:23:36 +00:00
Bernhard Reutner-Fischer
eceecea568
- fix bug where we did not reject invalid classes like '[[:alpha'
...
- debloat while at it:
text data bss dec hex filename
1554 0 19 1573 625 tr.o.oorig
1357 0 16 1373 55d tr.o
2007-03-30 14:43:27 +00:00
Bernhard Reutner-Fischer
3e816c1252
- fold recurse, depthFirst and dereference params into one param flags.
...
Minor size improvement (-16b for size, -24b according to bloat-o-meter).
2007-03-29 10:30:50 +00:00
Bernhard Reutner-Fischer
0a537a0c57
- move additional fancy options not mandated by SUSv3 into a FANCY option
2007-03-28 16:48:40 +00:00
Denis Vlasenko
3983bd5593
diff: fix SEGV (NULL deref) in diff -N
2007-03-26 22:58:21 +00:00
Denis Vlasenko
91dd275f05
split: let me join bikeshed painting frenzy :)
...
this one should be able to handle huge files.
text data bss dec hex filename
664 4 0 668 29c busybox.t0/coreutils/split.o
628 0 0 628 274 busybox.t1/coreutils/split.o
split_main 488 525 +37
suffix_len 4 - -4
next_file 77 - -77
(add/remove: 0/2 grow/shrink: 1/0 up/down: 37/-81) Total: -44 bytes
2007-03-26 20:15:40 +00:00
Bernhard Reutner-Fischer
576de34d1c
- check the suffix proper plus misc touch up
2007-03-26 18:19:29 +00:00
Bernhard Reutner-Fischer
b813eaff23
- implement suffices as required by SUSv3
...
- fix glitch in next_file (suffices were exhaused too early).
2007-03-26 14:28:12 +00:00
Bernhard Reutner-Fischer
cd43dfdeec
- shrink a tiny bit (-8b)
2007-03-26 10:46:31 +00:00
Bernhard Reutner-Fischer
10f8f5f443
- rough prototype for split(1). TODO: Still needs some love since it's way too big..
...
text data bss dec hex filename
602 4 0 606 25e coreutils/split.o
2007-03-25 21:50:18 +00:00
Denis Vlasenko
9a1fa8cf07
cmp: support 3rd and 4th arguments if DESKTOP=y (needed for gcc build)
2007-03-21 22:30:14 +00:00
Denis Vlasenko
c86e052b81
fix accumulated whitespace and indentation damage
2007-03-20 11:30:28 +00:00
Denis Vlasenko
97fd6d81b4
ls: fix segfault-if-standalone-shell, add big fat comment.
2007-03-19 20:59:20 +00:00
Denis Vlasenko
16c7fb7fc5
chown, env: stop using statics
2007-03-14 22:08:04 +00:00
Denis Vlasenko
e1e93c1e1c
missed hunk of "stop using big static buffer for inode hash"
2007-03-14 22:06:57 +00:00
Denis Vlasenko
39c651e909
introduce and use setfscreatecon_or_die
...
(patch by Yuichi Nakamura <ynakam@hitachisoft.jp>)
runcon: *yet another* fix for vda's brainfart :(
2007-03-12 18:22:55 +00:00
Denis Vlasenko
1203c9bf2f
next portion of selinux updates: chcon, runcon. From
...
Yuichi Nakamura <himainu-ynakam@miomio.jp>
KaiGai Kohei <busybox@kaigai.gr.jp>
2007-03-11 22:16:02 +00:00
Denis Vlasenko
a4688bf55d
fix buglets found by randomconfig run
2007-03-11 10:56:37 +00:00
Denis Vlasenko
49622d7846
selinux support by Yuichi Nakamura <ynakam@hitachisoft.jp> (HitachiSoft)
2007-03-10 16:58:49 +00:00
Denis Vlasenko
339f5eb2e0
printf: allow hex/oct numbers; move functions around
...
so that we have no forward declarations
2007-03-09 16:43:01 +00:00
Denis Vlasenko
02f0c4c2bf
diff: failed to confirm "static bug" in gcc - reinstating statics.
...
microscopic code improvements.
2007-03-09 10:08:53 +00:00
Denis Vlasenko
8a91081d9d
chown: fix comment, fix verbose message
2007-03-08 16:14:46 +00:00
Denis Vlasenko
cd27c42552
chown: support -H -L -P if ENABLE_DESKTOP
...
chmod: cosmetic fixes
expr: smallish help for dumb compilers
2007-03-08 13:37:43 +00:00