mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Report correct error in virNetDevTapCreate
ioctl returns -1, not the errno value
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user