fixed capacity display
This commit is contained in:
parent
4c6aa1f19c
commit
c13182b77f
|
@ -47,13 +47,13 @@ uint32_t Drive::getPowerCycles(void)
|
|||
}
|
||||
|
||||
string Drive::sCapacityToText() {
|
||||
if(getCapacity() <= (999*1000000000U)) {
|
||||
if(getCapacity() <= (999*1000000000UL)) {
|
||||
// Less or even 999 GB --> GB
|
||||
return to_string(getCapacity() / 1000000000U) + " GB";
|
||||
return to_string(getCapacity() / 1000000000UL) + " GB";
|
||||
}
|
||||
else {
|
||||
// More 999 GB --> TB
|
||||
return to_string(getCapacity() / 1000000000000U) + " TB";
|
||||
return to_string(getCapacity() / 1000000000000UL) + " TB";
|
||||
}
|
||||
return "ERROR";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue