提交 f8a33815 编写于 作者: J Ján Tomko

Report correct error in virNetDevTapCreate

ioctl returns -1, not the errno value
上级 10af0a19
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册