fix: removed unused code
Signed-off-by: Pablo Caderno <kaderno@gmail.com>pull/14158/head
parent
3494ae1c8c
commit
cd4428dfdd
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue