Re: [libvirt] [PATCH] lxc: Correctly report active cgroups
On 01.10.2012 15:12, Martin Kletzander wrote: > On 10/01/2012 02:54 PM, Michal Privoznik wrote: >> 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 |2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c >> index ae5163e..87305db 100644 >> --- a/src/lxc/lxc_driver.c >> +++ b/src/lxc/lxc_driver.c >> @@ -1645,7 +1645,7 @@ static bool lxcCgroupControllerActive(virLXCDriverPtr >> driver, >> if (driver->cgroupControllers & (1 << controller)) >> return true; >> #endif >> -return false; >> +return true; >> } >> >> >> > > ACK, > > Martin Thanks, pushed. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] lxc: Correctly report active cgroups
On 10/01/2012 02:54 PM, Michal Privoznik wrote: > 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 |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c > index ae5163e..87305db 100644 > --- a/src/lxc/lxc_driver.c > +++ b/src/lxc/lxc_driver.c > @@ -1645,7 +1645,7 @@ static bool lxcCgroupControllerActive(virLXCDriverPtr > driver, > if (driver->cgroupControllers & (1 << controller)) > return true; > #endif > -return false; > +return true; > } > > > ACK, Martin -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] lxc: Correctly report active cgroups
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 |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index ae5163e..87305db 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -1645,7 +1645,7 @@ static bool lxcCgroupControllerActive(virLXCDriverPtr driver, if (driver->cgroupControllers & (1 << controller)) return true; #endif -return false; +return true; } -- 1.7.8.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list