aboutsummaryrefslogtreecommitdiff
path: root/sbin/adjkerntz/adjkerntz.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1996-04-05 19:17:05 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1996-04-05 19:17:05 +0000
commit88d807a67619910f80b09f6e0c2fce6f8da8c7e5 (patch)
tree00987ca9e6a865b32d3edc506b723024fc223fa2 /sbin/adjkerntz/adjkerntz.c
parent4297524c49b81935639a67806e50a44a482bca38 (diff)
downloadsrc-88d807a67619910f80b09f6e0c2fce6f8da8c7e5.tar.gz
src-88d807a67619910f80b09f6e0c2fce6f8da8c7e5.zip
Detect if /etc/wall_cmos_clock gone while adjkerntz paused.
Notes
Notes: svn path=/head/; revision=15057
Diffstat (limited to 'sbin/adjkerntz/adjkerntz.c')
-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 4cc109844416..8cd3ff9ce750 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;