summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-26 21:12:36 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-26 21:12:38 +0200
commit016e9849e03c1375a09c11c54ad06a61f6a24473 (patch)
tree77101977b46efec990c11a5cf0efacbcde670f05 /src
parent4db6d587c37c0357d20c79bf1a7c9afd4c7ced61 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/mount-setup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mount-setup.c b/src/mount-setup.c
index 77be8fead8..48c32eab33 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);