Blame SOURCES/cpio-2.13-dev_number.patch

5c2053
From: Kamil Dudka <kdudka@redhat.com>
5c2053
Date: Mon, 14 Sep 2015 09:37:15 +0200
5c2053
Subject: [PATCH 3/7] Support major/minor device numbers over 127 (bz#450109)
5c2053
5c2053
diff --git a/src/copyin.c b/src/copyin.c
5c2053
index b29f348..1142d6a 100644
5c2053
--- a/src/copyin.c
5c2053
+++ b/src/copyin.c
5c2053
@@ -1123,15 +1123,15 @@ read_in_binary (struct cpio_file_stat *file_hdr,
5c2053
       swab_array ((char *) short_hdr, 13);
5c2053
     }
5c2053
 
5c2053
-  file_hdr->c_dev_maj = major (short_hdr->c_dev);
5c2053
-  file_hdr->c_dev_min = minor (short_hdr->c_dev);
5c2053
+  file_hdr->c_dev_maj = major ((unsigned short)short_hdr->c_dev);
5c2053
+  file_hdr->c_dev_min = minor ((unsigned short)short_hdr->c_dev);
5c2053
   file_hdr->c_ino = short_hdr->c_ino;
5c2053
   file_hdr->c_mode = short_hdr->c_mode;
5c2053
   file_hdr->c_uid = short_hdr->c_uid;
5c2053
   file_hdr->c_gid = short_hdr->c_gid;
5c2053
   file_hdr->c_nlink = short_hdr->c_nlink;
5c2053
-  file_hdr->c_rdev_maj = major (short_hdr->c_rdev);
5c2053
-  file_hdr->c_rdev_min = minor (short_hdr->c_rdev);
5c2053
+  file_hdr->c_rdev_maj = major ((unsigned short)short_hdr->c_rdev);
5c2053
+  file_hdr->c_rdev_min = minor ((unsigned short)short_hdr->c_rdev);
5c2053
   file_hdr->c_mtime = (unsigned long) short_hdr->c_mtimes[0] << 16
5c2053
                       | short_hdr->c_mtimes[1];
5c2053
   file_hdr->c_filesize = (unsigned long) short_hdr->c_filesizes[0] << 16