On 1/26/19 9:56 AM, Dhaval Giani wrote:
On Thu, Jan 24, 2019 at 4:53 AM Tom Hromatka <tom.hroma...@oracle.com> wrote:
In preparation for adding support for cgroup v2, this
commit moves some cgroup v1 mount logic out of
cgroup_init() and into its own function.
Signed-off-by: Tom Hromatka <tom.hroma...@oracle.com>
---
src/api.c | 218 +++++++++++++++++++++++++++++++++-----------------------------
1 file changed, 117 insertions(+), 101 deletions(-)
diff --git a/src/api.c b/src/api.c
index 0bf0615..5003c32 100644
--- a/src/api.c
+++ b/src/api.c
@@ -970,6 +970,119 @@ int cg_add_duplicate_mount(struct cg_mount_table_s *item,
const char *path)
}
/**
+ * Process a cgroup v1 mount and add it to cg_mount_table if it's not a
+ * duplicate.
+ *
+ * @param controllers List of controllers from /proc/cgroups
+ * @param ent File system description of cgroup mount being processed
+ * @param found_mnt cg_mount_table index
+ */
+static int process_v1_mnt(char *controllers[], struct mntent *ent,
+ int *found_mnt)
cgroup_v1_mount ?
We try to prefix all functions inside libcgroup with a cgroup, to have
the namespace respected.
Good catch. Thank you. I will make this change.
Tom
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel