VictoriaMetrics/lib/fs/fs_openbsd.go
Nikolay Khramchikhin 658a05ef0f added openbsd implementations (#790)
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/785

removed fadvise for openbsd, added freespace implemenation for openbsd
2020-09-29 00:43:19 +03:00

9 lines
148 B
Go

package fs
import (
"golang.org/x/sys/unix"
)
func freeSpace(stat unix.Statfs_t) uint64 {
return uint64(stat.F_bavail) * uint64(stat.F_bsize)
}