]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api.c: Add function to read the cgroup.subtree_control file
authorTom Hromatka <tom.hromatka@oracle.com>
Wed, 23 Sep 2020 16:41:00 +0000 (10:41 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 15 Oct 2020 19:43:09 +0000 (13:43 -0600)
commit1a28481d680e696b872b689f2613e4a236746ff2
tree40080f1c0163219c683cce840d5b8f4ff3bd287d
parent3bb5a8f4ef892a0f125b2455b1a566fced559e4f
api.c: Add function to read the cgroup.subtree_control file

Add a function, cgroupv2_get_subtree_control(), that verifies
if a controller is enabled in the cgroup.subtree_control file
for the requested path.

This function will be used in the next commit - "api.c: Add function
to check if a controller is enabled for a cgroup v2 cgroup" - to
determine if the requested cgroup v2 controller is enabled for a
cgroup.  This is a required check to ensure that the
cgclassify/cgexec operation will succeed.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/api.c
src/libcgroup-internal.h