From: Markus Armbruster <armbru@redhat.com>
To: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
jasowang@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v6 4/4] net/socket: Improve -net socket error reporting
Date: Thu, 29 Jun 2017 09:31:41 +0200 [thread overview]
Message-ID: <878tkb2qsi.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <7d861d6c-fb0c-7a93-22bc-cc7dc814ddaf@cn.fujitsu.com> (Mao Zhongyi's message of "Thu, 29 Jun 2017 11:08:09 +0800")
Mao Zhongyi <maozy.fnst@cn.fujitsu.com> writes:
> Hi, Daniel
>
> On 06/28/2017 09:27 PM, Daniel P. Berrange wrote:
>> On Wed, Jun 28, 2017 at 09:08:50PM +0800, Mao Zhongyi wrote:
>>> When -net socket fails, it first reports a specific error, then
>>> a generic one, like this:
>>>
>>> $ qemu-system-x86_64 -net socket,
>>> qemu-system-x86_64: -net socket: exactly one of fd=, listen=, connect=, mcast= or udp= is required
>>> qemu-system-x86_64: -net socket: Device 'socket' could not be initialized
>>
>> This second line of error message comes from net/net.c in the
>> net_client_init1 method:
>>
>> /* FIXME drop when all init functions store an Error */
>> if (errp && !*errp) {
>> error_setg(errp, QERR_DEVICE_INIT_FAILED,
>> NetClientDriver_lookup[netdev->type]);
>> }
>>
>>
>> hopefully your patch could drop this code too ?
>>
>> In fact this is the only use of QERR_DEVICE_INIT_FAILED in the
>> whole tree, so the QERR constant could possibly be killed too.
>>
>
> OK, I will. :)
You can do that only when *all* init functions stor an Error! We're not
there, yet:
$ grep 'FIXME error_setg' net/*
net/l2tpv3.c: /* FIXME error_setg(errp, ...) on failure */
net/slirp.c: /* FIXME error_setg(errp, ...) on failure */
net/socket.c: /* FIXME error_setg(errp, ...) on failure */
net/tap-win32.c: /* FIXME error_setg(errp, ...) on failure */
net/vde.c: /* FIXME error_setg(errp, ...) on failure */
prev parent reply other threads:[~2017-06-29 7:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 13:08 [Qemu-devel] [PATCH v6 0/4] Improve error reporting Mao Zhongyi
2017-06-28 13:08 ` [Qemu-devel] [PATCH v6 1/4] net/socket: Don't treat odd socket type as SOCK_STREAM Mao Zhongyi
2017-06-28 13:18 ` Daniel P. Berrange
2017-06-28 14:23 ` Eric Blake
2017-06-29 3:24 ` Mao Zhongyi
2017-06-28 13:08 ` [Qemu-devel] [PATCH v6 2/4] net/socket: Convert several helper functions to Error Mao Zhongyi
2017-06-28 13:21 ` Daniel P. Berrange
2017-06-28 13:08 ` [Qemu-devel] [PATCH v6 3/4] net/net: Convert parse_host_port() " Mao Zhongyi
2017-06-28 13:23 ` Daniel P. Berrange
2017-06-28 14:24 ` Eric Blake
2017-06-28 14:28 ` Daniel P. Berrange
2017-06-29 7:29 ` Markus Armbruster
2017-06-29 3:01 ` Mao Zhongyi
2017-06-28 13:08 ` [Qemu-devel] [PATCH v6 4/4] net/socket: Improve -net socket error reporting Mao Zhongyi
2017-06-28 13:27 ` Daniel P. Berrange
2017-06-29 3:08 ` Mao Zhongyi
2017-06-29 7:31 ` Markus Armbruster [this message]
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=878tkb2qsi.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=jasowang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.