mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 01:34:11 +03:00
vircgroup: introduce virCgroupV2DetectMounts
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
7a86201dd6
commit
50f61a46fc
@ -165,6 +165,21 @@ virCgroupV2CopyPlacement(virCgroupPtr group,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virCgroupV2DetectMounts(virCgroupPtr group,
|
||||
const char *mntType,
|
||||
const char *mntOpts ATTRIBUTE_UNUSED,
|
||||
const char *mntDir)
|
||||
{
|
||||
if (STRNEQ(mntType, "cgroup2"))
|
||||
return 0;
|
||||
|
||||
VIR_FREE(group->unified.mountPoint);
|
||||
|
||||
return VIR_STRDUP(group->unified.mountPoint, mntDir);
|
||||
}
|
||||
|
||||
|
||||
virCgroupBackend virCgroupV2Backend = {
|
||||
.type = VIR_CGROUP_BACKEND_TYPE_V2,
|
||||
|
||||
@ -172,6 +187,7 @@ virCgroupBackend virCgroupV2Backend = {
|
||||
.validateMachineGroup = virCgroupV2ValidateMachineGroup,
|
||||
.copyMounts = virCgroupV2CopyMounts,
|
||||
.copyPlacement = virCgroupV2CopyPlacement,
|
||||
.detectMounts = virCgroupV2DetectMounts,
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user