]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition
authorHarlan Stenn <stenn@ntp.org>
Fri, 21 Nov 2014 21:13:03 +0000 (21:13 +0000)
committerHarlan Stenn <stenn@ntp.org>
Fri, 21 Nov 2014 21:13:03 +0000 (21:13 +0000)
bk: 546faadfGhe1IGDiMAqH-3fp4Y62sw

ChangeLog
ntpd/ntp_refclock.c

index 31011405f7b793802f06edd6759b1cdda4223c24..31f0de9df1ef0f6116a2037489285e2d2ac909cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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@ntp.org>
 * [Bug 2677] PATH_MAX isn't #define'd  under Windows.
index 4fe7cdb1bdc414bb3a36a4d3cb61d6c0620ceb23..f0e9b9ec307dbf203ed1dc978cdf03ffb32b836c 100644 (file)
@@ -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);
 }