cpio/cpio-2.9-dev_number.patch
Pavel Raiskup fe198e6d04 rebase: new upstream version 2.12
* removed several upstreamed patches
* start using %autosetup macro
* remove 'autoreconf' call as it is not needed yet

Version: 2.12-1
2015-09-14 10:06:49 +02:00

29 lines
1.2 KiB
Diff

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