Commit Graph

2194 Commits

Author SHA1 Message Date
Denys Vlasenko
5342c3f310 clean up redundant, commented-out and misplaced includes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-01 15:09:44 +02:00
Denys Vlasenko
345e093c29 fix Config.in tab usage
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-31 16:03:56 +02:00
Maxim Kryzhanovsky
2004fa1bc8 ifplugd: code shrink; expanded comments
Signed-off-by: Maxim Kryzhanovsky <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-30 15:49:57 +02:00
Maxim Kryzhanovsky
fcb84c8bd2 ifplugd: code shrink
text    data     bss     dec     hex filename
 840048     453    6828  847329   cede1 busybox_old
 839915     453    6828  847196   ced5c busybox_unstripped

Signed-off-by: Maxim Kryzhanovsky <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-29 09:09:05 +02:00
Denys Vlasenko
c8a2ab1023 dumpleases: better help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-28 00:02:20 +01:00
Denys Vlasenko
406bd14416 udhcpd: fix -v/-P mixup
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-27 23:24:57 +01:00
Denys Vlasenko
9107b63a7f udhcp: abort if we see unknown option, and show valid options if so
function                                             old     new   delta
udhcp_option_idx                                       -      77     +77
udhcp_str2optset                                     366     351     -15
udhcpc_main                                         2845    2801     -44
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 77/-59)             Total: 18 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-27 23:23:41 +01:00
Denys Vlasenko
19158a837d unicode: s/FEATURE_ASSUME_UNICODE/UNICODE_SUPPORT, add UNICODE_USING_LOCALE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 14:06:56 +01:00
Denys Vlasenko
385b4562e3 udhcp: cosmetic cleanups; one case of s/full_read/xread/
function                                             old     new   delta
dumpleases_main                                      632     623      -9

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 10:09:34 +01:00
Denys Vlasenko
7724c766bd udhcp: pass pointer to whole packet to "add option" functions
This is needed for "overflow option" support

function                                             old     new   delta
udhcp_find_option                                      -      34     +34
udhcp_add_binary_option                               94     106     +12
write_leases                                         227     223      -4
udhcp_init_header                                     86      82      -4
send_release                                         104      99      -5
init_packet                                           87      81      -6
add_client_options                                   160     154      -6
add_server_options                                   100      92      -8
udhcpd_main                                         1964    1954     -10
udhcpc_main                                         2859    2837     -22
find_option                                           34       -     -34
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/8 up/down: 46/-99)            Total: -53 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 09:32:09 +01:00
Denys Vlasenko
a8f6b99987 udhcp: move options.c to common.c; disable unused bool and s16 option code
function                                             old     new   delta
udhcp_add_binary_option                                -      94     +94
udhcp_str2nip                                          -      42     +42
len_of_option_as_string                               12      10      -2
dhcp_option_lengths                                   12      10      -2
udhcpc_main                                         2859    2851      -8
read_nip                                              42       -     -42
xmalloc_optname_optval                               590     536     -54
udhcp_str2optset                                     443     366     -77
udhcp_add_option_string                               86       -     -86
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 0/5 up/down: 136/-271)         Total: -135 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 08:35:24 +01:00
Denys Vlasenko
7e6add1dfc udhcpc: add -x OPT:VAL option
function                                             old     new   delta
udhcp_str2optset                                       -     443    +443
add_client_options                                     -     160    +160
udhcpc_main                                         2753    2857    +104
packed_usage                                       26670   26689     +19
attach_option                                        380     385      +5
udhcpd_main                                         1964    1965      +1
udhcp_add_option_string                               94      86      -8
add_param_req_option                                 128       -    -128
read_opt                                             443       -    -443
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 4/1 up/down: 732/-579)          Total: 153 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-25 20:32:38 +01:00
Denys Vlasenko
3d9c69fb4f udhcp: add testing bits to dns en/decoder
we had two bugs there at least, must have testing

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-24 16:43:16 +01:00
Denys Vlasenko
702f7d6c0b udhcp: we call DNS name encoder with NULL, this can SEGV. added a check
function                                             old     new   delta
dname_enc                                            418     415      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-24 16:11:32 +01:00
Denys Vlasenko
a14a9d73b1 udhcp: fix DNS domanin codec bug: bad compression flag checks
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-24 15:06:23 +01:00
Denys Vlasenko
651a2697f7 *: merge some common strings
text   data    bss    dec    hexfilename
 838650   8009      0 846659  ceb43busybox_old
 838519   8009      0 846528  ceac0busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 16:25:17 +01:00
Denys Vlasenko
37a658c4c8 udhcp: handle errors in read_staticlease
also gets rid of ether-aton's static buffer in ether-wake:
   text   data    bss    dec    hexfilename
 838664    441   7572 846677  ceb55busybox_old
 838650    441   7564 846655  ceb3fbusybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 15:43:08 +01:00
Maciek Borzecki
30ebd7bd78 brctl: fixing stp parameters incompatibility
function                                             old     new   delta
static.stp_opts                                        -      23     +23
brctl_main                                          1148    1169     +21
packed_usage                                       26786   26794      +8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 52/0)               Total: 52 bytes

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 05:18:38 +01:00
Denys Vlasenko
e283413395 udhcp: code shrink
function                                             old     new   delta
attach_option                                          -     380    +380
read_opt                                             859     443    -416
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 380/-416)          Total: -36 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 04:31:38 +01:00
Denys Vlasenko
6ef8def7cf udhcp: remove two unused fields
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 02:17:52 +01:00
Denys Vlasenko
6b61629397 udhcp: make rfc derived doc more readable (but it still is contradictory)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 15:22:14 +01:00
Denys Vlasenko
dde8bdcc5b udhcp: merge options.h into common.h, script.c into dhcpc.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 14:29:13 +01:00
Denys Vlasenko
8d1144565f udhcpc: do not test for srand init, just do it at the start
function                                             old     new   delta
udhcpc_main                                         2855    2867     +12
static.initialized                                     1       -      -1
client_background                                     32      31      -1
perform_release                                      124     122      -2
random_xid                                            38       -     -38
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/2 up/down: 12/-42)            Total: -30 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 13:44:09 +01:00
Denys Vlasenko
501e35c474 udhcp: merge clientpacket.c into dhcpc.c
function                                             old     new   delta
udhcpc_main                                         2569    2855    +286
perform_release                                      122     124      +2
client_background                                     31      32      +1
init_packet                                          156      88     -68
send_decline                                         114       -    -114
send_discover                                        121       -    -121
send_select                                          130       -    -130
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 3/1 up/down: 289/-433)         Total: -144 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 13:43:12 +01:00
Denys Vlasenko
6b24d5354b udhcpc: merge clientsocket.c into dhcpc.c. +4 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 13:42:13 +01:00
Denys Vlasenko
53f72bb3f0 dhcpd: apparently, sometimes IP is in ciaddr, not requested_ip...
also revert the part which appempted to "fix" that in client

function                                             old     new   delta
udhcpd_main                                         1949    1964     +15
send_renew                                           142     105     -37
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 15/-37)            Total: -22 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 06:46:09 +01:00
Denys Vlasenko
c7dc79e71d udhcpd: untangle incredibly messy handling of DHCPREQUEST
Also fixes attacks possible via DHCPDECLINE / DHCPRELEASE

function                                             old     new   delta
udhcpd_main                                         1846    1949    +103
send_renew                                           105     142     +37
send_NAK                                              61       -     -61
send_ACK                                             180       -    -180
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/0 up/down: 140/-241)         Total: -101 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 06:15:28 +01:00
Denys Vlasenko
2e7aa92836 udhcp: tweak udhcpd.conf example and comments. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 02:22:07 +01:00
Denys Vlasenko
e5ce91b41b udhcp: code shrink; disable time and log server options
function                                             old     new   delta
add_server_options                                     -     100    +100
udhcp_add_simple_option                               92      90      -2
nobody_responds_to_arp                                88      85      -3
dhcp_options                                          66      62      -4
udhcp_add_option_string                              104      94     -10
udhcp_run_script                                     665     654     -11
dhcp_option_strings                                  203     188     -15
static.blank_chaddr                                   16       -     -16
send_ACK                                             211     180     -31
add_bootp_options                                     61       -     -61
udhcpd_main                                         1925    1846     -79
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/8 up/down: 100/-232)         Total: -132 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 00:43:11 +01:00
Denys Vlasenko
87fa216e1e udhcpc: make it possible to disable vendor id; improve help text
function                                             old     new   delta
init_packet                                          135     139      +4
packed_usage                                       26789   26786      -3
alloc_dhcp_option                                     67      63      -4
udhcpc_main                                         2467    2447     -20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 4/-27)             Total: -23 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-20 18:06:23 +01:00
Denys Vlasenko
0f62c4d065 udhcpd: remove five more options which do not make sense or not supported
requestip, vendorclass, clientid are client-side variables,
          they do not make sense as udhcpd opts
