summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin/named/db_dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind/bin/named/db_dump.c')
-rw-r--r--contrib/bind/bin/named/db_dump.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/contrib/bind/bin/named/db_dump.c b/contrib/bind/bin/named/db_dump.c
index a350719..26daa6f 100644
--- a/contrib/bind/bin/named/db_dump.c
+++ b/contrib/bind/bin/named/db_dump.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)db_dump.c 4.33 (Berkeley) 3/3/91";
-static const char rcsid[] = "$Id: db_dump.c,v 8.49 2001/02/06 06:42:19 marka Exp $";
+static const char rcsid[] = "$Id: db_dump.c,v 8.51 2001/06/18 14:42:49 marka Exp $";
#endif /* not lint */
/*
@@ -120,6 +120,7 @@ static const char rcsid[] = "$Id: db_dump.c,v 8.49 2001/02/06 06:42:19 marka Exp
#include <isc/eventlib.h>
#include <isc/logging.h>
+#include <isc/misc.h>
#include "port_after.h"
@@ -177,7 +178,8 @@ zt_dump(FILE *fp) {
fprintf(fp, ";; ++zone table++\n");
for (zp = &zones[0]; zp < &zones[nzones]; zp++) {
- char *pre, buf[64];
+ const char *pre;
+ char buf[64];
u_int cnt;
if (!zp->z_origin)
@@ -230,7 +232,7 @@ fwd_dump(FILE *fp) {
}
int
-db_dump(struct hashbuf *htp, FILE *fp, int zone, char *origin) {
+db_dump(struct hashbuf *htp, FILE *fp, int zone, const char *origin) {
struct databuf *dp = NULL;
struct namebuf *np;
struct namebuf **npp, **nppend;
@@ -621,9 +623,14 @@ db_dump(struct hashbuf *htp, FILE *fp, int zone, char *origin) {
break;
default:
- fprintf(fp, "%s?d_type=%d?",
- sep, dp->d_type);
- sep = " ";
+ fprintf(fp, "\\# %u", dp->d_size);
+ if (dp->d_size != 0) {
+ fputs(" ( ", fp);
+ isc_puthexstring(fp, dp->d_data,
+ dp->d_size, 40, 48,
+ "\n\t\t\t\t");
+ fputs(" ) ", fp);
+ }
}
if (dp->d_cred < DB_C_ZONE) {
fprintf(fp, "%sCr=%s",
OpenPOWER on IntegriCloud