]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
api: Add functions for iterating through the cgroup struct
authorTom Hromatka <tom.hromatka@oracle.com>
Tue, 20 Dec 2022 22:35:54 +0000 (22:35 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 6 Jan 2023 15:07:43 +0000 (08:07 -0700)
commit9ddd11f745763de99e6385044c01d5065fd969a5
treed02ab495b0cd3a25442c067d19916250b2e88047
parent64c7b2a3ab516dc8246da23463f9b59fdf57cff6
api: Add functions for iterating through the cgroup struct

Add functions to iterate through the cgroup structure:
cgroup_get_controller_count() - returns the number of controllers
within the cgroup struct
cgroup_get_controller_by_index() - returns the cgroup_controller
pointer corresponding with the requested index
cgroup_get_controller_name() - given a cgroup_controller pointer,
get the controller's name

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