Use binary prefixes (KiB, MiB, GiB...). Fixes #6551.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38533 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b0c5015140
commit
7fd93693fd
@ -131,10 +131,10 @@ size_to_string(off_t byteCount, char* name)
|
||||
float divisor;
|
||||
const char* format;
|
||||
} scale[] = {
|
||||
{ 0x100000, 1024.0, "%.2f KB" },
|
||||
{ 0x40000000, 1048576.0, "%.2f MB" },
|
||||
{ 0x10000000000ull, 1073741824.0, "%.2f GB" },
|
||||
{ 0x4000000000000ull, 1.09951162778e+12, "%.2f TB" }
|
||||
{ 0x100000, 1024.0, "%.2f KiB" },
|
||||
{ 0x40000000, 1048576.0, "%.2f MiB" },
|
||||
{ 0x10000000000ull, 1073741824.0, "%.2f GiB" },
|
||||
{ 0x4000000000000ull, 1.09951162778e+12, "%.2f TiB" }
|
||||
};
|
||||
|
||||
if (byteCount < 1024) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user