From 1b1ce1d4eabef2f290d1d18cb0015f7efc83cfa5 Mon Sep 17 00:00:00 2001 From: Chris Kuethe Date: Wed, 22 Aug 2007 21:04:31 +0000 Subject: Allow ntpd to log sensor offsets and adjtime calls to syslog at LOG_DEBUG priority. ok gwk, mbalmer, weingart "explicit non-ok from" henning --- usr.sbin/ntpd/ntpd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'usr.sbin/ntpd/ntpd.c') diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 75930d1f5c2..cae33baade4 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.49 2007/01/15 08:19:11 otto Exp $ */ +/* $OpenBSD: ntpd.c,v 1.50 2007/08/22 21:04:30 ckuethe Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -48,6 +48,7 @@ volatile sig_atomic_t quit = 0; volatile sig_atomic_t reconfig = 0; volatile sig_atomic_t sigchld = 0; struct imsgbuf *ibuf; +int debugsyslog = 0; void sighdlr(int sig) @@ -71,7 +72,7 @@ usage(void) { extern char *__progname; - fprintf(stderr, "usage: %s [-dSs] [-f file]\n", __progname); + fprintf(stderr, "usage: %s [-dSsv] [-f file]\n", __progname); exit(1); } @@ -95,7 +96,7 @@ main(int argc, char *argv[]) log_init(1); /* log to stderr until daemonized */ res_init(); /* XXX */ - while ((ch = getopt(argc, argv, "df:sS")) != -1) { + while ((ch = getopt(argc, argv, "df:sSv")) != -1) { switch (ch) { case 'd': lconf.debug = 1; @@ -109,6 +110,9 @@ main(int argc, char *argv[]) case 'S': lconf.settime = 0; break; + case 'v': + debugsyslog = 1; + break; default: usage(); /* NOTREACHED */ -- cgit v1.2.3