]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
As pointed out recently on a GNU cpio mailing list, you can't
authorTim Kientzle <kientzle@gmail.com>
Sat, 16 Jan 2010 07:11:58 +0000 (02:11 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sat, 16 Jan 2010 07:11:58 +0000 (02:11 -0500)
hardlink device nodes.

SVN-Revision: 1821

libarchive/archive_entry_link_resolver.c

index ae2d2ab254df00e29130c386174dda841ef0dd97..3b13e19c8bf7363a38a7f9dec98cde0752c1ede5 100644 (file)
@@ -181,8 +181,10 @@ archive_entry_linkify(struct archive_entry_linkresolver *res,
        /* 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) {