From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>,
Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Cc: jasowang@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com
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 [thread overview]
Message-ID: <f2cded5e-22cf-38f5-69d0-ac3b0e6ba8c2@redhat.com> (raw)
In-Reply-To: <87vangd5hh.fsf@dusky.pond.sub.org>
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
next prev parent reply other threads:[~2017-06-28 8:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-27 3:24 [Qemu-devel] [PATCH v5 0/4] Improve error reporting Mao Zhongyi
2017-06-27 3:24 ` [Qemu-devel] [PATCH v5 1/4] net/socket: Don't treat odd socket type as SOCK_STREAM Mao Zhongyi
2017-06-27 3:24 ` [Qemu-devel] [PATCH v5 2/4] net/socket: Convert error message to Error Mao Zhongyi
2017-06-27 7:43 ` Markus Armbruster
2017-06-28 4:07 ` Mao Zhongyi
2017-06-27 3:24 ` [Qemu-devel] [PATCH v5 3/4] net/net: Convert parse_host_port() " Mao Zhongyi
2017-06-27 8:04 ` Markus Armbruster
2017-06-28 4:08 ` Mao Zhongyi
2017-06-28 5:51 ` Markus Armbruster
2017-06-28 8:02 ` Paolo Bonzini [this message]
2017-06-28 10:56 ` Markus Armbruster
2017-06-28 13:01 ` Mao Zhongyi
2017-06-27 3:24 ` [Qemu-devel] [PATCH v5 4/4] net/socket: Improve -net socket error reporting Mao Zhongyi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f2cded5e-22cf-38f5-69d0-ac3b0e6ba8c2@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=maozy.fnst@cn.fujitsu.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).