chiark / gitweb /
mount: do not try to mount disable cgroup controllers
authorLennart Poettering <lennart@poettering.net>
Sun, 21 Nov 2010 21:29:10 +0000 (22:29 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 21 Nov 2010 21:29:10 +0000 (22:29 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=655222

TODO
src/mount-setup.c

diff --git a/TODO b/TODO
index b083529..12e292e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -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
 
index 14ac181..7eb806e 100644 (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;