"Robert P. J. Day" | 63fc1a9 | 2006-07-02 19:47:05 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
Glenn L McGrath | 7f2a953 | 2002-11-05 02:56:57 +0000 | [diff] [blame] | 2 | /* |
Denys Vlasenko | 0ef64bd | 2010-08-16 20:14:46 +0200 | [diff] [blame] | 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
Glenn L McGrath | 7f2a953 | 2002-11-05 02:56:57 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
Glenn L McGrath | 7f2a953 | 2002-11-05 02:56:57 +0000 | [diff] [blame] | 6 | #include "libbb.h" |
Denys Vlasenko | d184a72 | 2011-09-22 12:45:14 +0200 | [diff] [blame] | 7 | #include "bb_archive.h" |
Glenn L McGrath | 7f2a953 | 2002-11-05 02:56:57 +0000 | [diff] [blame] | 8 | |
Denis Vlasenko | defc1ea | 2008-06-27 02:52:20 +0000 | [diff] [blame] | 9 | char FAST_FUNC get_header_tar_bz2(archive_handle_t *archive_handle) |
Glenn L McGrath | 7f2a953 | 2002-11-05 02:56:57 +0000 | [diff] [blame] | 10 | { |
Denis Vlasenko | e1a0d48 | 2006-10-20 13:28:22 +0000 | [diff] [blame] | 11 | /* Can't lseek over pipes */ |
Denis Vlasenko | 1385899 | 2006-10-08 12:49:22 +0000 | [diff] [blame] | 12 | archive_handle->seek = seek_by_read; |
Glenn L McGrath | e356883 | 2002-11-13 00:24:20 +0000 | [diff] [blame] | 13 | |
Denis Vlasenko | e9ad84d | 2008-08-05 13:10:34 +0000 | [diff] [blame] | 14 | open_transformer(archive_handle->src_fd, unpack_bz2_stream_prime, "bunzip2"); |
Glenn L McGrath | 7f2a953 | 2002-11-05 02:56:57 +0000 | [diff] [blame] | 15 | archive_handle->offset = 0; |
Denis Vlasenko | 476b070 | 2007-09-09 14:11:11 +0000 | [diff] [blame] | 16 | while (get_header_tar(archive_handle) == EXIT_SUCCESS) |
| 17 | continue; |
Glenn L McGrath | 7f2a953 | 2002-11-05 02:56:57 +0000 | [diff] [blame] | 18 | |
Glenn L McGrath | 2685724 | 2003-11-05 04:55:58 +0000 | [diff] [blame] | 19 | /* Can only do one file at a time */ |
Denis Vlasenko | 1385899 | 2006-10-08 12:49:22 +0000 | [diff] [blame] | 20 | return EXIT_FAILURE; |
Glenn L McGrath | 7f2a953 | 2002-11-05 02:56:57 +0000 | [diff] [blame] | 21 | } |