Commit Graph

1607 Commits

Author SHA1 Message Date
Denis Vlasenko
73c571a5ff *: move get_sock_lsa and xwrite_str to libbb, use where appropriate
function                                             old     new   delta
get_sock_lsa                                           -      72     +72
buffer_fill_and_print                                179     196     +17
parse_expr                                           824     832      +8
read_base64                                          343     348      +5
nameval                                              202     206      +4
fbset_main                                          1694    1698      +4
expand                                              1849    1853      +4
udhcp_send_kernel_packet                             249     252      +3
udhcp_get_option                                     223     222      -1
chat_main                                           1246    1245      -1
pack_gzip                                           1661    1659      -2
doset                                                299     297      -2
bb__parsespent                                       119     117      -2
test_main                                            260     257      -3
qgravechar                                           109     106      -3
tcpudpsvd_main                                      1834    1830      -4
sysctl_display_all                                   589     580      -9
xopen_xwrite_close                                    44      33     -11
prs                                                   30      18     -12
find_main                                            418     406     -12
full_write2_str                                       25      12     -13
adduser_main                                         667     654     -13
evaltreenr                                           817     802     -15
evaltree                                             817     802     -15
tftpd_main                                           526     493     -33
ftpd_main                                           2050    1990     -60
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/18 up/down: 117/-211)         Total: -94 bytes
2009-03-09 00:12:37 +00:00
Denis Vlasenko
5e4fda0aff ftpd: code chrink, fixed some minor bugs
ls: update comment
*: openlog fixes (added LOG_PID, set LOG_DAEMON as appropriate)

function                                             old     new   delta
xwrite_str                                             -      26     +26
cmdio_write_ok                                         -      15     +15
handle_cwd                                            40      45      +5
packed_usage                                       25668   25670      +2
cmdio_write_raw                                        7       9      +2
handle_upload_common                                 322     320      -2
udhcpd_main                                         1375    1372      -3
udhcpc_main                                         2362    2359      -3
port_cleanup                                          27      23      -4
handle_dir_common                                    221     209     -12
str_netfd_write                                       26       -     -26
cmdio_get_cmd_and_arg                                122       -    -122
ftpd_main                                           2208    2050    -158
------------------------------------------------------------------------------
   text    data     bss     dec     hex filename
 809933     476    7864  818273   c7c61 busybox_old
 809199     476    7864  817539   c7983 busybox_unstripped
2009-03-08 23:46:48 +00:00
Denis Vlasenko
bf9d17949e adding forgotten new file 2009-03-08 09:31:28 +00:00
Denis Vlasenko
16b4a2de97 ftpd: new applet by Adam Tkac
$ size ftpd.o
   text    data     bss     dec     hex filename
   5703       0       0    5703    1647 ftpd.o
