get_header_tar_lzma.c 620 B

123456789101112131415161718192021222324
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * Small lzma deflate implementation.
  4. * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org>
  5. *
  6. * Licensed under GPL v2, see file LICENSE in this tarball for details.
  7. */
  8. #include "libbb.h"
  9. #include "unarchive.h"
  10. char FAST_FUNC get_header_tar_lzma(archive_handle_t *archive_handle)
  11. {
  12. /* Can't lseek over pipes */
  13. archive_handle->seek = seek_by_read;
  14. open_transformer(archive_handle->src_fd, unpack_lzma_stream, "unlzma");
  15. archive_handle->offset = 0;
  16. while (get_header_tar(archive_handle) == EXIT_SUCCESS)
  17. continue;
  18. /* Can only do one file at a time */
  19. return EXIT_FAILURE;
  20. }