dhcptype  is the packet type (not interesting, it's always 5)
userclass needs parser support in order to work

function                                             old     new   delta
dhcp_options                                          68      66      -2
read_opt                                             865     859      -6
dhcp_option_strings                                  253     203     -50
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-58)             Total: -58 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-20 07:12:21 +01:00
Denys Vlasenko
a953987e77 udhcpd: remove redundant code in send_offer()
static_lease_nip and lease pointer are canculated in the caller,
no need to calculate them again. lease_time_sec calculation
is also redundant: it is assigned to later, w/o being used
in between.

function                                             old     new   delta
udhcpd_main                                         1956    1925     -31

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-20 03:49:27 +01:00
Denys Vlasenko
8a7c166ab9 udhcp: move serverpacket.c into dhcpd.c, no other changes
function                                             old     new   delta
udhcpd_main                                         1480    1956    +476
send_inform                                           83       -     -83
send_offer                                           376       -    -376
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 1/0 up/down: 476/-459)           Total: 17 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-20 03:48:11 +01:00
Denys Vlasenko
777706cb23 udhcp: remove support for some really old and odd options
function                                             old     new   delta
dhcp_options                                          72      68      -4
dhcp_option_strings                                  271     253     -18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-19 23:42:23 +01:00
Denys Vlasenko
8531d76a15 *: code shrink and better "died from signal" reporting from wait4pid
function                                             old     new   delta
parse                                                964     967      +3
udhcp_run_script                                     670     665      -5
singlemount                                          911     906      -5
mount_it_now                                         360     355      -5
inotifyd_main                                        521     516      -5
xspawn                                                21       -     -21
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/4 up/down: 3/-41)             Total: -38 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-18 22:44:00 +01:00
Bernhard Reutner-Fischer
0c0f1767f0 brctl: Fix comment
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-03-17 11:23:04 +01:00
Maciek Borzecki
46abfc0da1 brctl: fix parsing of timespec to allow 0 (setfd, sethello..)
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-17 10:25:29 +01:00
Denys Vlasenko
cbcc1236f8 tftp: do not show progress bar if we get error right away. +13 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-05 23:38:54 +01:00
Denys Vlasenko
9341fd2d30 ping: do not leak data from stack; shrink
FANCY ping:
function                                             old     new   delta
common_ping_main                                     386    1732   +1346
sendping6                                             98      83     -15
sendping4                                            188     158     -30
ping4                                                575       -    -575
ping6                                                756       -    -756
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/2 up/down: 1346/-1376)        Total: -30 bytes

!FANCY ping:
function                                             old     new   delta
hostname                                               4       -      -4
common_ping_main                                     566     499     -67

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-03 01:10:29 +01:00
Denys Vlasenko
88aa558e5c *: do not check for POLLIN/POLLOUT only, just in case it's POLHUP/POLERR
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-02 15:02:45 +01:00
Denys Vlasenko
f6b29a2dc9 Merge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox 2010-02-27 23:15:22 +01:00
Denys Vlasenko
99069330a1 *: gethostname-related fixes
function                                             old     new   delta
hostname_main                                        218     231     +13
nfsmount                                            3541    3474     -67

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-27 19:38:19 +01:00
Bernhard Reutner-Fischer
45cec1ee89 Config: fix alphabetical ordering
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-26 19:33:49 +01:00
Bernhard Reutner-Fischer
ca228fb16d reuse a few strings
text    data     bss     dec     hex filename
 839040     453    6828  846321   ce9f1 busybox_old
 839019     453    6828  846300   ce9dc busybox_unstripped

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-26 10:09:31 +01:00
Denys Vlasenko
8031848938 typo fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-24 14:27:55 +01:00
Denys Vlasenko
45e9792446 netstat: fix a trivial bug
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-19 08:29:32 +01:00
Denys Vlasenko
81fe2b15f3 wget: fix bug 1057 "busybox wget segfaults with http_proxy environment set"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-11 04:23:43 +01:00
Bernhard Reutner-Fischer
3fdba181c3 wget: ignore --no-check-certificate
Used in a number of scripts, don't barf on it (we don't do ssl ATM).

function                                             old     new   delta
static.wget_longopts                                 122     145     +23
.rodata                                           131925  131947     +22
packed_usage                                       26860   26859      -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 45/-1)              Total: 44 bytes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-10 19:37:29 +01:00
Denys Vlasenko
343dfd7abe dnsd: add -s option. This allows (clumsy) operation with read dns servers
function                                             old     new   delta
packed_usage                                       26816   26886     +70
dnsd_main                                           1299    1303      +4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-07 02:45:03 +01:00
Denys Vlasenko
e66a09ba9c dnsd: add more -v messages
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-07 01:11:18 +01:00
Denys Vlasenko
5fb38491e3 dnsd: fix one big-endian goof; add a TODO about RA bit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-06 22:48:10 +01:00
Denys Vlasenko
2f14263c40 udhcp[cd]: fix aliasing warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-05 15:35:05 +01:00
Denys Vlasenko
36659fda1f *: fix 1/4 remaining aliasing warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-05 14:40:23 +01:00
Denys Vlasenko
12ca080a1c *: eliminate more aliasing warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04 18:41:18 +01:00
Denys Vlasenko
98a4c7cf3d *: suppress ~60% of "aliased warnings" on gcc-4.4.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04 15:00:15 +01:00
Denys Vlasenko
bb1dcc9aab more thorough fix for systems with strange socklen_t
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-02 12:45:38 +01:00
Denys Vlasenko
4b061461d3 tftpd: fix file creation with bogus mode. Closes bug 1021.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-02 01:01:40 +01:00
Denys Vlasenko
e17764c8fb further work on unicodization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-30 23:16:21 +01:00
Denys Vlasenko
6b9f163353 *: style fixes. no code changes (verified with objdump)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-28 02:24:24 +01:00
Denys Vlasenko
ffc4bced95 libiproute: eliminate unused fields in struct filter_t's; style fixes
function                                             old     new   delta
print_route                                         1603    1588     -15
iproute_list_or_flush                               1254    1230     -24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-39)             Total: -39 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-26 11:03:16 +01:00
Denys Vlasenko
24928ffd8d ntpd: explain why scripts can be run in quick succession
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-25 19:30:16 +01:00
Denys Vlasenko
3581c62515 whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-25 13:39:24 +01:00
Denys Vlasenko
9f93d62192 libbb: better unicode width support. Hopefully fixes bug 839.
Also opens up a possibility to make other unicode stuff smaller
and more correct later. but:

function                                             old     new   delta
static.combining                                       -     516    +516
bb_wcwidth                                             -     328    +328
unicode_cut_nchars                                     -     141    +141
mbstowc_internal                                       -      93     +93
in_table                                               -      78     +78
cal_main                                             899     961     +62
static.combining0x10000                                -      40     +40
unicode_strlen                                         -      31     +31
bb_mbstrlen                                           31       -     -31
bb_mbstowcs                                          173     102     -71
------------------------------------------------------------------------------
(add/remove: 7/1 grow/shrink: 1/1 up/down: 1289/-102)        Total: 1187 bytes

