From: Colin Vidal Date: Fri, 7 Nov 2025 17:56:39 +0000 (+0100) Subject: remove --memstats from cfg_test X-Git-Tag: v9.21.17~63^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15aa160e2e4c5bbfa2764be9437d3787d4ad453e;p=thirdparty%2Fbind9.git remove --memstats from cfg_test The `--memstats` option from cfg_test is unused, and even if used, does nothing because `--memstats` relies on `isc_mem_stats` which dump memory pools statistics, which are not used at all for configuration. Also, dropping the option avoid to add a parser API to get the memory stats (as the parser now uses the global memory context). --- diff --git a/doc/misc/cfg_test.c b/doc/misc/cfg_test.c index cb17b35e1b9..5ef29e45fcf 100644 --- a/doc/misc/cfg_test.c +++ b/doc/misc/cfg_test.c @@ -35,7 +35,7 @@ static void usage(void) { fprintf(stderr, "usage: cfg_test --rndc|--named " "[--grammar] [--zonegrammar] [--active] " - "[--memstats] conffile\n"); + "conffile\n"); exit(EXIT_FAILURE); } @@ -55,7 +55,6 @@ main(int argc, char **argv) { cfg_obj_t *cfg = NULL; cfg_type_t *type = NULL; bool grammar = false; - bool memstats = false; char *filename = NULL; unsigned int zonetype = 0; unsigned int pflags = 0; @@ -108,8 +107,6 @@ main(int argc, char **argv) { } else { usage(); } - } else if (strcmp(argv[1], "--memstats") == 0) { - memstats = true; } else if (strcmp(argv[1], "--named") == 0) { type = &cfg_type_namedconf; } else if (strcmp(argv[1], "--rndc") == 0) { @@ -146,13 +143,6 @@ main(int argc, char **argv) { cfg_obj_detach(&cfg); } - if (memstats) { - /* - * TODO: this is memstat of config that we are interested in - * here, right? - */ - isc_mem_stats(mctx, stderr); - } isc_mem_detach(&mctx); fflush(stdout);