Merge pull request #14158 from kadern0/issue-12842-partB

fix: removed unused code
pull/12739/head
Steven Powell 2022-05-16 13:01:32 -07:00 committed by GitHub
commit cb6f73223b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 22 deletions

View File

@ -22,23 +22,12 @@ import (
"fmt"
"os"
"path"
"syscall"
"github.com/opencontainers/runc/libcontainer/cgroups"
"golang.org/x/sys/unix"
"k8s.io/klog/v2"
)
// IsCgroup2UnifiedMode returns whether we are running in cgroup 2 cgroup2 mode.
func IsCgroup2UnifiedMode() (bool, error) {
var st syscall.Statfs_t
if err := syscall.Statfs("/sys/fs/cgroup", &st); err != nil {
return false, err
}
return st.Type == unix.CGROUP2_SUPER_MAGIC, nil
}
// findCgroupMountpoints returns the cgroups mount point
// defined in docker engine engine/pkg/sysinfo/sysinfo_linux.go
func findCgroupMountpoints() (map[string]string, error) {

View File

@ -18,17 +18,6 @@ limitations under the License.
package oci
import (
"runtime"
"github.com/pkg/errors"
)
// IsCgroup2UnifiedMode returns whether we are running in cgroup 2 cgroup2 mode.
func IsCgroup2UnifiedMode() (bool, error) {
return false, errors.Errorf("Not supported on %s", runtime.GOOS)
}
func HasMemoryCgroup() bool {
return true
}