Print the `99.99% done, finished soon' message only as often as the

normal status messages. Previously a large number of these new
messages could be spewed out towards the end of a dump.

Reviewed by:	imp
This commit is contained in:
Ian Dowse 2004-06-19 22:41:18 +00:00
parent 6ed979574f
commit b2fb183206
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130753

View File

@ -192,11 +192,14 @@ timeest(void)
time_t tnow, tdone;
int deltat, hours, mins;
(void)time(&tnow);
if (blockswritten > tapesize) {
setproctitle("%s: 99.99%% done, finished soon", disk);
msg("99.99%% done, finished soon\n");
if (tnow >= tschedule) {
tschedule = tnow + 300;
msg("99.99%% done, finished soon\n");
}
} else {
(void) time(&tnow);
deltat = (blockswritten == 0) ? 0 : tstart_writing - tnow +
(double)(tnow - tstart_writing) / blockswritten * tapesize;
tdone = tnow + deltat;