summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Gruber <jakob.gruber@gmail.com>2011-03-24 23:34:17 +0100
committerDan McGee <dan@archlinux.org>2011-04-20 17:31:56 -0500
commit84cfc135893546de8b4812d23f5db496331686ab (patch)
treece7376e8b439016c13ef169028d92db87aaf7b13 /src
parent3c8a448a2ff6b433059b1beb3a35cfd67c148d0c (diff)
downloadpacman-84cfc135893546de8b4812d23f5db496331686ab.tar.xz
Use IEC unit prefixes
Display {KiB, MiB, ...} instead of {KB, MB, ...} since that's what's actually being displayed. Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c4
1 files changed, 2 insertions, 2 deletions
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;