]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ChangeLog, pcl720.h, refclock_true.c:
authorHarlan Stenn <stenn@ntp.org>
Sun, 27 May 2001 19:42:52 +0000 (19:42 -0000)
committerHarlan Stenn <stenn@ntp.org>
Sun, 27 May 2001 19:42:52 +0000 (19:42 -0000)
  * ntpd/refclock_true.c:
  * kernel/sys/pcl720.h:
  Add support for the XL clock to refclock_true.c
  From: Paul A Vixie <vixie@mfnx.net>

bk: 3b1158bch7ckb2qWwx9LzJxgT5pZlA

ChangeLog
kernel/sys/pcl720.h
ntpd/refclock_true.c

index 9a63023843cd7a4119371d1b659c74175dd712fc..344560f9a68e4279f91e164f5bcf7a7294504c70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2001-05-27  Harlan Stenn  <stenn@whimsy.udel.edu>
 
+       * ntpd/refclock_true.c:
+       * kernel/sys/pcl720.h:
+       Add support for the XL clock to refclock_true.c 
+       From: Paul A Vixie <vixie@mfnx.net> 
+
        * ntpd/ntp_loopfilter.c (local_clock): One more attempt at
        "improving" the panic message.
 
index e8638ae3353499c8f16b909cdc280d087765fdcf..cf4eccdf555144e8514ff4e98cc96fadc6dd5ca7 100644 (file)
@@ -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; \
index 3aef785d40acadf7465d85257deeaee35ef07092..a5fe7026909cc678109d698f62becdd7f434bac4 100644 (file)
@@ -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;
        }