From mboxrd@z Thu Jan 1 00:00:00 1970 From: annie li Subject: Re: [PATCH] hvm: Correct RTC time offset update error due to tm->tm_year Date: Wed, 22 Feb 2012 22:35:07 +0800 Message-ID: <4F44FD1B.5090000@oracle.com> References: <4F41F41F.9060601@oracle.com> <4F430201.3040208@oracle.com> <1329908701.2880.26.camel@zakaz.uk.xensource.com> <4F44E94A.2060209@oracle.com> <1329919132.8557.2.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1329919132.8557.2.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Dan Magenheimer , "xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk , Kurt Hackel , young zhang , "Zhang, Yang Z" List-Id: xen-devel@lists.xenproject.org On 2012-2-22 21:58, Ian Campbell wrote: > > Yes, this looks plausible to me (although I'm no expert on this code). > Something similar happens in rtc_next_second. > > Perhaps it would be better to add a function or macro to do the > conversion, such that it is somewhat self documenting? Or at least make > the 1900 a #define with a suitable name. > Sure. How about #define epoch_year 1900 #define get_year(x) (x + epoch_year) ? Thanks, Annie > Ian. > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >