aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Config.in2
-rw-r--r--archival/cpio.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/Config.in b/Config.in
index da8a72a8e..2a2672f29 100644
--- a/Config.in
+++ b/Config.in
@@ -481,7 +481,7 @@ config FEATURE_IMPROVED_COLOUR_MAPPING
481 Windows console colours. 481 Windows console colours.
482 482
483config FEATURE_EXTRA_FILE_DATA 483config FEATURE_EXTRA_FILE_DATA
484 bool "Read additional file metadata (2.1 kb)" 484 bool "Read additional file metadata (2.7 kb)"
485 default y 485 default y
486 depends on PLATFORM_MINGW32 486 depends on PLATFORM_MINGW32
487 help 487 help
diff --git a/archival/cpio.c b/archival/cpio.c
index 7149782d7..d6564de59 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -49,7 +49,7 @@
49//config:config FEATURE_CPIO_RENUMBER_INODES 49//config:config FEATURE_CPIO_RENUMBER_INODES
50//config: bool "Support --renumber-inodes like GNU cpio" 50//config: bool "Support --renumber-inodes like GNU cpio"
51//config: default y 51//config: default y
52//config: depends on FEATURE_CPIO_O && LONG_OPTS 52//config: depends on FEATURE_CPIO_O && LONG_OPTS && (PLATFORM_POSIX || FEATURE_EXTRA_FILE_DATA)
53//config: help 53//config: help
54//config: Optionally renumber inodes when creating archives. 54//config: Optionally renumber inodes when creating archives.
55 55
@@ -275,6 +275,7 @@ static NOINLINE int cpio_o(void)
275 if (!(S_ISLNK(st.st_mode) || S_ISREG(st.st_mode))) 275 if (!(S_ISLNK(st.st_mode) || S_ISREG(st.st_mode)))
276 st.st_size = 0; /* paranoia */ 276 st.st_size = 0; /* paranoia */
277 277
278#if ENABLE_FEATURE_EXTRA_FILE_DATA
278 /* Store hardlinks for later processing, dont output them */ 279 /* Store hardlinks for later processing, dont output them */
279 if (!S_ISDIR(st.st_mode) && st.st_nlink > 1) { 280 if (!S_ISDIR(st.st_mode) && st.st_nlink > 1) {
280 struct name_s *n; 281 struct name_s *n;
@@ -310,6 +311,7 @@ static NOINLINE int cpio_o(void)
310 free(line); 311 free(line);
311 continue; 312 continue;
312 } 313 }
314#endif
313#if ENABLE_FEATURE_CPIO_RENUMBER_INODES 315#if ENABLE_FEATURE_CPIO_RENUMBER_INODES
314 else if (option_mask32 & OPT_RENUMBER_INODES) { 316 else if (option_mask32 & OPT_RENUMBER_INODES) {
315 st.st_ino = ++G.next_inode; 317 st.st_ino = ++G.next_inode;
@@ -345,10 +347,12 @@ static NOINLINE int cpio_o(void)
345 } 347 }
346 } 348 }
347 349
350#if ENABLE_FEATURE_EXTRA_FILE_DATA
348#if ENABLE_FEATURE_CPIO_IGNORE_DEVNO 351#if ENABLE_FEATURE_CPIO_IGNORE_DEVNO
349 if (option_mask32 & OPT_IGNORE_DEVNO) 352 if (option_mask32 & OPT_IGNORE_DEVNO)
350 st.st_dev = st.st_rdev = 0; 353 st.st_dev = st.st_rdev = 0;
351#endif 354#endif
355#endif
352 356
353 bytes += printf("070701" 357 bytes += printf("070701"
354 "%08X%08X%08X%08X%08X%08X%08X" 358 "%08X%08X%08X%08X%08X%08X%08X"