Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util/vircgroupv2.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
index 3200338fe3..5cd8e86b97 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -298,6 +298,14 @@ virCgroupV2DetectControllers(virCgroupPtr group,
}
+static bool
+virCgroupV2HasController(virCgroupPtr group,
+ int controller)
+{
+ return group->unified.controllers & (1 << controller);
+}
+
+
virCgroupBackend virCgroupV2Backend = {
.type = VIR_CGROUP_BACKEND_TYPE_V2,
@@ -310,6 +318,7 @@ virCgroupBackend virCgroupV2Backend = {
.validatePlacement = virCgroupV2ValidatePlacement,
.stealPlacement = virCgroupV2StealPlacement,
.detectControllers = virCgroupV2DetectControllers,
+ .hasController = virCgroupV2HasController,
};
--
2.17.1