2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-11-24 18:40:05 +00:00
xcat-dep/cpio/cpio-2.9-dev_number.patch
xq2005 c17860af8c add cpio-2.11 into the xCAT dependecy
Former-commit-id: bd30424ca9b2f1bc3a4650e5875a9dea44da664d
2013-05-28 07:53:32 +00:00

24 lines
1.1 KiB
Diff

diff -ruN cpio-2.9.90.orig/src/copyin.c cpio-2.9.90/src/copyin.c
--- cpio-2.9.90.orig/src/copyin.c 2008-07-11 13:20:27.000000000 +0200
+++ cpio-2.9.90/src/copyin.c 2008-07-18 10:16:24.000000000 +0200
@@ -1269,15 +1269,15 @@
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];