summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-15 00:11:22 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-15 00:11:22 +0000
commit8f0c89e05a7b52f8c5ae7b451de6fd50732aeb45 (patch)
tree9bf309fce9eff03da8980e84d3de5741627bf96d /archival
parentbc7177187f6b4f32c2f9562358294dfc7b521f67 (diff)
downloadbusybox-w32-1_13_4.tar.gz
busybox-w32-1_13_4.tar.bz2
busybox-w32-1_13_4.zip
apply post-1.13.3 fixes, bump version to 1.13.41_13_4
Diffstat (limited to 'archival')
-rw-r--r--archival/libunarchive/get_header_tar.c4
-rw-r--r--archival/tar.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index bf0f92b25..4c063b387 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -91,7 +91,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
91 91
92 again_after_align: 92 again_after_align:
93 93
94#if ENABLE_DESKTOP 94#if ENABLE_DESKTOP || ENABLE_FEATURE_TAR_AUTODETECT
95 /* to prevent misdetection of bz2 sig */ 95 /* to prevent misdetection of bz2 sig */
96 *(uint32_t*)(&tar) = 0; 96 *(uint32_t*)(&tar) = 0;
97 i = full_read(archive_handle->src_fd, &tar, 512); 97 i = full_read(archive_handle->src_fd, &tar, 512);
@@ -142,7 +142,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
142#if ENABLE_FEATURE_TAR_AUTODETECT 142#if ENABLE_FEATURE_TAR_AUTODETECT
143 char FAST_FUNC (*get_header_ptr)(archive_handle_t *); 143 char FAST_FUNC (*get_header_ptr)(archive_handle_t *);
144 144
145 USE_DESKTOP(autodetect:) 145 autodetect:
146 /* tar gz/bz autodetect: check for gz/bz2 magic. 146 /* tar gz/bz autodetect: check for gz/bz2 magic.
147 * If we see the magic, and it is the very first block, 147 * If we see the magic, and it is the very first block,
148 * we can switch to get_header_tar_gz/bz2/lzma(). 148 * we can switch to get_header_tar_gz/bz2/lzma().
diff --git a/archival/tar.c b/archival/tar.c
index 47cc39c80..b6beede0d 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -934,8 +934,10 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
934 tar_handle->src_fd = fileno(tar_stream); 934 tar_handle->src_fd = fileno(tar_stream);
935 tar_handle->seek = seek_by_read; 935 tar_handle->seek = seek_by_read;
936 } else { 936 } else {
937 if (ENABLE_FEATURE_TAR_AUTODETECT && flags == O_RDONLY) { 937 if (ENABLE_FEATURE_TAR_AUTODETECT
938 get_header_ptr = get_header_tar; 938 && get_header_ptr == get_header_tar
939 && flags == O_RDONLY
940 ) {
939 tar_handle->src_fd = open_zipped(tar_filename); 941 tar_handle->src_fd = open_zipped(tar_filename);
940 if (tar_handle->src_fd < 0) 942 if (tar_handle->src_fd < 0)
941 bb_perror_msg_and_die("can't open '%s'", tar_filename); 943 bb_perror_msg_and_die("can't open '%s'", tar_filename);