github.com/giuseppe/storage@v1.12.13/drivers/driver_freebsd.go (about) 1 package graphdriver 2 3 import ( 4 "syscall" 5 6 "golang.org/x/sys/unix" 7 ) 8 9 var ( 10 // Slice of drivers that should be used in an order 11 priority = []string{ 12 "zfs", 13 } 14 ) 15 16 // Mounted checks if the given path is mounted as the fs type 17 func Mounted(fsType FsMagic, mountPath string) (bool, error) { 18 var buf unix.Statfs_t 19 if err := syscall.Statfs(mountPath, &buf); err != nil { 20 return false, err 21 } 22 return FsMagic(buf.Type) == fsType, nil 23 }