summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-07 09:16:10 -0600
committerDan McGee <dan@archlinux.org>2011-11-07 09:16:10 -0600
commit1a994bf180003b814b135a5acd6f3e2aa67121fc (patch)
tree98f542ca7515e911f2bbd6549ef62f78f3269fe7 /src
parent90477f156c18659eee6e8be75122169060309990 (diff)
parente7b56f48d704f57f023d7ca3cdc9d492fb31a9cb (diff)
downloadpacman-1a994bf180003b814b135a5acd6f3e2aa67121fc.tar.xz
Merge branch 'maint'
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 6f39013f..14d80486 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -699,8 +699,11 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
xfered_human = humanize_size(xfered, '\0', &xfered_label);
printf(" %ls%-*s ", wcfname, padwid, "");
- /* We will show 1.6M/s, 11.6M/s, but 116K/s and 1116K/s */
- if(rate_human < 100.0) {
+ /* We will show 1.62M/s, 11.6M/s, but 116K/s and 1116K/s */
+ if(rate_human < 9.995) {
+ printf("%6.1f %3s %4.2f%c/s ",
+ xfered_human, xfered_label, rate_human, rate_label[0]);
+ } else if(rate_human < 99.95) {
printf("%6.1f %3s %4.1f%c/s ",
xfered_human, xfered_label, rate_human, rate_label[0]);
} else {