directory structure change to work with glide

glide has its own requirements. My previous workaround caused me some
code checkin errors. Need to fix this.
This commit is contained in:
Chris Lu
2016-06-02 18:09:14 -07:00
parent caeffa3998
commit 5ce6bbf076
166 changed files with 296 additions and 272 deletions

View File

@@ -0,0 +1,19 @@
// +build !windows,!openbsd,!netbsd,!plan9,!solaris
package stats
import (
"syscall"
)
func (disk *DiskStatus) fillInStatus() {
fs := syscall.Statfs_t{}
err := syscall.Statfs(disk.Dir, &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
return
}