qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 4/6] introduce new vma archive format


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v5 4/6] introduce new vma archive format
Date: Mon, 25 Feb 2013 08:15:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3

On 02/24/2013 11:18 PM, Dietmar Maurer wrote:
>>> +    if (full_read(vmar->fd, vmar->head_data, sizeof(VmaHeader)) !=
>>> +        sizeof(VmaHeader)) {
>>> +        error_setg(errp, "can't read vma header - %s",
>>> +                   errno ? strerror(errno) : "got EOF");
>>
>> You're not the first user, but strerror() isn't thread-safe.  strerror_r is 
>> not
>> necessarily portable (glibc vs. POSIX), and strerror_l isn't yet widely
>> implemented.  Should qemu be providing a better interface
>> qemu_strerror() that guarantees thread-safety when converting errno to a
>> string?
> 
> I thought I can use g_strerror?

g_strerror is not in use in the current qemu code base; but maybe it is
indeed the right alternative?  I'm asking because I'm not a glib expert.

-- 
Eric Blake   eblake redhat com    +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]