diff options
author | Glenn L McGrath | 2002-11-03 14:05:15 +0000 |
---|---|---|
committer | Glenn L McGrath | 2002-11-03 14:05:15 +0000 |
commit | 237ae42fc96ede945d28d9054f045b73e419d089 (patch) | |
tree | 3fb6a9c10150303aca3c218b47aaf327a186382a /archival/libunarchive/get_header_tar_gz.c | |
parent | 2fc54a9258c3aa5dad2ce9807ba85cf29af2668e (diff) | |
download | busybox-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.c | 5 |
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"); } |