Add (and use) rpmfiles counterpart for rpmfiFindFN()
This commit is contained in:
parent
2dda4fd863
commit
4640e833da
15
lib/rpmfi.c
15
lib/rpmfi.c
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue