mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
Report correct error in virNetDevTapCreate
ioctl returns -1, not the errno value
This commit is contained in:
parent
10af0a1973
commit
f8a33815d0
@ -294,7 +294,7 @@ int virNetDevTapCreate(char **ifname,
|
||||
}
|
||||
|
||||
if ((flags & VIR_NETDEV_TAP_CREATE_PERSIST) &&
|
||||
(errno = ioctl(fd, TUNSETPERSIST, 1))) {
|
||||
ioctl(fd, TUNSETPERSIST, 1) < 0) {
|
||||
virReportSystemError(errno,
|
||||
_("Unable to set tap device %s to persistent"),
|
||||
NULLSTR(*ifname));
|
||||
|
Loading…
Reference in New Issue
Block a user