summaryrefslogtreecommitdiffstats
path: root/sbin/adjkerntz
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-04-05 19:17:05 +0000
committerache <ache@FreeBSD.org>1996-04-05 19:17:05 +0000
commitfec10bb459b45fd4b52eae9d85dd3e9c0b425316 (patch)
tree00987ca9e6a865b32d3edc506b723024fc223fa2 /sbin/adjkerntz
parent6233a369535004956f4332ee2e8363b052d37827 (diff)
downloadFreeBSD-src-fec10bb459b45fd4b52eae9d85dd3e9c0b425316.zip
FreeBSD-src-fec10bb459b45fd4b52eae9d85dd3e9c0b425316.tar.gz
Detect if /etc/wall_cmos_clock gone while adjkerntz paused.
Diffstat (limited to 'sbin/adjkerntz')
-rw-r--r--sbin/adjkerntz/adjkerntz.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/adjkerntz/adjkerntz.c b/sbin/adjkerntz/adjkerntz.c
index 4cc1098..8cd3ff9 100644
--- a/sbin/adjkerntz/adjkerntz.c
+++ b/sbin/adjkerntz/adjkerntz.c
@@ -132,6 +132,11 @@ again:
looping = False;
wall_clock = (access(_PATH_CLOCK, F_OK) == 0);
+ if (init && !sleep_mode) {
+ init = False;
+ if (!wall_clock)
+ return 0;
+ }
mib[0] = CTL_MACHDEP;
mib[1] = CPU_ADJKERNTZ;
@@ -335,7 +340,7 @@ recalculate:
/****** End of critical section ******/
if (init && wall_clock) {
- init = False;
+ sleep_mode = False;
/* wait for signals and acts like -a */
(void) sigsuspend(&emask);
goto again;
OpenPOWER on IntegriCloud