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: Thu, 23 Feb 2012 23:17:01 +0800 Message-ID: <4F46586D.30605@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> <4F4652BB.4020809@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F4652BB.4020809@oracle.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: annie li Cc: Dan Magenheimer , "xen-devel@lists.xensource.com" , Ian Campbell , Konrad Rzeszutek Wilk , Kurt Hackel , young zhang , "Zhang, Yang Z" List-Id: xen-devel@lists.xenproject.org On 2012-2-23 22:52, annie li wrote: > > > 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. >> > I changed the 1900 to a macro and added a new function get_year. The > new patch is attached. Sorry, two macro define: epoch_year and get_year. Thanks Annie {