]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api: cgroup_get_cgroup() populate the controller list based on the subtree_control...
authorTom Hromatka <tom.hromatka@oracle.com>
Tue, 20 Dec 2022 22:33:23 +0000 (22:33 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 6 Jan 2023 15:28:47 +0000 (08:28 -0700)
commit52f20c4567ea45157112ad765b94f072cf62183f
treeabb7135112d73b58d0ddd28bea39e70db1611d0e
parent70ef727a351457e1d9368626725fb3d4adad10ce
api: cgroup_get_cgroup() populate the controller list based on the subtree_control file

In cgroup_get_cgroup(), populate the controller list in the cgroup
only with controllers that are enabled in cgroup.subtree_control.

As part of this change update the error codes from
cgroupv2_get_subtree_control() to better reflect memory allocation
errors

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
src/api.c