aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2023-08-06 21:35:58 +0200
committerDavid Oberhollenzer <goliath@infraroot.at>2023-08-10 09:25:51 +0200
commitb637566020abe184cdda199d640c636a7565a05c (patch)
treec9e3057cff9eaf9fa7d33016096c6228348f6f45 /include
parente7ecb1f92ae618a56ee8eabb6cbf98365de3695a (diff)
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 <richard@nod.at>
Diffstat (limited to 'include')
-rw-r--r--include/tar/tar.h7
1 files changed, 6 insertions, 1 deletions
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.