Uses code of Markus Kuhn, which is in public domain:
http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
"Permission to use, copy, modify, and distribute this software
 for any purpose and without fee is hereby granted. The author
 disclaims all warranties with regard to this software."

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-24 07:44:03 +01:00
Bernhard Reutner-Fischer
dfd38a480b ping: use ICMP_MINLEN
no code changes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-23 12:53:40 +01:00
Stefan Seyfried
f3fc9ac166 ftpd: conditional support for broken clients
Signed-off-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-18 02:08:30 +01:00
Denys Vlasenko
33f9dc08e5 ftpd: code shrink
function                                             old     new   delta
MMU:
handle_dir_common                                    354     338     -16
NOMMU:
ftpd_main                                           2437    2442      +5
popen_ls                                             201     174     -27

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-17 22:32:22 +01:00
Denys Vlasenko
57f46c1afd ntpd: remove some code which is at best unneeded and at worst wrong
function                                             old     new   delta
step_time                                            246     256     +10
ntpd_main                                            855     844     -11
update_local_clock                                   767     714     -53

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-17 03:01:15 +01:00
Denys Vlasenko
9b20adca4b ntpd: add anti-clock-hopping code
function                                             old     new   delta
select_and_cluster                                   837     950    +113
update_local_clock                                   759     767      +8
root_distance                                         61       -     -61

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-17 02:51:33 +01:00
Denys Vlasenko
5b9a910749 ntpd: disable frequency estimation code
function                                             old     new   delta
reset_peer_stats                                     164     168      +4
ntp_init                                             371     368      -3
recv_and_process_peer_pkt                            869     852     -17
update_local_clock                                   823     759     -64
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 4/-84)             Total: -80 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-17 01:05:58 +01:00
Denys Vlasenko
60b9524bf7 whitespace fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-14 01:11:54 +01:00
Denys Vlasenko
f2c8aa6676 libbb: introduce and use monotonic_ms
function                                             old     new   delta
monotonic_ms                                           -      60     +60
process_stdin                                        433     443     +10
display_speed                                         85      90      +5
nmeter_main                                          672     674      +2
builtin_type                                         114     116      +2
bb__parsespent                                       117     119      +2
ifplugd_main                                        1110    1109      -1
acpid_main                                           441     440      -1
chat_main                                           1361    1359      -2
doCommands                                          2458    2449      -9
arpping                                              466     450     -16
run_command                                          268     234     -34
readcmd                                             1072    1034     -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/7 up/down: 81/-101)           Total: -20 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 12:52:30 +01:00
Denys Vlasenko
cb23d93c68 *: add/remove safe_, it seems we had a few incorrect uses
function                                             old     new   delta
chat_main                                           1359    1361      +2
microcom_main                                        712     713      +1
ifplugd_main                                        1109    1110      +1
arpping                                              465     466      +1
acpid_main                                           440     441      +1
script_main                                         1069    1067      -2
cgi_io_loop_and_exit                                 594     591      -3
telnet_main                                         1475    1469      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/3 up/down: 6/-11)              Total: -5 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 12:29:55 +01:00
Denys Vlasenko
65d722bb0d ntpd: explain algorithm
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-11 02:14:04 +01:00
Denys Vlasenko
12628b7797 ntpd: expose more data to the script; more eagerly drop to lower poll
function                                             old     new   delta
run_script                                           340     395     +55
recv_and_process_peer_pkt                            817     869     +52
passwd_main                                         1027    1058     +31
ntpd_main                                            845     855     +10
update_local_clock                                   853     823     -30
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 148/-30)           Total: 118 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-11 01:31:59 +01:00
Denys Vlasenko
dc698bb038 *: make it easier to distinquish "struct tm", pointer to one, etc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 19:10:49 +01:00
Denys Vlasenko
866710a056 nc: fix "nc -nl -p LPORT RHOST" case (was expecting remote port 0). closes bug 837
function                                             old     new   delta
dolisten                                             742     830     +88

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-08 16:09:45 +01:00
Denys Vlasenko
f422a722bb ifplugd: restore auto-ifup unless -a; make iff method less iffy :D
function                                             old     new   delta
up_iface                                               -     112    +112
network_ioctl                                         13      38     +25
detect_link_iff                                       58      71     +13
detect_link                                          143     152      +9
ifplugd_main                                        1107    1109      +2
detect_link_wlan                                     131     125      -6
detect_link_ethtool                                   71      65      -6
detect_link_priv                                      88      80      -8
detect_link_mii                                       88      80      -8
maybe_up_new_iface                                   144      27    -117
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/5 up/down: 161/-145)           Total: 16 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-08 12:28:47 +01:00
Denys Vlasenko
9037787eae *: fix places where we were still using malloc/realloc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-08 09:07:50 +01:00
Denys Vlasenko
ae47335dc4 ntpd: show at loglevel 2 and export in env current poll interval
function                                             old     new   delta
run_script                                           273     340     +67
ntpd_main                                            832     845     +13

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-07 11:51:13 +01:00
Denys Vlasenko
6959f6bc23 hwclock: disable time diff code; ntpd -S script: do not wait for completion
function                                             old     new   delta
rtcname                                                4       -      -4
run_script                                           278     273      -5
hwclock_main                                         466     439     -27
read_rtc                                              86      38     -48
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/3 up/down: 0/-84)             Total: -84 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-07 08:31:46 +01:00
Denys Vlasenko
695fa51c80 hwclock: fix sizeof bug (used it on pointer, not array); make --systohc exact
function                                             old     new   delta
hwclock_main                                         329     428     +99
rtc_adjtime_is_utc                                   138     134      -4
edir                                                 365     354     -11
read_rtc                                              39      23     -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 99/-31)             Total: 68 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06 18:16:39 +01:00
Denys Vlasenko
06667f21d6 ntpd: renew cur_time after script run, it can take a while
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06 13:05:08 +01:00
Denys Vlasenko
ede737b7cf ntpd: add -S PROG option. This feature is crucial for CMOS/RTC syncronization
function                                             old     new   delta
run_script                                           112     278    +166
ntpd_main                                            779     825     +46
update_local_clock                                   824     858     +34
packed_usage                                       26518   26540     +22
ntp_init                                             366     371      +5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 273/0)             Total: 273 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06 12:27:47 +01:00
Denys Vlasenko
79ae534ac7 ifplugd: simplify run_script()
function                                             old     new   delta
packed_usage                                       26505   26518     +13
run_script                                           158     112     -46

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06 12:27:18 +01:00
Denys Vlasenko
074e8dcba7 ntpd: make -w less cumbersome to use
function                                             old     new   delta
packed_usage                                       26767   26779     +12
recv_and_process_peer_pkt                            808     817      +9

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 23:58:13 +01:00
Denys Vlasenko
28055028a7 fold: unicode support. Based on a patch by Tomas Heinrich <heinrich.tomas@gmail.com>
General Unicode support is tweaked to expose unicode_status.

function                                             old     new   delta
init_unicode                                           -      77     +77
write2stdout                                           -      19     +19
adjust_column                                         68      71      +3
unicode_status                                         -       1      +1
unicode_is_enabled                                     1       -      -1
grep_main                                            780     773      -7
fold_main                                            619     552     -67
check_unicode_in_env                                  77       -     -77
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 1/2 up/down: 100/-152)          Total: -52 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 20:49:58 +01:00
Denys Vlasenko
2ec91aead5 *: remove some uses of argc
function                                             old     new   delta
whoami_main                                           34      37      +3
logname_main                                          60      63      +3
hostid_main                                           35      38      +3
ttysize_main                                         136     135      -1
nmeter_main                                          673     672      -1
logger_main                                          387     386      -1
uuencode_main                                        330     328      -2
ifupdown_main                                       2125    2123      -2
mesg_main                                            158     155      -3
free_main                                            333     330      -3
cal_main                                             902     899      -3
acpid_main                                           443     440      -3
ar_main                                              196     189      -7
find_main                                            476     467      -9
ifconfig_main                                       1235    1221     -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/12 up/down: 9/-49)            Total: -40 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 14:15:38 +01:00
Denys Vlasenko
a355da0775 *: make 2 more "int argc"'s unused; more saved if !DESKTOP
function                                             old     new   delta
sync_main                                             18      20      +2
tty_main                                              90      87      -3
iprule_list                                           83      79      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 13:16:08 +01:00
Denys Vlasenko
4168fdd8e6 ntpd: add -w "watch" option, useful for debugging to look at our own data
Also fixed a small buglet discovered using -w

function                                             old     new   delta
recv_and_process_peer_pkt                            895     944     +49
select_and_cluster                                  1132    1150     +18
packed_usage                                       26769   26767      -2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 00:19:13 +01:00
Denys Vlasenko
2d3253d1f9 ntpd: fix comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-03 21:52:46 +01:00
Denys Vlasenko
d498ff0ac4 ntpd: try to avoid using libm. -1.2k if we succeed
uclibc's sqrt(x) is pathetic, 411 bytes? it can be ~100...

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-03 21:06:27 +01:00
Denys Vlasenko
510f56aa6f ntpd: remove an old hack for faster initialization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-03 12:00:26 +01:00
Denys Vlasenko
0b002812a8 ntpd: better selection of initial sync; fewer gettimeofday calls
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-03 08:59:59 +01:00
Denys Vlasenko
1ee5afdce2 ntpd: fix jitter calculations and status propagation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-02 15:57:07 +01:00
Denys Vlasenko
2e36eb8f27 ntpd: speed up reaction to poll interval decrease
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-02 01:50:16 +01:00
Denys Vlasenko
d9109e3b48 ntpd: improve frequency filtering
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-02 00:36:43 +01:00
Denys Vlasenko
a9aaeda0e9 ntpd: restore forgotten delay sanitization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-01 22:23:27 +01:00
Denys Vlasenko
e4844b8a5f ntpd: add a comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-01 21:59:49 +01:00
Denys Vlasenko
61313117a0 ntpd: disable unused code; show kernel's clock drift correction
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-01 19:56:16 +01:00
Denys Vlasenko
bfc2a32d88 ntpd: reduce poll interval increase rate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-01 18:12:06 +01:00
Denys Vlasenko
dd6673bac5 ntpd: replace openntp's clock discipline with ntpd's
It seems to be much more precise. +2.2k:
   text    data     bss     dec     hex filename
   4670       0       0    4670    123e busybox.t2/networking/ntpd.o
   6838       0       0    6838    1ab6 busybox.t3/networking/ntpd.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-01 16:46:17 +01:00
