}
struct tdb_context *
-tdb_open_compat_(const char *name, int hash_size_unused,
+tdb_open_compat_(const char *name, int hash_size,
int tdb_flags, int open_flags, mode_t mode,
void (*log_fn)(struct tdb_context *,
enum tdb_log_level,
void *data),
void *log_data)
{
- union tdb_attribute cif, log, hash, max_dead, *attr = NULL;
+ union tdb_attribute cif, log, hash, max_dead, hsize, *attr = NULL;
if (log_fn) {
log.log.base.attr = TDB_ATTRIBUTE_LOG;
tdb_flags &= ~TDB_VOLATILE;
}
+ if (hash_size && (tdb_flags & TDB_VERSION1)) {
+ hsize.base.attr = TDB_ATTRIBUTE_TDB1_HASHSIZE;
+ hsize.base.next = attr;
+ hsize.tdb1_hashsize.hsize = hash_size;
+ attr = &hsize;
+ }
+
/* Testsuite uses this to speed things up. */
if (getenv("TDB_NO_FSYNC")) {
tdb_flags |= TDB_NOSYNC;
(log_data))
struct tdb_context *
-tdb_open_compat_(const char *name, int hash_size_unused,
+tdb_open_compat_(const char *name, int hash_size,
int tdb_flags, int open_flags, mode_t mode,
void (*log_fn)(struct tdb_context *,
enum tdb_log_level,