aboutsummaryrefslogtreecommitdiff
path: root/go/stats/disk.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2014-03-28 12:18:01 -0700
committerChris Lu <chris.lu@gmail.com>2014-03-28 12:18:01 -0700
commit25a3c47defd1b9dab22942eeffd10b550e8ac527 (patch)
tree04f79ec81901e511fe9e4e48da5ce00f8b7524d0 /go/stats/disk.go
parent59f6a13609e63d23ffd4410edce38223a5705232 (diff)
downloadseaweedfs-25a3c47defd1b9dab22942eeffd10b550e8ac527.tar.xz
seaweedfs-25a3c47defd1b9dab22942eeffd10b550e8ac527.zip
Issue 65: weed-fs 0.51 does not compile under windows
Diffstat (limited to 'go/stats/disk.go')
-rw-r--r--go/stats/disk.go15
1 files changed, 2 insertions, 13 deletions
diff --git a/go/stats/disk.go b/go/stats/disk.go
index d0ffcd679..d5275e571 100644
--- a/go/stats/disk.go
+++ b/go/stats/disk.go
@@ -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
}