From e9fe56cdf3285295642db09b70b673d865551b4a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:25:13 +0930 Subject: tdb2: Remove unused tdb1 functions. We're going to use TDB2's API, so some TDB1 APIs are obviously unnecessary. We also get rid of USE_RIGHT_MERGES and TRACE code. Signed-off-by: Rusty Russell (Imported from CCAN commit b929638e3cfe629285af3ecd0813e03eaeaa1133) --- lib/tdb2/tdb1_tdb.c | 78 ----------------------------------------------------- 1 file changed, 78 deletions(-) (limited to 'lib/tdb2/tdb1_tdb.c') diff --git a/lib/tdb2/tdb1_tdb.c b/lib/tdb2/tdb1_tdb.c index 1ada443d60..93d2132f38 100644 --- a/lib/tdb2/tdb1_tdb.c +++ b/lib/tdb2/tdb1_tdb.c @@ -661,25 +661,6 @@ failed: } -/* - return the name of the current tdb file - useful for external logging functions -*/ -_PUBLIC_ const char *tdb1_name(struct tdb1_context *tdb) -{ - return tdb->name; -} - -/* - return the underlying file descriptor being used by tdb, or -1 - useful for external routines that want to check the device/inode - of the fd -*/ -_PUBLIC_ int tdb1_fd(struct tdb1_context *tdb) -{ - return tdb->fd; -} - /* return the current logging function useful for external tdb routines that wish to log tdb errors @@ -713,65 +694,6 @@ _PUBLIC_ int tdb1_hash_size(struct tdb1_context *tdb) return tdb->header.hash_size; } -_PUBLIC_ size_t tdb1_map_size(struct tdb1_context *tdb) -{ - return tdb->map_size; -} - -_PUBLIC_ int tdb1_get_flags(struct tdb1_context *tdb) -{ - return tdb->flags; -} - -_PUBLIC_ void tdb1_add_flags(struct tdb1_context *tdb, unsigned flags) -{ - if ((flags & TDB1_ALLOW_NESTING) && - (flags & TDB1_DISALLOW_NESTING)) { - tdb->ecode = TDB1_ERR_NESTING; - TDB1_LOG((tdb, TDB1_DEBUG_FATAL, "tdb1_add_flags: " - "allow_nesting and disallow_nesting are not allowed together!")); - return; - } - - if (flags & TDB1_ALLOW_NESTING) { - tdb->flags &= ~TDB1_DISALLOW_NESTING; - } - if (flags & TDB1_DISALLOW_NESTING) { - tdb->flags &= ~TDB1_ALLOW_NESTING; - } - - tdb->flags |= flags; -} - -_PUBLIC_ void tdb1_remove_flags(struct tdb1_context *tdb, unsigned flags) -{ - if ((flags & TDB1_ALLOW_NESTING) && - (flags & TDB1_DISALLOW_NESTING)) { - tdb->ecode = TDB1_ERR_NESTING; - TDB1_LOG((tdb, TDB1_DEBUG_FATAL, "tdb1_remove_flags: " - "allow_nesting and disallow_nesting are not allowed together!")); - return; - } - - if (flags & TDB1_ALLOW_NESTING) { - tdb->flags |= TDB1_DISALLOW_NESTING; - } - if (flags & TDB1_DISALLOW_NESTING) { - tdb->flags |= TDB1_ALLOW_NESTING; - } - - tdb->flags &= ~flags; -} - - -/* - enable sequence number handling on an open tdb -*/ -_PUBLIC_ void tdb1_enable_seqnum(struct tdb1_context *tdb) -{ - tdb->flags |= TDB1_SEQNUM; -} - /* add a region of the file to the freelist. Length is the size of the region in bytes, -- cgit