]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
move dns_trust_totext from masterdump.c to rdataset.c so that exportlib will build
authorMark Andrews <marka@isc.org>
Fri, 27 May 2011 05:03:41 +0000 (05:03 +0000)
committerMark Andrews <marka@isc.org>
Fri, 27 May 2011 05:03:41 +0000 (05:03 +0000)
lib/dns/include/dns/masterdump.h
lib/dns/include/dns/rdataset.h
lib/dns/masterdump.c
lib/dns/rdataset.c

index d13e8150d2ac041be03488667df2b710d0c8d833..0f734b2f1bdc95aaaf240e49b28d7da9e90cadd5 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.h,v 1.31.14.5 2011/05/27 01:46:22 marka Exp $ */
+/* $Id: masterdump.h,v 1.31.14.6 2011/05/27 05:03:41 marka Exp $ */
 
 #ifndef DNS_MASTERDUMP_H
 #define DNS_MASTERDUMP_H 1
@@ -329,9 +329,6 @@ dns_master_stylecreate(dns_master_style_t **style, unsigned int flags,
 void
 dns_master_styledestroy(dns_master_style_t **style, isc_mem_t *mctx);
 
-const char *
-dns_trust_totext(dns_trust_t trust);
-
 ISC_LANG_ENDDECLS
 
 #endif /* DNS_MASTERDUMP_H */
index 4d3578cc496a8286c92755adfffbbd7a6d27402b..cb78bfeef97c71874db58cca53c60dd5dd6fbffd 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdataset.h,v 1.51.18.11 2010/02/26 23:46:37 tbox Exp $ */
+/* $Id: rdataset.h,v 1.51.18.12 2011/05/27 05:03:41 marka Exp $ */
 
 #ifndef DNS_RDATASET_H
 #define DNS_RDATASET_H 1
@@ -608,6 +608,12 @@ dns_rdataset_expire(dns_rdataset_t *rdataset);
  * Mark the rdataset to be expired in the backing database.
  */
 
+const char *
+dns_trust_totext(dns_trust_t trust);
+/*
+ * Display trust in textual form.
+ */
+
 ISC_LANG_ENDDECLS
 
 #endif /* DNS_RDATASET_H */
index 8b9d0c2c26fed59a205379331aea8c4237deb0ea..9d060d295f8298b2086f60c00f492e9d98142f18 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.c,v 1.73.18.20 2011/05/27 01:46:22 marka Exp $ */
+/* $Id: masterdump.c,v 1.73.18.21 2011/05/27 05:03:40 marka Exp $ */
 
 /*! \file */
 
@@ -772,26 +772,6 @@ dump_order_compare(const void *a, const void *b) {
 
 #define MAXSORT 64
 
-static const char *trustnames[] = {
-       "none",
-       "pending-additional",
-       "pending-answer",
-       "additional",
-       "glue",
-       "answer",
-       "authauthority",
-       "authanswer",
-       "secure",
-       "local" /* aka ultimate */
-};
-
-const char *
-dns_trust_totext(dns_trust_t trust) {
-        if (trust >= sizeof(trustnames)/sizeof(*trustnames))
-                return ("bad");
-        return (trustnames[trust]);
-}
-
 static isc_result_t
 dump_rdatasets_text(isc_mem_t *mctx, dns_name_t *name,
                    dns_rdatasetiter_t *rdsiter, dns_totext_ctx_t *ctx,
@@ -830,12 +810,8 @@ dump_rdatasets_text(isc_mem_t *mctx, dns_name_t *name,
 
        for (i = 0; i < n; i++) {
                dns_rdataset_t *rds = sorted[i];
-               if (ctx->style.flags & DNS_STYLEFLAG_TRUST) {
-                       unsigned int trust = rds->trust;
-                       INSIST(trust < (sizeof(trustnames) /
-                                       sizeof(trustnames[0])));
-                       fprintf(f, "; %s\n", trustnames[trust]);
-               }
+               if (ctx->style.flags & DNS_STYLEFLAG_TRUST)
+                       fprintf(f, "; %s\n", dns_trust_totext(rds->trust));
                if (rds->type == 0 &&
                    (ctx->style.flags & DNS_STYLEFLAG_NCACHE) == 0) {
                        /* Omit negative cache entries */
index 56a386a9b51e3bfb193eb2025b95166d97aeda7f..0b6e0cdfd0ef20145ed49a7b0b415971ce1f9466 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdataset.c,v 1.72.18.9 2010/02/26 23:46:36 tbox Exp $ */
+/* $Id: rdataset.c,v 1.72.18.10 2011/05/27 05:03:40 marka Exp $ */
 
 /*! \file */
 
 #include <dns/rdataset.h>
 #include <dns/compress.h>
 
+static const char *trustnames[] = {
+       "none",
+       "pending-additional",
+       "pending-answer",
+       "additional",
+       "glue",
+       "answer",
+       "authauthority",
+       "authanswer",
+       "secure",
+       "local" /* aka ultimate */
+};
+
+const char *
+dns_trust_totext(dns_trust_t trust) {
+       if (trust >= sizeof(trustnames)/sizeof(*trustnames))
+               return ("bad");
+       return (trustnames[trust]);
+}
+
 void
 dns_rdataset_init(dns_rdataset_t *rdataset) {