diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-10-17 10:26:37 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-10-19 14:51:34 +0200 |
commit | 007e5f8782673d8e476398baaa5b4813741e970b (patch) | |
tree | d70d9d3b0dce866f4bfde33b22d031d0d76e2d14 /net/socket.c | |
parent | 4dd32b3dda3ebc3ac9dd6b951a40a3e4f2f0fd47 (diff) |
l2tpv3: Improve -netdev/netdev_add/-net/... error reporting
When -netdev l2tpv3 fails, it first reports a specific error, then a
generic one, like this:
$ qemu-system-x86_64 -netdev l2tpv3,id=foo,src=,dst=,txsession=1
qemu-system-x86_64: -netdev l2tpv3,id=foo,src=,dst=,txsession=1: l2tpv3_open : could not resolve src, errno = Name or service not known
qemu-system-x86_64: Device 'l2tpv3' could not be initialized
With the command line, the messages go to stderr. In HMP, they go to
the monitor. In QMP, the second one becomes the error reply, and the
first one goes to stderr.
Convert net_init_tap() to Error. This suppresses the unwanted second
message, and makes the specific error the QMP error reply.
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20181017082702.5581-14-armbru@redhat.com>
Diffstat (limited to 'net/socket.c')
0 files changed, 0 insertions, 0 deletions