From bdc5499205367eccef5700cba8af95ba941ac9b2 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:16:13 +0930 Subject: tdb2: add TDB_RDONLY flag, allow setting/unsetting it. You can only unset it if the TDB was originally opened O_RDWR. Also, cleaned up error handling in tdb_allrecord_lock() so we only get one log message on a r/o database. Signed-off-by: Rusty Russell (Imported from CCAN commit b87e14495d5b07e1b247218a72329f10ecb3da7f) --- lib/tdb2/tdb2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/tdb2/tdb2.h') diff --git a/lib/tdb2/tdb2.h b/lib/tdb2/tdb2.h index 8b127add81..bbe60a8936 100644 --- a/lib/tdb2/tdb2.h +++ b/lib/tdb2/tdb2.h @@ -87,6 +87,7 @@ struct tdb_context *tdb_open(const char *name, int tdb_flags, #define TDB_NOSYNC 64 /* don't use synchronous transactions */ #define TDB_SEQNUM 128 /* maintain a sequence number */ #define TDB_ALLOW_NESTING 256 /* fake nested transactions */ +#define TDB_RDONLY 512 /* implied by O_RDONLY */ /** * tdb_close - close and free a tdb. -- cgit