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: Richard Weinberger <richard@nod.at>
This commit is contained in:
Richard Weinberger authored and Eric Blake committed 2014-04-08 09:19:24 -06:00
1 parent 27fbfc2a17
commit 21ec87f4f1
1 file changed
+1 -2
+1 -2
View File
@@ -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)