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/run-tdb1-3G-file.c | |
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/run-tdb1-3G-file.c')
-rw-r--r-- | lib/tdb2/test/run-tdb1-3G-file.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); |