]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb/tdb_private.h
tdb: enforce hashing, via example hash in old rwlocks entry in header.
[ccan] / ccan / tdb / tdb_private.h
index 228e8dcf9b09eaedf64fd166b8a683deb50070a0..16f5d925c0954e2105ed63eeb969a45a374ad9cb 100644 (file)
@@ -176,7 +176,7 @@ struct tdb_header {
        char magic_food[32]; /* for /etc/magic */
        uint32_t version; /* version of the code */
        uint32_t hash_size; /* number of hash entries */
-       tdb_off_t rwlocks; /* obsolete - kept to detect old formats */
+       tdb_off_t hashcheck; /* 0 for default hash. */
        tdb_off_t recovery_start; /* offset of transaction recovery region */
        tdb_off_t sequence_number; /* used when TDB_SEQNUM is set */
        tdb_off_t reserved[29];
@@ -248,6 +248,7 @@ struct tdb_context {
 /*
   internal prototypes
 */
+uint32_t hashcheck(struct tdb_context *tdb);
 int tdb_munmap(struct tdb_context *tdb);
 void tdb_mmap(struct tdb_context *tdb);
 int tdb_lock(struct tdb_context *tdb, int list, int ltype);