#include <stdlib.h>
#include <err.h>
-static void log_fn(struct tdb1_context *tdb, enum tdb1_debug_level level, const char *fmt, ...)
+static void log_fn(struct tdb_context *tdb, enum tdb_log_level level,
+ enum TDB_ERROR ecode, const char *message, void *priv)
{
- unsigned int *count = tdb->log.log_private;
- if (strstr(fmt, "spinlocks"))
+ unsigned int *count = priv;
+ if (strstr(message, "spinlocks"))
(*count)++;
}
/* The code should barf on TDBs created with rwlocks. */
int main(int argc, char *argv[])
{
- struct tdb1_context *tdb;
+ struct tdb_context *tdb;
unsigned int log_count;
struct tdb1_logging_context log_ctx = { log_fn, &log_count };