From: Harlan Stenn Date: Fri, 21 Nov 2014 21:13:03 +0000 (+0000) Subject: [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition X-Git-Tag: NTP_4_2_7P481~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=085bf827c3109084c9e825f325cd8c8a33c1af7e;p=thirdparty%2Fntp.git [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition bk: 546faadfGhe1IGDiMAqH-3fp4Y62sw --- diff --git a/ChangeLog b/ChangeLog index 31011405f..31f0de9df 100644 --- 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 * [Bug 2677] PATH_MAX isn't #define'd under Windows. diff --git a/ntpd/ntp_refclock.c b/ntpd/ntp_refclock.c index 4fe7cdb1b..f0e9b9ec3 100644 --- a/ntpd/ntp_refclock.c +++ b/ntpd/ntp_refclock.c @@ -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); }