From: Kamalesh Babulal Date: Wed, 25 Sep 2024 07:08:42 +0000 (+0530) Subject: api.c: Rename cgroup_v1_build_procs_path() X-Git-Tag: v3.2.0~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd0fa01c328e3970fa3f622bbd64b6445ce35972;p=thirdparty%2Flibcgroup.git 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 --- 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; }