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