diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2011-08-20 19:02:29 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2011-08-20 19:02:29 +0000 |
commit | abb7f3e568a613a7d6daf6af3556386e08bfee52 (patch) | |
tree | e138e84c6cdd55dfd8570964868e01deff349f80 /usr.sbin/ospf6d | |
parent | 564f667f41c7007f68568b2bbaabd0b6204a0055 (diff) |
Decouple log_verbose() from log_init() so the verbose flag stays set with
"-v" (previously only "-vd" worked). Similar to recent ospfd commit.
ok claudio@
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r-- | usr.sbin/ospf6d/log.c | 3 | ||||
-rw-r--r-- | usr.sbin/ospf6d/ospf6d.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ospf6d/log.c b/usr.sbin/ospf6d/log.c index 1eab0730003..2e34697b5cb 100644 --- a/usr.sbin/ospf6d/log.c +++ b/usr.sbin/ospf6d/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.6 2009/12/22 17:45:47 claudio Exp $ */ +/* $OpenBSD: log.c,v 1.7 2011/08/20 19:02:28 sthen Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -51,7 +51,6 @@ log_init(int n_debug) extern char *__progname; debug = n_debug; - verbose = n_debug; if (!debug) openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON); diff --git a/usr.sbin/ospf6d/ospf6d.c b/usr.sbin/ospf6d/ospf6d.c index 68187ef26eb..5583c50479d 100644 --- a/usr.sbin/ospf6d/ospf6d.c +++ b/usr.sbin/ospf6d/ospf6d.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospf6d.c,v 1.21 2010/08/22 21:15:25 bluhm Exp $ */ +/* $OpenBSD: ospf6d.c,v 1.22 2011/08/20 19:02:28 sthen Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -135,6 +135,7 @@ main(int argc, char *argv[]) ospfd_process = PROC_MAIN; log_init(1); /* log to stderr until daemonized */ + log_verbose(1); while ((ch = getopt(argc, argv, "cdD:f:nv")) != -1) { switch (ch) { @@ -210,6 +211,7 @@ main(int argc, char *argv[]) errx(1, "unknown user %s", OSPF6D_USER); log_init(debug); + log_verbose(ospfd_conf->opts & OSPFD_OPT_VERBOSE); if (!debug) daemon(1, 0); |