]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
rename qpdb to qpcache
authorEvan Hunt <each@isc.org>
Thu, 7 Mar 2024 01:54:37 +0000 (17:54 -0800)
committerEvan Hunt <each@isc.org>
Fri, 8 Mar 2024 23:36:56 +0000 (15:36 -0800)
move qpdb.c to qpcache.c and rename the "qp" database implementation
to "qpcache", in order to make it more clearly distinguishable from
"qpzone".

configure.ac
lib/dns/Makefile.am
lib/dns/cache.c
lib/dns/db.c
lib/dns/qpcache.c [moved from lib/dns/qpdb.c with 99% similarity]
lib/dns/qpcache_p.h [moved from lib/dns/qpdb_p.h with 80% similarity]
tests/dns/qpdb_test.c
tests/dns/qpzone_test.c

index 070bccf102306e877680903f088961d1ec938715..1c2e1299c9f8a0a4ec2b798a1fdb3b15601d7224 100644 (file)
@@ -1585,13 +1585,13 @@ AS_CASE([$with_zonedb],
 AC_DEFINE_UNQUOTED([ZONEDB_DEFAULT], ["$zonedb"], [Default zone database type])
 
 #
-# Which should be the default zone database, RBTDB or QPDB (based on dns_qp)?
+# Which should be the default zone database, RBTDB or QPCACHE?
 # [pairwise: --with-cachedb=qp, --with-cachedb=rbt]
 #
 AC_ARG_WITH([cachedb],
-           [AS_HELP_STRING([--with-cachedb=detect],[specify default cache database type (default is "qp")])],
+           [AS_HELP_STRING([--with-cachedb=detect],[specify default cache database type (default is "qpcache")])],
            [],[with_cachedb=qp])
-cachedb="qp"
+cachedb="qpcache"
 AS_CASE([$with_cachedb],
        [RBT*|rbt*],[cachedb="rbt"],
         [QP*|qp*],[],
index abf6e2bc5c8c98a8e3f9aabc7dea8284543f6b61..2e6f8d6961d21aad0eca13d51e0720d3abdbbf6b 100644 (file)
@@ -223,8 +223,8 @@ libdns_la_SOURCES =                 \
        rbt-zonedb.c                    \
        rbtdb.c                         \
        rbtdb_p.h                       \
-       qpdb_p.h                        \
-       qpdb.c                          \
+       qpcache.c                               \
+       qpcache_p.h                     \
        rcode.c                         \
        rdata.c                         \
        rdatalist.c                     \
index 902ae732e995d8e68d3e98aa6324a9e1b61e6c18..32853be8d32a874d52d4c735d818e9f45f5f282d 100644 (file)
@@ -91,9 +91,9 @@ cache_create_db(dns_cache_t *cache, dns_db_t **db) {
        char *argv[1] = { 0 };
 
        /*
-        * For databases of type "qp" (which is the only cache
-        * implementation currently in existence) we pass hmctx to
-        * dns_db_create() via argv[0].
+        * For databases of type "qpcache" or "rbt" (which are the
+        * only cache implementations currently in existence) we pass
+        * hmctx to dns_db_create() via argv[0].
         */
        argv[0] = (char *)cache->hmctx;
        result = dns_db_create(cache->mctx, CACHEDB_DEFAULT, dns_rootname,
index 98e2c3f8f9bb60c34cadafe274dac2f77f9b0937..a5612e49fd6a39c824228e4040149ce6a4009df8 100644 (file)
@@ -62,7 +62,7 @@ struct dns_dbimplementation {
  */
 
 #include "db_p.h"
-#include "qpdb_p.h"
+#include "qpcache_p.h"
 #include "qpzone_p.h"
 #include "rbtdb_p.h"
 
@@ -89,8 +89,8 @@ initialize(void) {
        };
 
        qpimp = (dns_dbimplementation_t){
-               .name = "qp",
-               .create = dns__qpdb_create,
+               .name = "qpcache",
+               .create = dns__qpcache_create,
                .link = ISC_LINK_INITIALIZER,
        };
 
similarity index 99%
rename from lib/dns/qpdb.c
rename to lib/dns/qpcache.c
index b5427c2ab61bf790af33860d0d905e5436960693..f9e2d379a2df19b9479fec9d7c18dfad0e7281aa 100644 (file)
@@ -62,7 +62,7 @@
 #include <dns/zonekey.h>
 
 #include "db_p.h"
-#include "qpdb_p.h"
+#include "qpcache_p.h"
 
 #define CHECK(op)                            \
        do {                                 \
@@ -3862,9 +3862,10 @@ unlocknode(dns_db_t *db, dns_dbnode_t *node, isc_rwlocktype_t type) {
 }
 
 isc_result_t
-dns__qpdb_create(isc_mem_t *mctx, const dns_name_t *origin, dns_dbtype_t type,
-                dns_rdataclass_t rdclass, unsigned int argc, char *argv[],
-                void *driverarg ISC_ATTR_UNUSED, dns_db_t **dbp) {
+dns__qpcache_create(isc_mem_t *mctx, const dns_name_t *origin,
+                   dns_dbtype_t type, dns_rdataclass_t rdclass,
+                   unsigned int argc, char *argv[],
+                   void *driverarg ISC_ATTR_UNUSED, dns_db_t **dbp) {
        dns_qpdb_t *qpdb = NULL;
        isc_result_t result;
        isc_mem_t *hmctx = mctx;
similarity index 80%
rename from lib/dns/qpdb_p.h
rename to lib/dns/qpcache_p.h
index b00b712ce3f6f7a097f61f7344ad79457b7de2ca..5992ba77c22ae0d6a7728f2fbcf156b0b8c80329 100644 (file)
 ISC_LANG_BEGINDECLS
 
 isc_result_t
-dns__qpdb_create(isc_mem_t *mctx, const dns_name_t *base, dns_dbtype_t type,
-                dns_rdataclass_t rdclass, unsigned int argc, char *argv[],
-                void *driverarg, dns_db_t **dbp);
+dns__qpcache_create(isc_mem_t *mctx, const dns_name_t *base, dns_dbtype_t type,
+                   dns_rdataclass_t rdclass, unsigned int argc, char *argv[],
+                   void *driverarg, dns_db_t **dbp);
 /*%<
- * Create a new database of type "qp". Called via dns_db_create();
+ * Create a new database of type "qpcache". Called via dns_db_create();
  * see documentation for that function for more details.
  *
  * If argv[0] is set, it points to a valid memory context to be used for
index e7a6a296b017041d558bd711add2cb91c67311ed..d96a59080c0a3775484a1b4463df726f37cd3eb9 100644 (file)
@@ -36,7 +36,7 @@
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wshadow"
 #undef CHECK
-#include "qpdb.c"
+#include "qpcache.c"
 #pragma GCC diagnostic pop
 
 #undef CHECK
index 707bb78e887e8fca6584fb592b24c1f201e653e0..afd4f4285a3ab9f1e3a57f944d087687c151da1b 100644 (file)
@@ -37,9 +37,7 @@
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wshadow"
 #undef CHECK
-#include "db_p.h"
 #include "qpzone.c"
-#include "qpzone_p.h"
 #pragma GCC diagnostic pop
 
 #undef CHECK