Add GetInfo() support for solaris (#5174)

Fixes #5173
This commit is contained in:
Harshavardhana
2017-11-13 12:54:38 -08:00
committed by Dee Koder
parent f460eceb6d
commit 8d59f35523
184 changed files with 43457 additions and 28146 deletions

View File

@@ -29,13 +29,13 @@ func GetInfo(path string) (info Info, err error) {
if err != nil {
return Info{}, err
}
fsReservedBlocks := uint64(s.F_bfree) - uint64(s.F_bavail)
reservedBlocks := uint64(s.F_bfree) - uint64(s.F_bavail)
info = Info{
Total: uint64(s.F_bsize) * (uint64(s.F_blocks) - fsReservedBlocks),
Total: uint64(s.F_bsize) * (uint64(s.F_blocks) - reservedBlocks),
Free: uint64(s.F_bsize) * uint64(s.F_bavail),
Files: uint64(s.F_files),
Ffree: uint64(s.F_ffree),
FSType: getFSType(s.F_fstypename),
FSType: getFSType(s.F_fstypename[:]),
}
return info, nil
}