mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
Make minio server compile on OpenBSD, NetBSD, Solaris (#3719)
This commit is contained in:
committed by
Harshavardhana
parent
0c7694894b
commit
e5773e11c6
11
cmd/posix.go
11
cmd/posix.go
@@ -153,11 +153,20 @@ func getDiskInfo(diskPath string) (di disk.Info, err error) {
|
||||
return di, err
|
||||
}
|
||||
|
||||
// List of operating systems where we ignore disk space
|
||||
// verification.
|
||||
var ignoreDiskFreeOS = []string{
|
||||
globalWindowsOSName,
|
||||
globalNetBSDOSName,
|
||||
globalSolarisOSName,
|
||||
}
|
||||
|
||||
// checkDiskFree verifies if disk path has sufficient minimum free disk space and files.
|
||||
func (s *posix) checkDiskFree() (err error) {
|
||||
// We don't validate disk space or inode utilization on windows.
|
||||
// Each windows calls to 'GetVolumeInformationW' takes around 3-5seconds.
|
||||
if runtime.GOOS == globalWindowsOSName {
|
||||
// And StatFS is not supported by Go for solaris and netbsd.
|
||||
if contains(ignoreDiskFreeOS, runtime.GOOS) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user