libct: align param type for mountCgroupV1/V2 functions

Signed-off-by: lifubang <lifubang@acmcoder.com>
This commit is contained in:
lifubang
2025-05-08 15:13:04 +00:00
committed by Aleksa Sarai
parent a1ea773c3b
commit 7aa42ade85
+5 -5
View File
@@ -295,8 +295,8 @@ func cleanupTmp(tmpdir string) {
_ = os.RemoveAll(tmpdir)
}
func mountCgroupV1(m *configs.Mount, c *mountConfig) error {
binds, err := getCgroupMounts(m)
func mountCgroupV1(m mountEntry, c *mountConfig) error {
binds, err := getCgroupMounts(m.Mount)
if err != nil {
return err
}
@@ -366,7 +366,7 @@ func mountCgroupV1(m *configs.Mount, c *mountConfig) error {
return nil
}
func mountCgroupV2(m *configs.Mount, c *mountConfig) error {
func mountCgroupV2(m mountEntry, c *mountConfig) error {
err := utils.WithProcfd(c.root, m.Destination, func(dstFd string) error {
return mountViaFds(m.Source, nil, m.Destination, dstFd, "cgroup2", uintptr(m.Flags), m.Data)
})
@@ -737,9 +737,9 @@ func mountToRootfs(c *mountConfig, m mountEntry) error {
return setRecAttr(m.Mount, rootfs)
case "cgroup":
if cgroups.IsCgroup2UnifiedMode() {
return mountCgroupV2(m.Mount, c)
return mountCgroupV2(m, c)
}
return mountCgroupV1(m.Mount, c)
return mountCgroupV1(m, c)
default:
return mountPropagate(m, rootfs, mountLabel)
}