people/mcb30/busybox.git
12 years agounzip: fix endianness bugs
vda [Thu, 18 Oct 2007 23:27:46 +0000 (23:27 +0000)]
unzip: fix endianness bugs

git-svn-id: svn://busybox.net/trunk/busybox@20295 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agohttpd: free big buffer after use; improve grep-ability of 'headers' variable
vda [Thu, 18 Oct 2007 13:01:22 +0000 (13:01 +0000)]
httpd: free big buffer after use; improve grep-ability of 'headers' variable

git-svn-id: svn://busybox.net/trunk/busybox@20289 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoxatonum.h: add comment
vda [Thu, 18 Oct 2007 12:54:39 +0000 (12:54 +0000)]
xatonum.h: add comment
lineedit: fix typo in comment
httpd: support for proxying connection to other http server
(by Alex Landau <landau_alex@yahoo.com>)

git-svn-id: svn://busybox.net/trunk/busybox@20288 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agomore of usage text fixes wrt long options
vda [Thu, 18 Oct 2007 11:11:12 +0000 (11:11 +0000)]
more of usage text fixes wrt long options

git-svn-id: svn://busybox.net/trunk/busybox@20283 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoexclude --longopts from usage texts if those are disabled
vda [Thu, 18 Oct 2007 10:52:36 +0000 (10:52 +0000)]
exclude --longopts from usage texts if those are disabled

git-svn-id: svn://busybox.net/trunk/busybox@20282 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agosnv add setsebool
vda [Thu, 18 Oct 2007 10:46:42 +0000 (10:46 +0000)]
snv add setsebool

git-svn-id: svn://busybox.net/trunk/busybox@20281 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotelnetd: make sure telnetd -K exits if child dies
vda [Wed, 17 Oct 2007 14:33:31 +0000 (14:33 +0000)]
telnetd: make sure telnetd -K exits if child dies

git-svn-id: svn://busybox.net/trunk/busybox@20274 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotelnetd: trivial optimization
vda [Wed, 17 Oct 2007 11:18:49 +0000 (11:18 +0000)]
telnetd: trivial optimization

git-svn-id: svn://busybox.net/trunk/busybox@20273 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoash: use fdprintf, not dprintf.
vda [Wed, 17 Oct 2007 11:08:53 +0000 (11:08 +0000)]
ash: use fdprintf, not dprintf.
*: trailing whitespace removed

git-svn-id: svn://busybox.net/trunk/busybox@20272 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: more of code shrink
vda [Wed, 17 Oct 2007 10:14:11 +0000 (10:14 +0000)]
bzip2: more of code shrink

compressStream                                       503     473     -30
BZ2_bzCompress                                        78       -     -78
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-108)           Total: -108 bytes
   text    data     bss     dec     hex filename
 676300    2538   12104  690942   a8afe busybox_old
 676192    2538   12104  690834   a8a92 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20271 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoanother fix for build failure found by randomconfig
vda [Wed, 17 Oct 2007 09:59:01 +0000 (09:59 +0000)]
another fix for build failure found by randomconfig

git-svn-id: svn://busybox.net/trunk/busybox@20270 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoeven more fixes from randomconfig runs
vda [Tue, 16 Oct 2007 23:00:50 +0000 (23:00 +0000)]
even more fixes from randomconfig runs

git-svn-id: svn://busybox.net/trunk/busybox@20269 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agofixes revealed by randomconfig run
vda [Tue, 16 Oct 2007 22:53:05 +0000 (22:53 +0000)]
fixes revealed by randomconfig run

git-svn-id: svn://busybox.net/trunk/busybox@20268 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotelnetd: fix comment
vda [Tue, 16 Oct 2007 22:01:23 +0000 (22:01 +0000)]
telnetd: fix comment

git-svn-id: svn://busybox.net/trunk/busybox@20267 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotelnetd: code shrink suggested by Ralf Friedl <Ralf.Friedl@online.de>
vda [Tue, 16 Oct 2007 21:35:17 +0000 (21:35 +0000)]
telnetd: code shrink suggested by Ralf Friedl <Ralf.Friedl@online.de>

