mirror of
https://github.com/minio/minio.git
synced 2025-11-26 04:26:12 -05:00
@@ -1,7 +1,7 @@
|
||||
// +build darwin freebsd dragonfly
|
||||
// +build darwin dragonfly
|
||||
|
||||
/*
|
||||
* MinIO Cloud Storage, (C) 2015, 2016, 2017 MinIO, Inc.
|
||||
* MinIO Cloud Storage, (C) 2015-2021 MinIO, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,12 +30,12 @@ func GetInfo(path string) (info Info, err error) {
|
||||
if err != nil {
|
||||
return Info{}, err
|
||||
}
|
||||
reservedBlocks := uint64(s.Bfree) - uint64(s.Bavail)
|
||||
reservedBlocks := s.Bfree - s.Bavail
|
||||
info = Info{
|
||||
Total: uint64(s.Bsize) * (uint64(s.Blocks) - reservedBlocks),
|
||||
Free: uint64(s.Bsize) * uint64(s.Bavail),
|
||||
Files: uint64(s.Files),
|
||||
Ffree: uint64(s.Ffree),
|
||||
Total: uint64(s.Bsize) * (s.Blocks - reservedBlocks),
|
||||
Free: uint64(s.Bsize) * s.Bavail,
|
||||
Files: s.Files,
|
||||
Ffree: s.Ffree,
|
||||
FSType: getFSType(s.Fstypename[:]),
|
||||
}
|
||||
if info.Free > info.Total {
|
||||
|
||||
Reference in New Issue
Block a user