Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
(Imported from CCAN commit 77658070a3e4f712b94d659b2e399031ce3394c8)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
It can be 64 bits, for huge databases.
(Imported from CCAN commit 736c033322079baf754261d82b6a83de53b2bb4e)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
As noted, failtest was taking a long time, because a failure injected here
was not detected.
(Imported from CCAN commit 51f592dfcda4d58d6b9d8134b6e1aff791dc40f2)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
We use off_t in the tdb2 interface (for tdb_attribute_flock); we need
to make sure that all callers agree on the size.
This also causes a problem in the tests: it's not enough to include
config.h first, we need the _FILE_OFFSET_BITS define from private.h.
Otherwise, we can disagree about the definitions of F_SETLK, F_SETLKW
and off_t, causing strange problems.
(Imported from CCAN commit baa17ee2d5e01a32030f19e566007417d72b4b6e)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This is for SAMBA, so we follow their rules and do full license
headers. Two files were missing them.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 58025731)
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Aug 31 09:52:43 CEST 2011 on sn-devel-104
|
|
This is simplistic. We need to support making TDB2 a standalone library,
but for now, we simply built it in-tree.
Once we have tdb1 compatibility in tdb2, we can rename this option to
--enable-tdb2.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Soon, TDB2 will handle tdb1 files, but until then, we substitute.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This is a bit messy, but it works. Kept as a separate patch so it's
easier to merge back and forth with CCAN's tdb2.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|