Commit Graph

1821 Commits

Author SHA1 Message Date
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