]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
lxc: Correctly report active cgroups
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 1 Oct 2012 12:22:42 +0000 (14:22 +0200)
committerCole Robinson <crobinso@redhat.com>
Thu, 18 Oct 2012 17:10:43 +0000 (13:10 -0400)
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.
(cherry picked from commit 0dddd680c267eecfb0eeaa7b3a52f563089c6301)

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;
 }