git-svn-id: svn://busybox.net/trunk/busybox@20266 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: move state pointer to the offset 0 (smaller code)
vda [Tue, 16 Oct 2007 14:07:41 +0000 (14:07 +0000)]
bzip2: move state pointer to the offset 0 (smaller code)
ifdef out DecompressEnd if FEATURE_CLEAN_UP is not seleted

fallbackSort                                        1655    1672     +17
mainSort                                            2447    2458     +11
bzip2_main                                           109     119     +10
.rodata                                           123466  123469      +3
generateMTFValues                                    433     435      +2
handle_compress                                      355     356      +1
BZ2_bzCompress                                        79      78      -1
prepare_new_block                                     55      48      -7
compressStream                                       547     503     -44
sendMTFValues                                       2225    2140     -85
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/4 up/down: 44/-137)           Total: -93 bytes
   text    data     bss     dec     hex filename
 676421    2538   12104  691063   a8b77 busybox_old
 676328    2538   12104  690970   a8b1a busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20265 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: make -s equivalent to -2 (compatible with standard bzip2)
vda [Tue, 16 Oct 2007 10:47:27 +0000 (10:47 +0000)]
bzip2: make -s equivalent to -2 (compatible with standard bzip2)
telnetd: typo fix in comment

git-svn-id: svn://busybox.net/trunk/busybox@20263 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotelnetd: at Alexander Kriegisch <Alexander@kriegisch.name> insistence
vda [Mon, 15 Oct 2007 22:09:15 +0000 (22:09 +0000)]
telnetd: at Alexander Kriegisch <Alexander@kriegisch.name> insistence
add an option to close sessions as soon as child exits.
Maybe it should be a CONFIG option. OTOH, maybe it should be always on,
as it mimics, say, getty's behaviour.

function                                             old     new   delta
handle_sigchld                                         -      49     +49
telnetd_main                                        1312    1355     +43
.rodata                                           123429  123466     +37
packed_usage                                       22770   22806     +36
make_new_session                                     525     532      +7
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 172/0)             Total: 172 bytes
   text    data     bss     dec     hex filename
 676285    2538   12104  690927   a8aef busybox_old
 676421    2538   12104  691063   a8b77 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20262 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotelnetd: document bug in remove_iacs. reinstate band-aid
vda [Mon, 15 Oct 2007 17:28:00 +0000 (17:28 +0000)]
telnetd: document bug in remove_iacs. reinstate band-aid
which was making it near-impossible to trigger.
remove memmove call which was happening at each network read,
and in 99%+ cases was not needed. Unfortunately, +50 bytes.

git-svn-id: svn://busybox.net/trunk/busybox@20261 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotelnetd: some simplifications and better error hadling.
vda [Mon, 15 Oct 2007 15:19:36 +0000 (15:19 +0000)]
telnetd: some simplifications and better error hadling.
telnetd: don't SIGKILL child when closing the session.
kernel will seng SIGHUP for us.

static.iacs_to_send                                    -      15     +15
.rodata                                           123418  123429     +11
make_new_session                                     549     525     -24
send_iac                                              26       -     -26
free_session                                         144     118     -26
telnetd_main                                        1303    1261     -42
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/3 up/down: 26/-118)           Total: -92 bytes
   text    data     bss     dec     hex filename
 676341    2538   12104  690983   a8b27 busybox_old
 676234    2538   12104  690876   a8abc busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20260 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: update help text
vda [Sun, 14 Oct 2007 07:57:26 +0000 (07:57 +0000)]
bzip2: update help text

git-svn-id: svn://busybox.net/trunk/busybox@20259 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: implement -1..-9 command line flags
vda [Sun, 14 Oct 2007 07:51:19 +0000 (07:51 +0000)]
bzip2: implement -1..-9 command line flags

git-svn-id: svn://busybox.net/trunk/busybox@20258 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: eliminate some divisions
vda [Sun, 14 Oct 2007 07:49:48 +0000 (07:49 +0000)]
bzip2: eliminate some divisions

git-svn-id: svn://busybox.net/trunk/busybox@20257 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoremove trailing whitespace
vda [Sun, 14 Oct 2007 04:55:59 +0000 (04:55 +0000)]
remove trailing whitespace

