mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
a8a21be985
commit
80b832c300
7 changed files with 10 additions and 14 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue