cgroup-util: drop handcrafted cg_is_empty(), always check cgroup.events populated field

This effectively renames cg_is_empty_recursive() to cg_is_empty().
Note that all existing code calls the former and not the latter,
hence with cgv1 support being dropped it's trivial to consult
cgroup.events directly for populated state everywhere.

Additionally, use more generic cg_get_keyed_attribute() helper
rather than cg_read_event().
This commit is contained in:
Mike Yuan
2025-05-26 22:59:48 +02:00
parent 879952a853
commit c3f900770d
8 changed files with 16 additions and 75 deletions
-1
View File
@@ -233,7 +233,6 @@ int cg_get_xattr_bool(const char *path, const char *name);
int cg_remove_xattr(const char *path, const char *name);
int cg_is_empty(const char *controller, const char *path);
int cg_is_empty_recursive(const char *controller, const char *path);
int cg_get_root_path(char **path);