//go:build !windows
// +build !windows

package zciyon

import (
	"syscall"
)

func Ciy_sys_getdisk(drive string) map[string]int {
	sf := syscall.Statfs_t{}
	err := syscall.Statfs(drive, &sf)
	if err != nil {
		return nil
	}
	ret := map[string]int{}
	ret["all"] = int(sf.Blocks * uint64(sf.Bsize))
	ret["free"] = int(sf.Bfree * uint64(sf.Bsize))
	ret["available"] = int(sf.Bavail * uint64(sf.Bsize))
	return ret
}
