oweals/busybox.git
16 years agofbset: code shrink
Denis Vlasenko [Sun, 27 Jul 2008 20:25:29 +0000 (20:25 -0000)]
fbset: code shrink

function                                             old     new   delta
ss                                                     -      33     +33
fbset_main                                          1968    1844    -124
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 33/-124)           Total: -91 bytes

16 years agonetstat: code shrink
Denis Vlasenko [Sun, 27 Jul 2008 17:24:19 +0000 (17:24 -0000)]
netstat: code shrink

function                                             old     new   delta
print_inet_line                                        -     193    +193
scan_inet_proc_line                                    -     130    +130
unix_do_one                                          519     503     -16
do_info                                              145      97     -48
netstat_main                                         601     548     -53
tcp_do_one                                           462      61    -401
raw_do_one                                           513     107    -406
udp_do_one                                           533     119    -414
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/6 up/down: 323/-1338)       Total: -1015 bytes

16 years agostyle fix, no code changes
Denis Vlasenko [Sun, 27 Jul 2008 14:15:42 +0000 (14:15 -0000)]
style fix, no code changes

16 years agonetstat: optional -p support by L. Gabriel Somlo <somlo AT cmu.edu>
Denis Vlasenko [Sun, 27 Jul 2008 12:10:07 +0000 (12:10 -0000)]
netstat: optional -p support by L. Gabriel Somlo <somlo AT cmu.edu>

Without FEATURE_NETSTAT_PRG:
function                                             old     new   delta
recursive_action                                     416     425      +9
tcp_do_one                                           420     428      +8
udp_do_one                                           492     499      +7
raw_do_one                                           472     479      +7
expand                                              1697    1701      +4
netstat_main                                         489     492      +3
unix_do_one                                          486     488      +2
flags                                                  1       -      -1
qgravechar                                           109     106      -3
net_conn_line                                          4       -      -4
bbunpack                                             391     383      -8
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 7/2 up/down: 40/-16)             Total: 24 bytes

With FEATURE_NETSTAT_PRG:
file_act                                               -     213    +213
dir_act                                                -     192    +192
netstat_main                                         489     601    +112
prg_cache_get                                          -      50     +50
tcp_do_one                                           420     462     +42
udp_do_one                                           492     533     +41
raw_do_one                                           472     513     +41
unix_do_one                                          486     519     +33
recursive_action                                     416     425      +9
expand                                              1697    1701      +4
flags                                                  1       -      -1
qgravechar                                           109     106      -3
net_conn_line                                          4       -      -4
bbunpack                                             391     383      -8
packed_usage                                       24586   24572     -14
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 7/3 up/down: 737/-30)           Total: 707 bytes

16 years agowhitespace fix
Denis Vlasenko [Sat, 26 Jul 2008 23:16:33 +0000 (23:16 -0000)]
whitespace fix

16 years agoman: a forgotten chunk of lask commit (config file parser fixes)
Denis Vlasenko [Sat, 26 Jul 2008 23:14:23 +0000 (23:14 -0000)]
man: a forgotten chunk of lask commit (config file parser fixes)

16 years agofix several problems with config parser:
Denis Vlasenko [Sat, 26 Jul 2008 23:08:31 +0000 (23:08 -0000)]
fix several problems with config parser:
 a bug where it underflows the string
 a bug where it never frees parser_t struct
make read_config() return 0 if parser is NULL,
 make config_close() accept and ignore NULL parser -
 eliminates many if() blocks
reverse the sense of parser bit flags - negative flags
 are harder to grok.
hexdump: revert the change to use config parser, it is BIGGER
 and also requires additional quirks in parser
*: explicitly use PARSER_NORMAL instead of 0

function                                             old     new   delta
login_main                                          1575    1596     +21
config_close                                          18      29     +11
bbunpack                                             383     391      +8
qgravechar                                           106     109      +3
rtnl_tab_initialize                                  121     117      -4
expand                                              1697    1693      -4
man_main                                             717     712      -5
nameif_main                                          674     668      -6
hexdump_main                                         597     591      -6
read_config                                          217     209      -8
dnsd_main                                           1478    1470      -8
sysctl_main                                          203     189     -14
config_open2                                          44      25     -19
make_device                                         1177    1141     -36
config_read                                          597     549     -48
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/11 up/down: 43/-158)         Total: -115 bytes

16 years agoman: ignore (not complain) lines with less than 2 tokens
Denis Vlasenko [Sat, 26 Jul 2008 19:44:53 +0000 (19:44 -0000)]
man: ignore (not complain) lines with less than 2 tokens
 in config file

