oweals/busybox.git
15 years agodd: speed measurement. optional.
Gabor Heja [Tue, 13 Oct 2009 22:29:28 +0000 (00:29 +0200)]
dd: speed measurement. optional.

function                                             old     new   delta
dd_output_status                                      68     289    +221
dd_main                                             1463    1482     +19
write_and_stats                                       64      75     +11
packed_usage                                       26529   26526      -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 251/-3)            Total: 248 bytes
Signed-off-by: Gabor Heja <kakaopor@kakaopor.hu>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolibiproute/*: code shrink
Denys Vlasenko [Tue, 13 Oct 2009 15:58:24 +0000 (17:58 +0200)]
libiproute/*: code shrink

function                                             old     new   delta
ll_addr_a2n                                          181     178      -3
rtnl_rtntype_a2n                                     198     194      -4
ipaddr_modify                                       1309    1305      -4
print_addrinfo                                      1303    1298      -5
do_iplink                                           1137    1132      -5
print_route                                         1609    1603      -6
parse_args                                          1440    1434      -6
iproute_list_or_flush                               1261    1254      -7
rtnl_rttable_a2n                                      39      31      -8
rtnl_rtscope_a2n                                      39      31      -8
rtnl_rtrealm_a2n                                      39      31      -8
rtnl_rtprot_a2n                                       39      31      -8
rtnl_dsfield_a2n                                      39      31      -8
ll_type_n2a                                           78      70      -8
get_rt_realms                                        115     107      -8
print_tunnel                                         656     647      -9
rtnl_rttable_n2a                                      63      53     -10
rtnl_rtscope_n2a                                      63      53     -10
rtnl_rtrealm_n2a                                      63      53     -10
rtnl_rtntype_n2a                                     128     118     -10
rtnl_dsfield_n2a                                      71      61     -10
print_linkinfo                                       815     805     -10
ipaddr_list_or_flush                                1246    1235     -11
iproute_modify                                      1048    1036     -12
iprule_modify                                        866     851     -15
print_rule                                           765     738     -27
ll_addr_n2a                                          182     150     -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/27 up/down: 0/-262)          Total: -262 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolibiproute: code and data shrink
Denys Vlasenko [Tue, 13 Oct 2009 14:27:11 +0000 (16:27 +0200)]
libiproute: code and data shrink

function                                             old     new   delta
rtnl_a2n                                               -     126    +126
ll_remember_index                                    233     263     +30
find_by_index                                         26      36     +10
rtnl_rtprot_initialize                                66      70      +4
static.unit_chars                                      7       9      +2
rtnl_rttable_initialize                               73      75      +2
rtnl_rtscope_initialize                               83      85      +2
rtnl_rtrealm_initialize                               43      45      +2
rtnl_rtdsfield_initialize                             43      45      +2
rtnl_rttable_n2a                                      62      63      +1
rtnl_rtscope_n2a                                      62      63      +1
rtnl_rtrealm_n2a                                      62      63      +1
rtnl_dsfield_n2a                                      70      71      +1
ll_init_map                                           36      33      -3
make_human_readable_str                              262     258      -4
static.fmt                                            97      92      -5
static.fmt_tenths                                     10       -     -10
static.str                                            21       4     -17
static.res                                            20       -     -20
static.cache                                          24       4     -20
idxmap                                                64       4     -60
rtnl_rttable_a2n                                     154      39    -115
rtnl_rtscope_a2n                                     159      39    -120
rtnl_rtrealm_a2n                                     159      39    -120
rtnl_rtprot_a2n                                      159      39    -120
rtnl_dsfield_a2n                                     162      39    -123
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 12/11 up/down: 184/-737)       Total: -553 bytes
   text           data            bss            dec            hex        filename
 820376            445           7668         828489          ca449        busybox_old
 819950            445           7548         827943          ca227        busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolibbb/human_readable.c: shrink; and reduce bss usage
Denys Vlasenko [Mon, 12 Oct 2009 23:25:09 +0000 (01:25 +0200)]
libbb/human_readable.c: shrink; and reduce bss usage

also, move smart_ulltoaN there and comment usage locations

function                                             old     new   delta
static.unit_chars                                      7       9      +2
utoa_to_buf                                          110     108      -2
make_human_readable_str                              262     258      -4
fallbackSort                                        1723    1719      -4
static.fmt                                            97      92      -5
static.fmt_tenths                                     10       -     -10
static.str                                            21       4     -17
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/5 up/down: 2/-42)             Total: -40 bytes
   text    data     bss     dec     hex filename
 820981     453    6932  828366   ca3ce busybox_old
 820968     453    6916  828337   ca3b1 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash,hush: fix $RANDOM in children being repeated
Denys Vlasenko [Mon, 12 Oct 2009 13:25:01 +0000 (15:25 +0200)]
ash,hush: fix $RANDOM in children being repeated

function                                             old     new   delta
next_random                                           46      68     +22
forkshell                                            248     263     +15
expand_vars_to_list                                 2118    2131     +13
run_pipe                                            1775    1782      +7
popstring                                            134     140      +6
builtin_umask                                        123     121      -2
ash_main                                            1356    1336     -20
get_local_var_value                                  125     104     -21
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/3 up/down: 63/-43)             Total: 20 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoinclude/xatonum.h: make it survive -Wconversion
Denys Vlasenko [Sun, 11 Oct 2009 20:29:15 +0000 (22:29 +0200)]
include/xatonum.h: make it survive -Wconversion

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolibbb: revert the change where spawn reports exec failure
Denys Vlasenko [Sun, 11 Oct 2009 02:09:37 +0000 (04:09 +0200)]
libbb: revert the change where spawn reports exec failure

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: shrink $RANDOM support
Denys Vlasenko [Sun, 11 Oct 2009 00:15:49 +0000 (02:15 +0200)]
hush: shrink $RANDOM support

function                                             old     new   delta
get_local_var_value                                  104     125     +21
hush_main                                           1024     983     -41

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: use bbox wrappers for malloc etc instead of homegrown ones
Denys Vlasenko [Sat, 10 Oct 2009 22:45:25 +0000 (00:45 +0200)]
ash: use bbox wrappers for malloc etc instead of homegrown ones

function                                             old     new   delta
popstring                                            134     140      +6
ckmalloc                                               9       -      -9
ckstrdup                                              22       -     -22
ckrealloc                                             24       -     -24
ckzalloc                                              28       -     -28
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 1/0 up/down: 6/-83)             Total: -77 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: trivial shrink by using smaller int
Denys Vlasenko [Sat, 10 Oct 2009 22:36:20 +0000 (00:36 +0200)]
ash: trivial shrink by using smaller int

function                                             old     new   delta
copynode                                             197     196      -1
calcsize                                             127     126      -1
nodesize                                              54      27     -27
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-29)             Total: -29 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoudhcpc: more help text tweaking
Denys Vlasenko [Sat, 10 Oct 2009 14:14:41 +0000 (16:14 +0200)]
udhcpc: more help text tweaking

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoudhcpc: better wording in help text
Denys Vlasenko [Sat, 10 Oct 2009 14:13:17 +0000 (16:13 +0200)]
udhcpc: better wording in help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolaguage and copyright date corrections, no code changes
Denys Vlasenko [Fri, 9 Oct 2009 21:35:30 +0000 (23:35 +0200)]
laguage and copyright date corrections, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: make one testsuite entry more robust
Denys Vlasenko [Fri, 9 Oct 2009 21:08:28 +0000 (23:08 +0200)]
ash: make one testsuite entry more robust

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoshell/Config.in: forgotten chunk with CONFIG_HUSH_RANDOM_SUPPORT
Denys Vlasenko [Fri, 9 Oct 2009 20:11:30 +0000 (22:11 +0200)]
shell/Config.in: forgotten chunk with CONFIG_HUSH_RANDOM_SUPPORT

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: fix cut-n-paste error in last commit
Denys Vlasenko [Fri, 9 Oct 2009 20:00:58 +0000 (22:00 +0200)]
hush: fix cut-n-paste error in last commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: add support for $RANDOM. If on:
Denys Vlasenko [Fri, 9 Oct 2009 18:59:39 +0000 (20:59 +0200)]
hush: add support for $RANDOM. If on:

function                                             old     new   delta
hush_main                                            983    1024     +41
get_local_var_value                                   72     104     +32
block_signals                                        155     161      +6
reset_traps_to_defaults                              211     214      +3
builtin_wait                                         268     271      +3
pseudo_exec_argv                                     198     200      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/0 up/down: 87/0)               Total: 87 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: factor out $RANDOM support
Denys Vlasenko [Fri, 9 Oct 2009 18:59:04 +0000 (20:59 +0200)]
ash: factor out $RANDOM support

function                                             old     new   delta
next_random                                            -      46     +46
ash_main                                            1361    1356      -5
change_random                                        132      97     -35
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 46/-40)              Total: 6 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agops: show longer COMMAND
Denys Vlasenko [Fri, 9 Oct 2009 17:47:01 +0000 (19:47 +0200)]
ps: show longer COMMAND

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: support $PPID
Denys Vlasenko [Fri, 9 Oct 2009 13:40:49 +0000 (15:40 +0200)]
hush: support $PPID

function                                             old     new   delta
get_local_var_value                                   33      72     +39
hush_main                                            951     983     +32
block_signals                                        152     155      +3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 74/0)               Total: 74 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolibbb: make spawn() print "can't execute '%s'" on execv error
Denys Vlasenko [Thu, 8 Oct 2009 21:28:29 +0000 (23:28 +0200)]
libbb: make spawn() print "can't execute '%s'" on execv error

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoudhcpc: fix bug 629: use bcast receive when we perform rebinding
Denys Vlasenko [Thu, 8 Oct 2009 21:05:46 +0000 (23:05 +0200)]
udhcpc: fix bug 629: use bcast receive when we perform rebinding

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agomodprobe-small: added comment about multiple alias matches
Denys Vlasenko [Thu, 8 Oct 2009 20:54:41 +0000 (22:54 +0200)]
modprobe-small: added comment about multiple alias matches

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agortcwake: remove a static variable
Denys Vlasenko [Thu, 8 Oct 2009 14:04:50 +0000 (16:04 +0200)]
rtcwake: remove a static variable

function                                             old     new   delta
rtc_time                                               4       -      -4
rtcwake_main                                         479     474      -5
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-9)               Total: -9 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years ago*: three more NOINLINEs
Denys Vlasenko [Thu, 8 Oct 2009 12:54:18 +0000 (14:54 +0200)]
*: three more NOINLINEs

function                                             old     new   delta
lzo_decompress                                         -     525    +525
lzo_compress                                           -     470    +470
showmode                                               -     330    +330
fbset_main                                          1698    1273    -425
do_lzo_compress                                      799     323    -476
do_lzo_decompress                                   1167     526    -641
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 0/3 up/down: 1325/-1542)       Total: -217 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years ago*: a few more NOINLINEs
Denys Vlasenko [Thu, 8 Oct 2009 12:35:37 +0000 (14:35 +0200)]
*: a few more NOINLINEs

function                                             old     new   delta
print_linkinfo                                         -     815    +815
do_msg                                                 -     783    +783
INET_setroute                                          -     757    +757
varvalue                                               -     746    +746
do_sem                                                 -     637    +637
inflate_codes                                          -     617    +617
INET6_setroute                                         -     491    +491
edir                                                   -     370    +370
sync_cursor                                            -     298    +298
update_utmp                                            -     246    +246
searchLines                                            -     165    +165
setup_alarm                                            -     144    +144
may_wakeup                                             -     101    +101
getNum                                               566     371    -195
refresh                                             1166     848    -318
rtcwake_main                                         809     479    -330
getty_main                                          2396    1921    -475
chpst_main                                          1373     746    -627
inflate_unzip_internal                              1335     567    -768
evalvar                                             1384     612    -772
ipaddr_list_or_flush                                2160    1246    -914
route_main                                          1585     245   -1340
ipcs_main                                           2523    1049   -1474
------------------------------------------------------------------------------
(add/remove: 13/0 grow/shrink: 0/10 up/down: 6170/-7213)    Total: -1043 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years ago*: code shrink via NOINLINE
Denys Vlasenko [Thu, 8 Oct 2009 10:28:08 +0000 (12:28 +0200)]
*: code shrink via NOINLINE

function                                             old     new   delta
expand_vars_to_list                                    -    2118   +2118
lzo1x_optimize                                         -    1429   +1429
run_pipe                                             358    1775   +1417
arith_apply                                            -    1335   +1335
mainQSort3                                             -    1198   +1198
logdir_open                                            -    1163   +1163
rewrite                                                -    1039   +1039
dump_identity                                          -     987    +987
do_shm                                                 -     884    +884
cpio_o                                                 -     863    +863
cpio_main                                           1450     560    -890
ipcs_main                                           3442    2523    -919
bb_dump_dump                                        2611    1488   -1123
process_dev                                         4572    3405   -1167
logdirs_reopen                                      1308      86   -1222
arith                                               2084     707   -1377
mainSort                                            2622    1202   -1420
do_lzo_compress                                     2276     799   -1477
run_list                                            2491     943   -1548
expand_variables                                    2280     135   -2145
------------------------------------------------------------------------------
(add/remove: 9/0 grow/shrink: 1/10 up/down: 12433/-13288)    Total: -855 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: compile breakage fix
Denys Vlasenko [Thu, 8 Oct 2009 02:19:14 +0000 (04:19 +0200)]
ash: compile breakage fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agocp: revert a recent buggy change, and add a comment why it's wrong
Denys Vlasenko [Wed, 7 Oct 2009 23:32:44 +0000 (01:32 +0200)]
cp: revert a recent buggy change, and add a comment why it's wrong

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoFix english in build system
Denys Vlasenko [Tue, 6 Oct 2009 20:13:37 +0000 (22:13 +0200)]
Fix english in build system

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years ago*: use {i,u}toa() where appropriate
Denys Vlasenko [Tue, 6 Oct 2009 20:09:50 +0000 (22:09 +0200)]
*: use {i,u}toa() where appropriate

function                                             old     new   delta
startservice                                         377     363     -14
setari_u                                              54      40     -14
ash_main                                            1375    1361     -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-42)             Total: -42 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoTrim help text a bit more
Denys Vlasenko [Tue, 6 Oct 2009 19:23:02 +0000 (21:23 +0200)]
Trim help text a bit more

function                                             old     new   delta
packed_usage                                       26625   26529     -96

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoTrim usage text a bit
Denys Vlasenko [Tue, 6 Oct 2009 19:11:37 +0000 (21:11 +0200)]
Trim usage text a bit

function                                             old     new   delta
packed_usage                                       26646   26625     -21

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agounpackers: check errors from close() too
Denys Vlasenko [Mon, 5 Oct 2009 01:03:07 +0000 (03:03 +0200)]
unpackers: check errors from close() too

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agowget: fix for code 302; mount: support -o union
Vladimir Dronnikov [Mon, 5 Oct 2009 00:18:01 +0000 (02:18 +0200)]
wget: fix for code 302; mount: support -o union

Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: error out on ${#1#}, ${#$11}, ${#11#}
Cristian Ionescu-Idbohrn [Mon, 5 Oct 2009 00:07:23 +0000 (02:07 +0200)]
ash: error out on ${#1#}, ${#$11}, ${#11#}

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: document where we accept invalid syntax. no code changes
Denys Vlasenko [Sun, 4 Oct 2009 01:14:41 +0000 (03:14 +0200)]
ash: document where we accept invalid syntax. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agosendmail: accept -i too, not only -oi
Vladimir Dronnikov [Sat, 3 Oct 2009 23:34:54 +0000 (01:34 +0200)]
sendmail: accept -i too, not only -oi

Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: code shrink
Denys Vlasenko [Sat, 3 Oct 2009 23:14:19 +0000 (01:14 +0200)]
ash: code shrink

function                                             old     new   delta
ulimitcmd                                            489     415     -74

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoremove useless (unsigned >= 0) comparison
Denys Vlasenko [Sat, 3 Oct 2009 23:13:35 +0000 (01:13 +0200)]
remove useless (unsigned >= 0) comparison

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agols: forgotten chunk from prev commit
Denys Vlasenko [Sat, 3 Oct 2009 09:45:07 +0000 (11:45 +0200)]
ls: forgotten chunk from prev commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agols: code shrink
Denys Vlasenko [Sat, 3 Oct 2009 09:43:48 +0000 (11:43 +0200)]
ls: code shrink

function                                             old     new   delta
count_dirs                                            81      86      +5
dnalloc                                               13      17      +4
showfiles                                            372     370      -2
ls_main                                              833     825      -8
showdirs                                             505     489     -16
splitdnarray                                         189     120     -69
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/4 up/down: 9/-95)             Total: -86 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agols: fix for !FEATURE_LS_RECURSIVE (forgotten free); cleanups
Denys Vlasenko [Sat, 3 Oct 2009 09:42:33 +0000 (11:42 +0200)]
ls: fix for !FEATURE_LS_RECURSIVE (forgotten free); cleanups

no code changes if FEATURE_LS_RECURSIVE

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agols: add standards doc; record author of "total NNNN" code
Denys Vlasenko [Sat, 3 Oct 2009 08:53:36 +0000 (10:53 +0200)]
ls: add standards doc; record author of "total NNNN" code

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agols: code shrink
Denys Vlasenko [Fri, 2 Oct 2009 23:15:47 +0000 (01:15 +0200)]
ls: code shrink

function                                             old     new   delta
list_single                                            -    1006   +1006
print_name                                           211     209      -2
dnalloc                                               15      13      -2
splitdnarray                                         192     189      -3
ls_main                                              848     833     -15
showdirs                                             564     505     -59
showfiles                                           1460     372   -1088
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/6 up/down: 1006/-1169)       Total: -163 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agols: add "total NNNN" header if DESKTOP. By Johannes Stezenbach (js AT sig21.net)
Denys Vlasenko [Fri, 2 Oct 2009 23:14:15 +0000 (01:14 +0200)]
ls: add "total NNNN" header if DESKTOP. By Johannes Stezenbach (js AT sig21.net)

function                                             old     new   delta
showdirs                                             492     564     +72

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoFixes to usage text; updated busybox.spec
Denys Vlasenko [Fri, 2 Oct 2009 09:37:17 +0000 (11:37 +0200)]
Fixes to usage text; updated busybox.spec

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agocp: FEATURE_CP_LONG_OPTIONS depends on LONG_OPTS
Denys Vlasenko [Thu, 1 Oct 2009 23:29:25 +0000 (01:29 +0200)]
cp: FEATURE_CP_LONG_OPTIONS depends on LONG_OPTS

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agook, last fix wasn't correct... this one is better
Denys Vlasenko [Thu, 1 Oct 2009 23:21:31 +0000 (01:21 +0200)]
ok, last fix wasn't correct... this one is better

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agofix a typo in prev commit
Denys Vlasenko [Thu, 1 Oct 2009 23:13:45 +0000 (01:13 +0200)]
fix a typo in prev commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoUpdate documentation generator so that it sucks less
Denys Vlasenko [Thu, 1 Oct 2009 23:10:32 +0000 (01:10 +0200)]
Update documentation generator so that it sucks less

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agotypo fix in a comment in a testcase. oh well...
Denys Vlasenko [Wed, 30 Sep 2009 00:48:59 +0000 (02:48 +0200)]
typo fix in a comment in a testcase. oh well...

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agofind: add zeroing of G.xxx; ftpd - remove extraneous zeroing of G.xxx
Denys Vlasenko [Wed, 30 Sep 2009 00:39:57 +0000 (02:39 +0200)]
find: add zeroing of G.xxx; ftpd - remove extraneous zeroing of G.xxx

Brought "G trick" to the same shape in a few more places.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash,hush: share string
Denys Vlasenko [Tue, 29 Sep 2009 10:25:30 +0000 (12:25 +0200)]
ash,hush: share string

function                                             old     new   delta
optschanged                                          133     139      +6
hush_main                                            997     982     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 6/-15)              Total: -9 bytes
   text   data    bss    dec    hexfilename
 823160    445   7668 831273  caf29busybox_old
 823102    445   7668 831215  caeefbusybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agofind: -follow should not error out on dandling links
Denys Vlasenko [Tue, 29 Sep 2009 09:07:04 +0000 (11:07 +0200)]
find: -follow should not error out on dandling links

function                                             old     new   delta
recursive_action                                     425     465     +40
find_main                                            436     465     +29
test_main                                            247     253      +6
need_print                                             1       -      -1
doCommands                                          2523    2521      -2
compare_keys                                         737     735      -2
xdev_dev                                               4       -      -4
xdev_count                                             4       -      -4
recurse_flags                                          4       -      -4
mkfs_vfat_main                                      1609    1605      -4
actions                                                4       -      -4
fileAction                                           588     583      -5
------------------------------------------------------------------------------
(add/remove: 0/5 grow/shrink: 3/4 up/down: 75/-30)             Total: 45 bytes
   text    data     bss     dec     hex filename
 822711     450    7684  830845   cad7d busybox_old
 822773     445    7668  830886   cada6 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolibbb/lineedit: restore ^D handling for unicode
Denys Vlasenko [Mon, 28 Sep 2009 22:00:12 +0000 (00:00 +0200)]
libbb/lineedit: restore ^D handling for unicode

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agolibbb/lineedit: fix the case when we configured history to have 0 lines
Denys Vlasenko [Sun, 27 Sep 2009 00:48:53 +0000 (02:48 +0200)]
libbb/lineedit: fix the case when we configured history to have 0 lines

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash,hush: make trap output short signal names, without SIG prefix
Denys Vlasenko [Sun, 27 Sep 2009 00:05:45 +0000 (02:05 +0200)]
ash,hush: make trap output short signal names, without SIG prefix

function                                             old     new   delta
evalvar                                             1373    1371      -2
builtin_trap                                         457     441     -16
trapcmd                                              260     236     -24

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agofind: do not recurse into directories with depth == --maxdepth
Denys Vlasenko [Sat, 26 Sep 2009 23:51:47 +0000 (01:51 +0200)]
find: do not recurse into directories with depth == --maxdepth

This may avoid many, many unnecessary stat() calls

function                                             old     new   delta
fileAction                                           718     758     +40

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agocp: add support for --parents and long option synonyms of short opts
Denys Vlasenko [Sat, 26 Sep 2009 12:31:04 +0000 (14:31 +0200)]
cp: add support for --parents and long option synonyms of short opts

By Ian Wienand (ianw AT vmware.com)

function                                             old     new   delta
cp_main                                              257     369    +112
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 112/0)             Total: 112 bytes
   text    data     bss     dec     hex filename
 823000     458    6948  830406   cabc6 busybox_old
 823283     458    6948  830689   cace1 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: do not reset to default "" traps in subshell
Denys Vlasenko [Fri, 25 Sep 2009 12:21:06 +0000 (14:21 +0200)]
hush: do not reset to default "" traps in subshell

function                                             old     new   delta
reset_traps_to_defaults                              164     211     +47
builtin_umask                                        123     121      -2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: document a TODO. no code changes
Denys Vlasenko [Fri, 25 Sep 2009 10:58:37 +0000 (12:58 +0200)]
hush: document a TODO. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: better comment. no code changes
Denys Vlasenko [Fri, 25 Sep 2009 10:12:53 +0000 (12:12 +0200)]
ash: better comment. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: even smaller `trap` code
Denys Vlasenko [Fri, 25 Sep 2009 00:58:20 +0000 (02:58 +0200)]
ash: even smaller `trap`  code

function                                             old     new   delta
evalvar                                             1371    1373      +2
trapcmd                                              347     260     -87

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: slightly better (more correct) code for "trap hack"
Denys Vlasenko [Fri, 25 Sep 2009 00:12:27 +0000 (02:12 +0200)]
ash: slightly better (more correct) code for "trap hack"

function                                             old     new   delta
changepath                                           194     195      +1
evalvar                                             1373    1371      -2
forkchild                                            602     590     -12

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agologin: log PAM errors to syslog, not stderr
Denys Vlasenko [Thu, 24 Sep 2009 23:50:45 +0000 (01:50 +0200)]
login: log PAM errors to syslog, not stderr

By Ian Wienand (ianw AT vmware.com)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: better handling of EXIT trap in `trap` hack
Denys Vlasenko [Thu, 24 Sep 2009 22:06:51 +0000 (00:06 +0200)]
ash: better handling of EXIT trap in `trap` hack

function                                             old     new   delta
forkchild                                              -     602    +602
trapcmd                                              255     347     +92
ash_main                                            1362    1375     +13
evalvar                                             1371    1373      +2
popstring                                            140     134      -6
forkshell                                            835     248    -587
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/2 up/down: 709/-593)          Total: 116 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: do not let EXIT trap to fire in `trap`
Denys Vlasenko [Thu, 24 Sep 2009 01:09:26 +0000 (03:09 +0200)]
ash: do not let EXIT trap to fire in `trap`

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: small speed optimization. +10 bytes.
Denys Vlasenko [Wed, 23 Sep 2009 23:44:13 +0000 (01:44 +0200)]
hush: small speed optimization. +10 bytes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash,hush: fix trap reporting: s/SIGEXIT/EXIT/
Denys Vlasenko [Wed, 23 Sep 2009 23:43:21 +0000 (01:43 +0200)]
ash,hush: fix trap reporting: s/SIGEXIT/EXIT/

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoifenslave: fix for 2.4 kernels compile
Denys Vlasenko [Wed, 23 Sep 2009 21:47:52 +0000 (23:47 +0200)]
ifenslave: fix for 2.4 kernels compile

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years ago*: more portability fixes by Dan Fandrich
Denys Vlasenko [Wed, 23 Sep 2009 21:15:43 +0000 (23:15 +0200)]
*: more portability fixes by Dan Fandrich

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years ago*: optimize code size in strtoul calls
Denys Vlasenko [Wed, 23 Sep 2009 15:17:53 +0000 (17:17 +0200)]
*: optimize code size in strtoul calls

function                                             old     new   delta
bb_parse_mode                                        433     431      -2
rtnl_rtntype_a2n                                     202     198      -4
ParseField                                           511     498     -13
bb_init_module_24                                   4730    4675     -55
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-74)             Total: -74 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agotar: accept spaces at the end of header fields (compat)
Denys Vlasenko [Wed, 23 Sep 2009 15:16:37 +0000 (17:16 +0200)]
tar: accept spaces at the end of header fields (compat)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: fix `trap`
Denys Vlasenko [Wed, 23 Sep 2009 01:25:52 +0000 (03:25 +0200)]
ash: fix `trap`

function                                             old     new   delta
forkshell                                            738     810     +72
popstring                                            134     140      +6
parse_command                                       1460    1463      +3
evalvar                                             1373    1371      -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 81/-2)              Total: 79 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: fix `trap`
Denys Vlasenko [Tue, 22 Sep 2009 23:46:19 +0000 (01:46 +0200)]
hush: fix `trap`

function                                             old     new   delta
expand_variables                                    2217    2280     +63
static.argv                                            -       8      +8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohdparm,fdisk: reinstate BLKGETSIZE64 #defines. No code changes
Denys Vlasenko [Tue, 22 Sep 2009 21:16:39 +0000 (23:16 +0200)]
hdparm,fdisk: reinstate BLKGETSIZE64 #defines. No code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agopidof/killall: fix bug 625 (kernel threads get stale "binary name")
Denys Vlasenko [Tue, 22 Sep 2009 21:06:07 +0000 (23:06 +0200)]
pidof/killall: fix bug 625 (kernel threads get stale "binary name")

function                                             old     new   delta
procps_scan                                         1622    1642     +20

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agodf: unicode-aware column formatting. By Tomas Heinrich (theinric AT redhat.com)
Denys Vlasenko [Tue, 22 Sep 2009 13:34:28 +0000 (15:34 +0200)]
df: unicode-aware column formatting. By Tomas Heinrich (theinric AT redhat.com)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agops: fix compile breakage
Denys Vlasenko [Tue, 22 Sep 2009 09:21:48 +0000 (11:21 +0200)]
ps: fix compile breakage

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agosed: fix bug 623 (SEGV on some sed commands)
Denys Vlasenko [Tue, 22 Sep 2009 01:02:21 +0000 (03:02 +0200)]
sed: fix bug 623 (SEGV on some sed commands)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agops: conditionally enable -T on non-DESKTOP build too
Denys Vlasenko [Mon, 21 Sep 2009 21:58:43 +0000 (23:58 +0200)]
ps: conditionally enable -T on non-DESKTOP build too

function                                             old     new   delta
ps_main                                              253     274     +21

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: better wording in comments. no code changes
Denys Vlasenko [Mon, 21 Sep 2009 08:21:44 +0000 (10:21 +0200)]
hush: better wording in comments. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoawk: fix typo in prev commit
Denys Vlasenko [Mon, 21 Sep 2009 02:16:00 +0000 (04:16 +0200)]
awk: fix typo in prev commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoawk: implement mktime
Leonid Lisovskiy [Mon, 21 Sep 2009 02:08:08 +0000 (04:08 +0200)]
awk: implement mktime

function                                             old     new   delta
exec_builtin                                           -    1466   +1466
do_mktime                                              -     116    +116
tokenlist                                            441     448      +7
tokeninfo                                            396     400      +4
evaluate                                            5395    3755   -1640
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/1 up/down: 1593/-1640)        Total: -47 bytes

Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agodiff: debug macros; one trivial size optimization
Denys Vlasenko [Sun, 20 Sep 2009 23:23:19 +0000 (01:23 +0200)]
diff: debug macros; one trivial size optimization

function                                             old     new   delta
diffreg                                             1781    1815     +34
isqrt                                                 64       -     -64
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 34/-64)            Total: -30 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agodiff: fix bug 613 (diff -ub segfaults)
Denys Vlasenko [Sun, 20 Sep 2009 23:22:18 +0000 (01:22 +0200)]
diff: fix bug 613 (diff -ub segfaults)

function                                             old     new   delta
dump_unified_vec                                     435     457     +22
diff_main                                            855     860      +5
diffreg                                             1786    1781      -5
do_diff                                              428     416     -12
change                                               325     283     -42
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/3 up/down: 27/-59)            Total: -32 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agops: document -T option
Denys Vlasenko [Sun, 20 Sep 2009 18:29:25 +0000 (20:29 +0200)]
ps: document -T option

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoswaponoff: add uuid/label support. By Natanael Copa
Natanael Copa [Sun, 20 Sep 2009 02:28:22 +0000 (04:28 +0200)]
swaponoff: add uuid/label support. By Natanael Copa

function                                             old     new   delta
swap_enable_disable                                  130     150     +20
resolve_mount_spec                                    76      96     +20
mount_main                                          1152    1154      +2
findfs_main                                          125      80     -45
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 42/-45)             Total: -3 bytes

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoar: fix long filenames handling (bug 611)
Denys Vlasenko [Sat, 19 Sep 2009 23:28:27 +0000 (01:28 +0200)]
ar: fix long filenames handling (bug 611)

function                                             old     new   delta
get_header_ar                                        493     528     +35
read_num                                               -      25     +25

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agops,top: add an option to show threads. +260 bytes of code
Denys Vlasenko [Sat, 19 Sep 2009 20:29:42 +0000 (22:29 +0200)]
ps,top: add an option to show threads. +260 bytes of code

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agodd: fix conv=noerror w/o sync to not write out zeroed blocks
Denys Vlasenko [Fri, 18 Sep 2009 18:49:36 +0000 (20:49 +0200)]
dd: fix conv=noerror w/o sync to not write out zeroed blocks

function                                             old     new   delta
dd_main                                             1480    1463     -17

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agowe could need ssd -d (fancy)
Bernhard Reutner-Fischer [Thu, 17 Sep 2009 16:57:21 +0000 (18:57 +0200)]
we could need ssd -d (fancy)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
15 years agotar: do chown, not lchown to restore mode (compat)
Denys Vlasenko [Thu, 17 Sep 2009 01:02:57 +0000 (03:02 +0200)]
tar: do chown, not lchown to restore mode (compat)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agotar: fix --numeric-owner, --no-same-owner, --no-same-permissions bits
Denys Vlasenko [Thu, 17 Sep 2009 00:43:14 +0000 (02:43 +0200)]
tar: fix --numeric-owner, --no-same-owner, --no-same-permissions bits

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: fix bug 585 (>"$VAR_WITH_UNICODE_CHARS" problem)
Denys Vlasenko [Wed, 16 Sep 2009 14:20:31 +0000 (16:20 +0200)]
ash: fix bug 585 (>"$VAR_WITH_UNICODE_CHARS" problem)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoash: preparatory cleanup. The only real changes are (unsigned char) casts
Denys Vlasenko [Wed, 16 Sep 2009 14:18:32 +0000 (16:18 +0200)]
ash: preparatory cleanup. The only real changes are (unsigned char) casts

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agoadd a testcase for reopened bug 585 (not fixed yet)
Denys Vlasenko [Wed, 16 Sep 2009 12:04:07 +0000 (14:04 +0200)]
add a testcase for reopened bug 585 (not fixed yet)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agofdisk: add a warning and truncate disks with >= 2^32 sectors
Denys Vlasenko [Wed, 16 Sep 2009 01:03:13 +0000 (03:03 +0200)]
fdisk: add a warning and truncate disks with >= 2^32 sectors

As a result, for sectors we can use uint32_t instead of long long,
and on 32 bits it has drastic effects:

function                                             old     new   delta
get_geometry                                         619     646     +27
set_sun_partition                                    148     150      +2
get_partition                                        134     135      +1
xbsd_write_bootstrap                                 382     381      -1
xbsd_readlabel                                       247     246      -1
bsd_select                                          1674    1672      -2
sun_other_endian                                       4       1      -3
scsi_disk                                              4       1      -3
floppy                                                 4       1      -3
fdisk_main                                          3735    3732      -3
read_maybe_empty                                      43      37      -6
create_doslabel                                      111     104      -7
read_line                                             97      88      -9
add_logical                                          117     107     -10
write_table                                          599     588     -11
new_partition                                       1684    1670     -14
list_disk_geometry                                   229     215     -14
wrong_p_order                                        130     110     -20
xselect                                             3142    3114     -28
seek_sector                                           71      40     -31
get_boot                                            1576    1533     -43
fill_bounds                                          174     128     -46
delete_partition                                     603     551     -52
list_table                                          1401    1232    -169
set_partition                                        459     286    -173
verify                                              1840    1495    -345
add_partition                                       2486    1270   -1216
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/24 up/down: 30/-2210)       Total: -2180 bytes
   text    data     bss     dec     hex filename
 848812     460    7116  856388   d1144 busybox_old
 846620     460    7108  854188   d08ac busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agouse PACKED macro insted of open-coding GCC-ism
Denys Vlasenko [Tue, 15 Sep 2009 22:58:11 +0000 (00:58 +0200)]
use PACKED macro insted of open-coding GCC-ism

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>