From b637566020abe184cdda199d640c636a7565a05c Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Sun, 6 Aug 2023 21:35:58 +0200 Subject: tar2sqfs: Add option to exclude files Using --exclude or -E it is now possible to exclude files from the input tar stream. The options can be used multiple times. Signed-off-by: Richard Weinberger --- include/tar/tar.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/tar/tar.h b/include/tar/tar.h index 52a0562..811ac47 100644 --- a/include/tar/tar.h +++ b/include/tar/tar.h @@ -39,6 +39,11 @@ typedef struct { sqfs_s64 mtime; } tar_header_decoded_t; +typedef struct { + char **excludedirs; + size_t num_excludedirs; +} tar_iterator_opts; + #ifdef __cplusplus extern "C" { #endif @@ -63,7 +68,7 @@ int read_header(sqfs_istream_t *fp, tar_header_decoded_t *out); void clear_header(tar_header_decoded_t *hdr); -dir_iterator_t *tar_open_stream(sqfs_istream_t *stream); +dir_iterator_t *tar_open_stream(sqfs_istream_t *stream, tar_iterator_opts *opts); /* Write zero bytes to an output file to padd it to the tar record size. -- cgit v1.2.3