From 4d655fc8f959e871cd54f9bcfce5aa9588b5e969 Mon Sep 17 00:00:00 2001 From: Kevin Steves Date: Thu, 29 Jan 2009 00:06:05 +0000 Subject: log warning when can't read drift file; allows detection of corrupt contents. ok henning@ --- usr.sbin/ntpd/ntpd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.sbin/ntpd/ntpd.c') 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 @@ -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); } -- cgit v1.2.3