]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
lxc: Correctly report active cgroups
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 1 Oct 2012 12:22:42 +0000 (14:22 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 2 Oct 2012 08:28:38 +0000 (10:28 +0200)
There was an inverted return value in lxcCgroupControllerActive().
The function assumes cgroups are active and do couple of checks
to prove that. If any of them fails, false is returned. Therefore,
at the end, after all checks are done we must return true, not false.

src/lxc/lxc_driver.c

index ae5163e4956868597b80e4488e604f3db496f0f5..87305dbfc56e924f5b4bfba94d750b3ab801005a 100644 (file)
@@ -1645,7 +1645,7 @@ static bool lxcCgroupControllerActive(virLXCDriverPtr driver,
     if (driver->cgroupControllers & (1 << controller))
         return true;
 #endif
-    return false;
+    return true;
 }