Commit 0f76e713 authored by Shirou WAKAYAMA's avatar Shirou WAKAYAMA

fix Disk_usage parameter change.

parent 187d1ede
......@@ -17,11 +17,15 @@ func (d Disk) Disk_usage(path string) (Disk_usage, error) {
Path: path,
Total: (uint64(stat.Blocks) * uint64(bsize)) >> 1,
Free: (uint64(stat.Bfree) * uint64(bsize)) >> 1,
Available: (uint64(stat.Bavail) * uint64(bsize)) >> 1,
}
ret.Used = (ret.Total - ret.Free)
ret.Percent = (float64(ret.Used) / float64(ret.Total)) * 100.0
ret.UsedPercent = (float64(ret.Used) / float64(ret.Total)) * 100.0
return ret, nil
}
func (d Disk) Disk_partitions() ([]Disk_partition, error) {
ret := make([]Disk_partition, 0)
return ret, nil
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment