WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: ioemu: use asprintf instead of PATH_MAX

To: "Mike D. Day" <ncmike@xxxxxxxxxx>
Subject: [Xen-devel] Re: ioemu: use asprintf instead of PATH_MAX
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Thu, 24 Jan 2008 01:38:50 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 23 Jan 2008 17:39:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080123205347.GA12631@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, "Mike D. Day" <ncmike@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <20080123172005.GI5188@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20080123205347.GA12631@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Mike D. Day, le Wed 23 Jan 2008 15:53:47 -0500, a écrit :
> erOn 23/01/08 17:20 +0000, Samuel Thibault wrote:
> > Use asprintf instead of PATH_MAX, which POSIX says to be facultative.
> > 
> > Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
> 
> > -        snprintf(qemu_file, sizeof(qemu_file), 
> > -                 "/var/lib/xen/qemu-save.%d", domid);
> > +        asprintf(&qemu_file, "/var/lib/xen/qemu-save.%d", domid);
> 
> Just a question - afaik asprintf is a unix-ism that isn't supported on
> windows. Will this cause problems if also pushed to upstream qemu?

qemu is quite often used in windows too so that would pose problem
indeed.  But I guess the /var/lib patch would too anyway :)  And this
part of the code is actually xen-specific.

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel