From ebb3017cf08cc4dad3217db6cea404069b494b47 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:33:13 +0930 Subject: tdb2: Make tdb1 share tdb_store flags, struct tdb_data and TDB_MAGIC_FOOD. Signed-off-by: Rusty Russell (Imported from CCAN commit 8a47d50d72ea62e378dc92b150c92c1317c73fa3) --- lib/tdb2/tdb1_traverse.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/tdb2/tdb1_traverse.c') diff --git a/lib/tdb2/tdb1_traverse.c b/lib/tdb2/tdb1_traverse.c index 13813eebbb..23897c1441 100644 --- a/lib/tdb2/tdb1_traverse.c +++ b/lib/tdb2/tdb1_traverse.c @@ -147,7 +147,7 @@ static int tdb1_traverse_internal(struct tdb1_context *tdb, tdb1_traverse_func fn, void *private_data, struct tdb1_traverse_lock *tl) { - TDB1_DATA key, dbuf; + TDB_DATA key, dbuf; struct tdb1_record rec; int ret = 0, count = 0; tdb1_off_t off; @@ -223,7 +223,7 @@ int tdb1_traverse_read(struct tdb1_context *tdb, /* we need to get a read lock on the transaction lock here to cope with the lock ordering semantics of solaris10 */ - if (tdb1_transaction_lock(tdb, F_RDLCK, TDB1_LOCK_WAIT)) { + if (tdb1_transaction_lock(tdb, F_RDLCK, TDB_LOCK_WAIT)) { return -1; } @@ -253,7 +253,7 @@ int tdb1_traverse(struct tdb1_context *tdb, return tdb1_traverse_read(tdb, fn, private_data); } - if (tdb1_transaction_lock(tdb, F_WRLCK, TDB1_LOCK_WAIT)) { + if (tdb1_transaction_lock(tdb, F_WRLCK, TDB_LOCK_WAIT)) { return -1; } @@ -268,9 +268,9 @@ int tdb1_traverse(struct tdb1_context *tdb, /* find the first entry in the database and return its key */ -TDB1_DATA tdb1_firstkey(struct tdb1_context *tdb) +TDB_DATA tdb1_firstkey(struct tdb1_context *tdb) { - TDB1_DATA key; + TDB_DATA key; struct tdb1_record rec; tdb1_off_t off; @@ -298,10 +298,10 @@ TDB1_DATA tdb1_firstkey(struct tdb1_context *tdb) } /* find the next entry in the database, returning its key */ -TDB1_DATA tdb1_nextkey(struct tdb1_context *tdb, TDB1_DATA oldkey) +TDB_DATA tdb1_nextkey(struct tdb1_context *tdb, TDB_DATA oldkey) { uint32_t oldhash; - TDB1_DATA key = tdb1_null; + TDB_DATA key = tdb1_null; struct tdb1_record rec; unsigned char *k = NULL; tdb1_off_t off; -- cgit