From 5de58894c73fc8e58aba0b2b031f468847ec99b8 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 08:13:27 +0930 Subject: tdb2: don't return -1 (ie. TDB_ERR_CORRUPT) on transaction write fail. A left-over -1 return; should be returning ecode (probably TDB_ERR_IO). Signed-off-by: Rusty Russell (Imported from CCAN commit 077bdae6877d26749987b26a1b5b28cdba5ebbdd) --- lib/tdb2/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tdb2/transaction.c b/lib/tdb2/transaction.c index eab00e0937..10f4862c6e 100644 --- a/lib/tdb2/transaction.c +++ b/lib/tdb2/transaction.c @@ -203,7 +203,7 @@ static enum TDB_ERROR transaction_write(struct tdb_context *tdb, tdb_off_t off, tdb_len_t len2 = PAGESIZE - (off % PAGESIZE); ecode = transaction_write(tdb, off, buf, len2); if (ecode != TDB_SUCCESS) { - return -1; + return ecode; } len -= len2; off += len2; -- cgit