mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 18:03:50 +03:00
vircgroup: introduce virCgroupV2GetAnyController
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
c8f08a5346
commit
171c700cd8
@ -306,6 +306,14 @@ virCgroupV2HasController(virCgroupPtr group,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virCgroupV2GetAnyController(virCgroupPtr group)
|
||||
{
|
||||
/* The least significant bit is position 1. */
|
||||
return ffs(group->unified.controllers) - 1;
|
||||
}
|
||||
|
||||
|
||||
virCgroupBackend virCgroupV2Backend = {
|
||||
.type = VIR_CGROUP_BACKEND_TYPE_V2,
|
||||
|
||||
@ -319,6 +327,7 @@ virCgroupBackend virCgroupV2Backend = {
|
||||
.stealPlacement = virCgroupV2StealPlacement,
|
||||
.detectControllers = virCgroupV2DetectControllers,
|
||||
.hasController = virCgroupV2HasController,
|
||||
.getAnyController = virCgroupV2GetAnyController,
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user