summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-20 12:26:53 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-20 12:26:53 -0500
commit2dcb526d7a43cc4ac9493877ceb05810ff56dbae (patch)
tree8043ebf4139734e354d631659c4770b448aa1b12 /src/basic
parentb6629c4b9f82f5801af186e975b0220bf066ddbe (diff)
cgroup-util: fix the reversed return value of cg_is_unified_systemd_contoller_wanted
1d84ad944520fc3e062ef518c4db4e1 reversed the meaning of the option. The kernel command line option has the opposite meaning to the function, i.e. specifying "legacy=yes" means "unifed systemd controller=no".
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/cgroup-util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 67c2d3a681..b5ca10a2de 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -2378,7 +2378,9 @@ bool cg_is_unified_systemd_controller_wanted(void) {
if (r < 0)
return false;
- return (wanted = r > 0 ? b : false);
+ /* The meaning of the kernel option is reversed wrt. to the return value
+ * of this function, hence the negation. */
+ return (wanted = r > 0 ? !b : false);
}
bool cg_is_legacy_systemd_controller_wanted(void) {