Be a little more skeptical of dev/ino matches when reading cpio files.

This eliminates some false-positives in the hardlink detection logic.
This commit is contained in:
Tim Kientzle 2009-12-29 05:50:34 +00:00
parent 023a748ef3
commit 7f16f13149
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201163

View File

@ -92,7 +92,7 @@ struct links_entry {
struct links_entry *previous;
int links;
dev_t dev;
ino_t ino;
int64_t ino;
char *name;
};
@ -729,13 +729,13 @@ record_hardlink(struct cpio *cpio, struct archive_entry *entry)
{
struct links_entry *le;
dev_t dev;
ino_t ino;
int64_t ino;
if (archive_entry_nlink(entry) <= 1)
return;
dev = archive_entry_dev(entry);
ino = archive_entry_ino(entry);
ino = archive_entry_ino64(entry);
/*
* First look in the list of multiply-linked files. If we've