From d09713fe406f7cf90d5bd2c29dfe4c74e39a8735 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Wed, 12 Apr 2023 20:39:13 +0000 Subject: [PATCH] libprocessgroup: fix task_profile_test to correctly detect cgroup v2 Use correct attribute of the mntent to check for cgroup v2 entry. Bug: 277233783 Change-Id: Ie34b89b610117b8ce043f2f18947273d75618fef Signed-off-by: Suren Baghdasaryan --- libprocessgroup/task_profiles_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libprocessgroup/task_profiles_test.cpp b/libprocessgroup/task_profiles_test.cpp index 09ac44c6b..c449e951d 100644 --- a/libprocessgroup/task_profiles_test.cpp +++ b/libprocessgroup/task_profiles_test.cpp @@ -43,7 +43,7 @@ bool IsCgroupV2Mounted() { } struct mntent* mnt; while ((mnt = getmntent(mnts.get()))) { - if (strcmp(mnt->mnt_fsname, "cgroup2") == 0) { + if (strcmp(mnt->mnt_type, "cgroup2") == 0) { return true; } }