16 years agotr: fix "access past the end of a string" bug 4354
Denis Vlasenko [Sat, 26 Jul 2008 19:34:00 +0000 (19:34 -0000)]
tr: fix "access past the end of a string" bug 4354

16 years agomdev: do not complain if mdev.conf does not exist;
Denis Vlasenko [Sat, 26 Jul 2008 18:35:10 +0000 (18:35 -0000)]
mdev: do not complain if mdev.conf does not exist;
 use #if to prevent gcc from generating dead code
 (sadly, it's more ugly this way)

16 years agounzip: move check for unsupported zip features to better place
Denis Vlasenko [Sat, 26 Jul 2008 17:32:41 +0000 (17:32 -0000)]
unzip: move check for unsupported zip features to better place

16 years agounzip: give better error message when presented with unsupported
Denis Vlasenko [Sat, 26 Jul 2008 16:50:24 +0000 (16:50 -0000)]
unzip: give better error message when presented with unsupported
 zip file. Add zip documentation and an example of file we cant
 (yet) unpack.

16 years agoash: add slightly different testcase
Denis Vlasenko [Sat, 26 Jul 2008 14:20:04 +0000 (14:20 -0000)]
ash: add slightly different testcase

16 years agofix example of vcsa creation
Denis Vlasenko [Sat, 26 Jul 2008 14:02:24 +0000 (14:02 -0000)]
fix example of vcsa creation

16 years agoash: fix testcase to not sleep for whole 10 seconds,
Denis Vlasenko [Sat, 26 Jul 2008 13:53:42 +0000 (13:53 -0000)]
ash: fix testcase to not sleep for whole 10 seconds,
 gets annoying pretty fast. Also fix wrong message there.

16 years agoash: fix typo
Denis Vlasenko [Sat, 26 Jul 2008 13:48:35 +0000 (13:48 -0000)]
ash: fix typo

16 years agoash: hopefully close bug 4324. With testcase.
Denis Vlasenko [Sat, 26 Jul 2008 13:45:57 +0000 (13:45 -0000)]
ash: hopefully close bug 4324. With testcase.

function                                             old     new   delta
evaltree                                             621     869    +248
popstring                                            134     140      +6

16 years agoash: testsuite entries for last change
Denis Vlasenko [Fri, 25 Jul 2008 13:40:06 +0000 (13:40 -0000)]
ash: testsuite entries for last change

16 years agoash: dont allow e.g. exec <&10 to attach to stript's fd!
Denis Vlasenko [Fri, 25 Jul 2008 13:34:05 +0000 (13:34 -0000)]
ash: dont allow e.g. exec <&10 to attach to stript's fd!

function                                             old     new   delta
is_hidden_fd                                           -      61     +61
redirect                                            1135    1164     +29
popstring                                            134     140      +6
printf_main                                          635     637      +2
evalvar                                             1374    1376      +2
echo_main                                            294     296      +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/0 up/down: 102/0)             Total: 102 bytes

16 years ago*: conversion to config parser
Denis Vlasenko [Thu, 24 Jul 2008 23:38:04 +0000 (23:38 -0000)]
*: conversion to config parser

function                                             old     new   delta
config_read                                          540     597     +57
config_open2                                          41      44      +3
rtnl_rtprot_initialize                                70      66      -4
rtnl_rttable_initialize                               78      73      -5
rtnl_rtscope_initialize                               88      83      -5
rtnl_rtrealm_initialize                               48      43      -5
rtnl_rtdsfield_initialize                             48      43      -5
process_module                                       566     560      -6
bbunpack                                             391     383      -8
rtnl_tab_initialize                                  279     121    -158
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/8 up/down: 60/-196)          Total: -136 bytes

16 years agoash: prevent exec NN>&- from closing fd used for script reading
Denis Vlasenko [Thu, 24 Jul 2008 22:34:43 +0000 (22:34 -0000)]
ash: prevent exec NN>&- from closing fd used for script reading

16 years agoash: fix a bug where redirection fds were not closed afterwards.
Denis Vlasenko [Thu, 24 Jul 2008 19:46:38 +0000 (19:46 -0000)]
ash: fix a bug where redirection fds were not closed afterwards.
 optimize close+fcntl(DUPFD) into dup2. add testsuites.

function                                             old     new   delta
copyfd                                                47      68     +21
argstr                                              1311    1298     -13
popredir                                             148     131     -17
redirect                                            1139    1107     -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 21/-62)            Total: -41 bytes

16 years agoash: teach ash about 123>file. It could take only 0..9 before
Denis Vlasenko [Thu, 24 Jul 2008 19:44:41 +0000 (19:44 -0000)]
ash: teach ash about 123>file. It could take only 0..9 before

function                                             old     new   delta
redirect                                            1052    1139     +87
need_to_remember                                       -      36     +36
popredir                                             132     148     +16
fixredir                                              86     101     +15
readtoken1                                          3130    3143     +13
evalvar                                             1374    1376      +2
popstring                                            140     134      -6
cmdtxt                                               592     561     -31
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/2 up/down: 169/-37)           Total: 132 bytes

16 years agoash: ducument where "no fds > 9 in redirects" limitation is.
Denis Vlasenko [Thu, 24 Jul 2008 13:41:37 +0000 (13:41 -0000)]
ash: ducument where "no fds > 9 in redirects" limitation is.
 no code changes.

16 years agoash: ditch dupredirect(), it was only making code harder to read.
Denis Vlasenko [Thu, 24 Jul 2008 11:34:27 +0000 (11:34 -0000)]
ash: ditch dupredirect(), it was only making code harder to read.
 incorporate it in its single callsite.

function                                             old     new   delta
redirect                                            1054    1052      -2
changepath                                           196     194      -2

16 years agoash: explain redirect code a bit
Denis Vlasenko [Thu, 24 Jul 2008 07:54:57 +0000 (07:54 -0000)]
ash: explain redirect code a bit

function                                             old     new   delta
redirect                                            1059    1054      -5

16 years agoash: code shrink
Denis Vlasenko [Thu, 24 Jul 2008 06:07:50 +0000 (06:07 -0000)]
ash: code shrink

function                                             old     new   delta
copynode                                             171     180      +9
evaltreenr                                           615     621      +6
evaltree                                             615     621      +6
calcsize                                             121     127      +6
evalpipe                                             349     350      +1
redirect                                            1059    1057      -2
parseheredoc                                         129     126      -3
makename                                              35      32      -3
expredir                                             130     127      -3
parsefname                                           224     219      -5
popstring                                            140     134      -6
pipeline                                             276     268      -8
list                                                 360     351      -9
readtoken1                                          3157    3130     -27
parse_command                                       1504    1460     -44
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/10 up/down: 28/-110)          Total: -82 bytes

16 years agos/othervise/otherwise/g
Denis Vlasenko [Wed, 23 Jul 2008 08:41:08 +0000 (08:41 -0000)]
s/othervise/otherwise/g

16 years agolpd: extend help text
Denis Vlasenko [Wed, 23 Jul 2008 08:39:19 +0000 (08:39 -0000)]
lpd: extend help text

function                                             old     new   delta
packed_usage                                       24466   24612    +146

16 years agoinetd: do not trash errno in signal handlers;
Denis Vlasenko [Tue, 22 Jul 2008 20:57:28 +0000 (20:57 -0000)]
inetd: do not trash errno in signal handlers;
 in CHLD handler, stop looping through services when pid is found

function                                             old     new   delta
reread_config_file                                  1072    1092     +20
retry_network_setup                                   55      69     +14
reap_child                                           132     130      -2

16 years agoanother overlapping_strcpy
Denis Vlasenko [Tue, 22 Jul 2008 20:25:24 +0000 (20:25 -0000)]
another overlapping_strcpy

16 years agofix all cases of strcpy on overlapping strings.
Denis Vlasenko [Tue, 22 Jul 2008 20:16:55 +0000 (20:16 -0000)]
fix all cases of strcpy on overlapping strings.

16 years agofix trivial build warning
Denis Vlasenko [Tue, 22 Jul 2008 19:38:57 +0000 (19:38 -0000)]
fix trivial build warning

16 years agolpd,lpr: send/receive ACKs after filenames, not only after file bodies.
Denis Vlasenko [Tue, 22 Jul 2008 19:15:30 +0000 (19:15 -0000)]
lpd,lpr: send/receive ACKs after filenames, not only after file bodies.

lpqr_main                                           1114    1149     +35
lpd_main                                             748     768     +20

16 years ago- strip implied proto and superfluous "www." domain part.
Bernhard Reutner-Fischer [Tue, 22 Jul 2008 18:32:06 +0000 (18:32 -0000)]
- strip implied proto and superfluous "" domain part.
  If my lynx groks it, your browser will too ;)

16 years ago- wrap overlong lines (Cristian Ionescu-Idbohrn)
Bernhard Reutner-Fischer [Tue, 22 Jul 2008 18:27:53 +0000 (18:27 -0000)]
- wrap overlong lines (Cristian Ionescu-Idbohrn)
- s/\.  /. /g;# (me)

