~mmach/netext73/busybox

« back to all changes in this revision

Viewing changes to archival/libarchive/init_handle.c

  • Committer: mmach
  • Date: 2021-04-14 13:54:24 UTC
  • Revision ID: netbit73@gmail.com-20210414135424-8x3fxf716zs4wflb
1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* vi: set sw=4 ts=4: */
 
2
/*
 
3
 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
 
4
 */
 
5
#include "libbb.h"
 
6
#include "bb_archive.h"
 
7
 
 
8
archive_handle_t* FAST_FUNC init_handle(void)
 
9
{
 
10
        archive_handle_t *archive_handle;
 
11
 
 
12
        /* Initialize default values */
 
13
        archive_handle = xzalloc(sizeof(archive_handle_t));
 
14
        archive_handle->file_header = xzalloc(sizeof(file_header_t));
 
15
        archive_handle->action_header = header_skip;
 
16
        archive_handle->action_data = data_skip;
 
17
        archive_handle->filter = filter_accept_all;
 
18
        archive_handle->seek = seek_by_jump;
 
19
#if ENABLE_CPIO || ENABLE_RPM2CPIO || ENABLE_RPM
 
20
        archive_handle->cpio__owner.uid = (uid_t)-1L;
 
21
        archive_handle->cpio__owner.gid = (gid_t)-1L;
 
22
#endif
 
23
 
 
24
        return archive_handle;
 
25
}