github.com/sams1990/dockerrepo@v17.12.1-ce-rc2+incompatible/daemon/graphdriver/driver_freebsd.go (about)

     1  package 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  }