From 7e26a2a646877bcd5e03fce6d7347e88f059011e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 27 Mar 2008 03:30:53 +0000 Subject: [PATCH] 2344. [bug] Improve "logging{ file ...; };" documentation. [RT #17888] --- CHANGES | 3 +++ lib/isccfg/namedconf.c | 30 +++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 72a96b120d..f7d68ee4d5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2344. [bug] Improve "logging{ file ...; };" documentation. + [RT #17888] + 2343. [bug] (Seemingly) duplicate IPv6 entries could be created in ADB. [RT #17837] diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 0549518eb1..dfccba50ff 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: namedconf.c,v 1.84 2008/01/22 00:29:03 jinmei Exp $ */ +/* $Id: namedconf.c,v 1.85 2008/03/27 03:30:53 marka Exp $ */ /*! \file */ @@ -1761,6 +1761,7 @@ static isc_result_t parse_logversions(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) { return (parse_enum_or_other(pctx, type, &cfg_type_uint32, ret)); } + static cfg_type_t cfg_type_logversions = { "logversions", parse_logversions, cfg_print_ustring, cfg_doc_terminal, &cfg_rep_string, logversions_enums @@ -1834,8 +1835,19 @@ print_logfile(cfg_printer_t *pctx, const cfg_obj_t *obj) { } } + +static void +doc_logfile(cfg_printer_t *pctx, const cfg_type_t *type) { + UNUSED(type); + cfg_print_cstr(pctx, ""); + cfg_print_chars(pctx, " ", 1); + cfg_print_cstr(pctx, "[ versions ( \"unlimited\" | ) ]"); + cfg_print_chars(pctx, " ", 1); + cfg_print_cstr(pctx, "[ size ]"); +} + static cfg_type_t cfg_type_logfile = { - "log_file", parse_logfile, print_logfile, cfg_doc_terminal, + "log_file", parse_logfile, print_logfile, doc_logfile, &cfg_rep_tuple, logfile_fields }; @@ -1866,8 +1878,8 @@ static cfg_type_t cfg_type_lwres_view = { }; static cfg_type_t cfg_type_lwres_searchlist = { - "lwres_searchlist", cfg_parse_bracketed_list, cfg_print_bracketed_list, cfg_doc_bracketed_list, - &cfg_rep_list, &cfg_type_astring }; + "lwres_searchlist", cfg_parse_bracketed_list, cfg_print_bracketed_list, + cfg_doc_bracketed_list, &cfg_rep_list, &cfg_type_astring }; static cfg_clausedef_t lwres_clauses[] = { @@ -1986,15 +1998,15 @@ doc_sockaddrnameport(cfg_printer_t *pctx, const cfg_type_t *type) { cfg_print_chars(pctx, "( ", 2); cfg_print_cstr(pctx, ""); cfg_print_chars(pctx, " ", 1); - cfg_print_cstr(pctx, "[port ]"); + cfg_print_cstr(pctx, "[ port ]"); cfg_print_chars(pctx, " | ", 3); cfg_print_cstr(pctx, ""); cfg_print_chars(pctx, " ", 1); - cfg_print_cstr(pctx, "[port ]"); + cfg_print_cstr(pctx, "[ port ]"); cfg_print_chars(pctx, " | ", 3); cfg_print_cstr(pctx, ""); cfg_print_chars(pctx, " ", 1); - cfg_print_cstr(pctx, "[port ]"); + cfg_print_cstr(pctx, "[ port ]"); cfg_print_chars(pctx, " )", 2); } @@ -2072,11 +2084,11 @@ doc_masterselement(cfg_printer_t *pctx, const cfg_type_t *type) { cfg_print_chars(pctx, " | ", 3); cfg_print_cstr(pctx, ""); cfg_print_chars(pctx, " ", 1); - cfg_print_cstr(pctx, "[port ]"); + cfg_print_cstr(pctx, "[ port ]"); cfg_print_chars(pctx, " | ", 3); cfg_print_cstr(pctx, ""); cfg_print_chars(pctx, " ", 1); - cfg_print_cstr(pctx, "[port ]"); + cfg_print_cstr(pctx, "[ port ]"); cfg_print_chars(pctx, " )", 2); }