]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/test/run-tdb1.c
tdb2: make tdb1_open use attributes for logging, hash function.
[ccan] / ccan / tdb2 / test / run-tdb1.c
index 1f234b12e3433232e34391c4a383ee069fd6a651..d206545c68fa1d0f47bdaf36b14fd6fbb8318145 100644 (file)
@@ -2,16 +2,16 @@
 #include <ccan/tap/tap.h>
 #include <stdlib.h>
 #include <err.h>
-#include "tdb1-logging.h"
+#include "logging.h"
 
 int main(int argc, char *argv[])
 {
-       struct tdb1_context *tdb;
+       struct tdb_context *tdb;
        TDB_DATA key, data;
 
        plan_tests(10);
-       tdb = tdb1_open_ex("run.tdb", 1024, TDB1_CLEAR_IF_FIRST,
-                         O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL);
+       tdb = tdb1_open("run.tdb", 1024, TDB_DEFAULT,
+                       O_CREAT|O_TRUNC|O_RDWR, 0600, &tap_log_attr);
 
        ok1(tdb);
        key.dsize = strlen("hi");