summaryrefslogtreecommitdiffstats
path: root/sbin/dump/optr.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-02-16 20:22:26 +0000
committeriedowse <iedowse@FreeBSD.org>2002-02-16 20:22:26 +0000
commitcafeeb5d7be874d586a3728bd7361f5a495421af (patch)
tree0f2cc2d71524fe237caf317ec2d68debc75c7a24 /sbin/dump/optr.c
parent77112edb7c995791e7b74003c00e1e2656aab983 (diff)
downloadFreeBSD-src-cafeeb5d7be874d586a3728bd7361f5a495421af.zip
FreeBSD-src-cafeeb5d7be874d586a3728bd7361f5a495421af.tar.gz
On receipt of a SIGINFO, schedule an immediate printout of the
percentage complete and remaining time estimate. PR: bin/32138 Submitted by: mi
Diffstat (limited to 'sbin/dump/optr.c')
-rw-r--r--sbin/dump/optr.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index 1c53cdd..a35b550 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -51,6 +51,7 @@ static const char rcsid[] =
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
+#include <signal.h>
#include <unistd.h>
#include <utmp.h>
@@ -195,7 +196,7 @@ timeest()
time_t tnow;
int deltat;
- (void) time((time_t *) &tnow);
+ (void) time(&tnow);
if (tnow >= tschedule) {
tschedule = tnow + 300;
if (blockswritten < 500)
@@ -209,6 +210,16 @@ timeest()
}
}
+/*
+ * Schedule a printout of the estimate in the next call to timeest().
+ */
+void
+infosch(signal)
+ int signal;
+{
+ tschedule = 0;
+}
+
void
#if __STDC__
msg(const char *fmt, ...)
OpenPOWER on IntegriCloud