]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Use portable archive_entry services instead of S_ISBLK() and S_ISCHR() macros.
authorTim Kientzle <kientzle@gmail.com>
Thu, 6 Aug 2009 05:03:38 +0000 (01:03 -0400)
committerTim Kientzle <kientzle@gmail.com>
Thu, 6 Aug 2009 05:03:38 +0000 (01:03 -0400)
SVN-Revision: 1347

cpio/cpio.c

index 5b2a9afa5ae774c899f5f109a8b1387e27040d41..6b6bb696579e560d8e347b261f2e63a73c438af6 100644 (file)
@@ -973,7 +973,8 @@ list_item_verbose(struct cpio *cpio, struct archive_entry *entry)
        }
 
        /* Print device number or file size. */
-       if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) {
+       if (archive_entry_filetype(entry) == AE_IFCHR
+           || archive_entry_filetype(entry) == AE_IFBLK) {
                snprintf(size, sizeof(size), "%lu,%lu",
                    (unsigned long)archive_entry_rdevmajor(entry),
                    (unsigned long)archive_entry_rdevminor(entry));