aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/fetch
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2005-12-30 18:17:11 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2005-12-30 18:17:11 +0000
commit0c878744964c1142549a1f241d73d09d2984f7e3 (patch)
tree26f932ab5275eb12dc649ca50332bf3bbb7546e7 /usr.bin/fetch
parent830dab99f0ac6d86bc53db699defbdb5c5841479 (diff)
downloadsrc-0c878744964c1142549a1f241d73d09d2984f7e3.tar.gz
src-0c878744964c1142549a1f241d73d09d2984f7e3.zip
Notes
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r--usr.bin/fetch/fetch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index 2834e0b5902c..e37e2843a191 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -202,8 +202,12 @@ stat_display(struct xferstat *xs, int force)
fprintf(stderr, "\r%-46.46s", xs->name);
if (xs->size <= 0) {
+ setproctitle("%s [%s]", xs->name, stat_bytes(xs->rcvd));
fprintf(stderr, " %s", stat_bytes(xs->rcvd));
} else {
+ setproctitle("%s [%d%% of %s]", xs->name,
+ (int)((100.0 * xs->rcvd) / xs->size),
+ stat_bytes(xs->size));
fprintf(stderr, "%3d%% of %s",
(int)((100.0 * xs->rcvd) / xs->size),
stat_bytes(xs->size));