]> 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:04:17 +0000 (05:04 +0000)
committerMark Andrews <marka@isc.org>
Fri, 27 May 2011 05:04:17 +0000 (05:04 +0000)
lib/dns/include/dns/masterdump.h
lib/dns/include/dns/rdataset.h
lib/dns/masterdump.c
lib/dns/rdataset.c

index 42521b33596ecd1531b3aab47ac8645149858b9f..7a0a0f4e90ac3b81ffeb1230823b49914b25d81f 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.h,v 1.42 2008/09/24 02:46:23 marka Exp $ */
+/* $Id: masterdump.h,v 1.42.50.1 2011/05/27 05:04:17 marka Exp $ */
 
 #ifndef DNS_MASTERDUMP_H
 #define DNS_MASTERDUMP_H 1
@@ -332,9 +332,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 93c51812f3a3a9ecefa7fc661b5546a93dac2018..a406a59200c93846eb3686a6c6750e8f63b41afc 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdataset.h,v 1.65.50.4 2010/02/25 10:56:41 tbox Exp $ */
+/* $Id: rdataset.h,v 1.65.50.5 2011/05/27 05:04:17 marka Exp $ */
 
 #ifndef DNS_RDATASET_H
 #define DNS_RDATASET_H 1
@@ -650,6 +650,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 077512f38a80588ea1b06deba585d6de613c6dd5..43dabff48a8fd64505ed703acd1a77a491ad1586 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.c,v 1.94.50.8 2011/03/18 09:09:45 fdupont Exp $ */
+/* $Id: masterdump.c,v 1.94.50.9 2011/05/27 05:04:17 marka Exp $ */
 
 /*! \file */
 
@@ -773,26 +773,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,
@@ -831,12 +811,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 e2e5867e39ff8fce9ae6cdb18f4b6a92a4d40433..da3f4e11c78213be9bd57578fd1ff3261871176b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdataset.c,v 1.82.50.6 2011/03/12 04:57:27 tbox Exp $ */
+/* $Id: rdataset.c,v 1.82.50.7 2011/05/27 05:04:17 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) {