tdb2: cleanup oob handling.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 01:13:12 +0000 (10:43 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 01:13:12 +0000 (10:43 +0930)
commit77658070a3e4f712b94d659b2e399031ce3394c8
tree74b9483fc927d6a036b9d340c54eecf646f44a6a
parent736c033322079baf754261d82b6a83de53b2bb4e
tdb2: cleanup oob handling.

The tdb_oob() function can fail due to errors, as well as because the length
asked for is greater than the size of the file.  Clean that up:

(1) If probe is true, only fail if there's an error, not if the length is
    too great.
(2) Exit tdb_open() if it tdb_oob() probe fails; this helps cut down
    test time for failtest.
(3) Don't set probe to true in tdb_direct() fail; a minor issue, but it means
    we log failure.
ccan/tdb2/io.c
ccan/tdb2/open.c
ccan/tdb2/transaction.c