gopkg.in/dotcloud/docker.v1@v1.13.1/daemon/graphdriver/driver_freebsd.go (about)

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