diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-12-11 10:07:41 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-12-11 10:07:41 +0200 |
commit | 3c22ec586f58e210331988b56873a109f74ca182 (patch) | |
tree | c16e69b157e560eec85016d01687c3d95add5736 /lib/rpmfi.c | |
parent | f19c89778520b8c9e61db8744cb45abf489c6132 (diff) | |
download | librpm-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.c | 10 |
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; |