Remove static from cgroup_copy_controller_values() in api.c
so that other files within libcgroup can invoke it. It will
be used by the abstraction layer code in a subsequent commit.
Also, declare *dst as a const pointer and *src as a const *
const pointer. Subsequent abstraction layer checkins make
heavy use of const and without these changes, warnings (which
continuous integration converts to errors) are thrown.
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
}
-/**
- * @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 * const dst,
+ const struct cgroup_controller * const src)
{
int i, ret = 0;
*/
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 * const dst,
+ const struct cgroup_controller * const 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