From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Hongyang Subject: Re: [PATCH]xl: Add missing start_time entry when create and restore VMs Date: Sat, 15 May 2010 09:54:23 +0800 Message-ID: <4BEDFECF.9090408@cn.fujitsu.com> References: <4BED3507.2010307@cn.fujitsu.com> <181d8804-a9f0-4707-a2bc-514132a13c29@default> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <181d8804-a9f0-4707-a2bc-514132a13c29@default> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 05/14/2010 11:47 PM, Dan Magenheimer wrote: >> + vments[5] = libxl_sprintf(ctx, "%lu.%d", start_time.tv_sec,(int)start_time.tv_usec/10000); >> + vments[i++] = libxl_sprintf(ctx, "%lu.%d",start_time.tv_sec,(int)start_time.tv_usec/10000); > > I don't think these work as intended. For example, if > tv_usec is 10000, I think you want xxx.01 printed, not > xxx.1. Maybe you want %lu.%02d? Ah sorry, you're right, I'll fix that, Thank you. > > And in any case, is there a reason to limit the precision > to two digits? Why not %lu.%06d? > I see no reason too. But the current start_time is limit to two digits(vms created from 'xm create'). So I limit the precision to two digits. > -- Regards Yang Hongyang