driver_freebsd.go 409 B

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