aboutsummaryrefslogtreecommitdiff
path: root/net/tap-linux.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-05-15 13:58:55 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2015-05-27 09:51:05 +0100
commit80b832c300c2fc39c68e0ab095d408cb9199cfa0 (patch)
tree70f684044340242ad58bb5e5a095399a3928aadd /net/tap-linux.c
parenta8a21be9855e0bb0947a7325d0d1741a8814f21e (diff)
downloadqemu-80b832c300c2fc39c68e0ab095d408cb9199cfa0.zip
qemu-80b832c300c2fc39c68e0ab095d408cb9199cfa0.tar.gz
qemu-80b832c300c2fc39c68e0ab095d408cb9199cfa0.tar.bz2
tap: Convert tap_set_sndbuf() to Error
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1431691143-1015-8-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net/tap-linux.c')
-rw-r--r--net/tap-linux.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/tap-linux.c b/net/tap-linux.c
index 812bf2d..6fa2744 100644
--- a/net/tap-linux.c
+++ b/net/tap-linux.c
@@ -126,7 +126,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
*/
#define TAP_DEFAULT_SNDBUF 0
-int tap_set_sndbuf(int fd, const NetdevTapOptions *tap)
+void tap_set_sndbuf(int fd, const NetdevTapOptions *tap, Error **errp)
{
int sndbuf;
@@ -139,10 +139,8 @@ int tap_set_sndbuf(int fd, const NetdevTapOptions *tap)
}
if (ioctl(fd, TUNSETSNDBUF, &sndbuf) == -1 && tap->has_sndbuf) {
- error_report("TUNSETSNDBUF ioctl failed: %s", strerror(errno));
- return -1;
+ error_setg_errno(errp, errno, "TUNSETSNDBUF ioctl failed");
}
- return 0;
}
int tap_probe_vnet_hdr(int fd)