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 <tom.hroma...@oracle.com> --- src/api.c | 2 +- src/libcgroup-internal.h | 8 ++++++++ src/libcgroup.map | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/api.c b/src/api.c index 1a5e4a781b58..ce489c89e96f 100644 --- a/src/api.c +++ b/src/api.c @@ -384,7 +384,7 @@ static char *cgroup_basename(const char *path) return base; } -static int cgroup_test_subsys_mounted(const char *name) +int cgroup_test_subsys_mounted(const char *name) { int i; diff --git a/src/libcgroup-internal.h b/src/libcgroup-internal.h index eef54442674b..c2f75f556021 100644 --- a/src/libcgroup-internal.h +++ b/src/libcgroup-internal.h @@ -350,6 +350,14 @@ char *cg_build_path_locked(const char *setting, char *path, int cgroup_fill_cgc(struct dirent *ctrl_dir, struct cgroup *cgroup, struct cgroup_controller *cgc, int cg_index); +/** + * Given a controller name, test if it's mounted + * + * @param ctrl_name Controller name + * @return 1 if mounted, 0 if not mounted + */ +int cgroup_test_subsys_mounted(const char *ctrl_name); + /** * Functions that are defined as STATIC can be placed within the UNIT_TEST * ifdef. This will allow them to be included in the unit tests while diff --git a/src/libcgroup.map b/src/libcgroup.map index f7cc710a27a3..6eb22f052701 100644 --- a/src/libcgroup.map +++ b/src/libcgroup.map @@ -134,4 +134,5 @@ CGROUP_0.43 { cgroup_build_tasks_procs_path; cg_build_path_locked; cgroup_fill_cgc; + cgroup_test_subsys_mounted; } CGROUP_0.42; -- 2.26.2 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel