diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-01-06 01:03:23 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-01-06 01:04:10 +0100 |
commit | 6da139137eb4b0ee68ca4aa4ddfdab02e8a5cf98 (patch) | |
tree | 8e8ec1e63a5f3d6b83a0fcfab8cc926301800e06 /src/core/cgroup.c | |
parent | journal: call connect() with dropped privileges (diff) | |
download | systemd-6da139137eb4b0ee68ca4aa4ddfdab02e8a5cf98.tar.xz systemd-6da139137eb4b0ee68ca4aa4ddfdab02e8a5cf98.zip |
cgroup: fix error message
systemd[1]: Failed to set memory.limit_in_bytes on : Invalid argument
Diffstat (limited to '')
-rw-r--r-- | src/core/cgroup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 3d5d8898b6..d6156c3924 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -295,6 +295,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), |