Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Apr 2015 15:17:20 +0000 (UTC)
From:      Christian Weisgerber <naddy@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r385051 - in head/net/openntpd: . files
Message-ID:  <201504301517.t3UFHK4E078928@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: naddy
Date: Thu Apr 30 15:17:20 2015
New Revision: 385051
URL: https://svnweb.freebsd.org/changeset/ports/385051

Log:
  Clear the timex UNSYNC flag so the RTC receives updates from the
  system clock.

Added:
  head/net/openntpd/files/patch-compat_adjfreq__freebsd.c   (contents, props changed)
  head/net/openntpd/files/patch-src_ntpd.c   (contents, props changed)
Modified:
  head/net/openntpd/Makefile

Modified: head/net/openntpd/Makefile
==============================================================================
--- head/net/openntpd/Makefile	Thu Apr 30 15:12:00 2015	(r385050)
+++ head/net/openntpd/Makefile	Thu Apr 30 15:17:20 2015	(r385051)
@@ -2,6 +2,7 @@
 
 PORTNAME=	openntpd
 PORTVERSION=	5.7p4
+PORTREVISION=	1
 PORTEPOCH=	2
 CATEGORIES=	net
 MASTER_SITES=	${MASTER_SITE_OPENBSD}

Added: head/net/openntpd/files/patch-compat_adjfreq__freebsd.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/openntpd/files/patch-compat_adjfreq__freebsd.c	Thu Apr 30 15:17:20 2015	(r385051)
@@ -0,0 +1,23 @@
+--- compat/adjfreq_freebsd.c.orig	2015-03-12 04:42:13 UTC
++++ compat/adjfreq_freebsd.c
+@@ -57,3 +57,20 @@ adjfreq(const int64_t *freq, int64_t *ol
+ 
+ 	return 0;
+ }
++
++/*
++ * The RTC is only updated if the clock is not marked as unsynced.
++ */
++
++void
++update_status(int synced)
++{
++	struct timex txc = { 0 };
++
++	txc.modes = MOD_STATUS;
++	if (!synced)
++		txc.status = STA_UNSYNC;
++	if (ntp_adjtime(&txc) == -1)
++		log_warn("ntp_adjtime (3) failed");
++	return;
++}

Added: head/net/openntpd/files/patch-src_ntpd.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/openntpd/files/patch-src_ntpd.c	Thu Apr 30 15:17:20 2015	(r385051)
@@ -0,0 +1,18 @@
+--- src/ntpd.c.orig	2015-03-25 01:18:56 UTC
++++ src/ntpd.c
+@@ -53,6 +53,7 @@ const char     *ctl_lookup_option(char *
+ void		show_status_msg(struct imsg *);
+ void		show_peer_msg(struct imsg *, int);
+ void		show_sensor_msg(struct imsg *, int);
++void		update_status(int);
+ 
+ volatile sig_atomic_t	 quit = 0;
+ volatile sig_atomic_t	 reconfig = 0;
+@@ -423,6 +424,7 @@ ntpd_adjtime(double d)
+ 	else if (!firstadj && olddelta.tv_sec == 0 && olddelta.tv_usec == 0)
+ 		synced = 1;
+ 	firstadj = 0;
++	update_status(synced);
+ 	return (synced);
+ }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504301517.t3UFHK4E078928>