Add (and use) rpmfiles counterpart for rpmfiFindFN()

This commit is contained in:
Panu Matilainen 2013-11-08 10:18:06 +02:00
parent 2dda4fd863
commit 4640e833da
2 changed files with 14 additions and 3 deletions

View File

@ -262,12 +262,11 @@ char * rpmfilesFN(rpmfiles fi, int ix)
return fn;
}
int rpmfiFindFN(rpmfi fi, const char * fn)
int rpmfilesFindFN(rpmfiles files, const char * fn)
{
if (fi == NULL || fn == NULL)
if (files == NULL || fn == NULL)
return -1;
rpmfiles files = fi->files;
const rpmsid * bnid = files->bnid;
const rpmsid * dnid = files->dnid;
uint32_t * dil = files->dil;
@ -314,6 +313,16 @@ int rpmfiFindFN(rpmfi fi, const char * fn)
return -1;
}
int rpmfiFindFN(rpmfi fi, const char * fn)
{
int ix = -1;
if (fi != NULL) {
ix = rpmfilesFindFN(fi->files, fn);
}
return ix;
}
rpmfileAttrs rpmfilesFFlags(rpmfiles fi, int ix)
{
rpmfileAttrs FFlags = 0;

View File

@ -147,6 +147,8 @@ rpm_count_t rpmfilesFC(rpmfiles fi);
rpm_count_t rpmfilesDC(rpmfiles fi);
int rpmfilesFindFN(rpmfiles files, const char * fn);
rpmfi rpmfilesIter(rpmfiles files, int flags);
int rpmfilesDigestAlgo(rpmfiles fi);