]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
api.c: Rename cgroup_v1_build_procs_path()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 25 Sep 2024 07:08:42 +0000 (12:38 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 7 Oct 2024 19:50:14 +0000 (13:50 -0600)
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 <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/api.c

index 984ca75f8b7e935225d2bb3cbd74ef2658b11b7c..47b5b9a572a5e918c28dfe25413e312f710cb1b7 100644 (file)
--- 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;
                        }