mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-25 23:21:33 +03:00
parent
280029d18f
commit
5cbaad2f67
@ -248,6 +248,7 @@ int mount_setup_early(void) {
|
||||
|
||||
int mount_cgroup_controllers(char ***join_controllers) {
|
||||
_cleanup_set_free_free_ Set *controllers = NULL;
|
||||
bool has_argument = !!join_controllers;
|
||||
int r;
|
||||
|
||||
if (!cg_is_legacy_wanted())
|
||||
@ -255,7 +256,7 @@ int mount_cgroup_controllers(char ***join_controllers) {
|
||||
|
||||
/* Mount all available cgroup controllers that are built into the kernel. */
|
||||
|
||||
if (!join_controllers)
|
||||
if (!has_argument)
|
||||
/* The defaults:
|
||||
* mount "cpu" + "cpuacct" together, and "net_cls" + "net_prio".
|
||||
*
|
||||
@ -300,6 +301,7 @@ int mount_cgroup_controllers(char ***join_controllers) {
|
||||
|
||||
t = set_remove(controllers, *i);
|
||||
if (!t) {
|
||||
if (has_argument)
|
||||
free(*i);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user