mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-26 09:57:26 +03:00
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:
parent
b8725df8b3
commit
9a66c87a23
@ -1002,6 +1002,8 @@ int cg_is_empty_recursive(const char *controller, const char *path) {
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
r = read_one_line_file(populated, &t);
|
r = read_one_line_file(populated, &t);
|
||||||
|
if (r == -ENOENT)
|
||||||
|
return 1;
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user