mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 10:29:15 +00:00
Fix a bug in the stats display that showed up when resuming aborted transfers.
Submitted by: green
This commit is contained in:
parent
da6efda67d
commit
b3c141fd2e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63067
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user