From: Zbigniew Jędrzejewski-Szmek Date: Tue, 6 Jan 2015 00:03:23 +0000 (-0500) Subject: cgroup: fix error message X-Git-Tag: v219~681 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=6da139137eb4b0ee68ca4aa4ddfdab02e8a5cf98 cgroup: fix error message systemd[1]: Failed to set memory.limit_in_bytes on : Invalid argument --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 3d5d8898b..d6156c392 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),