mirror of
https://gitlab.isc.org/isc-projects/bind9.git
synced 2025-12-05 18:57:04 -06:00
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).
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user