From 738c6e0ca76665387ef817fe25ded4f9ead5060b Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 19 Oct 2010 16:14:24 +0300 Subject: Group the database options to per-dbi and per-environment groups - No other changes --- lib/backend/dbconfig.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'lib/backend') diff --git a/lib/backend/dbconfig.c b/lib/backend/dbconfig.c index 046fcf52b..86edbcf3f 100644 --- a/lib/backend/dbconfig.c +++ b/lib/backend/dbconfig.c @@ -19,8 +19,8 @@ static struct _dbiIndex staticdbi; /** \ingroup dbi */ static const struct poptOption rdbOptions[] = { - /* XXX DB_CXX_NO_EXCEPTIONS */ - + /* Environment options */ + { "cdb", 0,POPT_BIT_SET, &staticdbi.dbi_eflags, DB_INIT_CDB, NULL, NULL }, { "lock", 0,POPT_BIT_SET, &staticdbi.dbi_eflags, DB_INIT_LOCK, @@ -38,42 +38,43 @@ static const struct poptOption rdbOptions[] = { { "private", 0,POPT_BIT_SET, &staticdbi.dbi_eflags, DB_PRIVATE, NULL, NULL }, - { "nommap", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOMMAP, + { "deadlock", 0,POPT_BIT_SET, &staticdbi.dbi_verbose, DB_VERB_DEADLOCK, NULL, NULL }, - - { "btree", 0,POPT_ARG_VAL, &staticdbi.dbi_dbtype, DB_BTREE, + { "recovery", 0,POPT_BIT_SET, &staticdbi.dbi_verbose, DB_VERB_RECOVERY, NULL, NULL }, - { "hash", 0,POPT_ARG_VAL, &staticdbi.dbi_dbtype, DB_HASH, + { "waitsfor", 0,POPT_BIT_SET, &staticdbi.dbi_verbose, DB_VERB_WAITSFOR, NULL, NULL }, - { "unknown", 0,POPT_ARG_VAL, &staticdbi.dbi_dbtype, DB_UNKNOWN, + { "verbose", 0,POPT_ARG_VAL, &staticdbi.dbi_verbose, -1, NULL, NULL }, - { "nofsync", 0,POPT_ARG_NONE, &staticdbi.dbi_no_fsync, 0, + { "cachesize", 0,POPT_ARG_INT, &staticdbi.dbi_cachesize, 0, NULL, NULL }, - { "nodbsync", 0,POPT_ARG_NONE, &staticdbi.dbi_no_dbsync, 0, + { "mmapsize", 0,POPT_ARG_INT, &staticdbi.dbi_mmapsize, 0, NULL, NULL }, - { "lockdbfd", 0,POPT_ARG_NONE, &staticdbi.dbi_lockdbfd, 0, + { "mp_mmapsize", 0,POPT_ARG_INT, &staticdbi.dbi_mmapsize, 0, NULL, NULL }, - - { "cachesize", 0,POPT_ARG_INT, &staticdbi.dbi_cachesize, 0, + { "mp_size", 0,POPT_ARG_INT, &staticdbi.dbi_cachesize, 0, NULL, NULL }, - { "deadlock", 0,POPT_BIT_SET, &staticdbi.dbi_verbose, DB_VERB_DEADLOCK, - NULL, NULL }, - { "recovery", 0,POPT_BIT_SET, &staticdbi.dbi_verbose, DB_VERB_RECOVERY, + { "nofsync", 0,POPT_ARG_NONE, &staticdbi.dbi_no_fsync, 0, NULL, NULL }, - { "waitsfor", 0,POPT_BIT_SET, &staticdbi.dbi_verbose, DB_VERB_WAITSFOR, + + /* Per-dbi options */ + { "pagesize", 0,POPT_ARG_INT, &staticdbi.dbi_pagesize, 0, NULL, NULL }, - { "verbose", 0,POPT_ARG_VAL, &staticdbi.dbi_verbose, -1, + { "nommap", 0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_NOMMAP, NULL, NULL }, - { "mmapsize", 0,POPT_ARG_INT, &staticdbi.dbi_mmapsize, 0, + { "btree", 0,POPT_ARG_VAL, &staticdbi.dbi_dbtype, DB_BTREE, NULL, NULL }, - { "mp_mmapsize", 0,POPT_ARG_INT, &staticdbi.dbi_mmapsize, 0, + { "hash", 0,POPT_ARG_VAL, &staticdbi.dbi_dbtype, DB_HASH, NULL, NULL }, - { "mp_size", 0,POPT_ARG_INT, &staticdbi.dbi_cachesize, 0, + { "unknown", 0,POPT_ARG_VAL, &staticdbi.dbi_dbtype, DB_UNKNOWN, NULL, NULL }, - { "pagesize", 0,POPT_ARG_INT, &staticdbi.dbi_pagesize, 0, + + { "nodbsync", 0,POPT_ARG_NONE, &staticdbi.dbi_no_dbsync, 0, + NULL, NULL }, + { "lockdbfd", 0,POPT_ARG_NONE, &staticdbi.dbi_lockdbfd, 0, NULL, NULL }, POPT_TABLEEND -- cgit v1.2.3