[ntp:bk-ntp-dev-send] BitKeeper diffs

stenn at whimsy.udel.edu stenn at whimsy.udel.edu
Fri Nov 21 21:13:41 UTC 2014


#### ChangeSet ####
2014-11-21 21:13:03+00:00, stenn at psp-fb1.ntp.org
  [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition

==== ChangeLog ====
2014-11-21 21:12:35+00:00, stenn at psp-fb1.ntp.org +1 -0
  [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition

--- 1.1570/ChangeLog	2014-11-21 06:06:34 -05:00
+++ 1.1571/ChangeLog	2014-11-21 16:12:35 -05:00
@@ -1,4 +1,5 @@
 * [Bug 2314] Only enable PPS if kernel consumer binding succeeds.
+* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition. 
 * Rename pps_enable to hardpps_enable.
 (4.2.7p480) 2014/11/21 Released by Harlan Stenn <stenn at ntp.org>
 * [Bug 2677] PATH_MAX isn't #define'd  under Windows.

==== ntpd/ntp_refclock.c ====
2014-11-21 21:12:42+00:00, stenn at psp-fb1.ntp.org +5 -8
  [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition

--- 1.118/ntpd/ntp_refclock.c	2014-11-21 06:06:58 -05:00
+++ 1.119/ntpd/ntp_refclock.c	2014-11-21 16:12:42 -05:00
@@ -1245,20 +1245,17 @@ refclock_params(
 	}
 
 	/*
-	 * If flag3 is lit, select the kernel PPS.
+	 * If flag3 is lit, select the kernel PPS if we can.
 	 */
 	if (mode & CLK_FLAG3) {
 		if (time_pps_kcbind(ap->handle, PPS_KC_HARDPPS,
 		    ap->pps_params.mode & ~PPS_TSFMT_TSPEC,
 		    PPS_TSFMT_TSPEC) < 0) {
-			if (errno != EOPNOTSUPP) { 
-				msyslog(LOG_ERR,
-				    "refclock_params: time_pps_kcbind: %m");
-				return (0);
-			}
-		} else {
-			hardpps_enable = 1;
+			msyslog(LOG_ERR,
+			    "refclock_params: time_pps_kcbind: %m");
+			return (0);
 		}
+		hardpps_enable = 1;
 	}
 	return (1);
 }


More information about the bk-ntp-dev-send mailing list