summaryrefslogtreecommitdiff
path: root/lib/rpmfi.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-12-11 10:07:41 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-12-11 10:07:41 +0200
commit3c22ec586f58e210331988b56873a109f74ca182 (patch)
treec16e69b157e560eec85016d01687c3d95add5736 /lib/rpmfi.c
parentf19c89778520b8c9e61db8744cb45abf489c6132 (diff)
downloadlibrpm-tizen-3c22ec586f58e210331988b56873a109f74ca182.tar.gz
librpm-tizen-3c22ec586f58e210331988b56873a109f74ca182.tar.bz2
librpm-tizen-3c22ec586f58e210331988b56873a109f74ca182.zip
Add (internal) rpmfi accessor for dir indexes
- except for dnli->active setting in dnlInitIterator(), "give me directory matching this basename index" would be sufficient
Diffstat (limited to 'lib/rpmfi.c')
-rw-r--r--lib/rpmfi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index 6bf564797..9a04cfb73 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -156,6 +156,16 @@ int rpmfiSetDX(rpmfi fi, int dx)
return j;
}
+int rpmfiDIIndex(rpmfi fi, int dx)
+{
+ int j = -1;
+ if (fi != NULL && dx >= 0 && dx < fi->fc) {
+ if (fi->dil != NULL)
+ j = fi->dil[dx];
+ }
+ return j;
+}
+
const char * rpmfiBNIndex(rpmfi fi, int ix)
{
const char * BN = NULL;