From e613effeae7c9373c9e635fc708ec2ce29661d4c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:32:13 +0930 Subject: tdb2: make TDB1 code use tdb2's TDB_ERROR and tdb_logerr() To do this, we make sure that the first few fields of tdb1_context and tdb_context are the same. This sweep also fixes up a few paths where we weren't setting tdb->ecode before our old logging function. Signed-off-by: Rusty Russell (Imported from CCAN commit 919937354a331bb964564a11b5a5b80403ff8db9) --- lib/tdb2/test/run-tdb1-rwlock-check.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/tdb2/test/run-tdb1-rwlock-check.c') diff --git a/lib/tdb2/test/run-tdb1-rwlock-check.c b/lib/tdb2/test/run-tdb1-rwlock-check.c index f40a6fe13e..ec2a66a5bf 100644 --- a/lib/tdb2/test/run-tdb1-rwlock-check.c +++ b/lib/tdb2/test/run-tdb1-rwlock-check.c @@ -3,10 +3,11 @@ #include #include -static void log_fn(struct tdb1_context *tdb, enum tdb1_debug_level level, const char *fmt, ...) +static void log_fn(struct tdb1_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)++; } -- cgit