summaryrefslogtreecommitdiff
path: root/archival/libunarchive/get_header_tar_gz.c
diff options
context:
space:
mode:
authorGlenn L McGrath2002-11-03 14:05:15 +0000
committerGlenn L McGrath2002-11-03 14:05:15 +0000
commit237ae42fc96ede945d28d9054f045b73e419d089 (patch)
tree3fb6a9c10150303aca3c218b47aaf327a186382a /archival/libunarchive/get_header_tar_gz.c
parent2fc54a9258c3aa5dad2ce9807ba85cf29af2668e (diff)
downloadbusybox-237ae42fc96ede945d28d9054f045b73e419d089.zip
busybox-237ae42fc96ede945d28d9054f045b73e419d089.tar.gz
Abstract read and seek in unarchiving code, convert bunzip to file descriptors, support tar -j
Diffstat (limited to 'archival/libunarchive/get_header_tar_gz.c')
-rw-r--r--archival/libunarchive/get_header_tar_gz.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/archival/libunarchive/get_header_tar_gz.c b/archival/libunarchive/get_header_tar_gz.c
index 24d19fb..f0d4b13 100644
--- a/archival/libunarchive/get_header_tar_gz.c
+++ b/archival/libunarchive/get_header_tar_gz.c
@@ -29,7 +29,10 @@ extern char get_header_tar_gz(archive_handle_t *archive_handle)
int pid;
unsigned char magic[2];
- xread_all(archive_handle->src_fd, &magic, 2);
+ /* Cant lseek over pipe's */
+ archive_handle->seek = seek_by_char;
+
+ archive_xread_all(archive_handle, &magic, 2);
if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) {
error_msg_and_die("Invalid gzip magic");
}