From 7b666ce208f9a5bccfb22e11645bc6e3af884776 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 1 Apr 2010 11:47:15 +0300 Subject: [PATCH] Rename the dbi access method member dbi_type -> dbi_dbtype - make it more obvious what it is --- lib/backend/db3.c | 10 +++++----- lib/backend/dbconfig.c | 6 +++--- lib/backend/dbi.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/backend/db3.c b/lib/backend/db3.c index b886868a7..db6b40083 100644 --- a/lib/backend/db3.c +++ b/lib/backend/db3.c @@ -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); } diff --git a/lib/backend/dbconfig.c b/lib/backend/dbconfig.c index db8c87ef4..d1e8760a1 100644 --- a/lib/backend/dbconfig.c +++ b/lib/backend/dbconfig.c @@ -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, diff --git a/lib/backend/dbi.h b/lib/backend/dbi.h index d1dcb9ea0..25b08536c 100644 --- a/lib/backend/dbi.h +++ b/lib/backend/dbi.h @@ -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 */