|
|
@ -133,13 +133,9 @@ func printObjectAPIMsg() { |
|
|
|
|
|
|
|
|
|
|
|
// Get formatted disk/storage info message.
|
|
|
|
// Get formatted disk/storage info message.
|
|
|
|
func getStorageInfoMsg(storageInfo StorageInfo) string { |
|
|
|
func getStorageInfoMsg(storageInfo StorageInfo) string { |
|
|
|
freeSpace := uint64(storageInfo.Free) |
|
|
|
msg := fmt.Sprintf("%s %s Free, %s Total", colorBlue("Drive Capacity:"), |
|
|
|
totalSpace := uint64(storageInfo.Total) |
|
|
|
humanize.IBytes(uint64(storageInfo.Free)), |
|
|
|
if storageInfo.Backend.Type == XL { |
|
|
|
humanize.IBytes(uint64(storageInfo.Total))) |
|
|
|
freeSpace /= 2 |
|
|
|
|
|
|
|
totalSpace /= 2 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
msg := fmt.Sprintf("%s %s Free, %s Total", colorBlue("Drive Capacity:"), humanize.IBytes(freeSpace), humanize.IBytes(totalSpace)) |
|
|
|
|
|
|
|
diskInfo := fmt.Sprintf(" %d Online, %d Offline. We can withstand [%d] more drive failure(s).", |
|
|
|
diskInfo := fmt.Sprintf(" %d Online, %d Offline. We can withstand [%d] more drive failure(s).", |
|
|
|
storageInfo.Backend.OnlineDisks, |
|
|
|
storageInfo.Backend.OnlineDisks, |
|
|
|
storageInfo.Backend.OfflineDisks, |
|
|
|
storageInfo.Backend.OfflineDisks, |
|
|
|