summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/ldpd.c
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2011-08-20 19:02:29 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2011-08-20 19:02:29 +0000
commitabb7f3e568a613a7d6daf6af3556386e08bfee52 (patch)
treee138e84c6cdd55dfd8570964868e01deff349f80 /usr.sbin/ldpd/ldpd.c
parent564f667f41c7007f68568b2bbaabd0b6204a0055 (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/ldpd/ldpd.c')
-rw-r--r--usr.sbin/ldpd/ldpd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/ldpd.c b/usr.sbin/ldpd/ldpd.c
index 948679fa4fa..3ad0b161273 100644
--- a/usr.sbin/ldpd/ldpd.c
+++ b/usr.sbin/ldpd/ldpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpd.c,v 1.12 2010/09/01 13:54:54 claudio Exp $ */
+/* $OpenBSD: ldpd.c,v 1.13 2011/08/20 19:02:28 sthen Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -134,6 +134,7 @@ main(int argc, char *argv[])
ldpd_process = PROC_MAIN;
log_init(1); /* log to stderr until daemonized */
+ log_verbose(1);
while ((ch = getopt(argc, argv, "dD:f:nv")) != -1) {
switch (ch) {
@@ -155,7 +156,6 @@ main(int argc, char *argv[])
if (opts & LDPD_OPT_VERBOSE)
opts |= LDPD_OPT_VERBOSE2;
opts |= LDPD_OPT_VERBOSE;
- log_verbose(1);
break;
default:
usage();
@@ -189,6 +189,7 @@ main(int argc, char *argv[])
errx(1, "unknown user %s", LDPD_USER);
log_init(debug);
+ log_verbose(opts & LDPD_OPT_VERBOSE);
if (!debug)
daemon(1, 0);