cgroup: fix error message

systemd[1]: Failed to set memory.limit_in_bytes on : Invalid argument

(cherry picked from commit 6da139137e)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2015-01-16 00:56:58 -05:00
parent 97033df7a7
commit f11dbe2f40
+3
View File
@@ -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),