git-svn-id: svn://busybox.net/trunk/busybox@20256 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agosetsebool: new applet (Yuichi Nakamura <ynakam@hitachisoft.jp>)
vda [Sun, 14 Oct 2007 04:48:44 +0000 (04:48 +0000)]
setsebool: new applet (Yuichi Nakamura <ynakam@hitachisoft.jp>)

git-svn-id: svn://busybox.net/trunk/busybox@20255 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agohttpd: fix bug where we were trying to read more POSTDATA than content-length
vda [Sun, 14 Oct 2007 02:34:20 +0000 (02:34 +0000)]
httpd: fix bug where we were trying to read more POSTDATA than content-length

git-svn-id: svn://busybox.net/trunk/busybox@20254 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: code size shrink
vda [Sun, 14 Oct 2007 01:37:53 +0000 (01:37 +0000)]
bzip2: code size shrink

git-svn-id: svn://busybox.net/trunk/busybox@20253 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: remove files which are not used anymore
vda [Sun, 14 Oct 2007 00:44:10 +0000 (00:44 +0000)]
bzip2: remove files which are not used anymore

git-svn-id: svn://busybox.net/trunk/busybox@20252 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: size reduction, to just below 9k.
vda [Sun, 14 Oct 2007 00:43:01 +0000 (00:43 +0000)]
bzip2: size reduction, to just below 9k.

