summaryrefslogtreecommitdiff
path: root/source3/tdb/tdb.h
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-12-04 13:21:15 +0000
committerMartin Pool <mbp@samba.org>2001-12-04 13:21:15 +0000
commit84c19504d0268d0728bf0733049950bfc009aa67 (patch)
tree1d15dfd5e1450f468007c72e6aa0d9ce48a6b12b /source3/tdb/tdb.h
parent65e1d4a7a5b9a7a01ee15173bd7fb57fe23b23f9 (diff)
downloadsamba-84c19504d0268d0728bf0733049950bfc009aa67.tar.gz
samba-84c19504d0268d0728bf0733049950bfc009aa67.tar.bz2
samba-84c19504d0268d0728bf0733049950bfc009aa67.zip
Put back changes to set errno, which seem to do no harm.
(This used to be commit 3dbb5dfcfb29671f136d1ed6c865362eaf027446)
Diffstat (limited to 'source3/tdb/tdb.h')
-rw-r--r--source3/tdb/tdb.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/tdb/tdb.h b/source3/tdb/tdb.h
index 4efe263ee8..e3eab41fd6 100644
--- a/source3/tdb/tdb.h
+++ b/source3/tdb/tdb.h
@@ -99,10 +99,17 @@ typedef struct tdb_context {
} TDB_CONTEXT;
typedef int (*tdb_traverse_func)(TDB_CONTEXT *, TDB_DATA, TDB_DATA, void *);
+typedef void (*tdb_log_func)(TDB_CONTEXT *, int , const char *, ...);
TDB_CONTEXT *tdb_open(char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode);
-void tdb_logging_function(TDB_CONTEXT *tdb, void (*fn)(TDB_CONTEXT *, int , const char *, ...));
+TDB_CONTEXT *tdb_open_ex(char *name, int hash_size, int tdb_flags,
+ int open_flags, mode_t mode,
+ tdb_log_func log_fn);
+
+int tdb_reopen(TDB_CONTEXT *tdb);
+int tdb_reopen_all(void);
+void tdb_logging_function(TDB_CONTEXT *tdb, tdb_log_func);
enum TDB_ERROR tdb_error(TDB_CONTEXT *tdb);
const char *tdb_errorstr(TDB_CONTEXT *tdb);
TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key);
@@ -121,6 +128,11 @@ void tdb_unlockall(TDB_CONTEXT *tdb);
/* Low level locking functions: use with care */
int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key);
void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
+
+/* Debug functions. Not used in production. */
+void tdb_dump_all(TDB_CONTEXT *tdb);
+void tdb_printfreelist(TDB_CONTEXT *tdb);
+
extern TDB_DATA tdb_null;
#ifdef __cplusplus
}