From 0ea5db4e0d81907ccdc25c79aa3b6f8074775426 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 08:07:13 +0930 Subject: tdb2: catch errors in tdb1_needs_recovery() The tdb1 backend simply returns "true" if there's an error determining if a tdb needs recovery. But this leads failtest down a rabbit hole; it's better to return the error at this case (and makes for better for diagnostics, since they will come from the first fault, not later in tdb1_transaction_recover(). Signed-off-by: Rusty Russell (Imported from CCAN commit 332d0c29baa6896e67c439aeb47f58a104fbc781) --- lib/tdb2/tdb1_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tdb2/tdb1_private.h') diff --git a/lib/tdb2/tdb1_private.h b/lib/tdb2/tdb1_private.h index ea147a8967..68dc39f6f8 100644 --- a/lib/tdb2/tdb1_private.h +++ b/lib/tdb2/tdb1_private.h @@ -153,7 +153,7 @@ int tdb1_ofs_read(struct tdb_context *tdb, tdb1_off_t offset, tdb1_off_t *d); int tdb1_ofs_write(struct tdb_context *tdb, tdb1_off_t offset, tdb1_off_t *d); int tdb1_lock_record(struct tdb_context *tdb, tdb1_off_t off); int tdb1_unlock_record(struct tdb_context *tdb, tdb1_off_t off); -bool tdb1_needs_recovery(struct tdb_context *tdb); +tdb_bool_err tdb1_needs_recovery(struct tdb_context *tdb); int tdb1_rec_read(struct tdb_context *tdb, tdb1_off_t offset, struct tdb1_record *rec); int tdb1_rec_write(struct tdb_context *tdb, tdb1_off_t offset, struct tdb1_record *rec); int tdb1_do_delete(struct tdb_context *tdb, tdb1_off_t rec_ptr, struct tdb1_record *rec); -- cgit