diff --git a/libcontainer/configs/cgroup_unsupported.go b/libcontainer/configs/cgroup_unsupported.go index 95e2830a..101d82a1 100644 --- a/libcontainer/configs/cgroup_unsupported.go +++ b/libcontainer/configs/cgroup_unsupported.go @@ -1,4 +1,4 @@ -// +build !windows,!linux,!freebsd +// +build !windows,!linux package configs diff --git a/libcontainer/configs/device_defaults.go b/libcontainer/configs/device_defaults.go index 4d348d21..e4f423c5 100644 --- a/libcontainer/configs/device_defaults.go +++ b/libcontainer/configs/device_defaults.go @@ -1,4 +1,4 @@ -// +build linux freebsd +// +build linux package configs diff --git a/libcontainer/devices/devices_test.go b/libcontainer/devices/devices_test.go index e804eff0..5d68804b 100644 --- a/libcontainer/devices/devices_test.go +++ b/libcontainer/devices/devices_test.go @@ -1,4 +1,4 @@ -// +build linux freebsd +// +build linux package devices diff --git a/libcontainer/mount/mount_freebsd.go b/libcontainer/mount/mount_freebsd.go deleted file mode 100644 index 4f32edcd..00000000 --- a/libcontainer/mount/mount_freebsd.go +++ /dev/null @@ -1,41 +0,0 @@ -package mount - -/* -#include -#include -#include -*/ -import "C" - -import ( - "fmt" - "reflect" - "unsafe" -) - -// Parse /proc/self/mountinfo because comparing Dev and ino does not work from -// bind mounts. -func parseMountTable() ([]*Info, error) { - var rawEntries *C.struct_statfs - - count := int(C.getmntinfo(&rawEntries, C.MNT_WAIT)) - if count == 0 { - return nil, fmt.Errorf("Failed to call getmntinfo") - } - - var entries []C.struct_statfs - header := (*reflect.SliceHeader)(unsafe.Pointer(&entries)) - header.Cap = count - header.Len = count - header.Data = uintptr(unsafe.Pointer(rawEntries)) - - var out []*Info - for _, entry := range entries { - var mountinfo Info - mountinfo.Mountpoint = C.GoString(&entry.f_mntonname[0]) - mountinfo.Source = C.GoString(&entry.f_mntfromname[0]) - mountinfo.Fstype = C.GoString(&entry.f_fstypename[0]) - out = append(out, &mountinfo) - } - return out, nil -} diff --git a/libcontainer/mount/mount_unsupported.go b/libcontainer/mount/mount_unsupported.go index 8245f01d..6cde1ed7 100644 --- a/libcontainer/mount/mount_unsupported.go +++ b/libcontainer/mount/mount_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!freebsd freebsd,!cgo +// +build !linux package mount diff --git a/libcontainer/stats_freebsd.go b/libcontainer/stats_freebsd.go deleted file mode 100644 index f8d1d689..00000000 --- a/libcontainer/stats_freebsd.go +++ /dev/null @@ -1,5 +0,0 @@ -package libcontainer - -type Stats struct { - Interfaces []*NetworkInterface -} diff --git a/libcontainer/system/sysconfig.go b/libcontainer/system/sysconfig.go index b3a07cba..b8434f10 100644 --- a/libcontainer/system/sysconfig.go +++ b/libcontainer/system/sysconfig.go @@ -1,4 +1,4 @@ -// +build cgo,linux cgo,freebsd +// +build cgo,linux package system