From 80b832c300c2fc39c68e0ab095d408cb9199cfa0 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 15 May 2015 13:58:55 +0200 Subject: tap: Convert tap_set_sndbuf() to Error Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-id: 1431691143-1015-8-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi --- net/tap-linux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'net/tap-linux.c') diff --git a/net/tap-linux.c b/net/tap-linux.c index 812bf2dfc6..6fa27442bc 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) -- cgit v1.2.3