blob: 852c989cec25550228e6050413f416af92e83af2 [file] [log] [blame]
Denys Vlasenko08f9ffc2015-01-30 15:15:38 +01001/* vi: set sw=4 ts=4: */
2/*
3 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
4 */
Denys Vlasenko08f9ffc2015-01-30 15:15:38 +01005#include "libbb.h"
6#include "bb_archive.h"
7
8char FAST_FUNC get_header_tar_xz(archive_handle_t *archive_handle)
9{
10 /* Can't lseek over pipes */
11 archive_handle->seek = seek_by_read;
12
13 fork_transformer_with_sig(archive_handle->src_fd, unpack_xz_stream, "unxz");
14 archive_handle->offset = 0;
15 while (get_header_tar(archive_handle) == EXIT_SUCCESS)
16 continue;
17
18 /* Can only do one file at a time */
19 return EXIT_FAILURE;
20}