aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-03-22 15:48:57 +0000
committerRon Yorston <rmy@pobox.com>2012-03-22 15:48:57 +0000
commit9db164d6e39050d09f38288c6045cd2a2cbf6d63 (patch)
treeea5dc2d28d15da0de25c197ed7d059c3656af1a0 /archival
parent1118c95535ea51961437089fc3dece5ab4ea7e1b (diff)
parentd84b175cb6948eb17f847313bf912174e2f934e1 (diff)
downloadbusybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.tar.gz
busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.tar.bz2
busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.zip
Merge commit 'd84b175cb6948eb17f847313bf912174e2f934e1' into merge
Conflicts: include/platform.h
Diffstat (limited to 'archival')
-rw-r--r--archival/libarchive/get_header_tar.c16
-rw-r--r--archival/tar.c2
2 files changed, 14 insertions, 4 deletions
diff --git a/archival/libarchive/get_header_tar.c b/archival/libarchive/get_header_tar.c
index f73cd338e..79caff55a 100644
--- a/archival/libarchive/get_header_tar.c
+++ b/archival/libarchive/get_header_tar.c
@@ -348,10 +348,20 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
348 /* Set bits 12-15 of the files mode */ 348 /* Set bits 12-15 of the files mode */
349 /* (typeflag was not trashed because chksum does not use getOctal) */ 349 /* (typeflag was not trashed because chksum does not use getOctal) */
350 switch (tar.typeflag) { 350 switch (tar.typeflag) {
351 /* busybox identifies hard links as being regular files with 0 size and a link name */ 351 case '1': /* hardlink */
352 case '1': 352 /* we mark hardlinks as regular files with zero size and a link name */
353 file_header->mode |= S_IFREG; 353 file_header->mode |= S_IFREG;
354 break; 354 /* on size of link fields from star(4)
355 * ... For tar archives written by pre POSIX.1-1988
356 * implementations, the size field usually contains the size of
357 * the file and needs to be ignored as no data may follow this
358 * header type. For POSIX.1- 1988 compliant archives, the size
359 * field needs to be 0. For POSIX.1-2001 compliant archives,
360 * the size field may be non zero, indicating that file data is
361 * included in the archive.
362 * i.e; always assume this is zero for safety.
363 */
364 goto size0;
355 case '7': 365 case '7':
356 /* case 0: */ 366 /* case 0: */
357 case '0': 367 case '0':
diff --git a/archival/tar.c b/archival/tar.c
index 612b2119b..e7963b0b4 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -926,7 +926,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
926 /* Prepend '-' to the first argument if required */ 926 /* Prepend '-' to the first argument if required */
927 opt_complementary = "--:" // first arg is options 927 opt_complementary = "--:" // first arg is options
928 "tt:vv:" // count -t,-v 928 "tt:vv:" // count -t,-v
929 "X::T::" // cumulative lists 929 IF_FEATURE_TAR_FROM("X::T::") // cumulative lists
930#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM 930#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM
931 "\xff::" // cumulative lists for --exclude 931 "\xff::" // cumulative lists for --exclude
932#endif 932#endif