16 years agochown: do not use static data
Denis Vlasenko [Tue, 22 Jul 2008 11:37:23 +0000 (11:37 -0000)]
chown: do not use static data

function                                             old     new   delta
chown_main                                           160     182     +22
fileAction                                           750     744      -6
ugid                                                   8       -      -8

16 years agocut: stop using static data. This alone removed ~70 bytes of code.
Denis Vlasenko [Tue, 22 Jul 2008 10:34:46 +0000 (10:34 -0000)]
cut: stop using static data. This alone removed ~70 bytes of code.
 + some optimizations

function                                             old     new   delta
nlists                                                 4       -      -4
cut_lists                                              4       -      -4
cut_main                                            1041     960     -81

16 years agocal: remove lone static data variable. -4 bytes. coreutils
Denis Vlasenko [Tue, 22 Jul 2008 10:10:13 +0000 (10:10 -0000)]
cal: remove lone static data variable. -4 bytes. coreutils
 is down to four applets with nonzero data+bss.

16 years ago- unused variables if !ENABLE_FEATURE_MDEV_RENAME_REGEXP
Bernhard Reutner-Fischer [Tue, 22 Jul 2008 07:33:53 +0000 (07:33 -0000)]
- unused variables if !ENABLE_FEATURE_MDEV_RENAME_REGEXP

16 years agolibbb: [x]fopen_for_{read,write} introduced and used.
Denis Vlasenko [Mon, 21 Jul 2008 23:05:26 +0000 (23:05 -0000)]
libbb: [x]fopen_for_{read,write} introduced and used.
 (by Valdimir)

function                                             old     new   delta
config_open2                                           -      41     +41
config_read                                          507     542     +35
find_pair                                            169     187     +18
fopen_for_write                                        -      14     +14
fopen_for_read                                         -      14     +14
find_main                                            406     418     +12
xfopen_for_write                                       -      10     +10
xfopen_for_read                                        -      10     +10
popstring                                            134     140      +6
parse_inittab                                        396     401      +5
next_token                                           923     928      +5
pack_gzip                                           1659    1661      +2
bb__parsespent                                       117     119      +2
fallbackSort                                        1719    1717      -2
evalvar                                             1376    1374      -2
qrealloc                                              36      33      -3
...
...
...
...
singlemount                                         4579    4569     -10
process_stdin                                        443     433     -10
patch_main                                          1111    1101     -10
ifupdown_main                                       2175    2165     -10
file_action_grep                                      90      80     -10
uuidcache_init                                       649     637     -12
hush_main                                            797     785     -12
read_config                                          230     217     -13
dpkg_main                                           3835    3820     -15
read_line_input                                     3134    3110     -24
sysctl_main                                          232     203     -29
config_open                                           40      10     -30
WARN_BAD_LINE                                         44       -     -44
login_main                                          1714    1575    -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737)        Total: -563 bytes

16 years agowhitespace fixes, no code changed
Denis Vlasenko [Mon, 21 Jul 2008 21:34:51 +0000 (21:34 -0000)]
whitespace fixes, no code changed

16 years ago- commentary typo fix
Bernhard Reutner-Fischer [Mon, 21 Jul 2008 15:29:36 +0000 (15:29 -0000)]
- commentary typo fix

16 years ago- first pass to unify/cleanup uid handling (-236b)
Bernhard Reutner-Fischer [Mon, 21 Jul 2008 14:41:33 +0000 (14:41 -0000)]
- first pass to unify/cleanup uid handling (-236b)
  This needs further love, alot of love.. Tito?

16 years ago- fix spelling
Bernhard Reutner-Fischer [Mon, 21 Jul 2008 13:46:54 +0000 (13:46 -0000)]
- fix spelling

16 years ago- s/super.block/superblock/g; # for consistency; -1b
Bernhard Reutner-Fischer [Mon, 21 Jul 2008 13:33:22 +0000 (13:33 -0000)]
- s/super.block/superblock/g; # for consistency; -1b

16 years ago- remove superfluous forward declaration
Bernhard Reutner-Fischer [Mon, 21 Jul 2008 11:53:04 +0000 (11:53 -0000)]
- remove superfluous forward declaration

16 years ago- document -f
Bernhard Reutner-Fischer [Mon, 21 Jul 2008 11:30:51 +0000 (11:30 -0000)]
- document -f

16 years ago- commentary typo fix
Bernhard Reutner-Fischer [Mon, 21 Jul 2008 11:18:02 +0000 (11:18 -0000)]
- commentary typo fix

