提交 21ec87f4 编写于 作者: R Richard Weinberger 提交者: Eric Blake

LXC: Fix return code evaulation in lxcCheckNetNsSupport()

Commit b9dd878f (util: make it easier to grab only regular command exit)
changed the call semantics of virCommandRun() and therefore of virRun()
too. But lxcCheckNetNsSupport() was not updated.
As consequence of this lxcCheckNetNsSupport always failed and broke LXC.
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 27fbfc2a
......@@ -1475,8 +1475,7 @@ static int lxcCheckNetNsSupport(void)
const char *argv[] = {"ip", "link", "set", "lo", "netns", "-1", NULL};
int ip_rc;
if (virRun(argv, &ip_rc) < 0 ||
!(WIFEXITED(ip_rc) && (WEXITSTATUS(ip_rc) != 255)))
if (virRun(argv, &ip_rc) < 0 || ip_rc == 255)
return 0;
if (lxcContainerAvailable(LXC_CONTAINER_FEATURE_NET) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册