[Git][NTPsec/ntpsec][master] 3 commits: Remove 3rd arg (mode bits) to open for refclocks
Hal Murray
gitlab at mg.gitlab.com
Fri Nov 24 06:31:19 UTC 2017
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
2519fbe1 by Hal Murray at 2017-11-23T22:10:11-08:00
Remove 3rd arg (mode bits) to open for refclocks
The device already exists so that arg is ignored.
- - - - -
27068991 by Hal Murray at 2017-11-23T22:10:11-08:00
Add default test case (no args to configure)
- - - - -
7766f017 by Hal Murray at 2017-11-23T22:10:11-08:00
Fix to not use --disable-debug
- - - - -
4 changed files:
- ntpd/ntp_refclock.c
- ntpd/refclock_nmea.c
- ntpd/refclock_pps.c
- tests/option-tester.sh
Changes:
=====================================
ntpd/ntp_refclock.c
=====================================
--- a/ntpd/ntp_refclock.c
+++ b/ntpd/ntp_refclock.c
@@ -701,7 +701,7 @@ refclock_open(
* Open serial port and set default options
*/
- fd = open(dev, O_RDWR | O_NONBLOCK | O_NOCTTY, 0777);
+ fd = open(dev, O_RDWR | O_NONBLOCK | O_NOCTTY);
/* refclock_open() long returned 0 on failure, avoid it. */
if (0 == fd) {
fd = dup(0);
=====================================
ntpd/refclock_nmea.c
=====================================
--- a/ntpd/refclock_nmea.c
+++ b/ntpd/refclock_nmea.c
@@ -573,7 +573,7 @@ nmea_control(
}
if ( peer->cfg.ppspath ) {
up->ppsapi_fd = open(peer->cfg.ppspath,
- O_RDWR | O_NOCTTY | O_NONBLOCK, S_IRUSR | S_IWUSR);
+ O_RDWR | O_NOCTTY | O_NONBLOCK);
} else {
up->ppsapi_fd = -1;
}
=====================================
ntpd/refclock_pps.c
=====================================
--- a/ntpd/refclock_pps.c
+++ b/ntpd/refclock_pps.c
@@ -143,10 +143,9 @@ pps_start(
*/
snprintf(device, sizeof(device), DEVICE, unit);
up->fddev = open(peer->cfg.ppspath ? peer->cfg.ppspath : device,
- O_RDWR, 0777);
+ O_RDWR);
if (up->fddev <= 0) {
- msyslog(LOG_ERR,
- "REFCLOCK: refclock_pps: %m");
+ msyslog(LOG_ERR, "REFCLOCK: refclock_pps: %m");
return false;
}
=====================================
tests/option-tester.sh
=====================================
--- a/tests/option-tester.sh
+++ b/tests/option-tester.sh
@@ -46,13 +46,15 @@ doit ()
echo
}
-doit minimal "--disable-debug --disable-droproot --disable-dns-lookup --disable-kernel-pll --disable-mdns-registration"
-doit nodebug "--disable-debug --refclock=all"
-doit all "--enable-debug --enable-debug-timing --refclock=all --enable-lockclock --enable-leap-smear --enable-mssntp"
+doit default ""
+doit minimal "--disable-droproot --disable-dns-lookup --disable-kernel-pll --disable-mdns-registration"
if [ `uname -s` = Linux ]
then
doit linux "--enable-classic-mode --enable-early-droproot --enable-seccomp"
+doit all "--enable-debug --enable-debug-gdb --enable-debug-timing --refclock=all --enable-lockclock --enable-leap-smear --enable-mssntp --enable-classic-mode --enable-early-droproot --enable-seccomp"
+else
+doit all "--enable-debug --enable-debug-gdb --enable-debug-timing --refclock=all --enable-lockclock --enable-leap-smear --enable-mssntp"
fi
if [ "`which asciidoc 2>/dev/null`" != "" -a \
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/feb97562d3ff71b1d5df25b981502395a2be1545...7766f0177dd8ce4b37551e93a8e302a345e7e43c
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/feb97562d3ff71b1d5df25b981502395a2be1545...7766f0177dd8ce4b37551e93a8e302a345e7e43c
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20171124/95d3b6fd/attachment.html>
More information about the vc
mailing list