Denys Vlasenko
8a428d9b15 ntpd: ntpd.c -> ntpd_simple.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-01 16:45:43 +01:00
Denys Vlasenko
d2fe69f9dc ntpd: preparatory patches, no functional changes
function                                             old     new   delta
ntp_init                                             354     357      +3
ntpd_main                                           2945    2898     -47

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-30 18:38:05 +01:00
Denys Vlasenko
6879a7ae43 ntpd: fx incorrect offset display when stepping
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-18 18:50:29 +01:00
Denys Vlasenko
afa2d33aa4 ntpd: field renames and style fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-17 23:29:33 +01:00
Denys Vlasenko
e99c8d2ef5 ntpd: eliminate one time(NULL) call
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-17 12:17:41 +01:00
Denys Vlasenko
dbc6a7a8fd httpd -m: output salted MD5 hash. By (forrest AT hifulltech.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-16 02:28:50 +01:00
Denys Vlasenko
31e2e7b863 randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-12 02:42:35 +01:00
Denys Vlasenko
d2c879da25 wget: fix signedness in the compare (paranoia only, G.content_len is never < 0)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11 14:12:28 +01:00
Denys Vlasenko
a3aa3e3095 wget: check for close success; fix chunked; do not bother to send QUIT to ftp
Also, random fixes to use %u for unsigned quantities. -14 bytes in wget.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11 12:36:10 +01:00
Denys Vlasenko
4662de0511 replace APP_xxDHCPxx with xxDHCPxx, it's more consistent with the rest
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11 02:21:10 +01:00
Denys Vlasenko
6a110c969f ntpd: remove dynamic dns resolution code, too complex. -69 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-03 00:20:58 +01:00
Denys Vlasenko
7cb1d6ccf3 ntpd: try to avoid DNS requests *during* NTP roundtrip. +23 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-02 23:46:25 +01:00
Denys Vlasenko
907647fb15 ntpd: implement -x. shrink code a bit. -69 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-02 23:17:45 +01:00
Denys Vlasenko
4bd5189370 ntpd: fix malloc-too-short bug; code shrink -76 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-02 13:43:06 +01:00
Denys Vlasenko
ebde6f10fb ntpd: fix "synced" state detection
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-02 12:29:06 +01:00
Denys Vlasenko
f91e63cbc3 ntpd: continuing small message tweaks and the like. -29 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-02 02:30:31 +01:00
Denys Vlasenko
386960a38e htpd: better logging; removed some unused code and data. -212 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-02 01:51:24 +01:00
Denys Vlasenko
fae9f499b2 ntpd: make it work w/o -g too :(
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-01 02:32:01 +01:00
Denys Vlasenko
160b9ca731 ntpd: make it NOMMU-safe; ash: exclude it on NOMMU builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-27 02:35:15 +01:00
Denys Vlasenko
57be1eefab ping: fix unaligned access. closes bug 745.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-26 15:26:31 +01:00
Denys Vlasenko
650a7011a8 ntpd: trivial -2 byte code optimization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-26 07:11:12 +01:00
Denys Vlasenko
b2e5fc35eb ntpd: and real handling for -N, show usage w/o options; trim text
function                                             old     new   delta
ntp_init                                             317     348     +31
bb_msg_you_must_be_root                                -      17     +17
xsocket                                               66      76     +10
changepath                                           195     194      -1
bb_msg_perm_denied_are_you_root                       35      34      -1
send_tree                                            355     353      -2
count_lines                                           74      72      -2
must_be_root                                          17       -     -17
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/4 up/down: 58/-23)             Total: 35 bytes
   text   data    bss    dec    hexfilename
 832873    441   7548 840862  cd49ebusybox_old
 832839    441   7548 840828  cd47cbusybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-25 14:52:47 +01:00
Denys Vlasenko
b1278a38bc ntpd: locally bind every peer socket. +22 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-24 16:03:47 +01:00
Denys Vlasenko
9cc60d7e6b ntpd: fix vda's breakage
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-24 14:43:20 +01:00
Denys Vlasenko
f42fa1b21e traceroute6: restore port after probing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-24 14:10:06 +01:00
Denys Vlasenko
363e89b1ee ntpd: use MSG_DONTWAIT; better readability
function                                             old     new   delta
gettime_fp                                             -      39     +39
ntpd_main                                           3214    3199     -15
gettime                                               47       -     -47
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 39/-62)            Total: -23 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-24 14:04:15 +01:00
Denys Vlasenko
ca6c7e42f9 ntp: simplifications; libbb: simpler resolution of numeric hostnames
function                                             old     new   delta
str2sockaddr                                         405     567    +162
ntp_init                                             310     317      +7
scale_interval                                        58      59      +1
error_interval                                        22      23      +1
ntpd_main                                           3257    3214     -43
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 171/-43)           Total: 128 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-24 07:07:42 +01:00
Denys Vlasenko
c14bf21332 traceroute: simplify code a bit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-24 02:17:13 +01:00
Denys Vlasenko
8d580c72f4 ntpd: add -q option. By Adam Tkac.
function                                             old     new   delta
settime                                              347     375     +28
packed_usage                                       26681   26693     +12
ntpd_main                                           3282    3251     -31
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 40/-31)              Total: 9 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-23 16:27:16 +01:00
Leonid Lisovskiy
4c06531d5e traceroute6: new applet by Leonid Lisovskiy. +1562 bytes
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-23 06:20:09 +01:00
Denys Vlasenko
0d56568654 traceroute: cleanup preparing it for traceroute6. -17 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-23 06:15:38 +01:00
Adam Tkac
b1585064fd ntpd: new applet by Adam Tkac. +5k.
Signed-off-by: Adam Tkac <vonsch@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-22 03:43:55 +01:00
Denys Vlasenko
85164fa06e ping: use |=, not =, when combine option bit mask
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-21 15:44:56 +01:00
Denys Vlasenko
ad7d94bdc7 ping6: do not play dirty tricks with argv
function                                             old     new   delta
common_ping_main                                       -     368    +368
ping6_main                                            30      14     -16
ping_main                                            370      11    -359
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 368/-375)           Total: -7 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-20 18:12:12 +01:00
Denys Vlasenko
8684cbb5cc libbb: robustify isXXXX(). +39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-18 11:34:43 +01:00
Denys Vlasenko
a7ccdeef39 libbb: added xfdopen_for_read/write
function                                             old     new   delta
xfdopen_helper                                         -      40     +40
logdir_open                                         1163    1184     +21
process_stdin                                        433     443     +10
xfdopen_for_write                                      -       9      +9
doCommands                                          2465    2474      +9
patch_main                                          1214    1222      +8
bbunpack                                             457     465      +8
xfdopen_for_read                                       -       7      +7
scan_tree                                            258     262      +4
xstrtoul_range_sfx                                   230     231      +1
sendmail_main                                        957     955      -2
passwd_main                                         1027    1023      -4
parse                                                969     964      -5
test_main                                            253     247      -6
sed_main                                             655     649      -6
dos2unix_main                                        437     429      -8
fbsplash_main                                        950     938     -12
handle_dir_common                                    371     354     -17
expand_vars_to_list                                 2197    2169     -28
update_passwd                                       1275    1246     -29
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 7/10 up/down: 117/-117)           Total: 0 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15 23:28:11 +01:00
Denys Vlasenko
e3600a042e httpd_post_upload.txt example: handle binary files too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:37:50 +01:00
Denys Vlasenko
6331cf059c *: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Denys Vlasenko
6528abeb6a tftpd: another small tweak
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-08 18:27:18 +01:00
Denys Vlasenko
1e9ac9f685 tftp: another small tweak
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-08 18:15:10 +01:00
Denys Vlasenko
adc08ef194 tftpd: slight correction to progress bar code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-08 18:07:36 +01:00
Magnus Damm
8bd0af9962 tftp: add optiona support for progress bar
function                                             old     new   delta
tftp_protocol                                       1662    1834    +172
progress_meter                                       212     365    +153
tftp_progress_init                                     -      14     +14
tftp_main                                            276     281      +5
tftpd_main                                           513     500     -13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/1 up/down: 344/-13)           Total: 331 bytes

Signed-off-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-08 18:03:09 +01:00
Magnus Damm
bbd423530f tftp: extend tsize support a little
function                                             old     new   delta
tftp_protocol                                       1624    1662     +38
tftpd_main                                           495     513     +18
tftp_main                                            274     276      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 58/0)               Total: 58 bytes

