summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-10-20 12:23:14 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-10-20 12:23:14 +0300
commit00454b620862af9d5952f103b196aa916d133b6d (patch)
treef87728699ca9a53512be0c3e1363e840dea04752 /lib
parentbf8cfe884bf24f531f9b318bc8288951a07802c9 (diff)
downloadlibrpm-tizen-00454b620862af9d5952f103b196aa916d133b6d.tar.gz
librpm-tizen-00454b620862af9d5952f103b196aa916d133b6d.tar.bz2
librpm-tizen-00454b620862af9d5952f103b196aa916d133b6d.zip
Add a getter for dbi name
Diffstat (limited to 'lib')
-rw-r--r--lib/backend/db3.c5
-rw-r--r--lib/backend/dbi.h9
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/backend/db3.c b/lib/backend/db3.c
index 6cad9e8ec..120bc3789 100644
--- a/lib/backend/db3.c
+++ b/lib/backend/db3.c
@@ -381,6 +381,11 @@ int dbiFlags(dbiIndex dbi)
return flags;
}
+const char * dbiName(dbiIndex dbi)
+{
+ return dbi->dbi_file;
+}
+
int dbiVerify(dbiIndex dbi, unsigned int flags)
{
int rc = 0;
diff --git a/lib/backend/dbi.h b/lib/backend/dbi.h
index 407b0cdcd..946e636d5 100644
--- a/lib/backend/dbi.h
+++ b/lib/backend/dbi.h
@@ -243,6 +243,15 @@ dbiIndexType dbiType(dbiIndex dbi);
*/
RPM_GNUC_INTERNAL
int dbiFlags(dbiIndex dbi);
+
+/** \ingroup dbi
+ * Retrieve index name (same as the backing file name)
+ * @param dbi index database handle
+ * @return dbi name
+ */
+RPM_GNUC_INTERNAL
+const char * dbiName(dbiIndex dbi);
+
#ifdef __cplusplus
}
#endif