summaryrefslogtreecommitdiffstats
path: root/net/tap_int.h
diff options
context:
space:
mode:
authorMarkus Armbruster2015-05-15 13:58:54 +0200
committerStefan Hajnoczi2015-05-27 10:51:05 +0200
commita8a21be9855e0bb0947a7325d0d1741a8814f21e (patch)
tree76dc47b860b7d92357741747052391bb9a406832 /net/tap_int.h
parenttap: net_tap_fd_init() can't fail, drop dead error handling (diff)
downloadqemu-a8a21be9855e0bb0947a7325d0d1741a8814f21e.tar.gz
qemu-a8a21be9855e0bb0947a7325d0d1741a8814f21e.tar.xz
qemu-a8a21be9855e0bb0947a7325d0d1741a8814f21e.zip
tap: Improve -netdev/netdev_add/-net/... bridge error reporting
When -netdev bridge fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -netdev bridge,id=foo failed to launch bridge helper qemu-system-x86_64: -netdev bridge,id=foo: Device 'bridge' could not be initialized The first message goes to stderr. Wrong for HMP, because errors need to go to the monitor there. The second message goes to stderr for -netdev, to the monitor for HMP netdev_add, and becomes the error reply for QMP netdev_add. Convert net_bridge_run_helper() to Error, and propagate its errors through net_init_bridge(). This ensures the error gets reported where the user is, and suppresses the unwanted second message. While there, improve the error messages a bit. The above example becomes: $ qemu-system-x86_64 -netdev bridge,id=foo qemu-system-x86_64: -netdev bridge,id=foo: bridge helper failed net_init_tap() also uses net_bridge_run_helper(). Propagate its errors there as well. Improves reporting these errors with -netdev tap & friends. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1431691143-1015-7-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net/tap_int.h')
0 files changed, 0 insertions, 0 deletions