From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: util-linux-owner@vger.kernel.org Received: from mout.gmx.net ([212.227.15.19]:50957 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751030AbaJJALH (ORCPT ); Thu, 9 Oct 2014 20:11:07 -0400 Message-ID: <54372416.4050405@gmx.com> Date: Thu, 09 Oct 2014 20:11:02 -0400 From: JWP MIME-Version: 1.0 To: =?ISO-8859-1?Q?No=E9_RUBINSTEIN?= CC: util-linux Subject: Re: [RFC PATCH] hwclock: --offset: Use offset instead of writing clock References: <1412673336-13299-1-git-send-email-nrubinstein@aldebaran.com> <5433CE48.7060507@gmx.com> <5433D8DD.3090505@gmx.com> <54340BDD.7080405@gmx.com> <54366E5B.7010302@gmx.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Sender: util-linux-owner@vger.kernel.org List-ID: On 10/09/2014 11:05 AM, Noé RUBINSTEIN wrote: >> Are you sure that drift factor (re)calculation does not happen if >> writing the Hardware Clock fails? I just had a quick look at the >> code and it seem that we do not test to see if write fails. So >> (re)calculation might work as is? > > It does not seem to work the obvious way: > > [root@localhost ~]# date > Thu Oct 9 14:56:30 UTC 2014 > [root@localhost ~]# hwclock --systohc --update > hwclock: ioctl(RTC_SET_TIME) to /dev/rtc to set the time failed.: Invalid argument > [root@localhost ~]# hwclock --get > Thu Jan 8 05:12:51 1970 .543449 seconds You cannot initialize the Hardware Clock at all? Not even through the BIOS? If the Hardware Clock cannot be set at all, then my patch will not help you. Sorry if I misunderstood. What machine are you using?