Signed-off-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-08 18:02:53 +01:00
Magnus Damm
f5914992f3 wget: factor out progress bar code
Signed-off-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-08 16:34:43 +01:00
Denys Vlasenko
5a34d021cb ifplugd: small optimization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-07 17:30:14 +01:00
Tomas Heinrich
85bb843f47 dumpleases: unicode spport
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-05 08:42:47 +01:00
Denys Vlasenko
26c64bade8 udhcpc: log script parameter too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02 18:53:57 +01:00
Denys Vlasenko
8131eea3dc *: introduce and use ffulsh_all()
function                                             old     new   delta
buffer_fill_and_print                                179     196     +17
fflush_all                                             -       9      +9
spawn                                                 87      92      +5
rtcwake_main                                         455     453      -2
...
alarm_intr                                            93      84      -9
readcmd                                             1072    1062     -10
bb_ask                                               345     333     -12
more_main                                            845     832     -13
flush_stdout_stderr                                   42      23     -19
xfflush_stdout                                        27       -     -27
flush_stderr                                          30       -     -30
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397)         Total: -366 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02 14:19:51 +01:00
Denys Vlasenko
b204e6b61a httpd_indexcgi: fix off-by-one error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 09:29:01 +01:00
Denys Vlasenko
0939f2ebd2 fix up potential printf's with unsafe format strings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-24 17:47:56 +02:00
Vladimir Dronnikov
1dacfbb1f4 ftpget/put: make 3rd parameter optional
function                                             old     new   delta
packed_usage                                       26728   26738     +10
ftpgetput_main                                       343     351      +8

Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 23:34:43 +02:00
Denys Vlasenko
337a31b074 ifplugd: fix compile error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 18:31:02 +02:00
Denys Vlasenko
56b3eec162 small optimizations of toupper/tolower
function                                             old     new   delta
in_ib                                                191     172     -19

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 13:03:59 +02:00
Denys Vlasenko
6935ec9c0b networking/interface.c: tiny code shrink
function                                             old     new   delta
if_readlist_proc                                     634     631      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 19:42:26 +02:00
Denys Vlasenko
36df04837a randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-19 16:07:28 +02:00
Denys Vlasenko
2ace0ad2d7 ifup: make /etc/network/interfaces parser tolerant to trailing spaces
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-16 23:56:10 +02:00
Denys Vlasenko
d31575a3ae 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>
2009-10-13 17:58:24 +02:00
Denys Vlasenko
94466b8b8c 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>
2009-10-13 16:27:11 +02:00
Denys Vlasenko
219757fee9 udhcpc: fix bug 629: use bcast receive when we perform rebinding
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08 23:05:46 +02:00
Denys Vlasenko
adf922ec28 *: 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>
2009-10-08 14:35:37 +02:00
Vladimir Dronnikov
be168b1197 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>
2009-10-05 02:18:01 +02:00
Denys Vlasenko
fd2dc53ba4 remove useless (unsigned >= 0) comparison
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-04 01:13:35 +02:00
Denys Vlasenko
1b34d4f0b1 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>
2009-09-30 02:39:57 +02:00
Denys Vlasenko
ecb179b6d7 ifenslave: fix for 2.4 kernels compile
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 23:47:52 +02:00
Denys Vlasenko
1f27ab0d4b *: 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>
2009-09-23 17:17:53 +02:00
Denys Vlasenko
772c2db971 httpd_ssi.c: make it a bit less broken
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-13 17:38:15 +02:00
Denys Vlasenko
56573cb4f7 networking/httpd_ssi.c: expand comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-10 21:27:39 +02:00
Denys Vlasenko
db4a67628d networking/httpd_ssi.c: new example CGI handler
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-10 21:24:45 +02:00
Denys Vlasenko
33d8d08f78 httpd: shrink mime type matching code (suggested by Bernhard)
function                                             old     new   delta
static.suffixTable                                   100     231    +131
send_file_and_exit                                   625     658     +33
handle_incoming_and_exit                            2749    2745      -4
send_cgi_and_exit                                    936     901     -35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 164/-39)           Total: 125 bytes
   text    data     bss     dec     hex filename
 824631     458    6956  832045   cb22d busybox_old
 824550     458    6956  831964   cb1dc busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-10 01:46:02 +02:00
Denys Vlasenko
e66ccfaa2c remove some garbage from http POST upload example
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-09 22:33:30 +02:00
Denys Vlasenko
108b8c5367 httpd: fix bug 601 "I:index.php does not run interpreter on DIR/ url"
function                                             old     new   delta
parse_conf                                          1462    1485     +23
index_html                                             -      11     +11
handle_incoming_and_exit                            2762    2749     -13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 34/-13)             Total: 21 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-08 21:17:49 +02:00
Denys Vlasenko
043b1e5d99 more C standard compat fixes from Dan Fandrich
function                                             old     new   delta
docolon                                              207     204      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 12:47:55 +02:00
Denys Vlasenko
5370bfb123 documentation and typo fixes. By Dan Fandrich (dan AT coneharvesters.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 02:58:59 +02:00
Denys Vlasenko
2cc709139e inetd: comment tweak. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-04 03:48:40 +02:00
Denys Vlasenko
ed1667e8ee telnetd: add -w ("inetd wait") option. Can be configured off.
gcc fils to fully optimize it out when it's off:

function                                             old     new   delta
telnetd_main                                        1527    1548     +21
packed_usage                                       26596   26587      -9

but nevertheless it's a useful (and so far single) example
how to write "inetd wait" tcp service.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-04 02:21:13 +02:00
Denys Vlasenko
cfc216345e inetd: be more careful with syslog socket; other small fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-04 02:19:46 +02:00
Denys Vlasenko
22cbfbd996 ethr-wake: can use ether_hostton on uclibc >= 0.9.30
By Leonid Lisovskiy (lly.dev AT gmail.com)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30 16:23:29 +02:00
Matthijs van de Water
0d5866624d wget: strip trailing whitespace from e.g. "Content-length: 120 "
function                                             old     new   delta
wget_main                                           2395    2427     +32

Signed-off-by: Matthijs van de Water <matthijs.van.de.water@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-22 20:19:48 +02:00
Justin Maggard
aa369e0f0d udhcpc: if got IP successfully, disable -n for future renewals
Signed-off-by: Justin Maggard <jmaggard10@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-13 01:26:17 +02:00
Denys Vlasenko
0568b6e45a randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-08 03:20:12 +02:00
Tomoya Adachi
63416cc57d nc: fix nc -ll; report vfork errors; make select loop faster
function                                             old     new   delta
nc_main                                              933     946     +13

Signed-off-by: Tomoya Adachi <adachi@il.is.s.u-tokyo.ac.jp>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-03 02:59:22 +02:00
Denys Vlasenko
bac9f03ed8 tftp: add comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-25 01:56:23 +02:00
Atsushi Nemoto
330d898e99 tftp[d]: fix block# handling on upload with non-default blocksize
function                                             old     new   delta
tftp_protocol                                       1590    1618     +28

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-24 22:34:47 +02:00
Denys Vlasenko
d6513cff17 tcpsvd,udpsvd: fix uid/gid printing when run with -u
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19 23:07:13 +02:00
Denys Vlasenko
4abfc2642d udhcpc: small simplification
function                                             old     new   delta
udhcpc_main                                         2401    2398      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19 04:35:16 +02:00
Denys Vlasenko
753a3ce73e typo
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19 04:27:10 +02:00
Denys Vlasenko
7d6a791ef6 udhcpc: add/edit comments, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19 04:24:23 +02:00
Denys Vlasenko
13ca4b12e2 udhcpc: simplify manual renew (make it more similar to automatic one)
function                                             old     new   delta
udhcp_run_script                                     669     673      +4
udhcpc_main                                         2414    2401     -13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-13)              Total: -9 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19 04:07:21 +02:00
Denys Vlasenko
9038d6f8f5 remove trailing whitespace
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-15 20:02:19 +02:00
Denys Vlasenko
860d2bbdda fix fallout from BSD patches
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-10 18:37:06 +02:00
Denys Vlasenko
95cc814dbd udhcpd: fix a bug in add_lease where it was reading at [-1]
It is not correct when we read lease file!

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-07 14:59:30 +02:00
Denys Vlasenko
9b1b62adc4 Patches to enable FreeBSD build
platform.h: fix wrong check for endianness, fix lchown
aliasing to chown on uclibc.

