mount: do not try to mount disable cgroup controllers

https://bugzilla.redhat.com/show_bug.cgi?id=655222
This commit is contained in:
Lennart Poettering 2010-11-21 22:29:10 +01:00
parent c8b2e52cf6
commit 600a328fc2
2 changed files with 8 additions and 2 deletions

2
TODO
View File

@ -28,7 +28,7 @@
* set_put(), hashmap_put() return values check. i.e. == 0 doesn't free()!
* chkconfig/systemd-install glue
* chkconfig/systemd enable glue
* io priority during initialization

View File

@ -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;