Denis Vlasenko [Tue, 5 Jun 2007 22:29:14 +0000 (22:29 -0000)]
remove bashisms from testsuite
Denis Vlasenko [Tue, 5 Jun 2007 20:08:11 +0000 (20:08 -0000)]
nc: make connecting to IPv4 from IPv6-enabled hosts easier
(was requiring -s <local addr>)
Bernhard Reutner-Fischer [Tue, 5 Jun 2007 17:28:56 +0000 (17:28 -0000)]
- kiltedknight writes: Busybox incorrectly parses a line from the status file, claiming that a required package is not installed or tagged to be installed when it actually is.
Closes #1221
Bernhard Reutner-Fischer [Tue, 5 Jun 2007 17:07:01 +0000 (17:07 -0000)]
- fix typo in error message. Closes #1308
Denis Vlasenko [Mon, 4 Jun 2007 23:32:35 +0000 (23:32 -0000)]
uudecode: fix to base64 decode by Jorgen Cederlof <jcz@google.com>
improved help texts
# make bloatcheck
function old new delta
.rodata 127000 127032 +32
packed_usage 22156 22151 -5
uudecode_main 360 348 -12
uuencode_main 490 468 -22
read_base64 283 254 -29
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/4 up/down: 32/-68) Total: -36 bytes
Denis Vlasenko [Mon, 4 Jun 2007 21:03:51 +0000 (21:03 -0000)]
snprintf(... "%s"...) => safe_strncpy
Denis Vlasenko [Mon, 4 Jun 2007 18:23:59 +0000 (18:23 -0000)]
syslogd: move some vectors from data to text. Needs uclibc patch
to have any effect (patch is submitted to uclibc ml).
# size *[67]/*/syslog*.o
text data bss dec hex filename
3169 288 0 3457 d81 busybox.t6/sysklogd/syslogd.o
3457 0 0 3457 d81 busybox.t7/sysklogd/syslogd.o
Denis Vlasenko [Mon, 4 Jun 2007 12:21:53 +0000 (12:21 -0000)]
diff: stop using data/bss
function old new delta
do_diff 385 436 +51
diff_main 850 895 +45
dump_unified_vec 437 457 +20
prepare 335 334 -1
anychange 1 - -1
suff 4 - -4
status 135 131 -4
static.max_context 4 - -4
start 12 8 -4
pref 4 - -4
member 4 - -4
label2 4 - -4
label1 4 - -4
klist 4 - -4
ixold 4 - -4
ixnew 4 - -4
dl_count 4 - -4
dl 4 - -4
context_vec_start 4 - -4
context_vec_ptr 4 - -4
context_vec_end 4 - -4
context 4 - -4
clistlen 4 - -4
clist 4 - -4
clen 4 - -4
class 4 - -4
J 4 - -4
add_to_dirlist 71 64 -7
slen 8 - -8
sfile 8 - -8
len 8 - -8
file 8 - -8
get_dir 196 185 -11
newcand 97 85 -12
change 351 331 -20
stb2 96 - -96
stb1 96 - -96
diffreg 2835 2717 -118
------------------------------------------------------------------------------
(add/remove: 0/27 grow/shrink: 3/8 up/down: 116/-482) Total: -366 bytes
# size */*/diff.o
text data bss dec hex filename
7055 8 305 7368 1cc8 busybox.t2/coreutils/diff.o
7002 0 0 7002 1b5a busybox.t3/coreutils/diff.o
Denis Vlasenko [Mon, 4 Jun 2007 10:33:48 +0000 (10:33 -0000)]
ping: stop using data/bss
function old new delta
ping_main 375 392 +17
unpack_tail 317 320 +3
ping4 525 528 +3
ping6 772 773 +1
sendping6 99 98 -1
sendping4 184 183 -1
myid 2 - -2
sendping_tail 154 151 -3
tsum 4 - -4
tmin 4 - -4
tmax 4 - -4
source_lsa 4 - -4
pingsock 4 - -4
pingcount 4 - -4
ntransmitted 4 - -4
nrepeats 4 - -4
nreceived 4 - -4
if_index 4 - -4
hostname 8 4 -4
dotted 4 - -4
datalen 4 - -4
pingaddr 28 - -28
rcvd_tbl 128 - -128
------------------------------------------------------------------------------
(add/remove: 0/15 grow/shrink: 4/4 up/down: 24/-215) Total: -191 bytes
text data bss dec hex filename
679835 2728 16736 699299 aaba3 busybox_old
679851 2720 16536 699107 aaae3 busybox_unstripped
Denis Vlasenko [Mon, 4 Jun 2007 10:16:52 +0000 (10:16 -0000)]
Audit bb_common_bufsiz usage, add script which looks for misuse.
tr: stop using globals needlessly.
code: -103 bytes
Denis Vlasenko [Sun, 3 Jun 2007 22:30:22 +0000 (22:30 -0000)]
find_stray_communal_vars: script which finds communal variables
resize: remove globals var
mdev: remove globals var
Denis Vlasenko [Sat, 2 Jun 2007 12:54:09 +0000 (12:54 -0000)]
start 1.7.x version
Denis Vlasenko [Sat, 2 Jun 2007 12:46:55 +0000 (12:46 -0000)]
fdisk: make it work with big disks (read: typical today's disks)
even if CONFIG_LFS is unset.
Denis Vlasenko [Fri, 1 Jun 2007 14:40:03 +0000 (14:40 -0000)]
website: announce 1.6.0
Denis Vlasenko [Thu, 31 May 2007 23:55:39 +0000 (23:55 -0000)]
less: less <HUGEFILE + [End] busy loops, fix it
Denis Vlasenko [Thu, 31 May 2007 23:06:18 +0000 (23:06 -0000)]
less: forgot trivial #if ENABLE_xxxx
Denis Vlasenko [Thu, 31 May 2007 22:42:12 +0000 (22:42 -0000)]
delete tons of extra #includes
Denis Vlasenko [Thu, 31 May 2007 22:16:38 +0000 (22:16 -0000)]
use "glibc errno" trick not only for ash, but for entire busybox
(add/remove: 1/1 grow/shrink: 37/37 up/down: 139/-228) Total: -89 bytes
Denis Vlasenko [Thu, 31 May 2007 21:31:56 +0000 (21:31 -0000)]
more: stop using bss
# make && make bloatcheck
function old new delta
gotsig 86 107 +21
more_main 777 781 +4
cin_fileno 4 - -4
set_tty_to_initial_mode 25 - -25
new_settings 120 60 -60
initial_settings 120 60 -60
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/2 up/down: 25/-149) Total: -124 bytes
Denis Vlasenko [Thu, 31 May 2007 15:56:10 +0000 (15:56 -0000)]
less: fix very obscure memory corruption bug
Denis Vlasenko [Thu, 31 May 2007 15:55:03 +0000 (15:55 -0000)]
less: stop using data/bss. Code got smaller too.
# size busybox_old busybox_unstripped
text data bss dec hex filename
700719 2896 17880 721495 b0257 busybox_old
700547 2832 17432 720811 affab busybox_unstripped
# size */*/less.o
text data bss dec hex filename
6861 50 344 7255 1c57 busybox.t0/miscutils/less.o
6657 0 0 6657 1a01 busybox.t1/miscutils/less.o
Denis Vlasenko [Wed, 30 May 2007 14:48:38 +0000 (14:48 -0000)]
nmeter: stop using data/bss; reduce amount of reads from /proc
# size */*/nmeter.o
text data bss dec hex filename
4366 80 16 4462 116e busybox.t0/miscutils/nmeter.o
4386 0 0 4386 1122 busybox.t2/miscutils/nmeter.o
Denis Vlasenko [Wed, 30 May 2007 02:01:40 +0000 (02:01 -0000)]
vi: move some data to malloc'ed space: ~500 less bss, code
size is smaller too (subject to arch differenced I guess)
Denis Vlasenko [Wed, 30 May 2007 00:55:52 +0000 (00:55 -0000)]
hush: trivial buglet found by randomconfig testing
Denis Vlasenko [Wed, 30 May 2007 00:29:55 +0000 (00:29 -0000)]
whitespace fixes
Denis Vlasenko [Tue, 29 May 2007 21:41:28 +0000 (21:41 -0000)]
verror_msg: don't printf(NULL)
Denis Vlasenko [Sun, 27 May 2007 03:39:50 +0000 (03:39 -0000)]
test: close bug 1371
test: plug a memory leak
Denis Vlasenko [Sun, 27 May 2007 00:53:41 +0000 (00:53 -0000)]
ping: fix wrong sign extension of packet id (bug 1373)
Denis Vlasenko [Sat, 26 May 2007 19:00:18 +0000 (19:00 -0000)]
usage.c: remove reference to busybox.h
*: s/include "busybox.h"/include "libbb.h"
Denis Vlasenko [Sat, 26 May 2007 16:44:20 +0000 (16:44 -0000)]
xpipe: introduce (saves ~170 bytes)
udhcp/signalpipe.c: use pipe instead of socketpair.
Bernhard Reutner-Fischer [Sat, 26 May 2007 11:59:01 +0000 (11:59 -0000)]
- fix typo in help text and fix punctuation
Denis Vlasenko [Fri, 25 May 2007 14:34:30 +0000 (14:34 -0000)]
hush: fix 'echo abc`sleep 5`def' + Ctrl-Z and Ctrl-C bugs. +50 bytes of code.
Denis Vlasenko [Fri, 25 May 2007 11:12:32 +0000 (11:12 -0000)]
hush: avoid duplicating HUSH_VERSION
Denis Vlasenko [Fri, 25 May 2007 10:00:36 +0000 (10:00 -0000)]
hush: micro-optimization in new variable code
Denis Vlasenko [Fri, 25 May 2007 02:46:01 +0000 (02:46 -0000)]
hush: we can't do without variable->value member, saving 25 bytes of code
and some runtime memory. Rename few variables.
Denis Vlasenko [Fri, 25 May 2007 02:16:25 +0000 (02:16 -0000)]
hush: rework variable storage and environment handling.
More that -100 bytes of code + memory leak plugged.
Added a testcase for it.
Denis Vlasenko [Thu, 24 May 2007 13:52:46 +0000 (13:52 -0000)]
hush: update README with yet another failure case
Denis Vlasenko [Thu, 24 May 2007 13:22:47 +0000 (13:22 -0000)]
hush: fix segfaulting syntax error in interactive hush
Denis Vlasenko [Thu, 24 May 2007 13:22:01 +0000 (13:22 -0000)]
hush: improve 2 testsuite tests
Denis Vlasenko [Thu, 24 May 2007 12:26:39 +0000 (12:26 -0000)]
hush: add 2 tests for correct syntax error reporting
Denis Vlasenko [Thu, 24 May 2007 12:19:56 +0000 (12:19 -0000)]
udhcp: socketpair can fail if AF_UNIX is not available (e.g. if module is not loaded).
Error out on that.
Denis Vlasenko [Thu, 24 May 2007 12:18:16 +0000 (12:18 -0000)]
hush: fix handling of unmatched ${name (without closing '}') -
was eating all remaining input, potentially megabytes.
nofork: save/restore die_jmp too
nofork: use -2222 instead of -111 as "special" return valur for zero
(-111 is used by some applets. -2222 won't fit in exitcode and thus safer)
Denis Vlasenko [Wed, 23 May 2007 15:22:50 +0000 (15:22 -0000)]
hush: make syntax error messages a bit more useful
Denis Vlasenko [Wed, 23 May 2007 15:16:41 +0000 (15:16 -0000)]
hush: prepare testsuite for new, fixed error message format
Denis Vlasenko [Wed, 23 May 2007 13:01:10 +0000 (13:01 -0000)]
hush: fix job control with eval /bin/external_prog
hush: fix parsing of unterminated "str with no EOL
hush: improved make_string() (smaller, faster, needs less RAM)
hush: renamed several functions
Denis Vlasenko [Wed, 23 May 2007 00:32:25 +0000 (00:32 -0000)]
hush: fix a bit different instance of "No EOL" bug,
add testsuite for that. Expand another testsuite.
Denis Vlasenko [Wed, 23 May 2007 00:26:32 +0000 (00:26 -0000)]
fix execute bit on hush-misc/shift.tests
Denis Vlasenko [Tue, 22 May 2007 21:46:11 +0000 (21:46 -0000)]
hdparm: make -T -t code smaller (-194 bytes), and output prettier
Denis Vlasenko [Mon, 21 May 2007 23:30:54 +0000 (23:30 -0000)]
hush: add 3 CONFIG_xxx, allowing for smaller and less capable hush.
Minimal hush is ~9k now (lash is ~7k).
Denis Vlasenko [Mon, 21 May 2007 10:19:48 +0000 (10:19 -0000)]
shells: update README and testsuite. environment memory leak
needs to be fixed - and documented!
Denis Vlasenko [Mon, 21 May 2007 10:18:23 +0000 (10:18 -0000)]
hush: using smallints where we can. save ~20 bytes in code and
some data storage at runtime.
Denis Vlasenko [Sun, 20 May 2007 22:22:18 +0000 (22:22 -0000)]
hush: fix shift + $0 bug; add testcase
Denis Vlasenko [Sun, 20 May 2007 21:52:49 +0000 (21:52 -0000)]
hush: trivial size optimization
Denis Vlasenko [Sun, 20 May 2007 21:51:38 +0000 (21:51 -0000)]
hush: make process substitution configurable; add a testcase
Denis Vlasenko [Sun, 20 May 2007 17:12:43 +0000 (17:12 -0000)]
busybox.net: announce 1.5.1 on the web site.
Denis Vlasenko [Sun, 20 May 2007 13:08:31 +0000 (13:08 -0000)]
ash: implement type -p, costs less than 10 bytes
(patch by Mats Erik Andersson <mats.andersson64@comhem.se>)
Denis Vlasenko [Sun, 20 May 2007 12:32:41 +0000 (12:32 -0000)]
mount: fix mounting of symlinks (mount from util-linux allows that)
Denis Vlasenko [Fri, 18 May 2007 09:45:36 +0000 (09:45 -0000)]
cttyhack: new applet.
Denis Vlasenko [Fri, 18 May 2007 07:37:06 +0000 (07:37 -0000)]
make "static linking against glibc" an #error, not #warning
Denis Vlasenko [Fri, 18 May 2007 07:30:43 +0000 (07:30 -0000)]
awk: fix a trivial bug introduced by me.
This is how it goes. I break stuff by doing useless 'cleanups',
people fix the fallout. :(. Thanks rockeychu!
Denis Vlasenko [Fri, 18 May 2007 00:02:37 +0000 (00:02 -0000)]
we were basically ignoring CONFIG_USE_BB_PWD_GRP (assuming =y),
fix this
Denis Vlasenko [Thu, 17 May 2007 23:03:35 +0000 (23:03 -0000)]
awk: make code a bit less obfuscated
Denis Vlasenko [Thu, 17 May 2007 23:02:14 +0000 (23:02 -0000)]
several *.c files:
move 'extern environ' up to the location of #includes
Denis Vlasenko [Thu, 17 May 2007 16:37:22 +0000 (16:37 -0000)]
vi: remove two globals
awk: some 'lineno' vars were shorts, made them ints (code got smaller)
awk: rename global t to global ttt. still an awful name, but at least
you can grep for it now.
function old new delta
ttt - 28 +28
mysleep 104 120 +16
readit 408 418 +10
lineno 2 4 +2
parse_program 338 339 +1
evaluate 6446 6445 -1
syntax_error 25 23 -2
next_token 917 915 -2
new_node 26 24 -2
tv 16 8 -8
skip_spaces 68 53 -15
t 28 - -28
rfds 128 - -128
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 4/6 up/down: 57/-186) Total: -129 bytes
Denis Vlasenko [Thu, 17 May 2007 15:38:46 +0000 (15:38 -0000)]
hush: do "struct globals" trick. hush.o data+bss = 0 bytes now.
+60 bytes to image, but -8000 bytes in bss.
Denis Vlasenko [Thu, 17 May 2007 14:38:17 +0000 (14:38 -0000)]
hush: consolidated variable expansion for assignments and "normal" one.
-435 bytes. Tested against testsuite.
Denis Vlasenko [Thu, 17 May 2007 13:02:41 +0000 (13:02 -0000)]
more compile fixes from randomconfig run
Denis Vlasenko [Thu, 17 May 2007 12:58:30 +0000 (12:58 -0000)]
fix trivial compile errors found by randomconfig run
Denis Vlasenko [Wed, 16 May 2007 22:25:35 +0000 (22:25 -0000)]
netstat: fix error in new -W option handling
Denis Vlasenko [Wed, 16 May 2007 22:18:54 +0000 (22:18 -0000)]
hush: take care of several easy FIXMEs. -228 bytes.
Denis Vlasenko [Wed, 16 May 2007 15:05:36 +0000 (15:05 -0000)]
hush: another microscopic typo fix
Denis Vlasenko [Wed, 16 May 2007 12:57:12 +0000 (12:57 -0000)]
hush: fix English in comment
Denis Vlasenko [Wed, 16 May 2007 12:52:15 +0000 (12:52 -0000)]
hush: simplify read builtin; fix set_local_var (misplaced 'goto skip;')
Denis Vlasenko [Wed, 16 May 2007 10:39:24 +0000 (10:39 -0000)]
hush: fix expansion of quoted $VAR, $* and $@
Denis Vlasenko [Wed, 16 May 2007 09:36:55 +0000 (09:36 -0000)]
hush: fix incorrect processing of echo "'$var'".
hush: rename map[] and MAP_xxx, making them easier to understand.
hush: move testcase (which now passes) from hush-bugs to hush-parsing
Denis Vlasenko [Tue, 15 May 2007 23:57:46 +0000 (23:57 -0000)]
netstat: introduce -W: wide, ipv6-friendly output
netstat: shrink by ~500 bytes
(patch by Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>)
netstat: fix for bogus state value for raw sockets
Bernhard Reutner-Fischer [Tue, 15 May 2007 09:33:32 +0000 (09:33 -0000)]
- apply hunk that fixes an issue with (wrong?) dependencies. Initial notes were:
There is something wrong in the new buildsys: If one selects ip and has e.g.
rule or route unset, ip still wants to build those.
This fails (correctly) since rtnl_rttable_n2a and rtnl_rtrealm_n2a aren't
available if they were turned off. TODO: Talk to vda about this
Bernhard Reutner-Fischer [Tue, 15 May 2007 09:07:06 +0000 (09:07 -0000)]
- busybox.c was removed a while ago
Denis Vlasenko [Mon, 14 May 2007 22:09:52 +0000 (22:09 -0000)]
hush: move testsuite files from hush-bugs to hush-parsing
(as these bugs are now fixed)
Denis Vlasenko [Mon, 14 May 2007 16:23:23 +0000 (16:23 -0000)]
hush: more fixes to variable expansion, more testcases
Denis Vlasenko [Mon, 14 May 2007 16:19:34 +0000 (16:19 -0000)]
hush: move towards more correct variable expansion
hush: fix a few cases in FOR v IN ... construct
unfortunately, code growth is big - ~600 bytes
Denis Vlasenko [Sun, 13 May 2007 18:34:53 +0000 (18:34 -0000)]
hush: fix '{ false; echo $?; }' bug.
hush: expand testsuite. variable expansion is still very broken
Denis Vlasenko [Fri, 11 May 2007 12:57:35 +0000 (12:57 -0000)]
hush: reinstate hush_test, add testcases for process subst
Denis Vlasenko [Fri, 11 May 2007 12:56:43 +0000 (12:56 -0000)]
hush: fix bug in interactive shell introduced yesterday
hush: fix `process subst` (2 bugs)
NB: will delete and re-add hush_test in order to change file modes
Denis Vlasenko [Thu, 10 May 2007 23:06:55 +0000 (23:06 -0000)]
hush: fix "unterminated last line loops forever" bug
hush: add testsuite infrastructure
Denis Vlasenko [Thu, 10 May 2007 23:05:28 +0000 (23:05 -0000)]
hush: fix recent breakage (VAR=VAL stopped working)
Denis Vlasenko [Wed, 9 May 2007 22:16:08 +0000 (22:16 -0000)]
msh: fix obscure case with backticks and closed fd 1
Denis Vlasenko [Wed, 9 May 2007 21:57:23 +0000 (21:57 -0000)]
awk: don't segfault on printf(%*s). Close 1337.
Denis Vlasenko [Wed, 9 May 2007 21:27:15 +0000 (21:27 -0000)]
cryptpw: size reduction
function old new delta
cryptpw_main 198 140 -58
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-58) Total: -58 bytes
Denis Vlasenko [Wed, 9 May 2007 20:38:04 +0000 (20:38 -0000)]
mount: fix incorrect usage of strtok (inadvertently used NULL sometimes).
the change is "for(xxx)...." -> "if(var) for(xxx)...", but my gcc 4.1.2
adds _158 bytes_!! WTF?? 8(
Denis Vlasenko [Wed, 9 May 2007 18:32:54 +0000 (18:32 -0000)]
less: fix case when regex search finds nothing
Denis Vlasenko [Wed, 9 May 2007 12:50:08 +0000 (12:50 -0000)]
tftp: explain "block# 0" codepath; report our decision to bail out to server
if blocksize option doesn't look good (it was a FIXME. +33 bytes code);
make code more readable.
Denis Vlasenko [Tue, 8 May 2007 23:23:35 +0000 (23:23 -0000)]
cryptpw: forgot svn add... how typical of me :(
Denis Vlasenko [Tue, 8 May 2007 23:12:21 +0000 (23:12 -0000)]
tftp: code diet, and I think retransmits were broken.
function old new delta
static.errcode_str - 32 +32
tftp_main 359 345 -14
tftp_bb_error_msg 32 - -32
.rodata 130931 130899 -32
tftp 1720 1558 -162
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/3 up/down: 32/-240) Total: -208 bytes
Denis Vlasenko [Tue, 8 May 2007 17:52:17 +0000 (17:52 -0000)]
cryptpw: new applet (a bit less than 3k added)
(by Thomas Lundquist <lists@zelow.no>)
Denis Vlasenko [Tue, 8 May 2007 17:27:17 +0000 (17:27 -0000)]
tail: fix SEGV on "tail -N"
config system: clarify PREFER_APPLETS/SH_STANDALONE effects in help text
Denis Vlasenko [Sun, 6 May 2007 22:51:52 +0000 (22:51 -0000)]
kill: improve comment
Denis Vlasenko [Sun, 6 May 2007 22:48:55 +0000 (22:48 -0000)]
kill: fix recent breakage of vda, also make code smaller by 21 bytes.
Denis Vlasenko [Sun, 6 May 2007 14:15:42 +0000 (14:15 -0000)]
hush: fix double-free in "echo TEST &"
Denis Vlasenko [Sun, 6 May 2007 01:37:21 +0000 (01:37 -0000)]
svlogd: fix 'SEGV on uninitialized data' and make it honor TERM