summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-05 19:03:23 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-16 00:56:58 -0500
commitf11dbe2f409c293a1565cfcebbbb703c73e897b3 (patch)
tree75bb229108c884bcf9e8d3a10b6fb3e303b73caf
parent97033df7a71b1bc506094ad872a28ed9b3bde0cb (diff)
downloadsystemd-f11dbe2f409c293a1565cfcebbbb703c73e897b3.tar.gz
cgroup: fix error message
systemd[1]: Failed to set memory.limit_in_bytes on : Invalid argument (cherry picked from commit 6da139137eb4b0ee68ca4aa4ddfdab02e8a5cf98)
-rw-r--r--src/core/cgroup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 6b3b9541b5..5f3d9907b7 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -297,6 +297,9 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
/* Some cgroup attributes are not support on the root cgroup,
* hence silently ignore */
is_root = isempty(path) || path_equal(path, "/");
+ if (is_root)
+ /* Make sure we don't try to display messages with an empty path. */
+ path = "/";
/* We generally ignore errors caused by read-only mounted
* cgroup trees (assuming we are running in a container then),