3
0

get_header_tar_bz2.c 529 B

1234567891011121314151617181920
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  4. */
  5. #include "libbb.h"
  6. #include "bb_archive.h"
  7. char FAST_FUNC get_header_tar_bz2(archive_handle_t *archive_handle)
  8. {
  9. /* Can't lseek over pipes */
  10. archive_handle->seek = seek_by_read;
  11. fork_transformer_with_sig(archive_handle->src_fd, unpack_bz2_stream, "bunzip2");
  12. archive_handle->offset = 0;
  13. while (get_header_tar(archive_handle) == EXIT_SUCCESS)
  14. continue;
  15. /* Can only do one file at a time */
  16. return EXIT_FAILURE;
  17. }