diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-11-21 22:29:10 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-11-21 22:29:10 +0100 |
commit | 600a328fc28c521ee19a0a1c22b14e6011275c20 (patch) | |
tree | 44f006f4aa8f7f0841bfd77dba37e1a486a4c3af /src | |
parent | c8b2e52cf6a3b15b610f7efb31b8fff31cc9115c (diff) |
mount: do not try to mount disable cgroup controllers
https://bugzilla.redhat.com/show_bug.cgi?id=655222
Diffstat (limited to 'src')
-rw-r--r-- | src/mount-setup.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mount-setup.c b/src/mount-setup.c index 14ac18125f..7eb806e7fd 100644 --- a/src/mount-setup.c +++ b/src/mount-setup.c @@ -138,8 +138,9 @@ static int mount_cgroup_controllers(void) { for (;;) { MountPoint p; char *controller, *where; + int enabled = false; - if (fscanf(f, "%ms %*i %*i %*i", &controller) != 1) { + if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 1) { if (feof(f)) break; @@ -149,6 +150,11 @@ static int mount_cgroup_controllers(void) { goto finish; } + if (!enabled) { + free(controller); + continue; + } + if (asprintf(&where, "/sys/fs/cgroup/%s", controller) < 0) { free(controller); r = -ENOMEM; |