From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 27 23:24:09 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F8976FE for ; Mon, 27 Apr 2015 23:24:09 +0000 (UTC) Received: from relay.mailchannels.net (aso-006-i440.relay.mailchannels.net [23.91.64.121]) by mx1.freebsd.org (Postfix) with ESMTP id BD48E1E18 for ; Mon, 27 Apr 2015 23:24:08 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (ip-10-237-13-110.us-west-2.compute.internal [10.237.13.110]) by relay.mailchannels.net (Postfix) with ESMTPA id C3E60609F5; Mon, 27 Apr 2015 23:23:59 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (smtp4.ore.mailhop.org [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Mon, 27 Apr 2015 23:24:00 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1430177039856:492293919 X-MC-Ingress-Time: 1430177039856 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp4.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YmsNb-0005ca-EA; Mon, 27 Apr 2015 23:23:59 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t3RNNv7G045407; Mon, 27 Apr 2015 17:23:58 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+xPWQxT+ycAUeDNwMUYYgm Message-ID: <1430177037.1157.23.camel@freebsd.org> Subject: Re: System clock always unsynced From: Ian Lepore To: Christian Weisgerber Cc: freebsd-hackers@freebsd.org Date: Mon, 27 Apr 2015 17:23:57 -0600 In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 23:24:09 -0000 On Mon, 2015-04-27 at 16:30 +0000, Christian Weisgerber wrote: > On 2015-04-27, Christian Weisgerber wrote: > > > What *does* an ntpd daemon need to do to sync the clock? > > Okay, let me rephrase this since the first two replies completely > missed the point. This is an API programming question. How is the > poorly documented ntp_adjtime() API to be used so the system clock > will lose the STA_UNSYNC status and switch from TIME_ERROR to TIME_OK > as clock state? > It requires a call to ntp_adjtime() with the MOD_STATUS bit set in ntv.modes and the STA_UNSYNC bit clear in ntv.status. -- Ian