mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
vircgroup: introduce virCgroupV2ValidatePlacement
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
1efcf202e7
commit
9aa8226d86
@ -205,6 +205,20 @@ virCgroupV2DetectPlacement(virCgroupPtr group,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virCgroupV2ValidatePlacement(virCgroupPtr group,
|
||||
pid_t pid ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (!group->unified.placement) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Could not find placement for v2 controller"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
virCgroupBackend virCgroupV2Backend = {
|
||||
.type = VIR_CGROUP_BACKEND_TYPE_V2,
|
||||
|
||||
@ -214,6 +228,7 @@ virCgroupBackend virCgroupV2Backend = {
|
||||
.copyPlacement = virCgroupV2CopyPlacement,
|
||||
.detectMounts = virCgroupV2DetectMounts,
|
||||
.detectPlacement = virCgroupV2DetectPlacement,
|
||||
.validatePlacement = virCgroupV2ValidatePlacement,
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user