libcontainer: remove unneeded import

Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
This commit is contained in:
Kenta Tada 2020-04-09 20:14:39 +09:00
parent 9a93b7378c
commit e58a406b77
1 changed files with 2 additions and 3 deletions

View File

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