diff options
Diffstat (limited to 'usr.sbin/bind/lib/isccfg')
-rw-r--r-- | usr.sbin/bind/lib/isccfg/Makefile.in | 6 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isccfg/include/isccfg/Makefile.in | 4 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isccfg/include/isccfg/log.h | 54 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isccfg/log.c | 51 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isccfg/namedconf.c | 2 | ||||
-rw-r--r-- | usr.sbin/bind/lib/isccfg/parser.c | 9 |
6 files changed, 12 insertions, 114 deletions
diff --git a/usr.sbin/bind/lib/isccfg/Makefile.in b/usr.sbin/bind/lib/isccfg/Makefile.in index 21aa88d4c52..90c536ad3df 100644 --- a/usr.sbin/bind/lib/isccfg/Makefile.in +++ b/usr.sbin/bind/lib/isccfg/Makefile.in @@ -12,7 +12,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.7 2020/01/20 18:39:24 florian Exp $ +# $Id: Makefile.in,v 1.8 2020/01/21 08:06:56 florian Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -41,11 +41,11 @@ LIBS = @LIBS@ SUBDIRS = include # Alphabetically -OBJS = dnsconf.@O@ log.@O@ namedconf.@O@ \ +OBJS = dnsconf.@O@ namedconf.@O@ \ parser.@O@ version.@O@ # Alphabetically -SRCS = dnsconf.c log.c namedconf.c \ +SRCS = dnsconf.c namedconf.c \ parser.c version.c TARGETS = timestamp diff --git a/usr.sbin/bind/lib/isccfg/include/isccfg/Makefile.in b/usr.sbin/bind/lib/isccfg/include/isccfg/Makefile.in index 4e1f29f8f4d..f57922730e7 100644 --- a/usr.sbin/bind/lib/isccfg/include/isccfg/Makefile.in +++ b/usr.sbin/bind/lib/isccfg/include/isccfg/Makefile.in @@ -12,7 +12,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.4 2020/01/20 18:39:24 florian Exp $ +# $Id: Makefile.in,v 1.5 2020/01/21 08:06:56 florian Exp $ srcdir = @srcdir@ VPATH = @srcdir@ @@ -25,7 +25,7 @@ VERSION=@BIND9_VERSION@ # machine generated. The latter are handled specially in the # install target below. # -HEADERS = cfg.h dnsconf.h grammar.h log.h namedconf.h \ +HEADERS = cfg.h dnsconf.h grammar.h namedconf.h \ version.h SUBDIRS = diff --git a/usr.sbin/bind/lib/isccfg/include/isccfg/log.h b/usr.sbin/bind/lib/isccfg/include/isccfg/log.h deleted file mode 100644 index b3c47d34e9b..00000000000 --- a/usr.sbin/bind/lib/isccfg/include/isccfg/log.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* $Id: log.h,v 1.4 2020/01/09 14:18:30 florian Exp $ */ - -#ifndef ISCCFG_LOG_H -#define ISCCFG_LOG_H 1 - -/*! \file isccfg/log.h */ - -#include <isc/lang.h> -#include <isc/log.h> - -extern isc_logcategory_t cfg_categories[]; -extern isc_logmodule_t cfg_modules[]; - -#define CFG_LOGCATEGORY_CONFIG (&cfg_categories[0]) - -#define CFG_LOGMODULE_PARSER (&cfg_modules[0]) - -ISC_LANG_BEGINDECLS - -void -cfg_log_init(isc_log_t *lctx); -/*%< - * Make the libisccfg categories and modules available for use with the - * ISC logging library. - * - * Requires: - *\li lctx is a valid logging context. - * - *\li cfg_log_init() is called only once. - * - * Ensures: - * \li The categories and modules defined above are available for - * use by isc_log_usechannnel() and isc_log_write(). - */ - -ISC_LANG_ENDDECLS - -#endif /* ISCCFG_LOG_H */ diff --git a/usr.sbin/bind/lib/isccfg/log.c b/usr.sbin/bind/lib/isccfg/log.c deleted file mode 100644 index a9a270a33ad..00000000000 --- a/usr.sbin/bind/lib/isccfg/log.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* $Id: log.c,v 1.4 2020/01/09 14:18:30 florian Exp $ */ - -/*! \file */ - -#include <config.h> - -#include <isc/util.h> - -#include <isccfg/log.h> - -/*% - * When adding a new category, be sure to add the appropriate - * \#define to <isccfg/log.h>. - */ -isc_logcategory_t cfg_categories[] = { - { "config", 0 }, - { NULL, 0 } -}; - -/*% - * When adding a new module, be sure to add the appropriate - * \#define to <isccfg/log.h>. - */ -isc_logmodule_t cfg_modules[] = { - { "isccfg/parser", 0 }, - { NULL, 0 } -}; - -void -cfg_log_init(isc_log_t *lctx) { - REQUIRE(lctx != NULL); - - isc_log_registercategories(lctx, cfg_categories); - isc_log_registermodules(lctx, cfg_modules); -} diff --git a/usr.sbin/bind/lib/isccfg/namedconf.c b/usr.sbin/bind/lib/isccfg/namedconf.c index cbe1961277d..7b0e0d44c98 100644 --- a/usr.sbin/bind/lib/isccfg/namedconf.c +++ b/usr.sbin/bind/lib/isccfg/namedconf.c @@ -33,7 +33,7 @@ #include <isccfg/cfg.h> #include <isccfg/grammar.h> -#include <isccfg/log.h> + #define TOKEN_STRING(pctx) (pctx->token.value.as_textregion.base) diff --git a/usr.sbin/bind/lib/isccfg/parser.c b/usr.sbin/bind/lib/isccfg/parser.c index cae99bfa0d8..18c49812526 100644 --- a/usr.sbin/bind/lib/isccfg/parser.c +++ b/usr.sbin/bind/lib/isccfg/parser.c @@ -37,11 +37,14 @@ #include <isccfg/cfg.h> #include <isccfg/grammar.h> -#include <isccfg/log.h> + + +isc_logcategory_t cfg_category = { "config", 0 }; +isc_logmodule_t cfg_module = { "isccfg/parser", 0 }; /* Shorthand */ -#define CAT CFG_LOGCATEGORY_CONFIG -#define MOD CFG_LOGMODULE_PARSER +#define CAT &cfg_category +#define MOD &cfg_module #define MAP_SYM 1 /* Unique type for isc_symtab */ |