From 9b98acbba304f2c1c1fba5bda672e1005151e526 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:35:13 +0930 Subject: tdb2: Make TDB1 code use TDB2's open flags. This means getting rid of TDB_VOLATILE (perhaps we should use an attribute for that?), TDB_INCOMPATIBLE_HASH (use the tdb_attribute_hash for that) and TDB_CLEAR_IF_FIRST (use the tdb_attribute_openhook for that). We also get rid of TDB_DISALLOW_NESTING: that's the default for TDB2. Signed-off-by: Rusty Russell (Imported from CCAN commit 22d0e0dc59fc9d7e0046fec6971ef478c2d604fd) --- lib/tdb2/test/run-tdb1-corrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/tdb2/test/run-tdb1-corrupt.c') diff --git a/lib/tdb2/test/run-tdb1-corrupt.c b/lib/tdb2/test/run-tdb1-corrupt.c index bfc25a5711..2a8d31bf66 100644 --- a/lib/tdb2/test/run-tdb1-corrupt.c +++ b/lib/tdb2/test/run-tdb1-corrupt.c @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) plan_tests(4); /* This should use mmap. */ - tdb = tdb1_open_ex("run-corrupt.tdb", 2, TDB1_CLEAR_IF_FIRST, + tdb = tdb1_open_ex("run-corrupt.tdb", 2, TDB_DEFAULT, O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL); if (!tdb) @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) tdb1_close(tdb); /* This should not. */ - tdb = tdb1_open_ex("run-corrupt.tdb", 2, TDB1_CLEAR_IF_FIRST|TDB1_NOMMAP, + tdb = tdb1_open_ex("run-corrupt.tdb", 2, TDB_NOMMAP, O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL); if (!tdb) -- cgit