libcontainer: drop FreeBSD support
runc is not supported on FreeBSD, so remove all FreeBSD specific bits. As suggested by @crosbymichael in #1653 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This commit is contained in:
parent
fb6ec65b36
commit
4d27f20db0
|
@ -1,4 +1,4 @@
|
||||||
// +build !windows,!linux,!freebsd
|
// +build !windows,!linux
|
||||||
|
|
||||||
package configs
|
package configs
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// +build linux freebsd
|
// +build linux
|
||||||
|
|
||||||
package configs
|
package configs
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// +build linux freebsd
|
// +build linux
|
||||||
|
|
||||||
package devices
|
package devices
|
||||||
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
package mount
|
|
||||||
|
|
||||||
/*
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/ucred.h>
|
|
||||||
#include <sys/mount.h>
|
|
||||||
*/
|
|
||||||
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
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
// +build !linux,!freebsd freebsd,!cgo
|
// +build !linux
|
||||||
|
|
||||||
package mount
|
package mount
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
package libcontainer
|
|
||||||
|
|
||||||
type Stats struct {
|
|
||||||
Interfaces []*NetworkInterface
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
// +build cgo,linux cgo,freebsd
|
// +build cgo,linux
|
||||||
|
|
||||||
package system
|
package system
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue