Browse Source

log warning when can't read drift file; allows detection of

corrupt contents. ok henning@
OPENBSD_4_5
stevesk 16 years ago
parent
commit
5e5980c0aa
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/usr.sbin/ntpd/ntpd.c

+ 3
- 1
src/usr.sbin/ntpd/ntpd.c View File

@ -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> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -450,6 +450,8 @@ readfreq(void)
else if (current == 0) { else if (current == 0) {
if (fscanf(fp, "%le", &d) == 1) if (fscanf(fp, "%le", &d) == 1)
ntpd_adjfreq(d, 0); ntpd_adjfreq(d, 0);
else
log_warnx("can't read %s", DRIFTFILE);
} }
fclose(fp); fclose(fp);
} }


Loading…
Cancel
Save