[Git][NTPsec/ntpsec][master] 2 commits: Fix a few documentation glitches.
Eric S. Raymond
gitlab at mg.gitlab.com
Tue Jun 28 11:51:51 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
d706dfc2 by Eric S. Raymond at 2016-06-28T07:38:21-04:00
Fix a few documentation glitches.
- - - - -
2bd84c41 by Eric S. Raymond at 2016-06-28T07:48:42-04:00
Follow up memlock removal - remove setrlimit() that's a no-op without it.
This used t be done because Linux had a memory limit sometimes smaller than
ntpd's working setup, but that is no longer true - probably changed in the
64-bit transition.
- - - - -
7 changed files:
- docs/driver_generic.txt
- docs/driver_mx4200.txt
- docs/driver_neoclock.txt
- docs/driver_shm.txt
- ntpd/ntp_config.c
- ntpd/ntpd.c
- pylib/configure.py
Changes:
=====================================
docs/driver_generic.txt
=====================================
--- a/docs/driver_generic.txt
+++ b/docs/driver_generic.txt
@@ -15,7 +15,7 @@ PPS device: /dev/refclockpps-'u'; alternate PPS device
== Description ==
The generic driver supports many different clock
-types/configurations by pugging type-specific packet-parsing
+types/configurations by plugging type-specific packet-parsing
routine into a generic drive framework.
Note that some of these modes below are to support equipment that
=====================================
docs/driver_mx4200.txt
=====================================
--- a/docs/driver_mx4200.txt
+++ b/docs/driver_mx4200.txt
@@ -30,7 +30,7 @@ products such as the MX4200 and its successors.
== Operating Modes ==
This driver supports two modes of operation, static and mobile,
-controlled by clock flag 2.
+controlled by option +flag2+.
In static mode (the default) the driver assumes that the GPS antenna is
in a fixed location. The receiver is initially placed in a "Static, 3D
=====================================
docs/driver_neoclock.txt
=====================================
--- a/docs/driver_neoclock.txt
+++ b/docs/driver_neoclock.txt
@@ -23,7 +23,7 @@ link:clockopt.html[+time1+ time]::
Specifies the time offset calibration factor with the default value of
0.16958333 seconds. This offset is used to correct serial line and
operating system delays incurred in capturing time stamps. If you want
- to fudge the +time1+ offset *ALWAYS* add a value off 0.16958333. This is
+ to fudge the +time1+ offset *ALWAYS* add a value of 0.16958333. This is
necessary to compensate for the delay that is caused by transmitting the
timestamp at 2400 Baud. If you want to compensate the delay that the
DCF77 or TDF radio signal takes to travel to your site simply add the
@@ -36,7 +36,7 @@ link:clockopt.html[+time2+ time]::
Not used by this driver.
link:clockopt.html[+flag1 {0 | 1}+]::
- When set to 1 the driver will feed ntp with timestampe even if the radio
+ When set to 1 the driver will feed ntp with timestamps even if the radio
signal is lost. In this case an internal backup clock generates the
timestamps. This is ok as long as the receiver is synced once since the
receiver is able to keep time for a long period.
=====================================
docs/driver_shm.txt
=====================================
--- a/docs/driver_shm.txt
+++ b/docs/driver_shm.txt
@@ -174,7 +174,7 @@ for the specific unit.
If flag4 is set, clockstats records will be written when the driver is
polled.
+mode+::
- Not used by this driver.
+ Can be used to set private mode
== Configuration Example ==
=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -2005,17 +2005,7 @@ config_rlimit(
break;
case T_Memlock:
- if (rlimit_av->value.i != 0) {
-#if defined(RLIMIT_MEMLOCK)
- ntp_rlimit(RLIMIT_MEMLOCK,
- (rlim_t)(rlimit_av->value.i * 1024 * 1024),
- 1024 * 1024,
- "MB");
-#else
- /* STDERR as well would be fine... */
- msyslog(LOG_WARNING, "'rlimit memlock' specified but is not available on this system.");
-#endif /* RLIMIT_MEMLOCK */
- }
+ /* ignore, for backward compatibility */
break;
case T_Stacksize:
@@ -4214,21 +4204,9 @@ ntp_rlimit(
#endif
switch (rl_what) {
-#ifdef RLIMIT_MEMLOCK
case RLIMIT_MEMLOCK:
- /*
- * The default RLIMIT_MEMLOCK is very low on Linux systems.
- * Unless we increase this limit malloc calls are likely to
- * fail if we drop root privilege. To be useful the value
- * has to be larger than the largest ntpd resident set size.
- */
- DPRINTF(2, ("ntp_rlimit: MEMLOCK: %d %s\n",
- (int)(rl_value / rl_scale), rl_sstr));
- rl.rlim_cur = rl.rlim_max = rl_value;
- if (setrlimit(RLIMIT_MEMLOCK, &rl) == -1)
- msyslog(LOG_ERR, "Cannot set RLIMIT_MEMLOCK: %m");
+ /* ignore - for backward compatibility only */
break;
-#endif /* RLIMIT_MEMLOCK */
#ifdef RLIMIT_NOFILE
case RLIMIT_NOFILE:
=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -767,22 +767,6 @@ ntpdmain(
*/
sodium_init();
-
-
- if (!dumpopts) {
- /* Setup stack size in preparation for locking pages in memory. */
- ntp_rlimit(RLIMIT_STACK, DFLT_RLIMIT_STACK * 4096, 4096, "4k");
-#ifdef RLIMIT_MEMLOCK
- /*
- * The default RLIMIT_MEMLOCK is very low on Linux systems.
- * Unless we increase this limit malloc calls are likely to
- * fail if we drop root privilege. To be useful the value
- * has to be larger than the largest ntpd resident set size.
- */
- ntp_rlimit(RLIMIT_MEMLOCK, DFLT_RLIMIT_MEMLOCK * 1024 * 1024, 1024 * 1024, "MB");
-#endif /* RLIMIT_MEMLOCK */
- }
-
/*
* Set up signals we pay attention to locally.
*/
=====================================
pylib/configure.py
=====================================
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -256,7 +256,6 @@ def cmd_configure(ctx, config):
ctx.define("NTP_KEYSDIR", "%s/etc" % ctx.env.PREFIX, comment="NTP key file directory")
ctx.define("GETSOCKNAME_SOCKLEN_TYPE", "socklen_t", quote=False, comment="socklen type")
ctx.define("DFLT_RLIMIT_STACK", 50, comment="Default stack size")
- ctx.define("DFLT_RLIMIT_MEMLOCK", 32, comment="Locked memory size")
probe_multicast(ctx, "MCAST", "Checking for multicast capability")
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/f4ae76db0f29c417850247c09566c0b6e10fb882...2bd84c419a732c44273920e23db3ece2bc2e6f10
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160628/917ce0d2/attachment.html>
More information about the vc
mailing list