2009-03-08 09:30:56 +00:00
Denis Vlasenko
76140a77c9 networking/libiproute/*: code shrink by optimizing numeric conversions
and other misc stuff

function                                             old     new   delta
print_tunnel                                         660     656      -4
format_host                                            5       -      -5
get_unsigned                                          70      54     -16
get_u32                                               70      54     -16
do_iplink                                           1173    1151     -22
get_prefix                                           417     393     -24
print_rule                                           800     771     -29
print_addrinfo                                      1374    1342     -32
print_route                                         1745    1709     -36
iprule_modify                                        905     866     -39
iproute_modify                                      1105    1048     -57
get_integer                                           70       -     -70
parse_args                                          1684    1440    -244
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/11 up/down: 0/-594)          Total: -594 bytes
   text    data     bss     dec     hex filename
 817378     476    7892  825746   c9992 busybox_old
 816784     476    7892  825152   c9740 busybox_unstripped
2009-03-05 09:21:57 +00:00
Denis Vlasenko
5a2ad699fc wget: --post-data support by Harald Kuthe (harald-tuxbox AT arcor.de)
function                                             old     new   delta
wget_main                                           2467    2793    +326
static.wget_longopts                                 110     122     +12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 338/0)             Total: 338 bytes
2009-03-04 14:13:37 +00:00
Denis Vlasenko
787a492f23 ip: in "ip rule add from all table 1", "all" is taken as 0.0.0.0/32,
whereas "any" and "default" would be 0.0.0.0/0. They must be all 0.0.0.0/0.
Closes bug 57.
2009-03-03 14:55:29 +00:00
Denis Vlasenko
50af926ecf wget: fix --header handling 2009-03-02 15:08:06 +00:00
Denis Vlasenko
f09f4e015b runsv: small optimization
*: more paranoia around passing NULL to execl[e]

function                                             old     new   delta
custom                                               240     221     -19
2009-02-26 12:29:59 +00:00
Bernhard Reutner-Fischer
30e3df3817 - rephrase helptext for clarity 2009-02-24 10:05:15 +00:00
Bernhard Reutner-Fischer
12aca796ba - improve wording 2009-02-24 10:03:22 +00:00
Bernhard Reutner-Fischer
97b954decb - improve wording 2009-02-14 13:17:48 +00:00
Denis Vlasenko
2ca84f6064 httpd: tiny optimization 2009-02-05 12:38:21 +00:00
Denis Vlasenko
1cbfd98ded httpd:
Kill config options by making them always on:

FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP
FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES

This makes httpd.c remotely readable - it had ~125 #ifdefs, now it has ~100.
The growth on a .config with all FEATURE_HTTPDs off is:

function                                             old     new   delta
send_file_and_exit                                     -     269    +269
parse_conf                                           683     763     +80
free_llist                                             -      32     +32
httpd_main                                           427     454     +27
sighup_handler                                         -      15     +15
handle_incoming_and_exit                            1110     905    -205
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 2/1 up/down: 423/-205)          Total: 218 bytes
2009-02-04 23:43:44 +00:00
Denis Vlasenko
d814c98692 telnetd: do not advertise TELNET_LFLOW, we do not support
it properly.
2009-02-02 23:43:57 +00:00
Denis Vlasenko
04158e0459 udhcpd: add code which rejects lease files with suspicious or old timestamp.
*: s/time(0)/time(NULL)/g
2009-02-02 10:48:06 +00:00
Denis Vlasenko
73121c3c8c dhcpd,dumpleases: write and use 64-bit current time in lease file.
without it, determination of remaining lease time is unreliable.
 Yes, it's costly in code size, but without it, dumpleases output
 is misleading!

function                                             old     new   delta
read_leases                                          143     282    +139
dumpleases_main                                      447     572    +125
write_leases                                         193     233     +40
hton64                                                29      58     +29
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 333/0)             Total: 333 bytes
2009-02-01 00:40:45 +00:00
Denis Vlasenko
802cab15e5 brctl: fix compilation on 2.4.x kernels 2009-01-31 20:08:21 +00:00
Denis Vlasenko
bdea2c06dc traceroute: allow -w NUM as small as 1 2009-01-24 21:23:41 +00:00
Denis Vlasenko
766c10c386 traceroute: rewrite. Do not emit raw IP packets, instead send UDP or ICMP
packets and rely on the kernel to form IP headers, select source IP
 and interface. Doing it in traceroute wasn't working too good,
 and was bloating it.

function                                             old     new   delta
freehostinfo                                          29       -     -29
setsin                                                30       -     -30
in_cksum                                              57       -     -57
gethostinfo                                          165       -    -165
ifaddrlist                                           364       -    -364
traceroute_main                                     3713    2951    -762
------------------------------------------------------------------------------
(add/remove: 0/5 grow/shrink: 0/1 up/down: 0/-1407)         Total: -1407 bytes
2009-01-24 20:14:24 +00:00
Denis Vlasenko
fa65a3d78f traceroute: preparatory trivial cleanups
function                                             old     new   delta
traceroute_main                                     3932    3713    -219
2009-01-24 20:11:36 +00:00
Denis Vlasenko
39b681343b tunctl: new applet by Vladimir
function                                             old     new   delta
tunctl_main                                            -     371    +371
packed_usage                                       25669   25799    +130
applet_names                                        1981    1988      +7
applet_main                                         1192    1196      +4
applet_nameofs                                       596     598      +2
applet_install_loc                                   149     150      +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/0 up/down: 515/0)             Total: 515 bytes
2009-01-23 02:07:14 +00:00
Denis Vlasenko
ec64a5775e dhcpc: suppress "warning: 'timestamp_before_wait' might be used uninitialized 2009-01-14 00:28:03 +00:00
Denis Vlasenko
0416e3dde1 udhcpd: disable opton to have absolute lease times in lease file
(that does not work with dumpleases)
dumpleases: fix -a option.
networking/udhcp/*: code shrink, more compact static leases struture,
 better comments, etc

function                                             old     new   delta
find_free_or_expired_address                           -     147    +147
nobody_responds_to_arp                                 -      84     +84
read_opt                                             781     830     +49
dumpleases_main                                      435     447     +12
send_ACK                                             229     232      +3
read_staticlease                                      90      93      +3
addStaticLease                                        60      61      +1
getIpByMac                                            46      43      -3
reservedIp                                            31      20     -11
keywords                                             304     288     -16
send_offer                                           428     403     -25
write_leases                                         225     193     -32
read_leases                                          184     143     -41
read_yn                                               64       -     -64
find_address                                         191       -    -191
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 5/6 up/down: 299/-383)          Total: -84 bytes
2009-01-01 17:52:09 +00:00
Denis Vlasenko
76ddc2e3e4 libbb: add bb_unsetenv (taken from hush).
udhcpc: stop filtering environment passed to the script.
crond: fix uncovered potential bug (failing unsetenv)
mdev: fix uncovered potential bug (failing unsetenv)
tcp, udpsvd: fix uncovered potential bug (failing unsetenv)

function                                             old     new   delta
safe_setenv                                            -      58     +58
bb_unsetenv                                            -      55     +55
builtin_unset                                        139     138      -1
tcpudpsvd_main                                      1843    1830     -13
free_strings_and_unsetenv                             87      53     -34
udhcp_run_script                                    1186    1133     -53
safe_setenv4                                          62       -     -62
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/4 up/down: 113/-163)          Total: -50 bytes
2008-12-30 05:05:31 +00:00
Denis Vlasenko
12abcb36c8 libiproute: fix buggy open check: s/if (fd)/if (fd >= 0)/
less: small optimization -15 bytes
2008-12-10 14:14:09 +00:00
Denis Vlasenko
517413f9af bb_info_msg: make it do atomic, unbuffered writes
udhcpc: fix a problem where we don't open listening socket fast enough

function                                             old     new   delta
bb_info_msg                                           70     126     +56
change_listen_mode                                    37      78     +41
udhcp_listen_socket                                  151     124     -27
udhcpc_main                                         2344    2285     -59
2008-12-10 11:16:47 +00:00
Denis Vlasenko
e53738558f *: fix SO_BINDTODEVICE. Kernel wants at least IFNAMSIZ bytes there. 2008-12-10 11:12:16 +00:00
Denis Vlasenko
efb545b9bd optimize 16- and 32-bit moves
function                                             old     new   delta
udhcpd_main                                         1239    1257     +18
udhcp_add_simple_option                               93      92      -1
buffer_read_le_u32                                    19      18      -1
unpack_gz_stream_with_info                           526     520      -6
dnsd_main                                           1470    1463      -7
udhcp_run_script                                    1208    1186     -22
send_ACK                                             255     229     -26
arping_main                                         1661    1623     -38
send_offer                                           470     428     -42
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/8 up/down: 18/-143)          Total: -125 bytes
2008-12-08 22:56:18 +00:00
Denis Vlasenko
db12d1d733 Fix forgotten license comments 2008-12-07 00:52:58 +00:00
Denis Vlasenko
3246c0de12 iproute: fix ipXXX utilities trying to parse their applet name
as their 1st parameter.
2008-12-04 12:15:19 +00:00
Denis Vlasenko
196a953f21 iptunnel: fix problems with including linux/ip_tunnel.h
on some systems
2008-12-03 20:16:11 +00:00
Denis Vlasenko
d7a805efaf libbb: introduce and use xgetpwnam. ~ -150 bytes. 2008-12-03 19:05:55 +00:00
Denis Vlasenko
c5045fdbf1 vconfig: style fix, no code changes 2008-12-02 20:38:36 +00:00
Denis Vlasenko
360d9661b6 libbb: add strncpy_IFNAMSIZ
function                                             old     new   delta
...
udhcp_read_interface                                 225     220      -5
brctl_main                                          1151    1146      -5
add_interface                                        109     104      -5
ipaddr_list_or_flush                                2174    2167      -7
do_add_ioctl                                          88      80      -8
vconfig_main                                         249     240      -9
do_del_ioctl                                          78      68     -10
do_iplink                                           1186    1173     -13
do_if_fetch                                          766     753     -13
buffer_fill_and_print                                196     179     -17
parse_args                                          1709    1684     -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/20 up/down: 11/-140)         Total: -129 bytes
2008-12-02 18:18:50 +00:00
Denis Vlasenko
61befda93b ash,hush: add TODO for rare build failure
*: remove some redundant includes
2008-11-25 01:36:03 +00:00
Denis Vlasenko
00d8417631 vi: speedup and code shrink (Walter Harms)
networking/interface.c: silence warning (Vladimir)
wget: more robust EINTR detection
2008-11-24 07:34:42 +00:00
Denis Vlasenko
9d1d4c06d7 httpd: set $HOST to Host: header value. +83 bytes.
by Tobias Poschwatta (tp AT fonz.de)
2008-11-22 20:29:35 +00:00
Denis Vlasenko
12ff9dc714 networking/interface.c: better readability (by Walter Harms)
mkfs_minix: whitespace fix
2008-11-22 18:58:11 +00:00
Denis Vlasenko
ae6e135ae8 tftpd: can also have TFTP_DEBUG 2008-11-22 18:41:41 +00:00
Denis Vlasenko
249d948e39 nslookup: glibc + IPv6 address of DNS server don't mix (yet) 2008-11-17 15:36:36 +00:00
Denis Vlasenko
3f5f246466 nslookup: allow usage of IPv6 addresses or hostnames
for DNS server name; allow for port specification.
 Tested to work: "nslookup google.com [::1]:5353"
2008-11-16 19:02:26 +00:00
Wade Berrier
142c5cb2a2 ifupdown.c: allow options to udhcpc to be configurable from .config
This allows more control over options that are passed to udhcpc
that are not configurable via /etc/network/interfaces.

Example: rather than quit when an initial lease isn't found,
you could use "--background" so that udhcpc keeps running and
continually attempts to get an ip.  That way, when you plug in
the ethernet after powering on the device, you'll still get an ip.
2008-11-14 21:18:45 +00:00
Denis Vlasenko
4d47692fb8 arp: stop using globals
function                                             old     new   delta
hw_set                                                 1       -      -1
arp_main                                            1559    1558      -1
sockfd                                                 8       4      -4
hw                                                     4       -      -4
device                                                 4       -      -4
ap                                                     4       -      -4
packed_usage                                       25402   25393      -9
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/3 up/down: 0/-27)             Total: -27 bytes
2008-11-13 00:05:17 +00:00
Denis Vlasenko
81c6a91251 telnetd: fix compile problem for non-standalone telnetd 2008-11-12 21:14:50 +00:00
Denis Vlasenko
9f2f808b0d telnetd: correctly output 0xff char. ~100 bytes.
telnet: fix some atrocious names and style. no code changes
2008-11-11 02:56:39 +00:00
Denis Vlasenko
6d0443557c telnetd: set SO_KEEPALIVE, users report it's useful. +20 bytes. 2008-11-09 00:44:40 +00:00
Denis Vlasenko
3fa36e2350 *: a bit of code shrink
function                                             old     new   delta
stop_handler                                          41      38      -3
sulogin_main                                         508     504      -4
got_cont                                               4       -      -4
cont_handler                                          11       -     -11
startservice                                         309     297     -12
processorstart                                       423     409     -14
tcpudpsvd_main                                      1861    1843     -18
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/5 up/down: 0/-66)             Total: -66 bytes
2008-11-09 00:15:11 +00:00
Denis Vlasenko
b0150d299f telnetd: handle emacs M-DEL and IAC-NOP (putty keepalive)
by Jim Cathey (jcathey AT ciena.com)

function                                             old     new   delta
telnetd_main                                        1314    1364     +50
2008-11-07 01:58:21 +00:00
Denis Vlasenko
b9d572a273 total overhaul of mail applets. again. Vladimir as usual. 2008-11-06 23:41:38 +00:00