#include "system.h"
#include <rpmdb.h>
#include <rpmmacro.h>
#include "fprint.h"
#include "debug.h"
Go to the source code of this file.
Functions | |
fingerPrintCache | fpCacheCreate (int sizeHint) |
Create finger print cache. | |
void | fpCacheFree (fingerPrintCache cache) |
Destroy finger print cache. | |
const struct fprintCacheEntry_s * | cacheContainsDirectory (fingerPrintCache cache, const char *dirName) |
Find directory name entry in cache. | |
fingerPrint | doLookup (fingerPrintCache cache, const char *dirName, const char *baseName, int scareMemory) |
Return finger print of a file path. | |
fingerPrint | fpLookup (fingerPrintCache cache, const char *dirName, const char *baseName, int scareMemory) |
Return finger print of a file path. | |
unsigned int | fpHashFunction (const void *key) |
Return hash value for a finger print. | |
int | fpEqual (const void *key1, const void *key2) |
Compare two finger print entries. | |
void | fpLookupList (fingerPrintCache cache, const char **dirNames, const char **baseNames, const int *dirIndexes, int fileCount, fingerPrint *fpList) |
Return finger prints of an array of file paths. | |
void | fpLookupHeader (fingerPrintCache cache, Header h, fingerPrint *fpList) |
Return finger prints of all file names in header. |
Definition in file fprint.c.
|
Find directory name entry in cache.
Definition at line 35 of file fprint.c. References fingerPrintCache, fprintCache_s::ht, and htGetEntry(). Referenced by doLookup(). |
|
Return finger print of a file path.
Definition at line 55 of file fprint.c. References alloca(), fingerPrint_s::baseName, cacheContainsDirectory(), fingerPrint_s::entry, fingerPrint, fingerPrintCache, fprintCache_s::ht, htAddEntry(), PATH_MAX, realpath(), rpmCleanPath(), stpncpy(), fingerPrint_s::subDir, xmalloc(), and xstrdup(). Referenced by fpLookup(), and fpLookupList(). |
|
Create finger print cache.
Definition at line 13 of file fprint.c. References fingerPrintCache, hashEqualityString(), hashFunctionString(), htCreate(), and xmalloc(). Referenced by rpmdbFindByFile(), rpmdbFindFpList(), and rpmRunTransactions(). |
|
Destroy finger print cache.
Definition at line 23 of file fprint.c. References fingerPrintCache, fprintCache_s::ht, and htFree(). Referenced by rpmdbFindByFile(), rpmdbFindFpList(), and rpmRunTransactions(). |
|
Compare two finger print entries. exactly equivalent to FP_EQUAL macro.
Definition at line 209 of file fprint.c. References fingerPrint, and FP_EQUAL. Referenced by rpmRunTransactions(). |
|
Return hash value for a finger print. Hash based on dev and inode only!
Definition at line 191 of file fprint.c. References fingerPrint_s::baseName, fprintCacheEntry_s::dev, fingerPrint_s::entry, fingerPrint, and fprintCacheEntry_s::ino. Referenced by rpmRunTransactions(). |
|
Return finger print of a file path.
Definition at line 185 of file fprint.c. References doLookup(), fingerPrint, and fingerPrintCache. Referenced by rpmdbFindByFile(). |
|
Return finger prints of all file names in header.
Definition at line 247 of file fprint.c. References fingerPrint, fingerPrintCache, fpLookupList(), Header, HFD_t, HGE_t, int_32, RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, and rpmTagType. |
|
Return finger prints of an array of file paths.
Definition at line 227 of file fprint.c. References fingerPrint_s::baseName, doLookup(), fingerPrint_s::entry, fingerPrint, fingerPrintCache, and fingerPrint_s::subDir. Referenced by fpLookupHeader(), rpmdbFindFpList(), and rpmRunTransactions(). |