X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-tdb1-readonly-check.c;h=ae47aa747d5fdab28a3bac881c88ed1ec6e98c80;hp=2c06ca92eeb02cdc930f57b5677db93d0743001e;hb=22d0e0dc59fc9d7e0046fec6971ef478c2d604fd;hpb=fab544c24c1ad6523f95893abcaec4e6cce6c2b4 diff --git a/ccan/tdb2/test/run-tdb1-readonly-check.c b/ccan/tdb2/test/run-tdb1-readonly-check.c index 2c06ca92..ae47aa74 100644 --- a/ccan/tdb2/test/run-tdb1-readonly-check.c +++ b/ccan/tdb2/test/run-tdb1-readonly-check.c @@ -9,11 +9,11 @@ int main(int argc, char *argv[]) { struct tdb1_context *tdb; - TDB1_DATA key, data; + TDB_DATA key, data; plan_tests(11); tdb = tdb1_open_ex("run-readonly-check.tdb", 1024, - TDB1_DEFAULT, + TDB_DEFAULT, O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL); ok1(tdb); @@ -22,7 +22,7 @@ int main(int argc, char *argv[]) data.dsize = strlen("world"); data.dptr = (void *)"world"; - ok1(tdb1_store(tdb, key, data, TDB1_INSERT) == 0); + ok1(tdb1_store(tdb, key, data, TDB_INSERT) == 0); ok1(tdb1_check(tdb, NULL, NULL) == 0); /* We are also allowed to do a check inside a transaction. */ @@ -31,11 +31,11 @@ int main(int argc, char *argv[]) ok1(tdb1_close(tdb) == 0); tdb = tdb1_open_ex("run-readonly-check.tdb", 1024, - TDB1_DEFAULT, O_RDONLY, 0, &taplogctx, NULL); + TDB_DEFAULT, O_RDONLY, 0, &taplogctx, NULL); ok1(tdb); - ok1(tdb1_store(tdb, key, data, TDB1_MODIFY) == -1); - ok1(tdb1_error(tdb) == TDB1_ERR_RDONLY); + ok1(tdb1_store(tdb, key, data, TDB_MODIFY) == -1); + ok1(tdb_error(tdb) == TDB_ERR_RDONLY); ok1(tdb1_check(tdb, NULL, NULL) == 0); ok1(tdb1_close(tdb) == 0);