Issue 65: weed-fs 0.51 does not compile under windows

This commit is contained in:
Chris Lu
2014-03-28 12:18:01 -07:00
parent 59f6a13609
commit 25a3c47def
8 changed files with 58 additions and 71 deletions

View File

@@ -1,10 +1,6 @@
// +build !windows
package stats
import (
"syscall"
)
import ()
type DiskStatus struct {
Dir string
@@ -15,13 +11,6 @@ type DiskStatus struct {
func NewDiskStatus(path string) (disk *DiskStatus) {
disk = &DiskStatus{Dir: path}
fs := syscall.Statfs_t{}
err := syscall.Statfs(path, &fs)
if err != nil {
return
}
disk.All = fs.Blocks * uint64(fs.Bsize)
disk.Free = fs.Bfree * uint64(fs.Bsize)
disk.Used = disk.All - disk.Free
disk.fillInStatus()
return
}