get_header_tar_bz2.c 566 B

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