tdb2: use tdb->flags & TDB_RDONLY instead of tdb->read_only for TDB1 code.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 13 Sep 2011 22:12:13 +0000 (07:42 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 13 Sep 2011 22:12:13 +0000 (07:42 +0930)
commit997592431f3e62cacef13d9b75a12a3d8058e7b7
treea0941636f9ad0c72fc5a774b7031bbb8a3f3e4fd
parentf7e84f8ef86c3323f70e2fa30fd8a49cab1febf9
tdb2: use tdb->flags & TDB_RDONLY instead of tdb->read_only for TDB1 code.

There's also a semantic change here: for tdb1, being read-only meant no
locking, and it was an error to try to lock a r/o database.  For TDB2, you'd
need to specify TDB_NOLOCK, which suppresses locking silently.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 4dc29a338fadeac805b369b4b0851c02f1b152c7)
lib/tdb2/tdb1_check.c
lib/tdb2/tdb1_io.c
lib/tdb2/tdb1_lock.c
lib/tdb2/tdb1_open.c
lib/tdb2/tdb1_private.h
lib/tdb2/tdb1_summary.c
lib/tdb2/tdb1_tdb.c
lib/tdb2/tdb1_transaction.c
lib/tdb2/tdb1_traverse.c
lib/tdb2/test/run-tdb1-3G-file.c