From: Ján Tomko Date: Mon, 23 Jun 2014 10:03:05 +0000 (+0200) Subject: Report correct error in virNetDevTapCreate X-Git-Tag: v1.2.6-rc1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8a33815d0d3a40cf38ceff7a986bca04495f30b;p=thirdparty%2Flibvirt.git Report correct error in virNetDevTapCreate ioctl returns -1, not the errno value --- diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 0b444fad39..d64e64fc49 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -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));