X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Fprivate.h;h=8601a9a48e6497d0a93e3dfefe702ef897053a8e;hp=232229f5e912d076cbbdc337ea43c4ccb032ef8a;hb=4e185ad8ab5a7e01edbbe12d11eb2f1577de7e8b;hpb=576802602c19ed3cfda98414ffc9b118c2675931 diff --git a/ccan/tdb2/private.h b/ccan/tdb2/private.h index 232229f5..8601a9a4 100644 --- a/ccan/tdb2/private.h +++ b/ccan/tdb2/private.h @@ -36,6 +36,7 @@ #include "config.h" #include #include +#include #ifdef HAVE_BYTESWAP_H #include #endif @@ -308,8 +309,8 @@ struct tdb_context { uint32_t flags; /* Logging function */ - tdb_logfn_t log; - void *log_priv; + tdb_logfn_t logfn; + void *log_private; /* Hash function. */ tdb_hashfn_t khash; @@ -328,7 +329,7 @@ struct tdb_context { /* Lock information */ struct tdb_lock_type allrecord_lock; - uint64_t num_lockrecs; + size_t num_lockrecs; struct tdb_lock_type *lockrecs; struct tdb_attribute_stats *stats; @@ -529,6 +530,12 @@ int next_in_hash(struct tdb_context *tdb, int ltype, int tdb_transaction_recover(struct tdb_context *tdb); bool tdb_needs_recovery(struct tdb_context *tdb); +/* tdb.c: */ +void COLD tdb_logerr(struct tdb_context *tdb, + enum TDB_ERROR ecode, + enum tdb_debug_level level, + const char *fmt, ...); + #ifdef TDB_TRACE void tdb_trace(struct tdb_context *tdb, const char *op); void tdb_trace_seqnum(struct tdb_context *tdb, uint32_t seqnum, const char *op);