git-svn-id: svn://busybox.net/trunk/busybox@20251 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobzip2: port bzip2 1.0.4 to busybox. note: bzip2 code resides
vda [Sat, 13 Oct 2007 03:36:03 +0000 (03:36 +0000)]
bzip2: port bzip2 1.0.4 to busybox. note: bzip2 code resides
in separate directory (archival/bz/*)
and is covered by BSD-style license.
code size: 13k

git-svn-id: svn://busybox.net/trunk/busybox@20238 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agowhitespace/style fix
vda [Thu, 11 Oct 2007 19:53:10 +0000 (19:53 +0000)]
whitespace/style fix

git-svn-id: svn://busybox.net/trunk/busybox@20225 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agomt: eliminate vector of structures with pointers (bad for libbusybox).
vda [Thu, 11 Oct 2007 19:38:59 +0000 (19:38 +0000)]
mt: eliminate vector of structures with pointers (bad for libbusybox).
It's a win for static build too:

function                                             old     new   delta
opcode_name                                            -     213    +213
opcode_value                                           -      68     +68
mt_main                                              281     256     -25
opcodes                                              280       -    -280
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/1 up/down: 281/-305)          Total: -24 bytes
   text    data     bss     dec     hex filename
 767403     974    9420  777797   bde45 busybox_old
 767224     974    9420  777618   bdd92 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20224 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agostty: incorporate strings into struct instead of keeping pointers there.
vda [Thu, 11 Oct 2007 16:02:36 +0000 (16:02 +0000)]
stty: incorporate strings into struct instead of keeping pointers there.

static:
   text    data     bss     dec     hex filename
 767535     974    9420  777929   bdec9 busybox_old
 767403     974    9420  777797   bde45 busybox_unstripped

dynamic -fpic:
   text    data     bss     dec     hex filename
 718954   14030   12032  745016   b5e38 busybox_old
 720278   12534   12032  744844   b5d8c busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20223 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agovi: don't wait 50 ms before reading ESC sequences
vda [Thu, 11 Oct 2007 10:10:15 +0000 (10:10 +0000)]
vi: don't wait 50 ms before reading ESC sequences
inetd,syslogd: use safe_read instead of open-coded EINTR handling
syslogd: bail out if you see null read from Unix socket
(should never happen, but if it does, spinning forever
and eating 100% CPU is not a good idea)

git-svn-id: svn://busybox.net/trunk/busybox@20222 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotrim too verbose help texts
vda [Thu, 11 Oct 2007 10:07:24 +0000 (10:07 +0000)]
trim too verbose help texts

git-svn-id: svn://busybox.net/trunk/busybox@20221 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agofix a problem with two different applet_name's
vda [Thu, 11 Oct 2007 10:06:26 +0000 (10:06 +0000)]
fix a problem with two different applet_name's

git-svn-id: svn://busybox.net/trunk/busybox@20220 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoadd -fvisibility=hidden to CC flags, mark XXX_main functions
vda [Thu, 11 Oct 2007 10:05:36 +0000 (10:05 +0000)]
add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so

git-svn-id: svn://busybox.net/trunk/busybox@20219 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoadd -fpic to CC flags when we build libbusybox (14% smaller .so)
vda [Thu, 11 Oct 2007 10:02:52 +0000 (10:02 +0000)]
add -fpic to CC flags when we build libbusybox (14% smaller .so)

git-svn-id: svn://busybox.net/trunk/busybox@20218 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agobunzip: small code shrink and consmetics
vda [Wed, 10 Oct 2007 20:53:41 +0000 (20:53 +0000)]
bunzip: small code shrink and consmetics

read_bunzip                                          276     283      +7
get_bits                                             184     162     -22
get_next_block                                      1833    1810     -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 7/-45)             Total: -38 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20217 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoip tunnel parameter parsing fix by Jean Wolter <jw5@os.inf.tu-dresden.de>
vda [Wed, 10 Oct 2007 14:43:03 +0000 (14:43 +0000)]
ip tunnel parameter parsing fix by Jean Wolter <jw5@os.inf.tu-dresden.de>

git-svn-id: svn://busybox.net/trunk/busybox@20216 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoMove applets/applet.c into libbb, allows to get rid of --whole-archive
vda [Wed, 10 Oct 2007 14:41:07 +0000 (14:41 +0000)]
Move applets/applet.c into libbb, allows to get rid of --whole-archive
(smaller code). Tested in static and shared mode.

git-svn-id: svn://busybox.net/trunk/busybox@20215 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoget rid of global "struct bb_applet *current_applet"
vda [Wed, 10 Oct 2007 14:38:47 +0000 (14:38 +0000)]
get rid of global "struct bb_applet *current_applet"

git-svn-id: svn://busybox.net/trunk/busybox@20214 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotrylink: s/strip/$STRIP/g
vda [Wed, 10 Oct 2007 10:05:35 +0000 (10:05 +0000)]
trylink: s/strip/$STRIP/g

git-svn-id: svn://busybox.net/trunk/busybox@20213 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotypo fix in help text
vda [Tue, 9 Oct 2007 18:08:04 +0000 (18:08 +0000)]
typo fix in help text

git-svn-id: svn://busybox.net/trunk/busybox@20212 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotrylink: trivial cleanup
vda [Tue, 9 Oct 2007 18:01:13 +0000 (18:01 +0000)]
trylink: trivial cleanup

git-svn-id: svn://busybox.net/trunk/busybox@20211 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotrylink: reformat link flags for readability
vda [Tue, 9 Oct 2007 13:49:26 +0000 (13:49 +0000)]
trylink: reformat link flags for readability
trylink: add --sort-section alignment:
    text           data     bss     dec     hex filename
-   6557            428    3260   10245    2805 busybox
+   6555            428    3260   10243    2803 busybox
- 909621           1076   12108  922805   e14b5 libbusybox.so.1.8.0.svn
+ 908868           1050   12016  921934   e114e libbusybox.so.1.8.0.svn

git-svn-id: svn://busybox.net/trunk/busybox@20210 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotrylink: remove useless redirects, add missing error checks
vda [Tue, 9 Oct 2007 13:08:02 +0000 (13:08 +0000)]
trylink: remove useless redirects, add missing error checks

git-svn-id: svn://busybox.net/trunk/busybox@20209 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotrylink: trivial fixes
vda [Tue, 9 Oct 2007 10:15:41 +0000 (10:15 +0000)]
trylink: trivial fixes

git-svn-id: svn://busybox.net/trunk/busybox@20208 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agomake "individual applets" build less noisy.
vda [Mon, 8 Oct 2007 22:16:14 +0000 (22:16 +0000)]
make "individual applets" build less noisy.
add *.tmp to list of files deleted by make mrproper.

git-svn-id: svn://busybox.net/trunk/busybox@20207 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agowhitespace fix
vda [Mon, 8 Oct 2007 20:45:42 +0000 (20:45 +0000)]
whitespace fix

git-svn-id: svn://busybox.net/trunk/busybox@20206 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoadd libbb/appletlib.c
vda [Mon, 8 Oct 2007 19:32:12 +0000 (19:32 +0000)]
add libbb/appletlib.c

git-svn-id: svn://busybox.net/trunk/busybox@20205 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agomake --help work for "individual applets" too.
vda [Sun, 7 Oct 2007 21:00:41 +0000 (21:00 +0000)]
make --help work for "individual applets" too.

git-svn-id: svn://busybox.net/trunk/busybox@20202 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agolibbusybox: move (possibly compressed) help stuff into libbusybox.
vda [Sun, 7 Oct 2007 20:46:34 +0000 (20:46 +0000)]
libbusybox: move (possibly compressed) help stuff into libbusybox.
Makes individual binaries much smaller.

git-svn-id: svn://busybox.net/trunk/busybox@20201 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotrim too verbose help messages
vda [Sun, 7 Oct 2007 19:13:55 +0000 (19:13 +0000)]
trim too verbose help messages

git-svn-id: svn://busybox.net/trunk/busybox@20200 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agowebsite: "BusyBox Weekly News" didn't really work, remove link
vda [Sun, 7 Oct 2007 18:10:44 +0000 (18:10 +0000)]
website: "BusyBox Weekly News" didn't really work, remove link

git-svn-id: svn://busybox.net/trunk/busybox@20195 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoash: revert "cat | jobs" fix, it causes more problems than good
vda [Sun, 7 Oct 2007 18:02:52 +0000 (18:02 +0000)]
ash: revert "cat | jobs" fix, it causes more problems than good

git-svn-id: svn://busybox.net/trunk/busybox@20194 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoreviving libbusybox, adding CONFIG_INDIVIDUAL part 4
vda [Sun, 7 Oct 2007 17:06:26 +0000 (17:06 +0000)]
reviving libbusybox, adding CONFIG_INDIVIDUAL part 4

git-svn-id: svn://busybox.net/trunk/busybox@20192 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoreviving libbusybox, adding CONFIG_INDIVIDUAL part 3
vda [Sun, 7 Oct 2007 17:06:01 +0000 (17:06 +0000)]
reviving libbusybox, adding CONFIG_INDIVIDUAL part 3

git-svn-id: svn://busybox.net/trunk/busybox@20191 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoreviving libbusybox, adding CONFIG_INDIVIDUAL part 2
vda [Sun, 7 Oct 2007 17:05:42 +0000 (17:05 +0000)]
reviving libbusybox, adding CONFIG_INDIVIDUAL part 2

git-svn-id: svn://busybox.net/trunk/busybox@20190 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoreviving libbusybox, adding CONFIG_INDIVIDUAL part 1
vda [Sun, 7 Oct 2007 17:05:22 +0000 (17:05 +0000)]
reviving libbusybox, adding CONFIG_INDIVIDUAL part 1

git-svn-id: svn://busybox.net/trunk/busybox@20189 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years ago- mark TODO: use index_in_str_array()
aldot [Sat, 6 Oct 2007 20:47:53 +0000 (20:47 +0000)]
- mark TODO: use index_in_str_array()

git-svn-id: svn://busybox.net/trunk/busybox@20188 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agochpst: fix whitespace damage
vda [Fri, 5 Oct 2007 22:11:06 +0000 (22:11 +0000)]
chpst: fix whitespace damage
svlogd: fix bug (two different "line" variables); stop using data/bss

function                                             old     new   delta
processorstop                                        419     432     +13
rotate                                               514     525     +11
buffer_pwrite                                        493     499      +6
sig_term_handler                                      68      70      +2
sig_hangup_handler                                    34      36      +2
sig_alarm_handler                                     34      36      +2
rmoldest                                             305     307      +2
processorstart                                       401     403      +2
logdir_close                                         188     190      +2
tmaxflag                                               1       -      -1
rotateasap                                             1       -      -1
repl                                                   1       -      -1
reopenasap                                             1       -      -1
linecomplete                                           1       -      -1
exitasap                                               1       -      -1
wstat                                                  4       -      -4
verbose                                                9       5      -4
replace                                                4       -      -4
nearest_rotate                                         4       -      -4
linemax                                                4       -      -4
linelen                                                4       -      -4
line                                                   4       -      -4
fndir                                                  4       -      -4
fl_flag_0                                              4       -      -4
fdwdir                                                 4       -      -4
dirn                                                   4       -      -4
dir                                                    4       -      -4
blocked_sigset                                         4       -      -4
sig_child_handler                                    248     239      -9
logdirs_reopen                                      1263    1240     -23
buffer_pread                                         532     473     -59
svlogd_main                                         1466    1367     -99
------------------------------------------------------------------------------
(add/remove: 0/18 grow/shrink: 9/5 up/down: 42/-248)         Total: -206 bytes
   text    data     bss     dec     hex filename
 770916     989    9496  781401   bec59 busybox_old
 770768     980    9448  781196   beb8c busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20187 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agochpst: stop using data/bss
vda [Fri, 5 Oct 2007 21:23:49 +0000 (21:23 +0000)]
chpst: stop using data/bss

function                                             old     new   delta
chpst_main                                          1066    1089     +23
set_user                                               4       -      -4
root                                                   4       -      -4
nicelvl                                                4       -      -4
limitt                                                 4       -      -4
limits                                               196     192      -4
limitr                                                 4       -      -4
limitp                                                 4       -      -4
limito                                                 4       -      -4
limitl                                                 4       -      -4
limitf                                                 4       -      -4
limitd                                                 4       -      -4
limitc                                                 4       -      -4
limita                                                 4       -      -4
env_user                                               4       -      -4
env_dir                                                4       -      -4
------------------------------------------------------------------------------
(add/remove: 0/14 grow/shrink: 1/1 up/down: 23/-60)           Total: -37 bytes
   text    data     bss     dec     hex filename
 770892    1029    9520  781441   bec81 busybox_old
 770916     989    9496  781401   bec59 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20186 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agostat: code shrink; stop using bss; stop using strncat incorrectly
vda [Fri, 5 Oct 2007 20:31:23 +0000 (20:31 +0000)]
stat: code shrink; stop using bss; stop using strncat incorrectly

function                                             old     new   delta
printfs                                                -      28     +28
strcatc                                                -      26     +26
human_time                                            41      44      +3
print_it                                             229     219     -10
buf                                                   30       -     -30
print_statfs                                         420     358     -62
print_stat                                          1089     921    -168
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/3 up/down: 57/-270)          Total: -213 bytes
   text    data     bss     dec     hex filename
 771105    1029    9552  781686   bed76 busybox_old
 770892    1029    9520  781441   bec81 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20185 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agodelete now unused check_header_gzip.c
vda [Fri, 5 Oct 2007 20:29:31 +0000 (20:29 +0000)]
delete now unused check_header_gzip.c
sum: do not use uintmax needlessly

git-svn-id: svn://busybox.net/trunk/busybox@20184 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agotail: sizeof(buf) is sizeof(char*)! must be BUFSIZ
vda [Fri, 5 Oct 2007 19:17:16 +0000 (19:17 +0000)]
tail: sizeof(buf) is sizeof(char*)! must be BUFSIZ

git-svn-id: svn://busybox.net/trunk/busybox@20183 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agoadd tests for gunzip
vda [Fri, 5 Oct 2007 15:27:03 +0000 (15:27 +0000)]
add tests for gunzip

git-svn-id: svn://busybox.net/trunk/busybox@20182 69ca8d6d-28ef-0310-b511-8ec308f3f277

12 years agogunzip: support concatenated gz files.
vda [Fri, 5 Oct 2007 15:26:08 +0000 (15:26 +0000)]
gunzip: support concatenated gz files.

   text    data     bss     dec     hex filename
 770988    1029    9552  781569   bed01 busybox.t0/busybox
 771105    1029    9552  781686   bed76 busybox.t3/busybox

git-svn-id: svn://busybox.net/trunk/busybox@20181 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotail: work correctly on /proc files (Kazuo TAKADA <kztakada@sm.sony.co.jp>)
vda [Tue, 2 Oct 2007 10:17:56 +0000 (10:17 +0000)]
tail: work correctly on /proc files (Kazuo TAKADA <kztakada@sm.sony.co.jp>)

git-svn-id: svn://busybox.net/trunk/busybox@20170 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agologger: fix a problem of losing all argv except first
vda [Tue, 2 Oct 2007 09:57:41 +0000 (09:57 +0000)]
logger: fix a problem of losing all argv except first

git-svn-id: svn://busybox.net/trunk/busybox@20169 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago- ditch 2 bytes
aldot [Mon, 1 Oct 2007 18:04:42 +0000 (18:04 +0000)]
- ditch 2 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20164 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoprintf("%s\n") -> puts()
vda [Mon, 1 Oct 2007 12:05:12 +0000 (12:05 +0000)]
printf("%s\n") -> puts()

git-svn-id: svn://busybox.net/trunk/busybox@20160 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
vda [Mon, 1 Oct 2007 11:58:38 +0000 (11:58 +0000)]
'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
263 bytes saved.

git-svn-id: svn://busybox.net/trunk/busybox@20159 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohush: fix glob() abuse. Code was making unfounded assumptions how
vda [Mon, 1 Oct 2007 10:02:25 +0000 (10:02 +0000)]
hush: fix glob() abuse. Code was making unfounded assumptions how
glob() works, and it broke horribly on specific uclibc config.

git-svn-id: svn://busybox.net/trunk/busybox@20158 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohush: int->smallint for flag vars; make some names more "greppable"
vda [Mon, 1 Oct 2007 10:00:45 +0000 (10:00 +0000)]
hush: int->smallint for flag vars; make some names more "greppable"

git-svn-id: svn://busybox.net/trunk/busybox@20157 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohush: feeble attempt at making it more NOMMU-friendly
vda [Mon, 1 Oct 2007 09:59:47 +0000 (09:59 +0000)]
hush: feeble attempt at making it more NOMMU-friendly

git-svn-id: svn://busybox.net/trunk/busybox@20156 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohush: stop doing manual acounting of open fd's, kernel can do it for us
vda [Mon, 1 Oct 2007 09:59:01 +0000 (09:59 +0000)]
hush: stop doing manual acounting of open fd's, kernel can do it for us

git-svn-id: svn://busybox.net/trunk/busybox@20155 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agointroduce and use close_on_exec_on(fd). -50 bytes.
vda [Sun, 30 Sep 2007 23:50:48 +0000 (23:50 +0000)]
introduce and use close_on_exec_on(fd). -50 bytes.

git-svn-id: svn://busybox.net/trunk/busybox@20153 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomove udhcp_{client/server}_config to common_bufsiz1
vda [Sun, 30 Sep 2007 17:55:43 +0000 (17:55 +0000)]
move udhcp_{client/server}_config to common_bufsiz1

udhcp_run_script                                    1108    1151     +43
init_packet                                          209     210      +1
udhcpc_main                                         2395    2393      -2
udhcp_client_config                                   56       -     -56
udhcp_server_config                                   88       -     -88
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/1 up/down: 44/-146)          Total: -102 bytes
   text    data     bss     dec     hex filename
 771326    1029    9696  782051   beee3 busybox_old
 771383    1029    9552  781964   bee8c busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20149 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agodhcpreplay: code shrink, -40 bytes
vda [Sun, 30 Sep 2007 17:54:10 +0000 (17:54 +0000)]
dhcpreplay: code shrink, -40 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20148 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agofixlet to pgrep/pkill
vda [Sun, 30 Sep 2007 16:36:02 +0000 (16:36 +0000)]
fixlet to pgrep/pkill

git-svn-id: svn://busybox.net/trunk/busybox@20147 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoprint_signames_and_exit -> print_signames (because of "ash calls kill_main")
vda [Sun, 30 Sep 2007 16:32:01 +0000 (16:32 +0000)]
print_signames_and_exit -> print_signames (because of "ash calls kill_main")

git-svn-id: svn://busybox.net/trunk/busybox@20146 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoreplace printf with fputs where appropriate
vda [Sun, 30 Sep 2007 16:22:36 +0000 (16:22 +0000)]
replace printf with fputs where appropriate

git-svn-id: svn://busybox.net/trunk/busybox@20145 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agolibiproute: add missing break's
vda [Sun, 30 Sep 2007 16:04:21 +0000 (16:04 +0000)]
libiproute: add missing break's

git-svn-id: svn://busybox.net/trunk/busybox@20144 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoannounce 1.7.2 on the website
vda [Sun, 30 Sep 2007 00:06:42 +0000 (00:06 +0000)]
announce 1.7.2 on the website

git-svn-id: svn://busybox.net/trunk/busybox@20137 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agosmall code shrink
vda [Sat, 29 Sep 2007 23:26:52 +0000 (23:26 +0000)]
small code shrink

git-svn-id: svn://busybox.net/trunk/busybox@20134 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agobuild system: pass EXTRA_LDFLAGS to final link stage
vda [Sat, 29 Sep 2007 22:52:25 +0000 (22:52 +0000)]
build system: pass EXTRA_LDFLAGS to final link stage

git-svn-id: svn://busybox.net/trunk/busybox@20133 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrivial typo fix
vda [Sat, 29 Sep 2007 22:49:26 +0000 (22:49 +0000)]
trivial typo fix

git-svn-id: svn://busybox.net/trunk/busybox@20132 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agopgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>
vda [Sat, 29 Sep 2007 22:26:01 +0000 (22:26 +0000)]
pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>

git-svn-id: svn://busybox.net/trunk/busybox@20131 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoxrealloc_getcwd_or_warn: smaller cod and less wasted RAM at run time
vda [Sat, 29 Sep 2007 19:19:55 +0000 (19:19 +0000)]
xrealloc_getcwd_or_warn: smaller cod and less wasted RAM at run time

git-svn-id: svn://busybox.net/trunk/busybox@20120 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoremove if() which is always true
vda [Sat, 29 Sep 2007 18:27:14 +0000 (18:27 +0000)]
remove if() which is always true

git-svn-id: svn://busybox.net/trunk/busybox@20118 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agobunzip2: trim verbose messages
vda [Fri, 28 Sep 2007 23:45:56 +0000 (23:45 +0000)]
bunzip2: trim verbose messages

   text    data     bss     dec     hex filename
 770752    1029    9696  781477   beca5 busybox_old
 770691    1029    9696  781416   bec68 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20109 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: trivial simplification
vda [Fri, 28 Sep 2007 22:35:29 +0000 (22:35 +0000)]
httpd: trivial simplification

git-svn-id: svn://busybox.net/trunk/busybox@20108 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomore "if (p) free(p)" fixes; fix a typo in comment
vda [Fri, 28 Sep 2007 22:13:55 +0000 (22:13 +0000)]
more "if (p) free(p)" fixes; fix a typo in comment

git-svn-id: svn://busybox.net/trunk/busybox@20104 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agofix "if (p) free(p)" constructs
vda [Fri, 28 Sep 2007 22:07:23 +0000 (22:07 +0000)]
fix "if (p) free(p)" constructs

git-svn-id: svn://busybox.net/trunk/busybox@20103 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoremove stray semicolon
vda [Fri, 28 Sep 2007 21:56:36 +0000 (21:56 +0000)]
remove stray semicolon

git-svn-id: svn://busybox.net/trunk/busybox@20102 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: paranoia-induced fix against theoretical div-by-0 case
vda [Fri, 28 Sep 2007 13:41:41 +0000 (13:41 +0000)]
hdparm: paranoia-induced fix against theoretical div-by-0 case

git-svn-id: svn://busybox.net/trunk/busybox@20084 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: more robust (re overflows) code. +38 bytes.
vda [Fri, 28 Sep 2007 13:38:08 +0000 (13:38 +0000)]
hdparm: more robust (re overflows) code. +38 bytes.

git-svn-id: svn://busybox.net/trunk/busybox@20083 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrivial fix in setfiles. spotted by Yuichi Nakamura <ynakam@hitachisoft.jp>
vda [Fri, 28 Sep 2007 11:37:38 +0000 (11:37 +0000)]
trivial fix in setfiles. spotted by Yuichi Nakamura <ynakam@hitachisoft.jp>

git-svn-id: svn://busybox.net/trunk/busybox@20082 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: reduce possibility of numeric overflow in -T.
vda [Fri, 28 Sep 2007 11:21:47 +0000 (11:21 +0000)]
hdparm: reduce possibility of numeric overflow in -T.

do_time                                              386     410     +24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 24/0)               Total: 24 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20081 69ca8d6d-28ef-0310-b511-8ec308f3f277