X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb1_private.h;h=68dc39f6f8e02d1fcce98feb9a2a55b4e45c4763;hp=13c51df9f344c4acc49b3da7b14abaf05499fbe5;hb=614259f13c3e694fcd6b57fc05a329066e43c76d;hpb=ceb2f3eacbad917ee990afbc3dd800bfb0607887 diff --git a/ccan/tdb2/tdb1_private.h b/ccan/tdb2/tdb1_private.h index 13c51df9..68dc39f6 100644 --- a/ccan/tdb2/tdb1_private.h +++ b/ccan/tdb2/tdb1_private.h @@ -26,7 +26,6 @@ */ #include "private.h" -#include "tdb1.h" #include @@ -154,16 +153,17 @@ 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); unsigned char *tdb1_alloc_read(struct tdb_context *tdb, tdb1_off_t offset, tdb1_len_t len); -int tdb1_parse_data(struct tdb_context *tdb, TDB_DATA key, - tdb1_off_t offset, tdb1_len_t len, - int (*parser)(TDB_DATA key, TDB_DATA data, - void *private_data), - void *private_data); +enum TDB_ERROR tdb1_parse_data(struct tdb_context *tdb, TDB_DATA key, + tdb1_off_t offset, tdb1_len_t len, + enum TDB_ERROR (*parser)(TDB_DATA key, + TDB_DATA data, + void *private_data), + void *private_data); tdb1_off_t tdb1_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, uint32_t hash, int locktype, struct tdb1_record *rec); void tdb1_io_init(struct tdb_context *tdb);