[Libcg-devel] [PATCH 1/5] api: Expose cg_build_path_locked() to users of libcgroup.la

2021-02-16 Thread Tom Hromatka
Remove the static qualifier from cg_build_path_locked(). As part of the cgget refactor, cgget will utilize this function. Signed-off-by: Tom Hromatka --- src/api.c| 4 ++-- src/libcgroup-internal.h | 14 ++ src/libcgroup.map| 1 + 3 files changed, 17 insert

[Libcg-devel] [PATCH 5/5] cgget: Major refactor

2021-02-16 Thread Tom Hromatka
Previously cgget used data structures unlike anywhere else within libcgroup. cgget had arrays of strings to hold the list of controllers, settings, and values. Update cgget to utilize struct cgroup and struct cgroup_controller. This patch is intended to have no functional changes. Signed-off-by

[Libcg-devel] [PATCH 3/5] api.c: Expose cgroup_test_subsys_mounted() to users of libcgroup.la

2021-02-16 Thread Tom Hromatka
Remove the static qualifier from cgroup_test_subsys_mounted(). As part of the cgget refactor, cgget will utilize this function. Signed-off-by: Tom Hromatka --- src/api.c| 2 +- src/libcgroup-internal.h | 8 src/libcgroup.map| 1 + 3 files changed, 10 insertions(

[Libcg-devel] [PATCH 4/5] wrapper.c: Add support for empty values in cgroup_add_value_string()

2021-02-16 Thread Tom Hromatka
cgroup_add_value_string() is the fundamental building block for adding a name/value pair to a cgroup_controller struct. Add support for a NULL value field. Currently it only supports adding a valid value, but in a subsequent commit, cgget will utilize this function to build up a hierarchy of cgrou

[Libcg-devel] [PATCH 2/5] api.c: Expose cgroup_fill_cgc() to users of libcgroup.la

2021-02-16 Thread Tom Hromatka
Remove the static qualifier from cgroup_fill_cgc(). As part of the cgget refactor, cgget will utilize this function. Signed-off-by: Tom Hromatka --- src/api.c| 4 ++-- src/libcgroup-internal.h | 15 +++ src/libcgroup.map| 1 + 3 files changed, 18 insertions

[Libcg-devel] [PATCH 0/5] Refactor cgget

2021-02-16 Thread Tom Hromatka
Unlike the rest of libcgroup, the current implementation of cgget uses arrays of strings to represent cgroups, controllers, and settings. The rest of the library utilizes the cgroup struct to represent the hierarchy. In preparation for the development of a cgroup v1/v2 abstraction layer, this pat