[systemd-commits] src/mount-setup.c TODO

Lennart Poettering lennart at kemper.freedesktop.org
Sun Nov 21 13:30:12 PST 2010


 TODO              |    2 +-
 src/mount-setup.c |    8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 600a328fc28c521ee19a0a1c22b14e6011275c20
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Nov 21 22:29:10 2010 +0100

    mount: do not try to mount disable cgroup controllers
    
    https://bugzilla.redhat.com/show_bug.cgi?id=655222

diff --git a/TODO b/TODO
index b083529..12e292e 100644
--- 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
 
diff --git a/src/mount-setup.c b/src/mount-setup.c
index 14ac181..7eb806e 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;



More information about the systemd-commits mailing list