diff options
author | des <des@FreeBSD.org> | 2000-07-13 08:37:39 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-07-13 08:37:39 +0000 |
commit | 9ced9463554050d5ab35e1fb0fdc6ff38ca2daa5 (patch) | |
tree | 2dd8a925a5e9a932d9ef049a2d59997a4e1a8229 /usr.bin/fetch/fetch.c | |
parent | 29771b8acdc3f9a9bb0466f00ce0079b24a7e44d (diff) | |
download | FreeBSD-src-9ced9463554050d5ab35e1fb0fdc6ff38ca2daa5.zip FreeBSD-src-9ced9463554050d5ab35e1fb0fdc6ff38ca2daa5.tar.gz |
Fix a bug in the stats display that showed up when resuming aborted transfers.
Submitted by: green
Diffstat (limited to 'usr.bin/fetch/fetch.c')
-rw-r--r-- | usr.bin/fetch/fetch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 94d77b1..d6aa1fb 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -125,7 +125,7 @@ stat_display(struct xferstat *xs, int force) fprintf(stderr, ": %lld bytes", xs->rcvd); else fprintf(stderr, " (%lld bytes): %d%%", xs->size, - (int)((100.0 * (xs->rcvd + xs->offset)) / xs->size)); + (int)((100.0 * xs->rcvd) / xs->size)); } void @@ -137,7 +137,7 @@ stat_start(struct xferstat *xs, char *name, off_t size, off_t offset) xs->end = xs->last; xs->size = size; xs->offset = offset; - xs->rcvd = 0; + xs->rcvd = offset; stat_display(xs, 1); } |