mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
vircgroup: introduce virCgroupV2HasController
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
e1bb7fffe2
commit
c8f08a5346
@ -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,
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user