16 years ago- no obj-code changes. Fix indentation, use existing defines.
Bernhard Reutner-Fischer [Mon, 21 Jul 2008 11:16:39 +0000 (11:16 -0000)]
- no obj-code changes. Fix indentation, use existing defines.

16 years agotelnet: shrink
Denis Vlasenko [Mon, 21 Jul 2008 09:22:28 +0000 (09:22 -0000)]
telnet: shrink
telnetd: shrink, and fix issue file printing
test: better and shorter usage text

function                                             old     new   delta
putiac2                                               51      50      -1
putiac                                                24      20      -4
handlenetoutput                                       95      91      -4
telnet_main                                         1480    1475      -5
iacflush                                              37      32      -5
make_new_session                                     436     421     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-34)             Total: -34 bytes

16 years agohelp text: test --help doesnt print it (by design),
Denis Vlasenko [Mon, 21 Jul 2008 08:37:13 +0000 (08:37 -0000)]
help text: test --help doesnt print it (by design),
 so do not account for it

16 years agohttpd: add Hopedir directive specially for
Denis Vlasenko [Sun, 20 Jul 2008 23:25:32 +0000 (23:25 -0000)]
httpd: add Hopedir directive specially for
 (and by) walter harms <wharms AT bfs.de>;
 fix silly double-parse bug added in 21412.

function                                             old     new   delta
parse_conf                                          1532    1576     +44

16 years agomsh: fix "while...continue" bug 3884.
Denis Vlasenko [Sun, 20 Jul 2008 23:03:23 +0000 (23:03 -0000)]
msh: fix "while...continue" bug 3884.

16 years agobuild system: clean more files on make clean/make mrproper
Denis Vlasenko [Sun, 20 Jul 2008 18:37:54 +0000 (18:37 -0000)]
build system: clean more files on make clean/make mrproper

16 years agoudhcp: use libbb for config file parsing (by Vladimir)
Denis Vlasenko [Sun, 20 Jul 2008 17:58:12 +0000 (17:58 -0000)]
udhcp: use libbb for config file parsing (by Vladimir)

function                                             old     new   delta
read_config                                          313     230     -83

16 years agolibbb/parse_config.c: fix small buglet (by Vladimir)
Denis Vlasenko [Sun, 20 Jul 2008 17:50:58 +0000 (17:50 -0000)]
libbb/parse_config.c: fix small buglet (by Vladimir)

16 years agodnsd,sestatus: use libbb to parse config file (by Vladimir)
Denis Vlasenko [Sun, 20 Jul 2008 17:48:59 +0000 (17:48 -0000)]
dnsd,sestatus: use libbb to parse config file (by Vladimir)

function                                             old     new   delta
dnsd_main                                           1544    1487     -57

16 years agoman: fix breakage: must not die on lines with < 2 tokens
Denis Vlasenko [Sun, 20 Jul 2008 17:43:21 +0000 (17:43 -0000)]
man: fix breakage: must not die on lines with < 2 tokens

16 years agomn: use libbb for config parsing (by Vladimir)
Denis Vlasenko [Sun, 20 Jul 2008 17:41:30 +0000 (17:41 -0000)]
mn: use libbb for config parsing (by Vladimir)

function                                             old     new   delta
man_main                                             757     713     -44

16 years agotar: fix handling of tarballs with symlinks with size field != 0
Denis Vlasenko [Sun, 20 Jul 2008 17:10:43 +0000 (17:10 -0000)]
tar: fix handling of tarballs with symlinks with size field != 0

16 years agolibbb: fix print_flags() [fix somehow is only in 1.11.1?)
Denis Vlasenko [Sun, 20 Jul 2008 13:47:51 +0000 (13:47 -0000)]
libbb: fix print_flags() [fix somehow is only in 1.11.1?)

16 years agolibbb: fixes to config_read() by maintainer
Denis Vlasenko [Sun, 20 Jul 2008 13:01:56 +0000 (13:01 -0000)]
libbb: fixes to config_read() by maintainer
sysctl: use config_read()

function                                             old     new   delta
sysctl_main                                          121     232    +111
config_read                                          478     502     +24
parse_main                                           239     241      +2
sysctl_preload_file_and_exit                         234       -    -234
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 3/0 up/down: 137/-234)          Total: -97 bytes

16 years agolibbb: config_read() update
Denis Vlasenko [Sat, 19 Jul 2008 22:57:00 +0000 (22:57 -0000)]
libbb: config_read() update

16 years agomount: support nfs mount option nordiplus.
Denis Vlasenko [Sat, 19 Jul 2008 22:40:30 +0000 (22:40 -0000)]
mount: support nfs mount option nordiplus.
 By Octavian Purdila <opurdila AT ixiacom.com>

function                                             old     new   delta
static.options                                       272     281      +9
daemonize                                            130     107     -23
singlemount                                         4674    4579     -95
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 9/-118)           Total: -109 bytes

16 years agolibbb: updated config_parse() from Vladimir
Denis Vlasenko [Sat, 19 Jul 2008 09:27:19 +0000 (09:27 -0000)]
libbb: updated config_parse() from Vladimir

function                                             old     new   delta
config_read                                          385     460     +75
runsvdir_main                                       1701    1716     +15
readit                                               331     338      +7
passwd_main                                         1049    1053      +4
parse_command                                       1504    1507      +3
decode_format_string                                 822     824      +2
bb__parsespent                                       117     119      +2
udhcp_get_option                                     221     222      +1
changepath                                           196     194      -2
parse_inittab                                        400     396      -4
nameif_main                                          683     679      -4
make_device                                         1176    1172      -4
config_open                                           48      40      -8
expand_main                                          698     689      -9
readcmd                                             1012    1002     -10
config_free_data                                      37      21     -16
SynchronizeFile                                      683     643     -40
sleep_main                                           474     362    -112
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/10 up/down: 109/-209)        Total: -100 bytes

16 years agotest: fix parser to prefer binop over unop, as coreutils does.
Denis Vlasenko [Sat, 19 Jul 2008 08:15:13 +0000 (08:15 -0000)]
test: fix parser to prefer binop over unop, as coreutils does.
 remove bogus workaround in main(). rename atrocious variables/functions.
 much expand testsuite.
libbb: fix --help to not affect "test --help"

function                                             old     new   delta
run_applet_no_and_exit                               421     440     +19
nexpr                                                817     825      +8
static.no_op                                           -       6      +6
test_main                                            397     257    -140
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/1 up/down: 104/-211)         Total: -107 bytes

16 years agoprintf: do not print garbage on "%Ld". closes bug 4214.
Denis Vlasenko [Fri, 18 Jul 2008 18:41:55 +0000 (18:41 -0000)]
printf: do not print garbage on "%Ld". closes bug 4214.

function                                             old     new   delta
printf_main                                          633     637      +4
multiconvert                                          99      79     -20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-20)             Total: -16 bytes

16 years agolibbb: fix bb_strtol[l]'s check for "-". Hopefully closes bug 4174
Denis Vlasenko [Fri, 18 Jul 2008 18:17:10 +0000 (18:17 -0000)]
libbb: fix bb_strtol[l]'s check for "-". Hopefully closes bug 4174

function                                             old     new   delta
bb_strtol                                             82      85      +3
handle_errors                                         75      66      -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 3/-9)               Total: -6 bytes

16 years agoprintf: fix %b, fix several bugs in %*.*, fix compat issues with
Denis Vlasenko [Fri, 18 Jul 2008 11:10:51 +0000 (11:10 -0000)]
printf: fix %b, fix several bugs in %*.*, fix compat issues with
 aborting too early, support %zd; expand testsuite

function                                             old     new   delta
get_width_prec                                         -      46     +46
multiconvert                                          82      99     +17
conv_strtod                                           44      54     +10
print_direc                                          382     391      +9
printf_main                                          629     633      +4
conv_strtoul                                          20      16      -4
conv_strtol                                           20      16      -4
my_xstrtoul                                           20       -     -20
my_xstrtol                                            20       -     -20
my_xstrtod                                            21       -     -21
------------------------------------------------------------------------------
(add/remove: 1/3 grow/shrink: 4/2 up/down: 86/-69)             Total: 17 bytes

16 years ago- fix compilation for mips (Brian Daniels)
Bernhard Reutner-Fischer [Fri, 18 Jul 2008 07:42:00 +0000 (07:42 -0000)]
- fix compilation for mips (Brian Daniels)

16 years agovi: using array data after it fell out of scope is stupid.
Denis Vlasenko [Thu, 17 Jul 2008 21:32:32 +0000 (21:32 -0000)]
vi: using array data after it fell out of scope is stupid.

16 years agosendmail: update from the maintainer
Denis Vlasenko [Thu, 17 Jul 2008 19:37:09 +0000 (19:37 -0000)]
sendmail: update from the maintainer

