From: Lennart Poettering Date: Thu, 3 Sep 2015 16:28:21 +0000 (+0200) Subject: cgroup: make sure cg_is_empty_recursive() returns 1 for non-existing cgroups X-Git-Tag: v226~31^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a66c87a2386468fd3adc250cd9003644a7a5e6b;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index 3ef96b238e6..bf897c9b2dc 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -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;