diff options
author | des <des@FreeBSD.org> | 2005-12-30 18:17:11 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2005-12-30 18:17:11 +0000 |
commit | b2e56535e35be8c6f2bd79f0cb4ccdd99ad071ea (patch) | |
tree | 26f932ab5275eb12dc649ca50332bf3bbb7546e7 /usr.bin/fetch/fetch.c | |
parent | 31d71e45b2e3446dafbbc76476a8bda125a3d6ff (diff) | |
download | FreeBSD-src-b2e56535e35be8c6f2bd79f0cb4ccdd99ad071ea.zip FreeBSD-src-b2e56535e35be8c6f2bd79f0cb4ccdd99ad071ea.tar.gz |
Reflect progress in process title.
Submitted by: flz
MFC after: 2 weeks
Diffstat (limited to 'usr.bin/fetch/fetch.c')
-rw-r--r-- | usr.bin/fetch/fetch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 2834e0b5..e37e284 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)); |