16 years agopidof/killall: allow find_pid_by_name to find running
Denis Vlasenko [Thu, 17 Jul 2008 18:39:36 +0000 (18:39 -0000)]
pidof/killall: allow find_pid_by_name to find running
 processes started as scripts_with_name_longer_than_15_bytes.sh
 closes bug 4054 (and is generally neat)

16 years agoupdate README
Denis Vlasenko [Thu, 17 Jul 2008 18:33:35 +0000 (18:33 -0000)]
update README

16 years agobuild system: fix indentation in config menu
Denis Vlasenko [Thu, 17 Jul 2008 18:26:45 +0000 (18:26 -0000)]
build system: fix indentation in config menu

16 years agoinit: fix compile-time error; fix exiting on broken config file
Denis Vlasenko [Thu, 17 Jul 2008 17:58:44 +0000 (17:58 -0000)]
init: fix compile-time error; fix exiting on broken config file
parse_config: cosmetics

16 years ago- very minor shrinkage (-9b)
Bernhard Reutner-Fischer [Thu, 17 Jul 2008 15:13:31 +0000 (15:13 -0000)]
- very minor shrinkage (-9b)

16 years ago- fix "noreduce" flag of config_read (didn't work at all, at least for me).
Bernhard Reutner-Fischer [Thu, 17 Jul 2008 14:00:42 +0000 (14:00 -0000)]
- fix "noreduce" flag of config_read (didn't work at all, at least for me).
- convert init's inittab parsing to the new config parser:
function                                             old     new   delta
config_read                                          393     386      -7
static.actions                                        72      64      -8
.rodata                                           121772  121764      -8
parse_inittab                                        554     393    -161
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-184)           Total: -184 bytes

16 years ago- fix segfault in nameif with mactab file
Bernhard Reutner-Fischer [Thu, 17 Jul 2008 11:59:13 +0000 (11:59 -0000)]
- fix segfault in nameif with mactab file
  (by fixing and shrink config parser)

function                                             old     new   delta
config_free_data                                       -      37     +37
config_open                                           43      48      +5
pack_gzip                                           1658    1660      +2
nameif_main                                          527     525      -2
SynchronizeFile                                      629     623      -6
make_device                                         1184    1176      -8
config_close                                          31      18     -13
config_read                                          431     393     -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/5 up/down: 44/-67)            Total: -23 bytes

16 years agoprintf: protect against bogus format specifiers. Hopefully closes bug 4184
Denis Vlasenko [Thu, 17 Jul 2008 09:17:51 +0000 (09:17 -0000)]
printf: protect against bogus format specifiers. Hopefully closes bug 4184

16 years agobb_strtoXXX: close bug 4174 (potential use of buf[-1])
Denis Vlasenko [Thu, 17 Jul 2008 08:48:13 +0000 (08:48 -0000)]
bb_strtoXXX: close bug 4174 (potential use of buf[-1])

16 years ago- warn about overlong lines in help-texts
Bernhard Reutner-Fischer [Thu, 17 Jul 2008 08:02:28 +0000 (08:02 -0000)]
- warn about overlong lines in help-texts
  I initially bailed out with an error, but then that's a bit rough. Just warn to trick somebody into fixing them..

16 years agoconfig help fixes
Denis Vlasenko [Wed, 16 Jul 2008 23:45:11 +0000 (23:45 -0000)]
config help fixes

16 years agofix up callsites of config_read to check for >= 0
Denis Vlasenko [Wed, 16 Jul 2008 23:04:49 +0000 (23:04 -0000)]
fix up callsites of config_read to check for >= 0

16 years agoupdate of config file parser from Vladimir
Denis Vlasenko [Wed, 16 Jul 2008 22:12:18 +0000 (22:12 -0000)]
update of config file parser from Vladimir

16 years agosendmail: do not discard all headers
Denis Vlasenko [Wed, 16 Jul 2008 21:55:03 +0000 (21:55 -0000)]
sendmail: do not discard all headers

16 years agocpio: make long opts depend only on ENABLE_GETOPT_LONG
Denis Vlasenko [Wed, 16 Jul 2008 21:51:43 +0000 (21:51 -0000)]
cpio: make long opts depend only on ENABLE_GETOPT_LONG

16 years agoinstall: do not chown intermediate directories with install -d; shrink
Denis Vlasenko [Wed, 16 Jul 2008 21:49:02 +0000 (21:49 -0000)]
install: do not chown intermediate directories with install -d; shrink
 (by Natanael Copa)

function                                             old     new   delta
.rodata                                           171528  171511     -17
install_main                                         841     697    -144
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-161)           Total: -161 bytes

