mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
069fdc8a08
Changes most references of syscall to golang.org/x/sys/
Ones aren't changes include, Errno, Signal and SysProcAttr
as they haven't been implemented in /x/sys/.
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
[s390x] switch utsname from unsigned to signed
per 33267e036f
char in s390x in the /x/sys/unix package is now signed, so
change the buildtags
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
19 lines
420 B
Go
19 lines
420 B
Go
package graphdriver
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
var (
|
|
// Slice of drivers that should be used in an order
|
|
priority = []string{
|
|
"zfs",
|
|
}
|
|
)
|
|
|
|
// Mounted checks if the given path is mounted as the fs type
|
|
func Mounted(fsType FsMagic, mountPath string) (bool, error) {
|
|
var buf unix.Statfs_t
|
|
if err := syscall.Statfs(mountPath, &buf); err != nil {
|
|
return false, err
|
|
}
|
|
return FsMagic(buf.Type) == fsType, nil
|
|
}
|