Rename the dbi access method member dbi_type -> dbi_dbtype

- make it more obvious what it is
This commit is contained in:
Panu Matilainen 2010-04-01 11:47:15 +03:00
parent f30e6d409a
commit 7b666ce208
3 changed files with 9 additions and 9 deletions

View File

@ -630,13 +630,13 @@ int dbiOpenDB(rpmdb rpmdb, rpmTag rpmtag, dbiIndex * dbip)
dbpath = fullpath;
}
rc = (db->open)(db, txnid, dbpath, NULL,
dbi->dbi_type, oflags, dbi->dbi_perms);
dbi->dbi_dbtype, oflags, dbi->dbi_perms);
if (rc == 0 && dbi->dbi_type == DB_UNKNOWN) {
DBTYPE dbi_type = DB_UNKNOWN;
xx = db->get_type(db, &dbi_type);
if (rc == 0 && dbi->dbi_dbtype == DB_UNKNOWN) {
DBTYPE dbi_dbtype = DB_UNKNOWN;
xx = db->get_type(db, &dbi_dbtype);
if (xx == 0)
dbi->dbi_type = dbi_type;
dbi->dbi_dbtype = dbi_dbtype;
}
free(fullpath);
}

View File

@ -65,11 +65,11 @@ static const struct poptOption rdbOptions[] = {
{ "fcntl_locking",0,POPT_BIT_SET, &staticdbi.dbi_oflags, DB_FCNTL_LOCKING,
NULL, NULL },
{ "btree", 0,POPT_ARG_VAL, &staticdbi.dbi_type, DB_BTREE,
{ "btree", 0,POPT_ARG_VAL, &staticdbi.dbi_dbtype, DB_BTREE,
NULL, NULL },
{ "hash", 0,POPT_ARG_VAL, &staticdbi.dbi_type, DB_HASH,
{ "hash", 0,POPT_ARG_VAL, &staticdbi.dbi_dbtype, DB_HASH,
NULL, NULL },
{ "unknown", 0,POPT_ARG_VAL, &staticdbi.dbi_type, DB_UNKNOWN,
{ "unknown", 0,POPT_ARG_VAL, &staticdbi.dbi_dbtype, DB_UNKNOWN,
NULL, NULL },
{ "mode", 0,POPT_ARG_INT, &staticdbi.dbi_mode, 0,

View File

@ -16,7 +16,7 @@ struct _dbiIndex {
int dbi_oflags; /*!< db->open flags */
int dbi_tflags; /*!< dbenv->txn_begin flags */
int dbi_type; /*!< db index type */
DBTYPE dbi_dbtype; /*!< db index type */
unsigned dbi_mode; /*!< mode to use on open */
int dbi_perms; /*!< file permission to use on open */