mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
Report correct error in virNetDevTapCreate
ioctl returns -1, not the errno value
This commit is contained in:
1 parent
10af0a1973
commit
f8a33815d0
1 file changed
+1
-1
@@ -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