svn commit: r201100 - head/lib/libarchive

Tim Kientzle kientzle at FreeBSD.org
Mon Dec 28 03:05:32 UTC 2009


Author: kientzle
Date: Mon Dec 28 03:05:31 2009
New Revision: 201100
URL: http://svn.freebsd.org/changeset/base/201100

Log:
  Use ino64 interface.

Modified:
  head/lib/libarchive/archive_entry_link_resolver.c
  head/lib/libarchive/archive_entry_stat.c

Modified: head/lib/libarchive/archive_entry_link_resolver.c
==============================================================================
--- head/lib/libarchive/archive_entry_link_resolver.c	Mon Dec 28 03:03:00 2009	(r201099)
+++ head/lib/libarchive/archive_entry_link_resolver.c	Mon Dec 28 03:05:31 2009	(r201100)
@@ -249,7 +249,7 @@ find_entry(struct archive_entry_linkreso
 	struct links_entry	*le;
 	int			 hash, bucket;
 	dev_t			 dev;
-	ino_t			 ino;
+	int64_t			 ino;
 
 	/* Free a held entry. */
 	if (res->spare != NULL) {
@@ -264,15 +264,15 @@ find_entry(struct archive_entry_linkreso
 		return (NULL);
 
 	dev = archive_entry_dev(entry);
-	ino = archive_entry_ino(entry);
-	hash = dev ^ ino;
+	ino = archive_entry_ino64(entry);
+	hash = (int)(dev ^ ino);
 
 	/* Try to locate this entry in the links cache. */
 	bucket = hash % res->number_buckets;
 	for (le = res->buckets[bucket]; le != NULL; le = le->next) {
 		if (le->hash == hash
 		    && dev == archive_entry_dev(le->canonical)
-		    && ino == archive_entry_ino(le->canonical)) {
+		    && ino == archive_entry_ino64(le->canonical)) {
 			/*
 			 * Decrement link count each time and release
 			 * the entry if it hits zero.  This saves
@@ -350,7 +350,7 @@ insert_entry(struct archive_entry_linkre
 	if (res->number_entries > res->number_buckets * 2)
 		grow_hash(res);
 
-	hash = archive_entry_dev(entry) ^ archive_entry_ino(entry);
+	hash = archive_entry_dev(entry) ^ archive_entry_ino64(entry);
 	bucket = hash % res->number_buckets;
 
 	/* If we could allocate the entry, record it. */

Modified: head/lib/libarchive/archive_entry_stat.c
==============================================================================
--- head/lib/libarchive/archive_entry_stat.c	Mon Dec 28 03:03:00 2009	(r201099)
+++ head/lib/libarchive/archive_entry_stat.c	Mon Dec 28 03:05:31 2009	(r201100)
@@ -72,7 +72,7 @@ archive_entry_stat(struct archive_entry 
 	st->st_dev = archive_entry_dev(entry);
 	st->st_gid = archive_entry_gid(entry);
 	st->st_uid = archive_entry_uid(entry);
-	st->st_ino = archive_entry_ino(entry);
+	st->st_ino = archive_entry_ino64(entry);
 	st->st_nlink = archive_entry_nlink(entry);
 	st->st_rdev = archive_entry_rdev(entry);
 	st->st_size = archive_entry_size(entry);


More information about the svn-src-all mailing list