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 b083529baf8819233235f7a0159a43fbf8c0860d..12e292efb8d478b1ccc4c2dd77a5583a4f37f636 100644 (file)
--- a/TODO
+++ b/TODO
@@ -28,7 +28,7 @@
 
 * set_put(), hashmap_put() return values check. i.e. == 0 doesn't free()!
 
 
 * 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
 
 
 * io priority during initialization
 
index 14ac18125fe9f621b837ab2f7891822b6995db86..7eb806e7fd8588d3d7fa23965716f130448e0576 100644 (file)
@@ -138,8 +138,9 @@ static int mount_cgroup_controllers(void) {
         for (;;) {
                 MountPoint p;
                 char *controller, *where;
         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;
 
                         if (feof(f))
                                 break;
@@ -149,6 +150,11 @@ static int mount_cgroup_controllers(void) {
                         goto finish;
                 }
 
                         goto finish;
                 }
 
+                if (!enabled) {
+                        free(controller);
+                        continue;
+                }
+
                 if (asprintf(&where, "/sys/fs/cgroup/%s", controller) < 0) {
                         free(controller);
                         r = -ENOMEM;
                 if (asprintf(&where, "/sys/fs/cgroup/%s", controller) < 0) {
                         free(controller);
                         r = -ENOMEM;