16 years agos/SELINIX/SELINUX/
Denis Vlasenko [Wed, 16 Jul 2008 21:11:09 +0000 (21:11 -0000)]
s/SELINIX/SELINUX/

16 years agolibbb: get rid of statics in dump.c; code shrinks a lot too
Denis Vlasenko [Wed, 16 Jul 2008 11:00:16 +0000 (11:00 -0000)]
libbb: get rid of statics in dump.c; code shrinks a lot too

function                                             old     new   delta
alloc_dumper                                           -      26     +26
hexdump_main                                         600     601      +1
static.done                                            1       -      -1
static.ateof                                           1       -      -1
bb_dump_vflag                                          1       -      -1
static.savp                                            4       -      -4
static.nextfs                                          4       -      -4
static.curp                                            4       -      -4
exitval                                                4       -      -4
endfu                                                  4       -      -4
bb_dump_length                                         4       -      -4
bb_dump_fshead                                         4       -      -4
bb_dump_blocksize                                      4       -      -4
_argv                                                  4       -      -4
bb_dump_add                                          365     358      -7
savaddress                                             8       -      -8
eaddress                                               8       -      -8
bb_dump_skip                                           8       -      -8
address                                                8       -      -8
bb_dump_dump                                        2748    2672     -76
next                                                 538     445     -93
------------------------------------------------------------------------------
(add/remove: 1/16 grow/shrink: 1/3 up/down: 27/-247)         Total: -220 bytes
   text    data     bss     dec     hex filename
 789458     607    6764  796829   c289d busybox_old
 789309     601    6696  796606   c27be busybox_unstripped

16 years agotee: fix infinite looping on open error (echo asd | tee "")
Denis Vlasenko [Wed, 16 Jul 2008 07:34:00 +0000 (07:34 -0000)]
tee: fix infinite looping on open error (echo asd | tee "")

16 years agood,hexdump: fix bug where xrealloc may move pointer,
Denis Vlasenko [Wed, 16 Jul 2008 07:22:14 +0000 (07:22 -0000)]
od,hexdump: fix bug where xrealloc may move pointer,
 leaving other pointers dangling (bug 4104).
 + many style fixes in libbb/dump.c.

16 years agomdev: support for serializing hotplug
Denis Vlasenko [Tue, 15 Jul 2008 22:33:13 +0000 (22:33 -0000)]
mdev: support for serializing hotplug

function                                             old     new   delta
mdev_main                                            503     647    +144

16 years agosleep: make fractional seconds separately selectable in .config
Denis Vlasenko [Tue, 15 Jul 2008 22:01:49 +0000 (22:01 -0000)]
sleep: make fractional seconds separately selectable in .config

16 years agolibbb: document plans to speed up line-based input
Denis Vlasenko [Tue, 15 Jul 2008 21:29:44 +0000 (21:29 -0000)]
libbb: document plans to speed up line-based input

16 years agolibbb: unified config parser (By Vladimir Dronnikov)
Denis Vlasenko [Tue, 15 Jul 2008 21:09:30 +0000 (21:09 -0000)]
libbb: unified config parser (By Vladimir Dronnikov)
mdev: use it

function                                             old     new   delta
config_read                                            -     400    +400
config_open                                            -      43     +43
config_close                                           -       9      +9
qrealloc                                              33      36      +3
compare_keys                                         735     737      +2
xstrtoull_range_sfx                                  296     295      -1
qgravechar                                           109     106      -3
get_address                                          181     178      -3
next_token                                           928     923      -5
sv_main                                             1228    1222      -6
find_main                                            418     406     -12
next_field                                            32       -     -32
make_device                                         1269    1184     -85
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/7 up/down: 457/-147)          Total: 310 bytes

16 years agosendmail: do not ignore CC; accept to: and cc: case-insensitively.
Denis Vlasenko [Tue, 15 Jul 2008 20:56:23 +0000 (20:56 -0000)]
sendmail: do not ignore CC; accept to: and cc: case-insensitively.
 +20 bytes.

16 years agolibbb: experimental faster string reading routines.
Denis Vlasenko [Tue, 15 Jul 2008 10:33:12 +0000 (10:33 -0000)]
libbb: experimental faster string reading routines.

16 years agocomm: almost total rewrite; add testsuite
Denis Vlasenko [Tue, 15 Jul 2008 06:45:14 +0000 (06:45 -0000)]
comm: almost total rewrite; add testsuite

function                                             old     new   delta
writeline                                            128     125      -3
comm_main                                            540     239    -301
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-304)           Total: -304 bytes