cgroup-util: fix the reversed return value of cg_is_unified_systemd_contoller_wanted

1d84ad9445 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".
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-02-20 12:26:53 -05:00
parent b6629c4b9f
commit 2dcb526d7a
1 changed files with 3 additions and 1 deletions

View File

@ -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) {