summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-04-14 02:15:13 +0200
committerLennart Poettering <lennart@poettering.net>2012-04-16 18:59:07 +0200
commit3474ae3c7e1981301d0b35bc89d759ca13f06e8f (patch)
tree077a731a876821609751b1abcbe654cdfa6f288e /src/core
parent80172751b7a678834c1a453ae28c0eb333958250 (diff)
cgroup: if a controller is not available don't try to create cgroups in its hierarchy
Diffstat (limited to 'src/core')
-rw-r--r--src/core/cgroup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 7a5f673a7a..3334f216a2 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -334,7 +334,8 @@ int manager_setup_cgroup(Manager *m) {
}
/* 2. Show data */
- if ((r = cg_get_path(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_hierarchy, NULL, &path)) < 0) {
+ r = cg_get_path(SYSTEMD_CGROUP_CONTROLLER, m->cgroup_hierarchy, NULL, &path);
+ if (r < 0) {
log_error("Cannot find cgroup mount point: %s", strerror(-r));
goto finish;
}
@@ -342,7 +343,8 @@ int manager_setup_cgroup(Manager *m) {
log_debug("Using cgroup controller " SYSTEMD_CGROUP_CONTROLLER ". File system hierarchy is at %s.", path);
/* 3. Install agent */
- if ((r = cg_install_release_agent(SYSTEMD_CGROUP_CONTROLLER, SYSTEMD_CGROUP_AGENT_PATH)) < 0)
+ r = cg_install_release_agent(SYSTEMD_CGROUP_CONTROLLER, SYSTEMD_CGROUP_AGENT_PATH);
+ if (r < 0)
log_warning("Failed to install release agent, ignoring: %s", strerror(-r));
else if (r > 0)
log_debug("Installed release agent.");