2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

clean up unused API

the dns_adb_dumpfind() function was only used inside adb.c and
can be static. dns_view_dumpdbtostream() was not used anywhere.
This commit is contained in:
Evan Hunt 2022-05-25 12:02:18 -07:00
parent a8ddca1917
commit 7cac4ca03c
4 changed files with 5 additions and 60 deletions

View File

@ -2880,8 +2880,8 @@ dump_entry(FILE *f, dns_adb_t *adb, dns_adbentry_t *entry, bool debug,
}
}
void
dns_adb_dumpfind(dns_adbfind_t *find, FILE *f) {
static void
dumpfind(dns_adbfind_t *find, FILE *f) {
char tmp[512];
const char *tmpp = NULL;
dns_adbaddrinfo_t *ai = NULL;
@ -2971,7 +2971,7 @@ print_find_list(FILE *f, dns_adbname_t *name) {
find = ISC_LIST_HEAD(name->finds);
while (find != NULL) {
dns_adb_dumpfind(find, f);
dumpfind(find, f);
find = ISC_LIST_NEXT(find, plink);
}
}

View File

@ -454,29 +454,15 @@ dns_adb_destroyfind(dns_adbfind_t **find);
void
dns_adb_dump(dns_adb_t *adb, FILE *f);
/*%<
* This function is only used for debugging. It will dump as much of the
* state of the running system as possible.
* Used by "rndc dumpdb": Dump the state of the running ADB.
*
* Requires:
*
*\li adb be valid.
*\li adb is valid.
*
*\li f != NULL, and is a file open for writing.
*/
void
dns_adb_dumpfind(dns_adbfind_t *find, FILE *f);
/*%<
* This function is only used for debugging. Dump the data associated
* with a find.
*
* Requires:
*
*\li find is valid.
*
* \li f != NULL, and is a file open for writing.
*/
isc_result_t
dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
const dns_name_t *qname, dns_rdatatype_t type,

View File

@ -868,28 +868,6 @@ dns_view_dialup(dns_view_t *view);
* Perform dialup-time maintenance on the zones of 'view'.
*/
isc_result_t
dns_view_dumpdbtostream(dns_view_t *view, FILE *fp);
/*%<
* Dump the current state of the view 'view' to the stream 'fp'
* for purposes of analysis or debugging.
*
* Currently the dumped state includes the view's cache; in the future
* it may also include other state such as the address database.
* It will not not include authoritative data since it is voluminous and
* easily obtainable by other means.
*
* Requires:
*
*\li 'view' is valid.
*
*\li 'fp' refers to a file open for writing.
*
* Returns:
* \li ISC_R_SUCCESS The cache was successfully dumped.
* \li others An error occurred (see dns_master_dump)
*/
isc_result_t
dns_view_flushcache(dns_view_t *view, bool fixuponly);
/*%<

View File

@ -1472,25 +1472,6 @@ dns_view_checksig(dns_view_t *view, isc_buffer_t *source, dns_message_t *msg) {
view->dynamickeys));
}
isc_result_t
dns_view_dumpdbtostream(dns_view_t *view, FILE *fp) {
isc_result_t result;
REQUIRE(DNS_VIEW_VALID(view));
(void)fprintf(fp, ";\n; Cache dump of view '%s'\n;\n", view->name);
result = dns_master_dumptostream(view->mctx, view->cachedb, NULL,
&dns_master_style_cache,
dns_masterformat_text, NULL, fp);
if (result != ISC_R_SUCCESS) {
return (result);
}
dns_adb_dump(view->adb, fp);
dns_resolver_printbadcache(view->resolver, fp);
dns_badcache_print(view->failcache, "SERVFAIL cache", fp);
return (ISC_R_SUCCESS);
}
isc_result_t
dns_view_flushcache(dns_view_t *view, bool fixuponly) {
isc_result_t result;