#undef HTKEYTYPE
#undef HTDATATYPE
+/**
+ * Finger print cache entry.
+ * This is really a directory and symlink cache. We don't differentiate between
+ * the two. We can prepopulate it, which allows us to easily conduct "fake"
+ * installs of a system w/o actually mounting filesystems.
+ */
+struct fprintCacheEntry_s {
+ const char * dirName; /*!< path to existing directory */
+ dev_t dev; /*!< stat(2) device number */
+ ino_t ino; /*!< stat(2) inode number */
+};
+
#define FP_ENTRY_EQUAL(a, b) (((a)->dev == (b)->dev) && ((a)->ino == (b)->ino))
#define FP_EQUAL(a, b) ( \
}
+const char * fpEntryDir(fingerPrintCache cache, fingerPrint *fp)
+{
+ return (fp && fp->entry) ? fp->entry->dirName : NULL;
+}
+
+dev_t fpEntryDev(fingerPrintCache cache, fingerPrint *fp)
+{
+ return (fp && fp->entry) ? fp->entry->dev : 0;
+}
+
int fpLookupEquals(fingerPrintCache cache, fingerPrint *fp,
- const char * dirName, const char * baseName)
+ const char * dirName, const char * baseName)
{
struct fingerPrint_s ofp;
fpLookup(cache, dirName, baseName, 1, &ofp);
const char * baseName; /*!< file base name */
};
-/**
- * Finger print cache entry.
- * This is really a directory and symlink cache. We don't differentiate between
- * the two. We can prepopulate it, which allows us to easily conduct "fake"
- * installs of a system w/o actually mounting filesystems.
- */
-struct fprintCacheEntry_s {
- const char * dirName; /*!< path to existing directory */
- dev_t dev; /*!< stat(2) device number */
- ino_t ino; /*!< stat(2) inode number */
-};
-
struct rpmffi_s {
rpmte p;
int fileno;
int fpLookupEquals(fingerPrintCache cache, fingerPrint * fp,
const char * dirName, const char * baseName);
+RPM_GNUC_INTERNAL
+const char *fpEntryDir(fingerPrintCache cache, fingerPrint *fp);
+
+RPM_GNUC_INTERNAL
+dev_t fpEntryDev(fingerPrintCache cache, fingerPrint *fp);
+
/**
* Return finger print of a file path.
* @param cache pointer to fingerprint cache
}
/* Update disk space info for a file. */
- rpmtsUpdateDSI(ts, fiFps->entry->dev, fiFps->entry->dirName,
+ rpmtsUpdateDSI(ts, fpEntryDev(fpc, fiFps), fpEntryDir(fpc, fiFps),
rpmfiFSizeIndex(fi, i), rpmfiFReplacedSizeIndex(fi, i),
fixupSize, rpmfsGetAction(fs, i));