mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
0381d422d9
ar: reuse existing ar unpacking code get_header_tar: handle autodetection for tiny .tar.gz files too unarchive.h: do not include CONFIGed out things function old new delta get_header_tar 1521 1534 +13 dpkg_deb_main 400 380 -20 ar_main 260 196 -64 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 13/-84) Total: -71 bytes
22 lines
457 B
C
22 lines
457 B
C
/* vi: set sw=4 ts=4: */
|
|
/*
|
|
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
|
*/
|
|
|
|
#include "libbb.h"
|
|
#include "unarchive.h"
|
|
|
|
void FAST_FUNC unpack_ar_archive(archive_handle_t *ar_archive)
|
|
{
|
|
char magic[7];
|
|
|
|
xread(ar_archive->src_fd, magic, 7);
|
|
if (strncmp(magic, "!<arch>", 7) != 0) {
|
|
bb_error_msg_and_die("invalid ar magic");
|
|
}
|
|
ar_archive->offset += 7;
|
|
|
|
while (get_header_ar(ar_archive) == EXIT_SUCCESS)
|
|
continue;
|
|
}
|