diff options
author | Kevin Steves <stevesk@cvs.openbsd.org> | 2009-01-29 00:06:05 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@cvs.openbsd.org> | 2009-01-29 00:06:05 +0000 |
commit | 4d655fc8f959e871cd54f9bcfce5aa9588b5e969 (patch) | |
tree | 2ae255e44731a38aaf019ff5ef37758cb979d222 /usr.sbin/ntpd/ntpd.c | |
parent | d4e1f0494804ade4b8c72c2b522cf30850ca4fd0 (diff) |
log warning when can't read drift file; allows detection of
corrupt contents. ok henning@
Diffstat (limited to 'usr.sbin/ntpd/ntpd.c')
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index fcffb36ed5e..dbab4a44d19 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.61 2008/07/19 21:31:39 claudio Exp $ */ +/* $OpenBSD: ntpd.c,v 1.62 2009/01/29 00:06:04 stevesk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -450,6 +450,8 @@ readfreq(void) else if (current == 0) { if (fscanf(fp, "%le", &d) == 1) ntpd_adjfreq(d, 0); + else + log_warnx("can't read %s", DRIFTFILE); } fclose(fp); } |