diff options
Diffstat (limited to 'src/gdbmtool.c')
-rw-r--r-- | src/gdbmtool.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gdbmtool.c b/src/gdbmtool.c index e99547d..5ae668c 100644 --- a/src/gdbmtool.c +++ b/src/gdbmtool.c @@ -89,3 +89,3 @@ opendb (char *dbname) flags |= GDBM_SYNC; - + if (open_mode == GDBM_NEWDB) @@ -116,2 +116,15 @@ opendb (char *dbname) + if (variable_is_true ("coalesce")) + { + int t = 1; + if (gdbm_setopt (db, GDBM_SETCOALESCEBLKS, &t, sizeof (t)) == -1) + terror (_("gdbm_setopt failed: %s"), gdbm_strerror (gdbm_errno)); + } + if (variable_is_true ("centfree")) + { + int t = 1; + if (gdbm_setopt (db, GDBM_SETCENTFREE, &t, sizeof (t)) == -1) + terror (_("gdbm_setopt failed: %s"), gdbm_strerror (gdbm_errno)); + } + if (gdbm_file) |