Code seems to not be affected in my testing.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 03:34:12 +02:00
Denys Vlasenko
b22bbfffec fix dependencies of FEATURE_GETOPT_LONG
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-04 16:50:43 +02:00
Denys Vlasenko
97ef65483a udhcpc: support option 0x79 (static routes) (part of bug 341)
function                                             old     new   delta
xmalloc_optname_optval                                 -     583    +583
dhcp_option_strings                                  258     266      +8
dhcp_options                                          70      72      +2
len_of_option_as_string                               11      12      +1
dhcp_option_lengths                                   11      12      +1
udhcp_run_script                                    1187     669    -518
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/1 up/down: 595/-518)           Total: 77 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-03 18:14:03 +02:00
Denys Vlasenko
7895b91743 udhcp: dname_dec may return NULL, account for that case
Other random cleanips included...

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-03 16:59:59 +02:00
Denys Vlasenko
7d5ddf14a3 wget: remove IPv6 scope id in Host: field (apache compat)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-30 20:36:27 +02:00
Denys Vlasenko
f1fab09242 wget: fix redirection from HTTP to FTP server
while at it, sanitize redirection in general; add printout
of every redirection hop; make sure we won't print any non-ASCII
garbage from remote server in error meesages.

function                                             old     new   delta
sanitize_string                                        -      14     +14
parse_url                                            294     301      +7
gethdr                                               190     197      +7
wget_main                                           2326    2331      +5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 33/0)               Total: 33 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-28 03:33:57 +02:00
Denys Vlasenko
ab0c8d7b35 wget: remove strange *&var construct.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-28 01:23:35 +02:00
Denys Vlasenko
7f43280420 wget: code shrink by splitting main() into easier-to-optimize functions
function                                             old     new   delta
retrieve_file_data                                     -     356    +356
wget_main                                           2793    2326    -467
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 356/-467)         Total: -111 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-28 01:02:24 +02:00
Denys Vlasenko
4248c33a85 udhcpc: fix a read error loop (e.g.: device is down) blocking TERM
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-26 23:23:16 +02:00
Denys Vlasenko
d30b89c7ee updates for supporting Linux kernel build and initrd utilities
cpio: --verbose, --quiet, --to-stdout
test: make 64-bit math enable-able for hush too
dnsdomainname: alias to hostname -d
hostname: support --fqdn, --domain, --file

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-26 01:55:45 +02:00
Denys Vlasenko
7a76eba1f6 udhcp: fix trivial compile error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19 13:51:29 +02:00
Denys Vlasenko
f3b92d3856 getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTS
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19 12:10:38 +02:00
Denys Vlasenko
bcbd37df24 tweak Config texts and some broken English elsewhere
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-18 13:23:58 +02:00
Denys Vlasenko
dc36a72ac0 udhcp: cosmetics in arpping.c, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 13:56:50 +02:00
Denys Vlasenko
799d00e84c udhcp: convert old-style logging in print_static_leases
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 13:44:04 +02:00
Denys Vlasenko
6947d2c7e1 udhcp: logging improvements, field and variable renames
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 13:24:03 +02:00
Denys Vlasenko
4945ed32d7 udhcpc: fix format of one log message
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 11:58:11 +02:00
Denys Vlasenko
31af3d5a1d udhcp: shorten mac len from 16 to 6 in lease file
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 11:57:09 +02:00
Denys Vlasenko
ac906fa85e udhcp: change UDHCP_DEBUG into int, make verbosity selectable with -v
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 11:54:52 +02:00
Denys Vlasenko
ed8982bfc0 udhcp: add a few TODOs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 12:05:21 +02:00
Denys Vlasenko
26918dd28e udhcp: rename server/client_config.arp to server_mac and client_mac
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 12:04:23 +02:00
Denys Vlasenko
cab3a0127c udhcp: cleanup of static lease handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 12:03:12 +02:00
Denys Vlasenko
56f2d06c64 udhcp: rename sprintip to sprint_nip, siaddr to siaddr_nip
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 10:25:35 +02:00
Denys Vlasenko
990a617edf udhcp: rename giaddr to gateway_nip and server to server_nip
"nip" stands for "IP in network order"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 10:23:55 +02:00
Denys Vlasenko
1d924f59b1 udhcp: rename fields in struct dhcpOfferedAddr
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 10:23:01 +02:00
Denys Vlasenko
47f2d7ef7d udhcpd: don't fail ARP check if returned MAC matches client's one
Also, do not unicast replies to yiaddr.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 10:20:27 +02:00
Denys Vlasenko
16635cc2e0 test, tcpsvd, tcpsvd: shrink
function                                             old     new   delta
nexpr                                                825     826      +1
tcpudpsvd_main                                      1830    1822      -8
test_main                                            257     247     -10
binop                                                584     525     -59
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 1/-77)             Total: -76 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-13 22:49:08 +02:00
Denys Vlasenko
1d77db8459 telnetd: more compact version of the fix for stray open fds
function                                             old     new   delta
telnetd_main                                        1520    1527      +7
make_new_session                                     510     416     -94
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-94)             Total: -87 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-10 13:38:08 +02:00
Denys Vlasenko
a4bcbd0e04 telnetd: properly close fds in child
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-09 23:01:24 +02:00
Denys Vlasenko
62152da892 ifupdown: if $PATH is not set, do not set it to "" in children
Also random code shrink:

function                                             old     new   delta
set_environ                                          328     330      +2
static.label_buf                                       4       -      -4
startup_PATH                                           4       -      -4
my_environ                                             4       -      -4
ifupdown_main                                       2148    2134     -14
setlocalenv                                          117      90     -27
get_var                                              139     112     -27
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 1/3 up/down: 2/-80)             Total: -78 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05 21:53:11 +02:00
Denys Vlasenko
035b4d77dc ftpd: allow multiple -S options to increase verbosity too, like -v
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05 20:42:40 +02:00
Denys Vlasenko
0f952c249e inetd: comment why we redirect stderr to network
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05 15:35:36 +02:00
Denys Vlasenko
d5f1b1bbe0 *: add FAST_FUNC to function ptrs where it makes sense
function                                             old     new   delta
evalcommand                                         1195    1209     +14
testcmd                                                -      10     +10
printfcmd                                              -      10     +10
echocmd                                                -      10     +10
func_exec                                            270     276      +6
echo_dg                                              104     109      +5
store_nlmsg                                           85      89      +4
pseudo_exec_argv                                     195     198      +3
dotcmd                                               287     290      +3
machtime_stream                                       29      31      +2
discard_stream                                        24      26      +2
argstr                                              1299    1301      +2
killcmd                                              108     109      +1
evalfor                                              226     227      +1
daytime_stream                                        43      44      +1
run_list                                            2544    2543      -1
lookupvar                                             62      61      -1
ipaddr_modify                                       1310    1309      -1
...
parse_stream                                        2254    2245      -9
evalpipe                                             356     347      -9
collect_if                                           210     197     -13
read_opt                                             869     851     -18
handle_dollar                                        681     658     -23
print_addrinfo                                      1342    1303     -39
iterate_on_dir                                       156      59     -97
print_route                                         1709    1609    -100
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 12/130 up/down: 74/-767)       Total: -693 bytes
   text    data     bss     dec     hex filename
 841748     467    7872  850087   cf8a7 busybox_old
 841061     467    7872  849400   cf5f8 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05 12:06:05 +02:00
Denys Vlasenko
8507e1f109 ftpd: fix a case when with -w unknown commands are ignored with no error code
Signed-off-by: Stefan Seyfried <seife@suse.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-04 19:03:20 +02:00
Denys Vlasenko
28a105d867 nc, hush: cosmetic cleanups, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-01 11:26:30 +02:00
Denys Vlasenko
bf2af9acb2 flash_lock, flash_unlock: new applets
By Thierry Reding (thierry.reding AT avionic-design.de)

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-25 04:15:37 +02:00
Denys Vlasenko
c8ab67cad8 tftp: do not risk invoking Sorcerer's Apprentice syndrome
examples/udhcp/simple.script: fix incorrect test for $1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-10 23:27:43 +02:00
Bernhard Reutner-Fischer
62851171db fix debug message
Print the mime-type only after it has been set.
  Add possible TODOs: use TCP_CORK, parse_config()
