From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: ioemu: use asprintf instead of PATH_MAX Date: Thu, 24 Jan 2008 01:38:50 +0000 Message-ID: <20080124013850.GJ4320@implementation> References: <20080123172005.GI5188@implementation.uk.xensource.com> <20080123205347.GA12631@silverwood.ncultra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20080123205347.GA12631@silverwood.ncultra.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Mike D. Day" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 > > > - 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