|
rpm
5.4.10
|
#include "system.h"#include <rpmiotypes.h>#include <rpmio.h>#include <rpmmacro.h>#include <rpmtag.h>#include <rpmdb.h>#include "fprint.h"#include "debug.h"#include "rpmfi.h"#include "rpmte.h"
Go to the source code of this file.
Macros | |
| #define | _FPRINT_INTERNAL |
| #define | _RPMFI_INTERNAL |
| #define | _RPMTE_INTERNAL |
Functions | |
| fingerPrintCache | fpCacheCreate (int sizeHint) |
| Create finger print cache. | |
| fingerPrintCache | fpCacheFree (fingerPrintCache cache) |
| Destroy finger print cache. | |
| static struct fprintCacheEntry_s * | cacheContainsDirectory (fingerPrintCache cache, const char *dirName) |
| Find directory name entry in cache. | |
| static fingerPrint | doLookup (fingerPrintCache cache, const char *dirName, const char *baseName, int scareMem) |
| Return finger print of a file path. | |
| fingerPrint | fpLookup (fingerPrintCache cache, const char *dirName, const char *baseName, int scareMem) |
| Return finger print of a file path. | |
| rpmuint32_t | fpHashFunction (rpmuint32_t h, const void *data, size_t size) |
| int | fpEqual (const void *key1, const void *key2) |
| Compare two finger print entries. | |
| void | fpLookupList (fingerPrintCache cache, const char **dirNames, const char **baseNames, const rpmuint32_t *dirIndexes, rpmuint32_t fileCount, fingerPrint *fpList) |
| Return finger prints of an array of file paths. | |
| void | fpLookupSubdir (hashTable symlinks, hashTable fphash, fingerPrintCache fpc, void *_p, int filenr) |
| Check file for to be installed symlinks in their path, correct their fingerprint and add it to newht. | |
Definition in file fprint.c.
|
staticread |
Find directory name entry in cache.
| cache | pointer to fingerprint cache |
| dirName | string to locate in cache |
Definition at line 44 of file fprint.c.
References htGetEntry().
Referenced by doLookup().
|
static |
Return finger print of a file path.
| cache | pointer to fingerprint cache |
| dirName | leading directory name of path |
| baseName | file name of path |
| scareMem |
Definition at line 64 of file fprint.c.
References alloca(), fingerPrint_s::baseName, cacheContainsDirectory(), dirName, fingerPrint_s::entry, htAddEntry(), PATH_MAX, Realpath(), rpmCleanPath(), stpncpy(), fingerPrint_s::subDir, xmalloc, and xstrdup().
Referenced by fpLookup(), and fpLookupList().
| fingerPrintCache fpCacheCreate | ( | int | sizeHint | ) |
Create finger print cache.
| sizeHint | number of elements expected |
Definition at line 21 of file fprint.c.
References htCreate(), and xmalloc.
Referenced by rpmtsPrepare().
| fingerPrintCache fpCacheFree | ( | fingerPrintCache | cache | ) |
Destroy finger print cache.
| cache | pointer to fingerprint cache |
Definition at line 31 of file fprint.c.
References htFree().
Referenced by rpmtsPrepare().
| int fpEqual | ( | const void * | key1, |
| const void * | key2 | ||
| ) |
Compare two finger print entries.
This routine is exactly equivalent to the FP_EQUAL macro.
| key1 | finger print 1 |
| key2 | finger print 2 |
Definition at line 212 of file fprint.c.
References FP_EQUAL.
Referenced by rpmtsAddFingerprints(), and rpmtsPrepare().
| rpmuint32_t fpHashFunction | ( | rpmuint32_t | h, |
| const void * | data, | ||
| size_t | size | ||
| ) |
Definition at line 196 of file fprint.c.
References fingerPrint_s::baseName, and fingerPrint_s::entry.
Referenced by rpmtsAddFingerprints(), and rpmtsPrepare().
| fingerPrint fpLookup | ( | fingerPrintCache | cache, |
| const char * | dirName, | ||
| const char * | baseName, | ||
| int | scareMem | ||
| ) |
Return finger print of a file path.
| cache | pointer to fingerprint cache |
| dirName | leading directory name of file path |
| baseName | base name of file path |
| scareMem |
Definition at line 190 of file fprint.c.
References doLookup().
Referenced by fpLookupSubdir(), and rpmtsCheckInstalledFiles().
| void fpLookupList | ( | fingerPrintCache | cache, |
| const char ** | dirNames, | ||
| const char ** | baseNames, | ||
| const rpmuint32_t * | dirIndexes, | ||
| rpmuint32_t | fileCount, | ||
| fingerPrint * | fpList | ||
| ) |
Return finger prints of an array of file paths.
| cache | pointer to fingerprint cache |
| dirNames | directory names |
| baseNames | file base names |
| dirIndexes | index into dirNames for each baseNames |
| fileCount | number of file entries |
| *fpList | array of finger prints |
Definition at line 230 of file fprint.c.
References fingerPrint_s::baseName, doLookup(), fingerPrint_s::entry, and fingerPrint_s::subDir.
Referenced by rpmfiFpLookup().
| void fpLookupSubdir | ( | hashTable | symlinks, |
| hashTable | fphash, | ||
| fingerPrintCache | fpc, | ||
| void * | _p, | ||
| int | filenr | ||
| ) |
Check file for to be installed symlinks in their path, correct their fingerprint and add it to newht.
| ht | hash table containing all files fingerprints |
| newht | hash table to add the corrected fingerprints |
| fpc | fingerprint cache |
| _p | transaction element |
| filenr | the number of the file we are dealing with |
Definition at line 299 of file fprint.c.
References _free(), fingerPrint_s::baseName, fpLookup(), htAddEntry(), htGetEntry(), recs, rpmGetPath(), xmalloc, and xstrdup().
Referenced by rpmtsAddFingerprints().
1.8.1.2