diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-10-19 16:14:24 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-10-19 16:14:24 +0300 |
commit | 738c6e0ca76665387ef817fe25ded4f9ead5060b (patch) | |
tree | 1b88ed2bd7906266204fd86ed81c4ab70a21d996 /lib | |
parent | 43942e79a1ea955b2b7ba3a635921f579455cb5f (diff) | |
download | librpm-tizen-738c6e0ca76665387ef817fe25ded4f9ead5060b.tar.gz librpm-tizen-738c6e0ca76665387ef817fe25ded4f9ead5060b.tar.bz2 librpm-tizen-738c6e0ca76665387ef817fe25ded4f9ead5060b.zip |
Group the database options to per-dbi and per-environment groups
- No other changes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backend/dbconfig.c | 43 |
1 files changed, 22 insertions, 21 deletions
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 |