From fd0fa01c328e3970fa3f622bbd64b6445ce35972 Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Wed, 25 Sep 2024 12:38:42 +0530 Subject: [PATCH] api.c: Rename cgroup_v1_build_procs_path() Rename cgroup_v1_build_procs_path() to cgroup_build_tid_path(), this function will be used to build a procs path on both cgroup v1/v2 to which the tid/pid will be written based on the cgroup type. Change the name to reflect the new functionality. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- src/api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api.c b/src/api.c index 984ca75f..47b5b9a5 100644 --- a/src/api.c +++ b/src/api.c @@ -2012,7 +2012,7 @@ err: return ret; } -static int cgroup_v1_build_procs_path(const char * const ctrl_name, char *path) +static int cgroup_build_tid_path(const char * const ctrl_name, char *path) { enum cg_version_t version; size_t len; @@ -2057,7 +2057,7 @@ static int cgroup_attach_task_tid(struct cgroup *cgroup, pid_t tid, bool move_ti return ret; if (move_tids) { - ret = cgroup_v1_build_procs_path(controller_name, path); + ret = cgroup_build_tid_path(controller_name, path); if (ret) return ret; } @@ -2099,7 +2099,7 @@ static int cgroup_attach_task_tid(struct cgroup *cgroup, pid_t tid, bool move_ti return ret; if (move_tids) { - ret = cgroup_v1_build_procs_path(controller_name, path); + ret = cgroup_build_tid_path(controller_name, path); if (ret) return ret; } -- 2.47.3