From owner-svn-src-all@FreeBSD.ORG Sat Jan 23 07:57:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B41BE1065672; Sat, 23 Jan 2010 07:57:17 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A45808FC12; Sat, 23 Jan 2010 07:57:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0N7vHGM041805; Sat, 23 Jan 2010 07:57:17 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0N7vHTM041803; Sat, 23 Jan 2010 07:57:17 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201001230757.o0N7vHTM041803@svn.freebsd.org> From: Tim Kientzle Date: Sat, 23 Jan 2010 07:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202873 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 07:57:17 -0000 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) {