qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative ba


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH] block: for a streaming job, fix relative base name arguments
Date: Thu, 12 Apr 2012 06:10:08 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 04/12/2012 02:50 AM, Kevin Wolf wrote:

>> +
>> +    src = realpath(current, NULL);
> 
> My POSIX manpage says:
> 
> "If resolved_name is a null pointer, the behavior of realpath() is
> implementation-defined."
> 
> It seems to have been standardised by now, but I'm not sure if it is a
> good idea to rely on a quite new feature on some OSes.

Worse, there are known compliance bugs; realpath() on Solaris 10 will
return a relative answer for relative input, for example.  I don't know
if glib provides a more portable alternative function, but I'd start by
searching that.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]