]> git.ipfire.org Git - pakfire.git/commitdiff
cgroups: Rename pakfire_cgroup_open to *_create
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 Dec 2024 16:38:06 +0000 (16:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 Dec 2024 16:38:06 +0000 (16:38 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c
src/libpakfire/cgroup.c
src/libpakfire/include/pakfire/cgroup.h

index 6d205a3af901d404eae332e7fae2357c035f7cbf..6476f9f932c1100736995a35385e8abc11b4436e 100644 (file)
@@ -1348,7 +1348,7 @@ static int pakfire_build_setup_cgroup(struct pakfire_build* build) {
        }
 
        // Create a new cgroup
-       r = pakfire_cgroup_open(&build->cgroup, build->ctx, path, 0);
+       r = pakfire_cgroup_create(&build->cgroup, build->ctx, path, 0);
        if (r) {
                ERROR(build->ctx, "Could not create cgroup for build %s: %m\n", build->_id);
                goto ERROR;
index 8b384898199bb0c39e98cefc66e7cea1a79fcfcb..e2679ecf3b0495ab932466c74a9ad17c2ff7a38d 100644 (file)
@@ -132,7 +132,7 @@ static int pakfire_cgroup_parent(struct pakfire_cgroup* cgroup,  struct pakfire_
        }
 
        // Open the cgroup
-       return pakfire_cgroup_open(parent, cgroup->ctx, path, 0);
+       return pakfire_cgroup_create(parent, cgroup->ctx, path, 0);
 }
 
 static int pakfire_cgroup_setup_devices(struct pakfire_cgroup* cgroup) {
@@ -390,7 +390,7 @@ static int pakfire_cgroup_enable_controllers(struct pakfire_cgroup* cgroup) {
 
        If the cgroup doesn't exist, it will be created including any parent cgroups.
 */
-int pakfire_cgroup_open(struct pakfire_cgroup** cgroup,
+int pakfire_cgroup_create(struct pakfire_cgroup** cgroup,
                struct pakfire_ctx* ctx, const char* path, int flags) {
        struct pakfire_cgroup* c = NULL;
        int r;
@@ -489,7 +489,7 @@ int pakfire_cgroup_child(struct pakfire_cgroup** child,
                return r;
 
        // Open the child group
-       return pakfire_cgroup_open(child, cgroup->ctx, p, flags);
+       return pakfire_cgroup_create(child, cgroup->ctx, p, flags);
 }
 
 /*
index 1b4b881bc4af777e29cc45590224ecae1c941416..05023312e5b71760496e8324853135a569ae6595 100644 (file)
@@ -195,7 +195,7 @@ struct pakfire_cgroup_stats {
        } memory;
 };
 
-int pakfire_cgroup_open(struct pakfire_cgroup** cgroup,
+int pakfire_cgroup_create(struct pakfire_cgroup** cgroup,
        struct pakfire_ctx* ctx, const char* path, int flags);
 
 struct pakfire_cgroup* pakfire_cgroup_ref(struct pakfire_cgroup* cgroup);