Merge pull request #68 from filecoin-project/fix/darwin
Fix build on osx
This commit is contained in:
commit
f0dae546b5
@ -13,5 +13,5 @@ var log = logging.Logger("fsutil")
|
||||
func Deallocate(file *os.File, offset int64, length int64) error {
|
||||
log.Warnf("deallocating space not supported")
|
||||
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
@ -20,6 +20,6 @@ func FileSize(path string) (SizeInfo, error) {
|
||||
// NOTE: stat.Blocks is in 512B blocks, NOT in stat.Blksize
|
||||
// See https://www.gnu.org/software/libc/manual/html_node/Attribute-Meanings.html
|
||||
return SizeInfo{
|
||||
stat.Blocks * 512,
|
||||
int64(stat.Blocks) * 512,
|
||||
}, nil
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ func Statfs(path string) (FsStat, error) {
|
||||
}
|
||||
|
||||
return FsStat{
|
||||
Capacity: int64(stat.Blocks) * stat.Bsize,
|
||||
Available: int64(stat.Bavail) * stat.Bsize,
|
||||
Capacity: int64(stat.Blocks) * int64(stat.Bsize),
|
||||
Available: int64(stat.Bavail) * int64(stat.Bsize),
|
||||
}, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user