diff options
author | iedowse <iedowse@FreeBSD.org> | 2004-06-19 22:41:18 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2004-06-19 22:41:18 +0000 |
commit | 516e3c359bd5549b57a8750bf4cc83812824e679 (patch) | |
tree | 231714057716e22e755a7259a9ec8965fa83e7e1 /sbin/dump | |
parent | ffba897cc784ba0a20aede4306e2c1dbfb1ebec6 (diff) | |
download | FreeBSD-src-516e3c359bd5549b57a8750bf4cc83812824e679.zip FreeBSD-src-516e3c359bd5549b57a8750bf4cc83812824e679.tar.gz |
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
Diffstat (limited to 'sbin/dump')
-rw-r--r-- | sbin/dump/optr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index aa2c06a..8c1f3c1 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -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; |