+ if (hsize_attr) {
+ if (!(tdb_flags & TDB_VERSION1) ||
+ (!(tdb_flags & TDB_INTERNAL) && !(open_flags & O_CREAT))) {
+ ecode = tdb_logerr(tdb, TDB_ERR_EINVAL,
+ TDB_LOG_USE_ERROR,
+ "tdb_open: can only use"
+ " TDB_ATTRIBUTE_TDB1_HASHSIZE when"
+ " creating a TDB_VERSION1 tdb");
+ goto fail;
+ }
+ }
+
+ if (seed) {
+ if (tdb_flags & TDB_VERSION1) {
+ ecode = tdb_logerr(tdb, TDB_ERR_EINVAL,
+ TDB_LOG_USE_ERROR,
+ "tdb_open:"
+ " cannot set TDB_ATTRIBUTE_SEED"
+ " on TDB1 tdb.");
+ goto fail;
+ } else if (!(tdb_flags & TDB_INTERNAL)
+ && !(open_flags & O_CREAT)) {
+ ecode = tdb_logerr(tdb, TDB_ERR_EINVAL,
+ TDB_LOG_USE_ERROR,
+ "tdb_open:"
+ " cannot set TDB_ATTRIBUTE_SEED"
+ " without O_CREAT.");
+ goto fail;
+ }
+ }
+