diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-22 15:54:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-22 15:54:32 -0500 |
commit | 8b377a79c240e4480339358db3b87263ec6cfef3 (patch) | |
tree | f57534fd15a79aa24f816d641fd8bc47213bbd59 /pkg/cgroups/cgroups_supported.go | |
parent | 94b53a2d4aaf8795506f7f778f11cb887056ff50 (diff) | |
parent | 2511b508009918c4b20620cead2ef5dd48129069 (diff) | |
download | podman-8b377a79c240e4480339358db3b87263ec6cfef3.tar.gz podman-8b377a79c240e4480339358db3b87263ec6cfef3.tar.bz2 podman-8b377a79c240e4480339358db3b87263ec6cfef3.zip |
Merge pull request #4920 from openSUSE/cgroup2-super-magic
Use cgroupv2 super magic from golang.org/x/sys/unix
Diffstat (limited to 'pkg/cgroups/cgroups_supported.go')
-rw-r--r-- | pkg/cgroups/cgroups_supported.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/cgroups/cgroups_supported.go b/pkg/cgroups/cgroups_supported.go index 2a36777d4..a9fef38b9 100644 --- a/pkg/cgroups/cgroups_supported.go +++ b/pkg/cgroups/cgroups_supported.go @@ -12,6 +12,7 @@ import ( "syscall" "github.com/pkg/errors" + "golang.org/x/sys/unix" ) var ( @@ -27,7 +28,7 @@ func IsCgroup2UnifiedMode() (bool, error) { if err := syscall.Statfs("/sys/fs/cgroup", &st); err != nil { isUnified, isUnifiedErr = false, err } else { - isUnified, isUnifiedErr = st.Type == _cgroup2SuperMagic, nil + isUnified, isUnifiedErr = st.Type == unix.CGROUP2_SUPER_MAGIC, nil } }) return isUnified, isUnifiedErr |