diff options
author | Mao Zhongyi <maozy.fnst@cn.fujitsu.com> | 2017-09-04 22:35:40 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2017-09-08 08:17:37 +0800 |
commit | 0522a959aec29768610900636f6234ab40530f82 (patch) | |
tree | 86513fab9d0c58d8806211b89a160819782e62b2 /ioport.c | |
parent | bcd4dfd6852361361d6622de7e67f94e2b475d27 (diff) |
net/socket: Improve -net socket error reporting
When -net socket fails, it first reports a specific error, then
a generic one, like this:
$ ./x86_64-softmmu/qemu-system-x86_64 -net socket,mcast=230.0.0.1:1234,listen
qemu-system-x86_64: -net socket,mcast=230.0.0.1:1234,listen: exactly one of listen=, connect=, mcast= or udp= is required
qemu-system-x86_64: -net socket,mcast=230.0.0.1:1234,listen: Device 'socket' could not be initialized
Convert net_socket_*_init() to Error to get rid of the superfluous second
error message. After the patch, the effect like this:
$ ./x86_64-softmmu/qemu-system-x86_64 -net socket,mcast=230.0.0.1:1234,listen
qemu-system-x86_64: -net socket,mcast=230.0.0.1:1234,listen: exactly one of listen=, connect=, mcast= or udp= is requireda
This also fixes a few silent failures to report an error.
Cc: jasowang@redhat.com
Cc: armbru@redhat.com
Cc: berrange@redhat.com
Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'ioport.c')
0 files changed, 0 insertions, 0 deletions