From: Lennart Poettering Date: Tue, 26 Apr 2011 19:12:36 +0000 (+0200) Subject: mount: failure to mount cgroup hierarchies should not be fatal X-Git-Tag: v26~21 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=016e9849e03c1375a09c11c54ad06a61f6a24473;p=systemd mount: failure to mount cgroup hierarchies should not be fatal If we cannot open /etc/cgroup, print an error message, but go on, to support cgroup-less builds. https://bugzilla.redhat.com/show_bug.cgi?id=628004 --- diff --git a/src/mount-setup.c b/src/mount-setup.c index 77be8fea..48c32eab 100644 --- a/src/mount-setup.c +++ b/src/mount-setup.c @@ -136,8 +136,10 @@ static int mount_cgroup_controllers(void) { /* Mount all available cgroup controllers that are built into the kernel. */ - if (!(f = fopen("/proc/cgroups", "re"))) - return -ENOENT; + if (!(f = fopen("/proc/cgroups", "re"))) { + log_error("Failed to enumerate cgroup controllers: %m"); + return 0; + } /* Ignore the header line */ (void) fgets(buf, sizeof(buf), f);