Skip to content

Commit

Permalink
Merge pull request opencontainers#2303 from KentaTada/remove-unneeded…
Browse files Browse the repository at this point in the history
…-syscall-import

libcontainer: remove unneeded import
  • Loading branch information
crosbymichael authored Apr 9, 2020
2 parents 9a93b73 + e58a406 commit d65ba5f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libcontainer/cgroups/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"strconv"
"strings"
"sync"
"syscall"
"time"

units "github.com/docker/go-units"
Expand Down Expand Up @@ -43,8 +42,8 @@ var HugePageSizeUnitList = []string{"B", "KB", "MB", "GB", "TB", "PB"}
// IsCgroup2UnifiedMode returns whether we are running in cgroup v2 unified mode.
func IsCgroup2UnifiedMode() bool {
isUnifiedOnce.Do(func() {
var st syscall.Statfs_t
if err := syscall.Statfs(unifiedMountpoint, &st); err != nil {
var st unix.Statfs_t
if err := unix.Statfs(unifiedMountpoint, &st); err != nil {
panic("cannot statfs cgroup root")
}
isUnified = st.Type == unix.CGROUP2_SUPER_MAGIC
Expand Down

0 comments on commit d65ba5f

Please sign in to comment.