2009-05-04 09:57:25 +02:00
Denys Vlasenko
48a29defca httpd: speed up httpd.conf at the cost of 49 bytes of code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-02 00:50:38 +02:00
Denys Vlasenko
9c35a1cfb6 ifplugd: fix warnings 2009-05-01 09:04:25 +02:00
Denys Vlasenko
47aaa2bee6 Make it clearer that usually people should _NOT_
select FEATURE_UNIX_LOCAL.
2009-05-01 03:00:04 +02:00
Denis Vlasenko
1fd3b38fd1 *: bb_error_msg's messages should not be capitalized 2009-04-29 12:02:57 +00:00
Denis Vlasenko
80e57eb7d5 ifplugd: tiny shrink 2009-04-26 01:43:36 +00:00
Denis Vlasenko
f4e4563fe7 ifplugd: add copyright 2009-04-26 01:17:44 +00:00
Denis Vlasenko
71c165780a ifplugd: new applet by Maksym Kryzhanovskyy (xmaks AT email.cz)
+3k code and 0.5k in messages. Most of the bloat due to compat :(
2009-04-26 01:08:51 +00:00
Denis Vlasenko
f6b4685691 add FEATURE_UNIX_LOCAL. By Ingo van Lil (inguin AT gmx.de) 2009-04-25 13:16:53 +00:00
Denis Vlasenko
eb4e5ecc32 inetd: constify data 2009-04-22 23:25:48 +00:00
Denis Vlasenko
c8d7109f60 httpd: fix small bug in parser. it crept in during cleanup 2009-04-22 14:16:59 +00:00
Denis Vlasenko
00643ca520 httpd: allow empty lines in conf file 2009-04-22 13:52:22 +00:00
Denis Vlasenko
1cf4a0eb81 httpd: simplify insane conf file parser
function                                             old     new   delta
bb_simplify_abs_path_inplace                           -      98     +98
parse_expr                                           824     832      +8
passwd_main                                         1025    1027      +2
evalvar                                             1374    1376      +2
parse_command                                       1463    1460      -3
bb_simplify_path                                     137      55     -82
parse_conf                                          1572    1422    -150
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 3/3 up/down: 126/-251)         Total: -125 bytes
2009-04-22 13:49:16 +00:00
Denis Vlasenko
8ed1945a91 nc: free lsa in server mode, we might be up for a long time 2009-04-21 23:51:43 +00:00
Denis Vlasenko
a771e7c005 *: remove check for errors on getsockaddr in cases we know they can't happen
libbb: make get_sock_lsa use only one getsockaddr syscall, not two

function                                             old     new   delta
get_sock_lsa                                          72     101     +29
do_iplink                                           1151    1137     -14
arping_main                                         1585    1569     -16
dolisten                                             789     755     -34
xrtnl_open                                           161      94     -67
2009-04-21 23:48:38 +00:00
Denis Vlasenko
5e34ff29bc *: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
76478b8091 udhcpc: fix truncation of last char in client hostnames 2009-04-21 00:41:57 +00:00
Denis Vlasenko
c7cc5a9432 mdev: Rob's #if forest removal
*: remove superfluous conts in "f(type *const param)"
2009-04-19 01:27:20 +00:00
Denis Vlasenko
0b791d9a97 move llist_find_str from modutils to libbb 2009-04-13 20:52:00 +00:00
Denis Vlasenko
e8a796828e dhcprelay: fix usage text. Simplify and make code more readable.
Add TODOs.
2009-04-13 03:33:46 +00:00
Denis Vlasenko
ef1b439669 dnsd: stop using oversized buffer. trim comment. 2009-04-12 19:03:01 +00:00
Denis Vlasenko
5c32993009 mount: users report that CIFS support is breaking things,
mostly remove it.
2009-04-12 12:16:21 +00:00
Denis Vlasenko
f8de411e24 dnsd: removed highly questionable setting of signals to SIG_IGN 2009-04-12 04:20:22 +00:00
Denis Vlasenko
ddbf3bf35f dnsd: fix a number of bugs. Ideas by Ming-Ching Tiew (mctiew AT yahoo.com)
function                                             old     new   delta
undot                                                  -      42     +42
dnsd_main                                           1394    1213    -181
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 42/-181)          Total: -139 bytes
2009-04-12 04:09:09 +00:00
Denis Vlasenko
f81e8dbc74 *: make "pragma GCC visibility push(hidden)" less ugly 2009-04-09 12:35:13 +00:00
Denis Vlasenko
42e78b978f ftpd: s/CONFIG_BUSYBOX_EXEC_PATH/bb_busybox_exec_path/ 2009-04-04 20:34:22 +00:00
Denis Vlasenko
551ffdccea more of pointless whitespace fixes 2009-04-01 19:48:05 +00:00
Denis Vlasenko
bd79c3d337 dhcpd: remember and record hostnames; optimize get_option
dumpleases: show hostnames

function                                             old     new   delta
add_lease                                            230     292     +62
send_offer                                           403     421     +18
send_ACK                                             232     249     +17
read_leases                                          249     258      +9
dumpleases_main                                      604     609      +5
nobody_responds_to_arp                                84      86      +2
udhcp_end_option                                      32      30      -2
udhcp_get_option                                     222     171     -51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/2 up/down: 113/-53)            Total: 60 bytes
2009-04-01 12:36:09 +00:00
Denis Vlasenko
f9beb61a81 tftp: when we infer local name from remote (-r [/]path/path/file),
strip path. This mimics wget and is generally more intuitive.
2009-03-25 03:55:53 +00:00
Denis Vlasenko
cbb4e61dd5 httpd: add comment explaining why SERVER_NAME etc is not set. 2009-03-18 20:00:46 +00:00
Denis Vlasenko
9f57cf6604 ftpd: fix command fetching to not do it in 1-byte reads;
fix command de-escaping. Tested to download files with embeeded \xff and LF.
libbb: tweaks for the above

function                                             old     new   delta
ftpd_main                                           2231    2321     +90
xmalloc_fgets_internal                               190     222     +32
xmalloc_fgets_str_len                                  -      27     +27
xmalloc_fgets_str                                      7      23     +16
xmalloc_fgetline_str                                  10      26     +16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 181/0)             Total: 181 bytes
2009-03-18 17:32:44 +00:00
Denis Vlasenko
fce4a9454c ftpd: add some comments 2009-03-18 16:02:54 +00:00
Denis Vlasenko
e3b840ce98 ftpd: trim messages (but make sure they still make sense)
text    data     bss     dec     hex filename                                                                                                                               
   4400       0       0    4400    1130 ftpd_old.o
   4346       0       0    4346    10fa ftpd.o
2009-03-18 14:25:28 +00:00
Denis Vlasenko
5b492ee876 ftpd: do not use nasty tricks for re-execing if we are on MMU machine.
On NOMMU, code is alomost the same, on MMU:

function                                             old     new   delta
handle_dir_common                                    223     390    +167
ftpd_main                                           2306    2231     -75
popen_ls                                             203       -    -203
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/1 up/down: 167/-278)         Total: -111 bytes
2009-03-18 14:12:22 +00:00
Denis Vlasenko
1432cb4bd9 ftpd: add support for MDTM, I see clients often use it,
it may allow client-side caching.

function                                             old     new   delta
ftpd_main                                           2232    2306     +74
gmtime_r                                               -      19     +19
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 93/0)               Total: 93 bytes
2009-03-18 00:45:00 +00:00
Denis Vlasenko
3a7a1eba2e ftpd: document NLST format 2009-03-17 13:03:06 +00:00
Denis Vlasenko
1a82555108 ftpd: instead of wordy HELP, implement useful, and smaller, FEAT.
(HELP is still "supported" as an alias to FEAT)

   text    data     bss     dec     hex filename
 807331     468    7856  815655   c7227 busybox_old
 807246     468    7856  815570   c71d2 busybox_unstripped
2009-03-17 12:40:34 +00:00
Denis Vlasenko
edb0de4283 ftpd: implement -vv verbosity
function                                             old     new   delta
ftpd_main                                           2097    2190     +93
verbose_log                                            -      33     +33
cmdio_write_raw                                       12      34     +22
cmdio_write_ok                                        25      45     +20
cmdio_write_error                                     25      45     +20
cmdio_write                                           62      78     +16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/0 up/down: 204/0)             Total: 204 bytes
2009-03-17 12:23:24 +00:00
Denis Vlasenko
e6c94a611a ftpd: tweak timeout code 2009-03-17 05:11:51 +00:00
Denis Vlasenko
074c9036b2 ftpd: fix thinko: set_nport takes port in network order 2009-03-16 21:01:41 +00:00
Denis Vlasenko
fbf5846ce1 ftpd: dont use fdprintf for simple status messages
function                                             old     new   delta
ftpd_main                                           2025    2055     +30
cmdio_write_ok                                        17      25      +8
cmdio_write_error                                     17      25      +8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 46/0)               Total: 46 bytes
2009-03-16 20:54:45 +00:00
Denis Vlasenko
43bb7bba3b ftpd: simplify PORT check by assuming IP = peer's IP.
Should be as safe as before this change.

function                                             old     new   delta
ftpd_main                                           2115    2025     -90
2009-03-16 19:54:06 +00:00
Denis Vlasenko
20c8216897 ftpd: add idle and absolute timeouts. This is a security issue,
otherwise ftpd may end up hanging indefinitely.

function                                             old     new   delta
timeout_handler                                        -     110    +110
ftpd_main                                           2019    2115     +96
packed_usage                                       25662   25685     +23
handle_upload_common                                 306     322     +16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 245/0)             Total: 245 bytes
2009-03-16 16:19:53 +00:00
Denis Vlasenko
f2160b6a09 ftpd: security tightened up:
PORT is not allowed on !IPv4
 PORT must have IP == peer's IP
 upload is allowed only into regular files

function                                             old     new   delta
ftpd_main                                           1815    2019    +204
handle_upload_common                                 260     306     +46
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 250/0)             Total: 250 bytes
2009-03-16 14:53:54 +00:00
Denis Vlasenko
fc58ba1298 ftpd: fix the bug where >2GB file ops report errors;
make a few simplifications; add TODOs.

function                                             old     new   delta
port_or_pasv_was_seen                                  -      37     +37
get_remote_transfer_fd                               104     109      +5
handle_upload_common                                 265     260      -5
handle_dir_common                                    228     223      -5
popen_ls                                             211     203      -8
ftpd_main                                           1825    1815     -10
data_transfer_checks_ok                               37       -     -37
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/4 up/down: 42/-65)            Total: -23 bytes
2009-03-15 15:54:58 +00:00
Denis Vlasenko
54ac03a618 *: remove LOG_NOWAIT 2009-03-11 15:59:49 +00:00
Denis Vlasenko
4221e90ae4 ftpd: stop unconditional logging to syslog. This was the only applet
which was doing it. Added option -S to enable it when desired.

function                                             old     new   delta
packed_usage                                       25647   25666     +19
ftpd_main                                           1826    1825      -1
2009-03-11 15:07:44 +00:00
Denis Vlasenko
a19e64933c docs/logging_and_backgrounding.txt: new mini-doc
dnsd: remove statics, remove nerly-useless SIGINT handler
crond: correct more of logfile to 0666 (as usual, umask allows
 user to remove unwanted bits).
nameif: print errors to stderr too, not just to syslog

function                                             old     new   delta
udhcp_read_interface                                 308     306      -2
ttl                                                    4       -      -4
fileconf                                               4       -      -4
dnsentry                                               4       -      -4
interrupt                                             19       -     -19
dnsd_main                                           1463    1394     -69
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/2 up/down: 0/-102)           Total: -102 bytes
   text    data     bss     dec     hex filename
 808161     476    7864  816501   c7575 busybox_old
 807994     468    7856  816318   c74be busybox_unstripped
2009-03-11 14:40:00 +00:00
Denis Vlasenko
5b28d314e7 ftpd: add LOG_NDELAY to openlog 2009-03-09 17:22:16 +00:00
Denis Vlasenko
c41cba5a57 ftpd: reuse ls applet for LIST/NLST/STAT generation
function                                             old     new   delta
popen_ls                                               -     211    +211
ftpd_main                                           1760    1826     +66
handle_dir_common                                    199     228     +29
get_remote_transfer_fd                                89     104     +15
replace_char                                          30      34      +4
handle_upload_common                                 263     265      +2
bind_for_passive_mode                                129     121      -8
cmdio_write                                           84      62     -22
escape_text                                          166     136     -30
init_data_sock_params                                 81       -     -81
ftpdataio_dispose_transfer_fd                         87       -     -87
write_dirstats                                       149       -    -149
write_filestats                                      603       -    -603
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 11/5 up/down: 384/-986)        Total: -602 bytes
   text    data     bss     dec     hex filename
 808804     476    7864  817144   c77f8 busybox_old
 808156     476    7864  816496   c7570 busybox_unstripped
2009-03-09 15:46:07 +00:00
Denis Vlasenko
9b2fbda538 ftpd: EPSV and SIZE support. Tested to work on IPv6 too.
libbb: str2sockaddr shuld accept [IPv6] addr without port -
 wget 'ftp://[::1]/file' needs that to work.

function                                             old     new   delta
bind_for_passive_mode                                  -     129    +129
get_nport                                              -      30     +30
ftpd_main                                           1731    1760     +29
str2sockaddr                                         412     431     +19
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 207/0)             Total: 207 bytes
   text    data     bss     dec     hex filename
 808568     476    7864  816908   c770c busybox_old
 808804     476    7864  817144   c77f8 busybox_unstripped
2009-03-09 13:01:08 +00:00
Denis Vlasenko
57a3b17498 ftp: reduce amount of realloc's done in cmdio_write
text    data     bss     dec     hex filename
 808562     476    7864  816902   c7706 busybox_old
 808568     476    7864  816908   c770c busybox_unstripped
2009-03-09 04:38:37 +00:00
Denis Vlasenko
d42eb81206 ftpd: code shrink 2009-03-09 04:22:52 +00:00
Denis Vlasenko
3455285339 ftpd: code shrink 2009-03-09 04:18:00 +00:00
Denis Vlasenko
f1a11b5a4e ftp: code shrink
text    data     bss     dec     hex filename
 809078     476    7864  817418   c790a busybox_old
 808590     476    7864  816930   c7722 busybox_unstripped
2009-03-09 04:13:59 +00:00
Denis Vlasenko
9e95920efd ftpd: code shuffled a bit, added comments 2009-03-09 03:15:05 +00:00
Denis Vlasenko
51c9bb1fd1 ftpd: add comment 2009-03-09 02:51:46 +00:00
Denis Vlasenko
ffb4bb3034 ftpd: further code shrink
function                                             old     new   delta      
port_pasv_cleanup                                      -      50     +50      
replace_char                                           -      30     +30      
ftp_write_str_common                                 102     104      +2
handle_dir_common                                    209     204      -5
ftpd_main                                           1990    1970     -20
port_cleanup                                          23       -     -23
pasv_cleanup                                          28       -     -28
handle_upload_common                                 320     273     -47
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 1/3 up/down: 82/-123)           Total: -41 bytes
2009-03-09 02:23:45 +00:00
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
Denis Vlasenko
3854c5ddf4 runsvdir: alternative methon of supporting runsvdir-as-init. +66 bytes.
*: s/int/pid_t where appropriate
2008-11-06 22:39:57 +00:00
Denis Vlasenko
35a064b67f build system: tidying up CONFIG_xxx names (suggested by Rob) 2008-11-06 00:49:59 +00:00
Denis Vlasenko
202ac504e1 *: code shrink by adding a wrapper around very common tcsetattr(0, TCSANOW, xx) op
function                                             old     new   delta
tcsetattr_stdin_TCSANOW                                -      14     +14
set_sane_term                                        116     113      -3
top_main                                            1277    1273      -4
make_new_session                                     421     415      -6
rawmode                                              133     126      -7
reset_term                                            18      10      -8
die                                                   43      35      -8
cookmode                                              62      54      -8
vlock_main                                           425     415     -10
read_line_input                                     3165    3155     -10
bb_askpass                                           357     347     -10
fsck_minix_main                                     3079    3065     -14
getty_main                                          2375    2332     -43
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/12 up/down: 14/-131)         Total: -117 bytes
2008-11-05 13:20:58 +00:00
Denis Vlasenko
4cb576ea98 inetd: fix a case when we have zero services 2008-11-05 11:36:22 +00:00
Denis Vlasenko
391ffa19d1 nslookup: tiny shrink (-5 bytes); add comment about res_init
inet_common: cosmetics, no code changes
2008-11-04 21:44:28 +00:00
Denis Vlasenko
5a89763fb7 tftpd: show help if stdin is not a socket 2008-11-01 00:22:24 +00:00
Denis Vlasenko
44d5dcebc6 iplink: accept shorthands for "address" keyword here:
"ip link set address 00:11:22:33:44:55"
ifupdown: use "addr" instead of "address"
2008-11-01 00:10:51 +00:00
Bernhard Reutner-Fischer
470dc1d7e2 - minor shrinkage (~-60) 2008-10-30 17:42:49 +00:00
Bernhard Reutner-Fischer
e29186687b - support ip link set eth1 address 00:11:22:33:44:55
and not only the shorthand "addr". Thanks to ncopa for noticing
2008-10-30 16:45:55 +00:00
Denis Vlasenko
31d58e58d2 randomconfig fixes 2008-10-29 13:16:28 +00:00
Denis Vlasenko
7ff85c53f1 udhcp: simplify SO_BINDTODEVICE call 2008-10-27 12:56:58 +00:00
Denis Vlasenko
59f502b36f ping: trivial code shrink
function                                             old     new   delta
ping6_main                                            31      30      -1
ping_main                                            405     370     -35
2008-10-27 11:54:45 +00:00
Bernhard Reutner-Fischer
8fbd8ac8dd - fix ip route rejecting dotted quads as prefix
- adjust error message for wrong prefix not to mention address
  Previously e.g. ip route add 127.0.0.0/255.0.0.0 dev dummy0
  was rejected, saying
ip: an inet address is expected rather than "127.0.0.0/255.0.0.0"
 
function                                             old     new   delta
get_prefix_1                                         201     309    +108
get_prefix                                            55      73     +18
get_addr                                              55      73     +18
get_addr32                                            48      58     +10
get_addr_1                                           249     204     -45
.rodata                                           114569  114524     -45
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/2 up/down: 154/-90)            Total: 64 bytes
2008-10-21 12:42:45 +00:00