aboutsummaryrefslogtreecommitdiff
path: root/bin/tar2sqfs/src/tar2sqfs.c
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 /bin/tar2sqfs/src/tar2sqfs.c
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 'bin/tar2sqfs/src/tar2sqfs.c')
-rw-r--r--bin/tar2sqfs/src/tar2sqfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/tar2sqfs/src/tar2sqfs.c b/bin/tar2sqfs/src/tar2sqfs.c
index ed671f5..ae8b548 100644
--- a/bin/tar2sqfs/src/tar2sqfs.c
+++ b/bin/tar2sqfs/src/tar2sqfs.c
@@ -8,9 +8,10 @@
int main(int argc, char **argv)
{
- int status = EXIT_FAILURE;
sqfs_istream_t *input_file = NULL;
+ tar_iterator_opts topts = { 0 };
dir_iterator_t *tar = NULL;
+ int status = EXIT_FAILURE;
sqfs_writer_t sqfs;
int ret;
@@ -22,7 +23,10 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
- tar = tar_open_stream(input_file);
+ topts.excludedirs = excludedirs;
+ topts.num_excludedirs = num_excludedirs;
+
+ tar = tar_open_stream(input_file, &topts);
sqfs_drop(input_file);
if (tar == NULL) {
fputs("Creating tar stream: out-of-memory\n", stderr);