]> 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>
Thu, 26 May 2011 07:56:39 +0000 (07:56 +0000)
committerMark Andrews <marka@isc.org>
Thu, 26 May 2011 07:56:39 +0000 (07:56 +0000)
lib/dns/include/dns/masterdump.h
lib/dns/include/dns/rdataset.h
lib/dns/masterdump.c
lib/dns/rdataset.c

index 2f255d8edc76e37fb21b5acd460878092d7c8873..99e1caeece8c2346cac1ae3c5cf1363c399e524c 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.h,v 1.44 2011/03/05 23:52:30 tbox Exp $ */
+/* $Id: masterdump.h,v 1.45 2011/05/26 07:56:39 marka Exp $ */
 
 #ifndef DNS_MASTERDUMP_H
 #define DNS_MASTERDUMP_H 1
@@ -338,9 +338,6 @@ dns_master_stylecreate2(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 d4b4ebfc3041c5b8838f91335de33bc89a24bd20..7ffa55387e89497a87cfb75308f842425cd18aab 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdataset.h,v 1.69 2010/02/25 05:08:01 tbox Exp $ */
+/* $Id: rdataset.h,v 1.70 2011/05/26 07:56:39 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 f9b592ef28f13beb68226b37206471ff77b0cb6e..121b024110385b78ae1b25c7194b16273ce3222e 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: masterdump.c,v 1.106 2011/03/20 02:31:54 marka Exp $ */
+/* $Id: masterdump.c,v 1.107 2011/05/26 07:56:38 marka Exp $ */
 
 /*! \file */
 
@@ -839,26 +839,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,
@@ -897,12 +877,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 f2774b5d1bca6520493353daab6f6e5d578132af..0f957f18dcc0b18f5307dd47e280414d64d960c7 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdataset.c,v 1.88 2011/03/12 04:59:48 tbox Exp $ */
+/* $Id: rdataset.c,v 1.89 2011/05/26 07:56:38 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) {