github.com/Prakhar-Agarwal-byte/moby@v0.0.0-20231027092010-a14e3e8ab87e/daemon/graphdriver/driver_freebsd.go (about)

     1  package graphdriver // import "github.com/Prakhar-Agarwal-byte/moby/daemon/graphdriver"
     2  
     3  import (
     4  	"syscall"
     5  
     6  	"golang.org/x/sys/unix"
     7  )
     8  
     9  // List of drivers that should be used in an order
    10  var priority = "zfs"
    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 unix.Statfs_t
    15  	if err := syscall.Statfs(mountPath, &buf); err != nil {
    16  		return false, err
    17  	}
    18  	return FsMagic(buf.Type) == fsType, nil
    19  }