summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dhcrelay6
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2017-03-21 12:38:23 +0000
committerbluhm <bluhm@openbsd.org>2017-03-21 12:38:23 +0000
commit89044269eb539d9f535931ac9adfeba8143de79d (patch)
tree9e83d6e605ecf9d887fc828cae0d28236609b8f9 /usr.sbin/dhcrelay6
parentFrom a syslog perspective it does not make sense to log fatal and (diff)
downloadwireguard-openbsd-89044269eb539d9f535931ac9adfeba8143de79d.tar.xz
wireguard-openbsd-89044269eb539d9f535931ac9adfeba8143de79d.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. I have missed dhcrelay6 and slaacd in my previous conversion as they were added recently.
Diffstat (limited to 'usr.sbin/dhcrelay6')
-rw-r--r--usr.sbin/dhcrelay6/log.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/dhcrelay6/log.c b/usr.sbin/dhcrelay6/log.c
index 3ceb9faf08b..d261550cc76 100644
--- a/usr.sbin/dhcrelay6/log.c
+++ b/usr.sbin/dhcrelay6/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.1 2017/03/17 14:45:16 rzalamena Exp $ */
+/* $OpenBSD: log.c,v 1.2 2017/03/21 12:38:23 bluhm Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -105,17 +105,17 @@ log_warn(const char *emsg, ...)
/* best effort to even work in out of memory situations */
if (emsg == NULL)
- logit(LOG_CRIT, "%s", strerror(saved_errno));
+ logit(LOG_ERR, "%s", strerror(saved_errno));
else {
va_start(ap, emsg);
if (asprintf(&nfmt, "%s: %s", emsg,
strerror(saved_errno)) == -1) {
/* we tried it... */
- vlog(LOG_CRIT, emsg, ap);
- logit(LOG_CRIT, "%s", strerror(saved_errno));
+ vlog(LOG_ERR, emsg, ap);
+ logit(LOG_ERR, "%s", strerror(saved_errno));
} else {
- vlog(LOG_CRIT, nfmt, ap);
+ vlog(LOG_ERR, nfmt, ap);
free(nfmt);
}
va_end(ap);
@@ -130,7 +130,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);
}