blob: 6d4f5851ed6e0899f64f5fac5a7e120805c798f9 [file] [log] [blame]
"Robert P. J. Day"63fc1a92006-07-02 19:47:05 +00001/* vi: set sw=4 ts=4: */
Glenn L McGrath7f2a9532002-11-05 02:56:57 +00002/*
"Robert P. J. Day"801ab142006-07-12 07:56:04 +00003 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Glenn L McGrath7f2a9532002-11-05 02:56:57 +00004 */
5
Glenn L McGrath7f2a9532002-11-05 02:56:57 +00006#include "libbb.h"
7#include "unarchive.h"
8
Rob Landleydfba7412006-03-06 20:47:33 +00009char get_header_tar_bz2(archive_handle_t *archive_handle)
Glenn L McGrath7f2a9532002-11-05 02:56:57 +000010{
Denis Vlasenkoe1a0d482006-10-20 13:28:22 +000011 /* Can't lseek over pipes */
Denis Vlasenko13858992006-10-08 12:49:22 +000012 archive_handle->seek = seek_by_read;
Glenn L McGrathe3568832002-11-13 00:24:20 +000013
Denis Vlasenko211f7f82007-09-05 11:48:32 +000014 archive_handle->src_fd = open_transformer(archive_handle->src_fd, unpack_bz2_stream, "bunzip2", "bunzip2", "-cf", "-", NULL);
Glenn L McGrath7f2a9532002-11-05 02:56:57 +000015 archive_handle->offset = 0;
Denis Vlasenko476b0702007-09-09 14:11:11 +000016 while (get_header_tar(archive_handle) == EXIT_SUCCESS)
17 continue;
Glenn L McGrath7f2a9532002-11-05 02:56:57 +000018
Glenn L McGrath26857242003-11-05 04:55:58 +000019 /* Can only do one file at a time */
Denis Vlasenko13858992006-10-08 12:49:22 +000020 return EXIT_FAILURE;
Glenn L McGrath7f2a9532002-11-05 02:56:57 +000021}