blob: 15d10adb81b6ba1106cee77f33a267af39de11dd [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 */
Denis Vlasenko9a7d38f2007-05-31 22:42:12 +00008#include "libbb.h"
Denys Vlasenkod184a722011-09-22 12:45:14 +02009#include "bb_archive.h"
Rob Landleyc1d69902006-01-20 18:28:50 +000010
Denis Vlasenkoa60936d2008-06-28 05:04:09 +000011char FAST_FUNC get_header_tar_lzma(archive_handle_t *archive_handle)
Rob Landleyc1d69902006-01-20 18:28:50 +000012{
13 /* Can't lseek over pipes */
Denis Vlasenko13858992006-10-08 12:49:22 +000014 archive_handle->seek = seek_by_read;
Rob Landleyc1d69902006-01-20 18:28:50 +000015
Denys Vlasenkob4c11c12014-12-07 00:44:00 +010016 fork_transformer_with_sig(archive_handle->src_fd, unpack_lzma_stream, "unlzma");
Rob Landleyc1d69902006-01-20 18:28:50 +000017 archive_handle->offset = 0;
Denis Vlasenko476b0702007-09-09 14:11:11 +000018 while (get_header_tar(archive_handle) == EXIT_SUCCESS)
19 continue;
Rob Landleyc1d69902006-01-20 18:28:50 +000020
21 /* Can only do one file at a time */
22 return EXIT_FAILURE;
23}