fix: removed unused code

Signed-off-by: Pablo Caderno <kaderno@gmail.com>
pull/14158/head
Pablo Caderno 2022-05-13 09:05:42 +10:00
parent 3494ae1c8c
commit cd4428dfdd
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
}