Module Name: src
Committed By: christos
Date: Fri Mar 6 00:44:04 UTC 2015
Modified Files:
src/external/bsd/bind/dist/bin/named: main.c
Log Message:
Print syslog errors in one line, like we do for stderr so that the
duplicate line detection of syslogd can merge them.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/bind/dist/bin/named/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/bind/dist/bin/named/main.c
diff -u src/external/bsd/bind/dist/bin/named/main.c:1.16 src/external/bsd/bind/dist/bin/named/main.c:1.17
--- src/external/bsd/bind/dist/bin/named/main.c:1.16 Sun Jan 25 10:51:53 2015
+++ src/external/bsd/bind/dist/bin/named/main.c Thu Mar 5 19:44:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.16 2015/01/25 15:51:53 christos Exp $ */
+/* $NetBSD: main.c,v 1.17 2015/03/06 00:44:04 christos Exp $ */
/*
* Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
@@ -283,12 +283,12 @@ library_unexpected_error(const char *fil
*/
if (ns_g_lctx != NULL) {
- isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
- NS_LOGMODULE_MAIN, ISC_LOG_ERROR,
- "%s:%d: unexpected error:", file, line);
+ char fmt[2048];
+ snprintf(fmt, sizeof(fmt),
+ "%s:%d: unexpected error: %s", file, line, format);
isc_log_vwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_MAIN, ISC_LOG_ERROR,
- format, args);
+ fmt, args);
} else {
fprintf(stderr, "%s:%d: fatal error: ", file, line);
vfprintf(stderr, format, args);