diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-03 18:28:21 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-04 09:07:31 +0200 |
commit | 9a66c87a2386468fd3adc250cd9003644a7a5e6b (patch) | |
tree | cff0510153f4e9202aa5b3adcca8428bb71fba6e /src | |
parent | b8725df8b338b13405e430d037f0aac7872ce3d5 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/cgroup-util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index 3ef96b238e..bf897c9b2d 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; |