diff options
Diffstat (limited to 'networking/ntpd.c')
-rw-r--r-- | networking/ntpd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c index d55b070c5..2700cf515 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
@@ -905,7 +905,7 @@ do_sendto(int fd, | |||
905 | ret = send_to_from(fd, msg, len, MSG_DONTWAIT, to, from, addrlen); | 905 | ret = send_to_from(fd, msg, len, MSG_DONTWAIT, to, from, addrlen); |
906 | } | 906 | } |
907 | if (ret != len) { | 907 | if (ret != len) { |
908 | bb_perror_msg("send failed"); | 908 | bb_simple_perror_msg("send failed"); |
909 | return -1; | 909 | return -1; |
910 | } | 910 | } |
911 | return 0; | 911 | return 0; |
@@ -1121,7 +1121,7 @@ step_time(double offset) | |||
1121 | dtime = tvc.tv_sec + (1.0e-6 * tvc.tv_usec) + offset; | 1121 | dtime = tvc.tv_sec + (1.0e-6 * tvc.tv_usec) + offset; |
1122 | d_to_tv(dtime, &tvn); | 1122 | d_to_tv(dtime, &tvn); |
1123 | if (settimeofday(&tvn, NULL) == -1) | 1123 | if (settimeofday(&tvn, NULL) == -1) |
1124 | bb_perror_msg_and_die("settimeofday"); | 1124 | bb_simple_perror_msg_and_die("settimeofday"); |
1125 | 1125 | ||
1126 | VERB2 { | 1126 | VERB2 { |
1127 | tval = tvc.tv_sec; | 1127 | tval = tvc.tv_sec; |
@@ -1494,7 +1494,7 @@ select_and_cluster(void) | |||
1494 | /* Starting from 1 is ok here */ | 1494 | /* Starting from 1 is ok here */ |
1495 | for (i = 1; i < num_survivors; i++) { | 1495 | for (i = 1; i < num_survivors; i++) { |
1496 | if (G.last_update_peer == survivor[i].p) { | 1496 | if (G.last_update_peer == survivor[i].p) { |
1497 | VERB5 bb_error_msg("keeping old synced peer"); | 1497 | VERB5 bb_simple_error_msg("keeping old synced peer"); |
1498 | p = G.last_update_peer; | 1498 | p = G.last_update_peer; |
1499 | goto keep_old; | 1499 | goto keep_old; |
1500 | } | 1500 | } |
@@ -1702,7 +1702,7 @@ update_local_clock(peer_t *p) | |||
1702 | #else | 1702 | #else |
1703 | set_new_values(STATE_SYNC, offset, recv_time); | 1703 | set_new_values(STATE_SYNC, offset, recv_time); |
1704 | #endif | 1704 | #endif |
1705 | VERB4 bb_error_msg("transitioning to FREQ, datapoint ignored"); | 1705 | VERB4 bb_simple_error_msg("transitioning to FREQ, datapoint ignored"); |
1706 | return 0; /* "leave poll interval as is" */ | 1706 | return 0; /* "leave poll interval as is" */ |
1707 | 1707 | ||
1708 | #if 0 /* this is dead code for now */ | 1708 | #if 0 /* this is dead code for now */ |
@@ -1796,7 +1796,7 @@ update_local_clock(peer_t *p) | |||
1796 | VERB4 { | 1796 | VERB4 { |
1797 | memset(&tmx, 0, sizeof(tmx)); | 1797 | memset(&tmx, 0, sizeof(tmx)); |
1798 | if (adjtimex(&tmx) < 0) | 1798 | if (adjtimex(&tmx) < 0) |
1799 | bb_perror_msg_and_die("adjtimex"); | 1799 | bb_simple_perror_msg_and_die("adjtimex"); |
1800 | bb_error_msg("p adjtimex freq:%ld offset:%+ld status:0x%x tc:%ld", | 1800 | bb_error_msg("p adjtimex freq:%ld offset:%+ld status:0x%x tc:%ld", |
1801 | tmx.freq, tmx.offset, tmx.status, tmx.constant); | 1801 | tmx.freq, tmx.offset, tmx.status, tmx.constant); |
1802 | } | 1802 | } |
@@ -1906,7 +1906,7 @@ update_local_clock(peer_t *p) | |||
1906 | //tmx.maxerror = (uint32_t)((sys_rootdelay / 2 + sys_rootdisp) * 1e6); | 1906 | //tmx.maxerror = (uint32_t)((sys_rootdelay / 2 + sys_rootdisp) * 1e6); |
1907 | rc = adjtimex(&tmx); | 1907 | rc = adjtimex(&tmx); |
1908 | if (rc < 0) | 1908 | if (rc < 0) |
1909 | bb_perror_msg_and_die("adjtimex"); | 1909 | bb_simple_perror_msg_and_die("adjtimex"); |
1910 | /* NB: here kernel returns constant == G.poll_exp, not == G.poll_exp - 4. | 1910 | /* NB: here kernel returns constant == G.poll_exp, not == G.poll_exp - 4. |
1911 | * Not sure why. Perhaps it is normal. | 1911 | * Not sure why. Perhaps it is normal. |
1912 | */ | 1912 | */ |
@@ -2248,7 +2248,7 @@ recv_and_process_client_pkt(void /*int fd*/) | |||
2248 | if (size < 0) { | 2248 | if (size < 0) { |
2249 | if (errno == EAGAIN) | 2249 | if (errno == EAGAIN) |
2250 | goto bail; | 2250 | goto bail; |
2251 | bb_perror_msg_and_die("recv"); | 2251 | bb_simple_perror_msg_and_die("recv"); |
2252 | } | 2252 | } |
2253 | addr = xmalloc_sockaddr2dotted_noport(from); | 2253 | addr = xmalloc_sockaddr2dotted_noport(from); |
2254 | bb_error_msg("malformed packet received from %s: size %u", addr, (int)size); | 2254 | bb_error_msg("malformed packet received from %s: size %u", addr, (int)size); |
@@ -2415,7 +2415,7 @@ static NOINLINE void ntp_init(char **argv) | |||
2415 | srand(getpid()); | 2415 | srand(getpid()); |
2416 | 2416 | ||
2417 | if (getuid()) | 2417 | if (getuid()) |
2418 | bb_error_msg_and_die(bb_msg_you_must_be_root); | 2418 | bb_simple_error_msg_and_die(bb_msg_you_must_be_root); |
2419 | 2419 | ||
2420 | /* Set some globals */ | 2420 | /* Set some globals */ |
2421 | G.discipline_jitter = G_precision_sec; | 2421 | G.discipline_jitter = G_precision_sec; |
@@ -2491,7 +2491,7 @@ static NOINLINE void ntp_init(char **argv) | |||
2491 | /* supports 'sha' and 'sha1' formats */ | 2491 | /* supports 'sha' and 'sha1' formats */ |
2492 | hash_type = HASH_SHA1; | 2492 | hash_type = HASH_SHA1; |
2493 | else | 2493 | else |
2494 | bb_error_msg_and_die("only MD5 and SHA1 keys supported"); | 2494 | bb_simple_error_msg_and_die("only MD5 and SHA1 keys supported"); |
2495 | /* man ntp.keys: | 2495 | /* man ntp.keys: |
2496 | * MD5 The key is 1 to 16 printable characters terminated by an EOL, | 2496 | * MD5 The key is 1 to 16 printable characters terminated by an EOL, |
2497 | * whitespace, or a # (which is the "start of comment" character). | 2497 | * whitespace, or a # (which is the "start of comment" character). |
@@ -2674,7 +2674,7 @@ int ntpd_main(int argc UNUSED_PARAM, char **argv) | |||
2674 | if (p->p_fd == -1) { | 2674 | if (p->p_fd == -1) { |
2675 | /* Time to send new req */ | 2675 | /* Time to send new req */ |
2676 | if (--cnt == 0) { | 2676 | if (--cnt == 0) { |
2677 | VERB4 bb_error_msg("disabling burst mode"); | 2677 | VERB4 bb_simple_error_msg("disabling burst mode"); |
2678 | G.polladj_count = 0; | 2678 | G.polladj_count = 0; |
2679 | G.poll_exp = MINPOLL; | 2679 | G.poll_exp = MINPOLL; |
2680 | } | 2680 | } |