From 84cfc135893546de8b4812d23f5db496331686ab Mon Sep 17 00:00:00 2001 From: Jakob Gruber Date: Thu, 24 Mar 2011 23:34:17 +0100 Subject: Use IEC unit prefixes Display {KiB, MiB, ...} instead of {KB, MB, ...} since that's what's actually being displayed. Signed-off-by: Jakob Gruber Signed-off-by: Dan McGee --- src/pacman/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pacman/util.c b/src/pacman/util.c index 7080b2b7..47d0f00d 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -612,7 +612,7 @@ static char *pkg_get_location(pmpkg_t *pkg) * @param target_unit '\0' or a short label. If equal to one of the short unit * labels ('B', 'K', ...) bytes is converted to target_unit; if '\0', the first * unit which will bring the value to below a threshold of 2048 will be chosen. - * @param long_labels whether to use short ("K") or long ("KB") unit labels + * @param long_labels whether to use short ("K") or long ("KiB") unit labels * @param label will be set to the appropriate unit label * * @return the size in the appropriate unit @@ -621,7 +621,7 @@ double humanize_size(off_t bytes, const char target_unit, int long_labels, const char **label) { static const char *shortlabels[] = {"B", "K", "M", "G", "T", "P"}; - static const char *longlabels[] = {"B", "KB", "MB", "GB", "TB", "PB"}; + static const char *longlabels[] = {"B", "KiB", "MiB", "GiB", "TiB", "PiB"}; static const int unitcount = sizeof(shortlabels) / sizeof(shortlabels[0]); const char **labels = long_labels ? longlabels : shortlabels; -- cgit v1.2.3-70-g09d2