[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 3/4] net/net: Convert parse_host_port() to Er
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v5 3/4] net/net: Convert parse_host_port() to Error |
Date: |
Wed, 28 Jun 2017 10:02:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 28/06/2017 07:51, Markus Armbruster wrote:
>> The gethostbyname() return a null pointer if an error occurs, and the h_errno
>> variable holds an error number. herror() and hstrerror() can prints the error
>> message associated with the current value of h_errno, but hstrerror() returns
>> the string type is good for passing the error message to Error. So I'd prefer
>> the hstrerror.
>>
>> As for the portability of hstrerror(), sorry, I'm also not sure, but in this
>> case I tested, it's OK. so I want to use hstrerror() for a while, if there
>> are
>> any problem that can be fixed later. Do you think it can be done?
>
> Standard first portability question: does Windows provide it?
Nope. But it does have gai_strerror.
Paolo
[Qemu-devel] [PATCH v5 2/4] net/socket: Convert error message to Error, Mao Zhongyi, 2017/06/26
[Qemu-devel] [PATCH v5 4/4] net/socket: Improve -net socket error reporting, Mao Zhongyi, 2017/06/26