Date: Sat, 23 Jan 2010 07:57:17 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r202873 - head/lib/libarchive Message-ID: <201001230757.o0N7vHTM041803@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Sat Jan 23 07:57:17 2010 New Revision: 202873 URL: http://svn.freebsd.org/changeset/base/202873 Log: Don't try to hardlink block or character device nodes that come out of cpio archives. Modified: head/lib/libarchive/archive_entry_link_resolver.c Modified: head/lib/libarchive/archive_entry_link_resolver.c ============================================================================== --- head/lib/libarchive/archive_entry_link_resolver.c Sat Jan 23 07:55:53 2010 (r202872) +++ head/lib/libarchive/archive_entry_link_resolver.c Sat Jan 23 07:57:17 2010 (r202873) @@ -181,8 +181,10 @@ archive_entry_linkify(struct archive_ent /* If it has only one link, then we're done. */ if (archive_entry_nlink(*e) == 1) return; - /* Directories never have hardlinks. */ - if (archive_entry_filetype(*e) == AE_IFDIR) + /* Directories, devices never have hardlinks. */ + if (archive_entry_filetype(*e) == AE_IFDIR + || archive_entry_filetype(*e) == AE_IFBLK + || archive_entry_filetype(*e) == AE_IFCHR) return; switch (res->strategy) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001230757.o0N7vHTM041803>