summaryrefslogtreecommitdiff
path: root/lib/tdb2/tdb1_private.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-09-14 07:49:13 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-09-14 07:49:13 +0930
commitcbad6e2c140e59a6ec653bcfe773599a57a5042f (patch)
tree84e7605464b76c0fabb18b89c7395f41d7514e5a /lib/tdb2/tdb1_private.h
parent333a23fa995faf1735e5234272f56b792d91a877 (diff)
downloadsamba-cbad6e2c140e59a6ec653bcfe773599a57a5042f.tar.gz
samba-cbad6e2c140e59a6ec653bcfe773599a57a5042f.tar.bz2
samba-cbad6e2c140e59a6ec653bcfe773599a57a5042f.zip
tdb2: unify tdb1_open into tdb_open
Finally, we gut tdb1_open() to the tdb1-specific parts, and call it from tdb_open if they specify the TDB_VERSION1 flag or the version is a TDB1. We also unify tdb_close(), based on the TDB_VERSION1 flag. Note that tdb_open(TDB_VERSION1) will fail on an existing tdb if it's a TDB2. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit c8c3b3568677e8b0105f84e4ab068c580faf4591)
Diffstat (limited to 'lib/tdb2/tdb1_private.h')
-rw-r--r--lib/tdb2/tdb1_private.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/tdb2/tdb1_private.h b/lib/tdb2/tdb1_private.h
index 034c7e3328..2e292ee0bc 100644
--- a/lib/tdb2/tdb1_private.h
+++ b/lib/tdb2/tdb1_private.h
@@ -62,7 +62,6 @@
#define TDB1_DEFAULT_HASH_SIZE 131
#define TDB1_FREELIST_TOP (sizeof(struct tdb1_header))
#define TDB1_ALIGN(x,a) (((x) + (a)-1) & ~((a)-1))
-#define TDB1_BYTEREV(x) (((((x)&0xff)<<24)|((x)&0xFF00)<<8)|(((x)>>8)&0xFF00)|((x)>>24))
#define TDB1_DEAD(r) ((r)->magic == TDB1_DEAD_MAGIC)
#define TDB1_BAD_MAGIC(r) ((r)->magic != TDB1_MAGIC && !TDB1_DEAD(r))
#define TDB1_HASH_TOP(hash) (TDB1_FREELIST_TOP + (TDB1_BUCKET(hash)+1)*sizeof(tdb1_off_t))
@@ -145,7 +144,6 @@ int tdb1_recovery_area(struct tdb_context *tdb,
struct tdb1_record *rec);
int tdb1_allrecord_lock(struct tdb_context *tdb, int ltype,
enum tdb_lock_flags flags, bool upgradable);
-int tdb1_allrecord_unlock(struct tdb_context *tdb, int ltype);
int tdb1_allrecord_upgrade(struct tdb_context *tdb);
int tdb1_write_lock_record(struct tdb_context *tdb, tdb1_off_t off);
int tdb1_write_unlock_record(struct tdb_context *tdb, tdb1_off_t off);
@@ -175,7 +173,6 @@ int tdb1_expand(struct tdb_context *tdb, tdb1_off_t size);
int tdb1_rec_free_read(struct tdb_context *tdb, tdb1_off_t off,
struct tdb1_record *rec);
bool tdb1_write_all(int fd, const void *buf, size_t count);
-int tdb1_transaction_recover(struct tdb_context *tdb);
void tdb1_header_hash(struct tdb_context *tdb,
uint32_t *magic1_hash, uint32_t *magic2_hash);
uint64_t tdb1_old_hash(const void *key, size_t len, uint64_t seed, void *);