wok view busybox/stuff/busybox-1.31-cpio.u @ rev 25284
roundup: added BUILD_DEPENDS
author | Hans-G?nter Theisgen |
---|---|
date | Mon Jul 18 16:14:38 2022 +0100 (2022-07-18) |
parents | 0830d8859de8 |
children |
line source
1 --- busybox-1.31/archival/cpio.c
2 +++ busybox-1.31/archival/cpio.c
3 @@ -247,6 +247,9 @@
4 if (!(S_ISLNK(st.st_mode) || S_ISREG(st.st_mode)))
5 st.st_size = 0; /* paranoia */
7 + if (S_ISLNK(st.st_mode))
8 + st.st_nlink = 1; /* like GNU cpio */
9 +
10 /* Store hardlinks for later processing, dont output them */
11 if (!S_ISDIR(st.st_mode) && st.st_nlink > 1) {
12 struct name_s *n;
13 --- busybox-1.31/archival/libarchive/get_header_cpio.c
14 +++ busybox-1.31/archival/libarchive/get_header_cpio.c
15 @@ -80,7 +80,7 @@
16 /* Update offset amount and skip padding before file contents */
17 data_align(archive_handle, 4);
19 - if (strcmp(file_header->name, cpio_TRAILER) == 0) {
20 + if ((strcmp(file_header->name, cpio_TRAILER) | file_header->mode) == 0) {
21 /* Always round up. ">> 9" divides by 512 */
22 archive_handle->cpio__blocks = (uoff_t)(archive_handle->offset + 511) >> 9;
23 goto create_hardlinks;