btrfs-progs: use IEC units for sizes

As implemented now, we use 1024 based units but reporting 1000 based,
let's finally fix that and add optional unit bases later.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
David Sterba 2013-07-10 19:30:51 +02:00
parent e1779e6460
commit 76f0b7e187
1 changed files with 1 additions and 2 deletions

View File

@ -1173,8 +1173,7 @@ out:
return ret;
}
static char *size_strs[] = { "", "KB", "MB", "GB", "TB",
"PB", "EB"};
static char *size_strs[] = { "", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"};
void pretty_size_snprintf(u64 size, char *str, size_t str_bytes)
{
int num_divs = 0;