diff options
author | bluhm <bluhm@openbsd.org> | 2017-03-21 12:06:55 +0000 |
---|---|---|
committer | bluhm <bluhm@openbsd.org> | 2017-03-21 12:06:55 +0000 |
commit | 9b2c1562932ce8ef5a9c88720f87a65f2e0ed290 (patch) | |
tree | e95ec72e2bab693103fbc2539fd53344a59af6c1 /usr.sbin/route6d | |
parent | Export CROSSDIR so that the two users (ld.so and binutils) of that (diff) | |
download | wireguard-openbsd-9b2c1562932ce8ef5a9c88720f87a65f2e0ed290.tar.xz wireguard-openbsd-9b2c1562932ce8ef5a9c88720f87a65f2e0ed290.zip |
From a syslog perspective it does not make sense to log fatal and
warn with the same severity. Switch log_warn() to LOG_ERR and keep
fatal() at LOG_CRIT.
OK reyk@ florian@
Diffstat (limited to 'usr.sbin/route6d')
-rw-r--r-- | usr.sbin/route6d/log.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/route6d/log.c b/usr.sbin/route6d/log.c index 0b1ceb44ea4..3dd3aefe558 100644 --- a/usr.sbin/route6d/log.c +++ b/usr.sbin/route6d/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.2 2017/03/13 21:20:56 bluhm Exp $ */ +/* $OpenBSD: log.c,v 1.3 2017/03/21 12:06:56 bluhm Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -111,17 +111,17 @@ log_warn(const char *emsg, ...) va_list ap; if (emsg == NULL) - logit(LOG_CRIT, "%s", strerror(errno)); + logit(LOG_ERR, "%s", strerror(errno)); else { va_start(ap, emsg); /* best effort to even work in out of memory situations */ if (asprintf(&nfmt, "%s: %s", emsg, strerror(errno)) == -1) { /* we tried it... */ - vlog(LOG_CRIT, emsg, ap); - logit(LOG_CRIT, "%s", strerror(errno)); + vlog(LOG_ERR, emsg, ap); + logit(LOG_ERR, "%s", strerror(errno)); } else { - vlog(LOG_CRIT, nfmt, ap); + vlog(LOG_ERR, nfmt, ap); free(nfmt); } va_end(ap); @@ -134,7 +134,7 @@ log_warnx(const char *emsg, ...) va_list ap; va_start(ap, emsg); - vlog(LOG_CRIT, emsg, ap); + vlog(LOG_ERR, emsg, ap); va_end(ap); } |