diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:59:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:59:13 +0930 |
commit | 8e14a3e06d42b0302868dc3911a2e607e42a51b3 (patch) | |
tree | ada1f4891472e6a4d3904327fb7f6bc0264f915c /lib/tdb2/private.h | |
parent | 5d9dd8d541a761e0af2c8d50ee55485f2cef3e01 (diff) | |
download | samba-8e14a3e06d42b0302868dc3911a2e607e42a51b3.tar.gz samba-8e14a3e06d42b0302868dc3911a2e607e42a51b3.tar.bz2 samba-8e14a3e06d42b0302868dc3911a2e607e42a51b3.zip |
tdb2: unify tdb1_check and tdb1_summary into tdb_check and tdb_summary.
Switch on the TDB_VERSION1 flag. Also, change tdb1_check's checkfn argument
to return an error code (and set tdb->last_error accordingly).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit ef92843f2c74ab9d4fa7f167a2182e5e8955df91)
Diffstat (limited to 'lib/tdb2/private.h')
-rw-r--r-- | lib/tdb2/private.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/tdb2/private.h b/lib/tdb2/private.h index 67bc97dad1..816d5f70f8 100644 --- a/lib/tdb2/private.h +++ b/lib/tdb2/private.h @@ -643,6 +643,12 @@ struct tdb_context { #define TDB1_BYTEREV(x) (((((x)&0xff)<<24)|((x)&0xFF00)<<8)|(((x)>>8)&0xFF00)|((x)>>24)) +/* tdb1_check.c: */ +int tdb1_check(struct tdb_context *tdb, + enum TDB_ERROR (*check)(TDB_DATA key, TDB_DATA data, void *), + void *private_data); + + /* tdb1_open.c: */ int tdb1_new_database(struct tdb_context *tdb, struct tdb_attribute_tdb1_hashsize *hashsize); @@ -670,6 +676,9 @@ int tdb1_traverse(struct tdb_context *tdb, int (*)(struct tdb_context *, TDB_DATA, TDB_DATA, void *), void *private_data); +/* tdb1_summary.c: */ +char *tdb1_summary(struct tdb_context *tdb); + /* tdb1_tdb.c: */ int tdb1_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag); enum TDB_ERROR tdb1_fetch(struct tdb_context *tdb, TDB_DATA key, |