From: Harlan Stenn Date: Sun, 27 May 2001 19:42:52 +0000 (-0000) Subject: ChangeLog, pcl720.h, refclock_true.c: X-Git-Tag: NTP_4_0_99_M~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8853ac1ac80fdc15eb29df3c2f39a1e97e12b071;p=thirdparty%2Fntp.git ChangeLog, pcl720.h, refclock_true.c: * ntpd/refclock_true.c: * kernel/sys/pcl720.h: Add support for the XL clock to refclock_true.c From: Paul A Vixie bk: 3b1158bch7ckb2qWwx9LzJxgT5pZlA --- diff --git a/ChangeLog b/ChangeLog index 9a6302384..344560f9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2001-05-27 Harlan Stenn + * ntpd/refclock_true.c: + * kernel/sys/pcl720.h: + Add support for the XL clock to refclock_true.c + From: Paul A Vixie + * ntpd/ntp_loopfilter.c (local_clock): One more attempt at "improving" the panic message. diff --git a/kernel/sys/pcl720.h b/kernel/sys/pcl720.h index e8638ae33..cf4eccdf5 100644 --- a/kernel/sys/pcl720.h +++ b/kernel/sys/pcl720.h @@ -61,7 +61,7 @@ static void pcl720_outb(int addr, unsigned char x) { }) #define pcl720_read(Base,Cntr) \ - ({ register unsigned int b = Base, c = Cntr, v; \ + ({ register unsigned int b = Base, v; \ i8253_ctrl ctrl; \ \ ctrl.s.rl = i8253_latch; \ diff --git a/ntpd/refclock_true.c b/ntpd/refclock_true.c index 3aef785d4..a5fe70269 100644 --- a/ntpd/refclock_true.c +++ b/ntpd/refclock_true.c @@ -359,7 +359,8 @@ true_receive( /* * Clock misunderstood our last command? */ - if (pp->a_lastcode[0] == '?') { + if (pp->a_lastcode[0] == '?' || + strcmp(pp->a_lastcode, "ERROR 05 NO SUCH FUNCTION") == 0) { true_doevent(peer, e_Huh); return; } @@ -427,13 +428,14 @@ true_receive( } /* - * Timecode: " TRUETIME Mk III" - * (from a TM/TMD clock during initialization.) + * Timecode: " TRUETIME Mk III" or " TRUETIME XL" + * (from a TM/TMD/XL clock during initialization.) */ - if (strcmp(pp->a_lastcode, " TRUETIME Mk III") == 0) { + if (strcmp(pp->a_lastcode, " TRUETIME Mk III") == 0 || + strncmp(pp->a_lastcode, " TRUETIME XL", 12) == 0) { true_doevent(peer, e_F18); NLOG(NLOG_CLOCKSTATUS) { - msyslog(LOG_INFO, "TM/TMD: %s", pp->a_lastcode); + msyslog(LOG_INFO, "TM/TMD/XL: %s", pp->a_lastcode); } return; }