cgroup: make sure cg_is_empty_recursive() returns 1 for non-existing cgroups

Previously, on the legacy hierarchy a non-existing cgroup was considered
identical to an empty one, but the unified hierarchy the check for a
non-existing one returned ENOENT.
This commit is contained in:
Lennart Poettering 2015-09-03 18:28:21 +02:00
parent b8725df8b3
commit 9a66c87a23

View file

@ -1002,6 +1002,8 @@ int cg_is_empty_recursive(const char *controller, const char *path) {
return r;
r = read_one_line_file(populated, &t);
if (r == -ENOENT)
return 1;
if (r < 0)
return r;