This commit adds a string comparison of "cgroup2" to cg_test_mounted_fs(). This allows cgroup v2 mounts to pass the filesystem check and thus cgroups can be created.
Signed-off-by: Tom Hromatka <tom.hroma...@oracle.com> --- src/api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api.c b/src/api.c index bef9ea263f43..2ced9298a275 100644 --- a/src/api.c +++ b/src/api.c @@ -1315,7 +1315,8 @@ static int cg_test_mounted_fs(void) goto done; } - while (strcmp(ent->mnt_type, "cgroup") != 0) { + while (strcmp(ent->mnt_type, "cgroup") != 0 && + strcmp(ent->mnt_type, "cgroup2") != 0) { ent = getmntent_r(proc_mount, temp_ent, mntent_buff, sizeof(mntent_buff)); if (ent == NULL) { -- 2.25.3 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel