diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:43:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:43:13 +0930 |
commit | c16184f83b2fea59cd31ec968f0c6b7e06f9047b (patch) | |
tree | ea5604690ea72c3afe35b7e9c06c3b6042842266 /lib/tdb2/test | |
parent | 997592431f3e62cacef13d9b75a12a3d8058e7b7 (diff) | |
download | samba-c16184f83b2fea59cd31ec968f0c6b7e06f9047b.tar.gz samba-c16184f83b2fea59cd31ec968f0c6b7e06f9047b.tar.bz2 samba-c16184f83b2fea59cd31ec968f0c6b7e06f9047b.zip |
tdb2: merge tdb1_context into tdb_context.
Finally, we split out the tdb2-specific parts of tdb_context, and put
them into a "tdb2" sub-struct; the tdb1 parts go into a "tdb1"
sub-struct. We get rido of tdb1_context and use tdb_context
everywhere.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit bbeb528e74c0e234e1f724ac8d54be404cfc6f9a)
Diffstat (limited to 'lib/tdb2/test')
26 files changed, 54 insertions, 54 deletions
diff --git a/lib/tdb2/test/layout.c b/lib/tdb2/test/layout.c index 31889ad080..4f66e0935f 100644 --- a/lib/tdb2/test/layout.c +++ b/lib/tdb2/test/layout.c @@ -147,8 +147,8 @@ static void add_to_freetable(struct tdb_context *tdb, unsigned ftable, struct tle_freetable *freetable) { - tdb->ftable_off = freetable->base.off; - tdb->ftable = ftable; + tdb->tdb2.ftable_off = freetable->base.off; + tdb->tdb2.ftable = ftable; add_free_record(tdb, eoff, sizeof(struct tdb_used_record) + elen, TDB_LOCK_WAIT, false); } @@ -312,7 +312,7 @@ struct tdb_context *tdb_layout_get(struct tdb_layout *layout) } } - tdb->ftable_off = find_ftable(layout, 0)->base.off; + tdb->tdb2.ftable_off = find_ftable(layout, 0)->base.off; /* Get physical if they asked for it. */ if (layout->filename) { diff --git a/lib/tdb2/test/run-03-coalesce.c b/lib/tdb2/test/run-03-coalesce.c index 073b4e99aa..538613ba0a 100644 --- a/lib/tdb2/test/run-03-coalesce.c +++ b/lib/tdb2/test/run-03-coalesce.c @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) ok1(free_record_length(tdb, layout->elem[1].base.off) == len); /* Figure out which bucket free entry is. */ - b_off = bucket_off(tdb->ftable_off, size_to_bucket(len)); + b_off = bucket_off(tdb->tdb2.ftable_off, size_to_bucket(len)); /* Lock and fail to coalesce. */ ok1(tdb_lock_free_bucket(tdb, b_off, TDB_LOCK_WAIT) == 0); test = layout->elem[1].base.off; @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) ok1(tdb_check(tdb, NULL, NULL) == 0); /* Figure out which bucket free entry is. */ - b_off = bucket_off(tdb->ftable_off, size_to_bucket(1024)); + b_off = bucket_off(tdb->tdb2.ftable_off, size_to_bucket(1024)); /* Lock and fail to coalesce. */ ok1(tdb_lock_free_bucket(tdb, b_off, TDB_LOCK_WAIT) == 0); test = layout->elem[1].base.off; @@ -88,7 +88,7 @@ int main(int argc, char *argv[]) ok1(tdb_check(tdb, NULL, NULL) == 0); /* Figure out which bucket (first) free entry is. */ - b_off = bucket_off(tdb->ftable_off, size_to_bucket(1024)); + b_off = bucket_off(tdb->tdb2.ftable_off, size_to_bucket(1024)); /* Lock and coalesce. */ ok1(tdb_lock_free_bucket(tdb, b_off, TDB_LOCK_WAIT) == 0); test = layout->elem[2].base.off; @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) ok1(tdb_check(tdb, NULL, NULL) == 0); /* Figure out which bucket free entry is. */ - b_off = bucket_off(tdb->ftable_off, size_to_bucket(1024)); + b_off = bucket_off(tdb->tdb2.ftable_off, size_to_bucket(1024)); /* Lock and coalesce. */ ok1(tdb_lock_free_bucket(tdb, b_off, TDB_LOCK_WAIT) == 0); test = layout->elem[2].base.off; @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) ok1(tdb_check(tdb, NULL, NULL) == 0); /* Figure out which bucket free entry is. */ - b_off = bucket_off(tdb->ftable_off, size_to_bucket(1024)); + b_off = bucket_off(tdb->tdb2.ftable_off, size_to_bucket(1024)); /* Lock and coalesce. */ ok1(tdb_lock_free_bucket(tdb, b_off, TDB_LOCK_WAIT) == 0); test = layout->elem[2].base.off; diff --git a/lib/tdb2/test/run-04-basichash.c b/lib/tdb2/test/run-04-basichash.c index 12c130f5f6..3bf66c720f 100644 --- a/lib/tdb2/test/run-04-basichash.c +++ b/lib/tdb2/test/run-04-basichash.c @@ -68,9 +68,9 @@ int main(int argc, char *argv[]) /* Make sure we fill it in for later finding. */ off = new_off + sizeof(struct tdb_used_record); - ok1(!tdb->methods->twrite(tdb, off, key.dptr, key.dsize)); + ok1(!tdb->tdb2.io->twrite(tdb, off, key.dptr, key.dsize)); off += key.dsize; - ok1(!tdb->methods->twrite(tdb, off, dbuf.dptr, dbuf.dsize)); + ok1(!tdb->tdb2.io->twrite(tdb, off, dbuf.dptr, dbuf.dsize)); /* We should be able to unlock that OK. */ ok1(tdb_unlock_hashes(tdb, h.hlock_start, h.hlock_range, @@ -228,9 +228,9 @@ int main(int argc, char *argv[]) /* Make sure we fill it in for later finding. */ off = new_off + sizeof(struct tdb_used_record); - ok1(!tdb->methods->twrite(tdb, off, key.dptr, key.dsize)); + ok1(!tdb->tdb2.io->twrite(tdb, off, key.dptr, key.dsize)); off += key.dsize; - ok1(!tdb->methods->twrite(tdb, off, dbuf.dptr, dbuf.dsize)); + ok1(!tdb->tdb2.io->twrite(tdb, off, dbuf.dptr, dbuf.dsize)); /* We should be able to unlock that OK. */ ok1(tdb_unlock_hashes(tdb, h.hlock_start, h.hlock_range, diff --git a/lib/tdb2/test/run-30-exhaust-before-expand.c b/lib/tdb2/test/run-30-exhaust-before-expand.c index 2279a802a3..db391e7e59 100644 --- a/lib/tdb2/test/run-30-exhaust-before-expand.c +++ b/lib/tdb2/test/run-30-exhaust-before-expand.c @@ -9,7 +9,7 @@ static bool empty_freetable(struct tdb_context *tdb) unsigned int i; /* Now, free table should be completely exhausted in zone 0 */ - if (tdb_read_convert(tdb, tdb->ftable_off, &ftab, sizeof(ftab)) != 0) + if (tdb_read_convert(tdb, tdb->tdb2.ftable_off, &ftab, sizeof(ftab)) != 0) abort(); for (i = 0; i < sizeof(ftab.buckets)/sizeof(ftab.buckets[0]); i++) { diff --git a/lib/tdb2/test/run-50-multiple-freelists.c b/lib/tdb2/test/run-50-multiple-freelists.c index 547bac476e..81c52e76c0 100644 --- a/lib/tdb2/test/run-50-multiple-freelists.c +++ b/lib/tdb2/test/run-50-multiple-freelists.c @@ -35,22 +35,22 @@ int main(int argc, char *argv[]) off = get_free(tdb, 0, 80 - sizeof(struct tdb_used_record), 0, TDB_USED_MAGIC, 0); ok1(off == layout->elem[3].base.off); - ok1(tdb->ftable_off == layout->elem[0].base.off); + ok1(tdb->tdb2.ftable_off == layout->elem[0].base.off); off = get_free(tdb, 0, 160 - sizeof(struct tdb_used_record), 0, TDB_USED_MAGIC, 0); ok1(off == layout->elem[5].base.off); - ok1(tdb->ftable_off == layout->elem[1].base.off); + ok1(tdb->tdb2.ftable_off == layout->elem[1].base.off); off = get_free(tdb, 0, 320 - sizeof(struct tdb_used_record), 0, TDB_USED_MAGIC, 0); ok1(off == layout->elem[7].base.off); - ok1(tdb->ftable_off == layout->elem[2].base.off); + ok1(tdb->tdb2.ftable_off == layout->elem[2].base.off); off = get_free(tdb, 0, 40 - sizeof(struct tdb_used_record), 0, TDB_USED_MAGIC, 0); ok1(off == layout->elem[9].base.off); - ok1(tdb->ftable_off == layout->elem[0].base.off); + ok1(tdb->tdb2.ftable_off == layout->elem[0].base.off); /* Now we fail. */ off = get_free(tdb, 0, 0, 1, TDB_USED_MAGIC, 0); diff --git a/lib/tdb2/test/run-tdb1-3G-file.c b/lib/tdb2/test/run-tdb1-3G-file.c index fcb1a0c757..d5aeda5dde 100644 --- a/lib/tdb2/test/run-tdb1-3G-file.c +++ b/lib/tdb2/test/run-tdb1-3G-file.c @@ -6,11 +6,11 @@ #include <err.h> #include "tdb1-logging.h" -static int tdb1_expand_file_sparse(struct tdb1_context *tdb, +static int tdb1_expand_file_sparse(struct tdb_context *tdb, tdb1_off_t size, tdb1_off_t addition) { - if ((tdb->flags & TDB_RDONLY) || tdb->traverse_read) { + if ((tdb->flags & TDB_RDONLY) || tdb->tdb1.traverse_read) { tdb->last_error = TDB_ERR_RDONLY; return -1; } @@ -46,7 +46,7 @@ static const struct tdb1_methods large_io_methods = { tdb1_expand_file_sparse }; -static int test_traverse(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, +static int test_traverse(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, void *_data) { TDB_DATA *expect = _data; @@ -59,7 +59,7 @@ static int test_traverse(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, orig_data, data; uint32_t hash; tdb1_off_t rec_ptr; @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL); ok1(tdb); - tdb->methods = &large_io_methods; + tdb->tdb1.io = &large_io_methods; /* Enlarge the file (internally multiplies by 2). */ ok1(tdb1_expand(tdb, 1500000000) == 0); diff --git a/lib/tdb2/test/run-tdb1-bad-tdb-header.c b/lib/tdb2/test/run-tdb1-bad-tdb-header.c index 9e23e97970..fe2501081a 100644 --- a/lib/tdb2/test/run-tdb1-bad-tdb-header.c +++ b/lib/tdb2/test/run-tdb1-bad-tdb-header.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; struct tdb1_header hdr; int fd; diff --git a/lib/tdb2/test/run-tdb1-check.c b/lib/tdb2/test/run-tdb1-check.c index f05608feaa..9864e42c56 100644 --- a/lib/tdb2/test/run-tdb1-check.c +++ b/lib/tdb2/test/run-tdb1-check.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, data; plan_tests(13); diff --git a/lib/tdb2/test/run-tdb1-corrupt.c b/lib/tdb2/test/run-tdb1-corrupt.c index 5aa37ec46c..2e70da7ce5 100644 --- a/lib/tdb2/test/run-tdb1-corrupt.c +++ b/lib/tdb2/test/run-tdb1-corrupt.c @@ -23,7 +23,7 @@ static int check(TDB_DATA key, TDB_DATA data, void *private) return 0; } -static void tdb1_flip_bit(struct tdb1_context *tdb, unsigned int bit) +static void tdb1_flip_bit(struct tdb_context *tdb, unsigned int bit) { unsigned int off = bit / CHAR_BIT; unsigned char mask = (1 << (bit % CHAR_BIT)); @@ -40,7 +40,7 @@ static void tdb1_flip_bit(struct tdb1_context *tdb, unsigned int bit) } } -static void check_test(struct tdb1_context *tdb) +static void check_test(struct tdb_context *tdb) { TDB_DATA key, data; unsigned int i, verifiable, corrupt, sizes[2], dsize, ksize; @@ -93,7 +93,7 @@ static void check_test(struct tdb1_context *tdb) int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; plan_tests(4); /* This should use mmap. */ diff --git a/lib/tdb2/test/run-tdb1-die-during-transaction.c b/lib/tdb2/test/run-tdb1-die-during-transaction.c index bcd24df554..1d03a30a1a 100644 --- a/lib/tdb2/test/run-tdb1-die-during-transaction.c +++ b/lib/tdb2/test/run-tdb1-die-during-transaction.c @@ -81,7 +81,7 @@ static int ftruncate_check(int fd, off_t length) static bool test_death(enum operation op, struct agent *agent) { - struct tdb1_context *tdb = NULL; + struct tdb_context *tdb = NULL; TDB_DATA key; enum agent_return ret; int needed_recovery = 0; diff --git a/lib/tdb2/test/run-tdb1-endian.c b/lib/tdb2/test/run-tdb1-endian.c index 9813050d1e..245b65446c 100644 --- a/lib/tdb2/test/run-tdb1-endian.c +++ b/lib/tdb2/test/run-tdb1-endian.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, data; plan_tests(13); diff --git a/lib/tdb2/test/run-tdb1-incompatible.c b/lib/tdb2/test/run-tdb1-incompatible.c index 58e1fba1fa..9e58161462 100644 --- a/lib/tdb2/test/run-tdb1-incompatible.c +++ b/lib/tdb2/test/run-tdb1-incompatible.c @@ -9,7 +9,7 @@ static uint64_t tdb1_dumb_hash(const void *key, size_t len, uint64_t seed, return len; } -static void log_fn(struct tdb1_context *tdb, enum tdb_log_level level, +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 = priv; @@ -46,7 +46,7 @@ static uint64_t old_hash(const void *key, size_t len, uint64_t seed, int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; unsigned int log_count, flags; TDB_DATA d; struct tdb1_logging_context log_ctx = { log_fn, &log_count }; diff --git a/lib/tdb2/test/run-tdb1-nested-transactions.c b/lib/tdb2/test/run-tdb1-nested-transactions.c index 6a13c13ded..be4e926946 100644 --- a/lib/tdb2/test/run-tdb1-nested-transactions.c +++ b/lib/tdb2/test/run-tdb1-nested-transactions.c @@ -7,7 +7,7 @@ int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, data; plan_tests(27); diff --git a/lib/tdb2/test/run-tdb1-nested-traverse.c b/lib/tdb2/test/run-tdb1-nested-traverse.c index 5eadc184ff..3d15082a03 100644 --- a/lib/tdb2/test/run-tdb1-nested-traverse.c +++ b/lib/tdb2/test/run-tdb1-nested-traverse.c @@ -23,7 +23,7 @@ static bool correct_data(TDB_DATA data) && memcmp(data.dptr, "world", data.dsize) == 0; } -static int traverse2(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, +static int traverse2(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, void *p) { ok1(correct_key(key)); @@ -31,7 +31,7 @@ static int traverse2(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, return 0; } -static int traverse1(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, +static int traverse1(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, void *p) { ok1(correct_key(key)); @@ -48,7 +48,7 @@ static int traverse1(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, data; plan_tests(17); diff --git a/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c b/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c index c1cb40a49e..10d57bacfb 100644 --- a/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c +++ b/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c @@ -14,7 +14,7 @@ #define NUM_ENTRIES 10 -static bool prepare_entries(struct tdb1_context *tdb) +static bool prepare_entries(struct tdb_context *tdb) { unsigned int i; TDB_DATA key, data; @@ -31,7 +31,7 @@ static bool prepare_entries(struct tdb1_context *tdb) return true; } -static void delete_entries(struct tdb1_context *tdb) +static void delete_entries(struct tdb_context *tdb) { unsigned int i; TDB_DATA key; @@ -45,7 +45,7 @@ static void delete_entries(struct tdb1_context *tdb) } /* We don't know how many times this will run. */ -static int delete_other(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, +static int delete_other(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, void *private_data) { unsigned int i; @@ -57,7 +57,7 @@ static int delete_other(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, return 0; } -static int delete_self(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, +static int delete_self(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, void *private_data) { ok1(tdb1_delete(tdb, key) == 0); @@ -66,7 +66,7 @@ static int delete_self(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; int errors = 0; plan_tests(41); diff --git a/lib/tdb2/test/run-tdb1-oldhash.c b/lib/tdb2/test/run-tdb1-oldhash.c index 4f74dbb95b..ea56dd3c8c 100644 --- a/lib/tdb2/test/run-tdb1-oldhash.c +++ b/lib/tdb2/test/run-tdb1-oldhash.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; plan_tests(8); diff --git a/lib/tdb2/test/run-tdb1-open-during-transaction.c b/lib/tdb2/test/run-tdb1-open-during-transaction.c index 875fc3ca9e..3cb0685bbc 100644 --- a/lib/tdb2/test/run-tdb1-open-during-transaction.c +++ b/lib/tdb2/test/run-tdb1-open-during-transaction.c @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) const int flags[] = { TDB_DEFAULT, TDB_NOMMAP }; int i; - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, data; plan_tests(10); diff --git a/lib/tdb2/test/run-tdb1-readonly-check.c b/lib/tdb2/test/run-tdb1-readonly-check.c index ae47aa747d..2eda33d9b6 100644 --- a/lib/tdb2/test/run-tdb1-readonly-check.c +++ b/lib/tdb2/test/run-tdb1-readonly-check.c @@ -8,7 +8,7 @@ int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, data; plan_tests(11); diff --git a/lib/tdb2/test/run-tdb1-rwlock-check.c b/lib/tdb2/test/run-tdb1-rwlock-check.c index ec2a66a5bf..cd227f4cd7 100644 --- a/lib/tdb2/test/run-tdb1-rwlock-check.c +++ b/lib/tdb2/test/run-tdb1-rwlock-check.c @@ -3,7 +3,7 @@ #include <stdlib.h> #include <err.h> -static void log_fn(struct tdb1_context *tdb, enum tdb_log_level level, +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 = priv; @@ -14,7 +14,7 @@ static void log_fn(struct tdb1_context *tdb, enum tdb_log_level level, /* 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 }; diff --git a/lib/tdb2/test/run-tdb1-summary.c b/lib/tdb2/test/run-tdb1-summary.c index b563b18730..ffd8bc8caa 100644 --- a/lib/tdb2/test/run-tdb1-summary.c +++ b/lib/tdb2/test/run-tdb1-summary.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) { unsigned int i, j; - struct tdb1_context *tdb; + struct tdb_context *tdb; int flags[] = { TDB_INTERNAL, TDB_DEFAULT, TDB_NOMMAP, TDB_INTERNAL|TDB_CONVERT, TDB_CONVERT, TDB_NOMMAP|TDB_CONVERT }; diff --git a/lib/tdb2/test/run-tdb1-traverse-in-transaction.c b/lib/tdb2/test/run-tdb1-traverse-in-transaction.c index 922f73caa7..243f2d653f 100644 --- a/lib/tdb2/test/run-tdb1-traverse-in-transaction.c +++ b/lib/tdb2/test/run-tdb1-traverse-in-transaction.c @@ -24,7 +24,7 @@ static bool correct_data(TDB_DATA data) && memcmp(data.dptr, "world", data.dsize) == 0; } -static int traverse(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, +static int traverse(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, void *p) { ok1(correct_key(key)); @@ -34,7 +34,7 @@ static int traverse(struct tdb1_context *tdb, TDB_DATA key, TDB_DATA data, int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, data; plan_tests(13); diff --git a/lib/tdb2/test/run-tdb1-wronghash-fail.c b/lib/tdb2/test/run-tdb1-wronghash-fail.c index 42bc6c02f4..90e16832f4 100644 --- a/lib/tdb2/test/run-tdb1-wronghash-fail.c +++ b/lib/tdb2/test/run-tdb1-wronghash-fail.c @@ -3,7 +3,7 @@ #include <stdlib.h> #include <err.h> -static void log_fn(struct tdb1_context *tdb, enum tdb_log_level level, +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 = priv; @@ -27,7 +27,7 @@ static uint64_t old_hash(const void *key, size_t len, uint64_t seed, int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; unsigned int log_count; TDB_DATA d; struct tdb1_logging_context log_ctx = { log_fn, &log_count }; diff --git a/lib/tdb2/test/run-tdb1-zero-append.c b/lib/tdb2/test/run-tdb1-zero-append.c index 1304bebdbd..80458728d6 100644 --- a/lib/tdb2/test/run-tdb1-zero-append.c +++ b/lib/tdb2/test/run-tdb1-zero-append.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, data; plan_tests(4); diff --git a/lib/tdb2/test/run-tdb1.c b/lib/tdb2/test/run-tdb1.c index 84eea75ce2..39b156b499 100644 --- a/lib/tdb2/test/run-tdb1.c +++ b/lib/tdb2/test/run-tdb1.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) { - struct tdb1_context *tdb; + struct tdb_context *tdb; TDB_DATA key, data; plan_tests(10); diff --git a/lib/tdb2/test/tdb1-external-agent.c b/lib/tdb2/test/tdb1-external-agent.c index 18c76f1124..08c024b5cc 100644 --- a/lib/tdb2/test/tdb1-external-agent.c +++ b/lib/tdb2/test/tdb1-external-agent.c @@ -16,7 +16,7 @@ #include <stdio.h> #include <stdarg.h> -static struct tdb1_context *tdb; +static struct tdb_context *tdb; static enum agent_return do_operation(enum operation op, const char *name) { diff --git a/lib/tdb2/test/tdb1-logging.c b/lib/tdb2/test/tdb1-logging.c index 3424296b91..cb058296d4 100644 --- a/lib/tdb2/test/tdb1-logging.c +++ b/lib/tdb2/test/tdb1-logging.c @@ -6,7 +6,7 @@ #include <stdio.h> /* Turn log messages into tap diag messages. */ -static void taplog(struct tdb1_context *tdb, +static void taplog(struct tdb_context *tdb, enum tdb_log_level level, enum TDB_ERROR ecode, const char *message, |