blob: d565a217d92d015e27216abca817e88b909a5152 [file] [log] [blame]
"Robert P. J. Day"63fc1a92006-07-02 19:47:05 +00001/* vi: set sw=4 ts=4: */
Rob Landleyc1d69902006-01-20 18:28:50 +00002/*
3 * Small lzma deflate implementation.
4 * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org>
5 *
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02006 * Licensed under GPLv2, see file LICENSE in this source tree.
Rob Landleyc1d69902006-01-20 18:28:50 +00007 */
8
Denis Vlasenko9a7d38f2007-05-31 22:42:12 +00009#include "libbb.h"
Denys Vlasenkod184a722011-09-22 12:45:14 +020010#include "bb_archive.h"
Rob Landleyc1d69902006-01-20 18:28:50 +000011
Denis Vlasenkoa60936d2008-06-28 05:04:09 +000012char FAST_FUNC get_header_tar_lzma(archive_handle_t *archive_handle)
Rob Landleyc1d69902006-01-20 18:28:50 +000013{
14 /* Can't lseek over pipes */
Denis Vlasenko13858992006-10-08 12:49:22 +000015 archive_handle->seek = seek_by_read;
Rob Landleyc1d69902006-01-20 18:28:50 +000016
Denys Vlasenko8a6a2f92012-03-06 16:27:48 +010017 open_transformer_with_sig(archive_handle->src_fd, unpack_lzma_stream, "unlzma");
Rob Landleyc1d69902006-01-20 18:28:50 +000018 archive_handle->offset = 0;
Denis Vlasenko476b0702007-09-09 14:11:11 +000019 while (get_header_tar(archive_handle) == EXIT_SUCCESS)
20 continue;
Rob Landleyc1d69902006-01-20 18:28:50 +000021
22 /* Can only do one file at a time */
23 return EXIT_FAILURE;
24}