mirror of
https://github.com/containers/podman.git
synced 2025-11-02 06:37:09 +08:00
Bump github.com/containers/common from 0.6.1 to 0.8.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.6.1 to 0.8.0. - [Release notes](https://github.com/containers/common/releases) - [Commits](https://github.com/containers/common/compare/v0.6.1...v0.8.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
committed by
Daniel J Walsh
parent
ccb9e579c4
commit
eb86bfc344
27
vendor/github.com/containers/common/pkg/cgroupv2/cgroups_linux.go
generated
vendored
Normal file
27
vendor/github.com/containers/common/pkg/cgroupv2/cgroups_linux.go
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
package cgroupv2
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
var (
|
||||
isCgroupV2Once sync.Once
|
||||
isCgroupV2 bool
|
||||
isCgroupV2Err error
|
||||
)
|
||||
|
||||
// Enabled returns whether we are running in cgroup 2 cgroup2 mode.
|
||||
func Enabled() (bool, error) {
|
||||
isCgroupV2Once.Do(func() {
|
||||
var st syscall.Statfs_t
|
||||
if err := syscall.Statfs("/sys/fs/cgroup", &st); err != nil {
|
||||
isCgroupV2, isCgroupV2Err = false, err
|
||||
} else {
|
||||
isCgroupV2, isCgroupV2Err = st.Type == unix.CGROUP2_SUPER_MAGIC, nil
|
||||
}
|
||||
})
|
||||
return isCgroupV2, isCgroupV2Err
|
||||
}
|
||||
8
vendor/github.com/containers/common/pkg/cgroupv2/cgroups_unsupported.go
generated
vendored
Normal file
8
vendor/github.com/containers/common/pkg/cgroupv2/cgroups_unsupported.go
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// +build !linux
|
||||
|
||||
package cgroupv2
|
||||
|
||||
// Enabled returns whether we are running in cgroup 2 cgroup2 mode.
|
||||
func Enabled() (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
Reference in New Issue
Block a user