Remove static from cgroup_copy_controller_values() in api.c
so that other files within libcgroup.la can invoke it.  It
will be used by the abstraction layer code in a subsequent
commit.

Signed-off-by: Tom Hromatka <tom.hroma...@oracle.com>
---
 src/api.c                | 10 ++--------
 src/libcgroup-internal.h | 12 ++++++++++++
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/api.c b/src/api.c
index 8a3414bca1d0..8e8f361a4542 100644
--- a/src/api.c
+++ b/src/api.c
@@ -2157,14 +2157,8 @@ err:
 
 }
 
-/**
- * @dst: Destination controller
- * @src: Source controller from which values will be copied to dst
- *
- * Create a duplicate copy of values under the specified controller
- */
-static int cgroup_copy_controller_values(struct cgroup_controller *dst,
-                                       struct cgroup_controller *src)
+int cgroup_copy_controller_values(struct cgroup_controller *dst,
+                                 struct cgroup_controller *src)
 {
        int i, ret = 0;
 
diff --git a/src/libcgroup-internal.h b/src/libcgroup-internal.h
index 0098d9d80a0a..fd20139be01f 100644
--- a/src/libcgroup-internal.h
+++ b/src/libcgroup-internal.h
@@ -87,6 +87,7 @@ enum cg_version_t {
        CGROUP_UNK = 0,
        CGROUP_V1,
        CGROUP_V2,
+       CGROUP_DISK = 0xFF,
 };
 
 struct control_value {
@@ -362,6 +363,17 @@ int cgroup_fill_cgc(struct dirent *ctrl_dir, struct cgroup 
*cgroup,
  */
 int cgroup_test_subsys_mounted(const char *ctrl_name);
 
+/**
+ * Create a duplicate copy of values under the specified controller
+ *
+ * @dst: Destination controller
+ * @src: Source controller from which values will be copied to dst
+ *
+ * @return 0 on a successful copy, ECGOTHER if the copy failed
+ */
+int cgroup_copy_controller_values(struct cgroup_controller *dst,
+                                 struct cgroup_controller *src);
+
 /**
  * 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
-- 
2.26.2



_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to