diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-04-29 16:08:38 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-04-30 14:41:42 +0200 |
commit | 7a39921d7fff089c87ac183d3c0d6e42e5cbaa04 (patch) | |
tree | 723bce4ebe163fc939919bd877c2919f48d84534 /bin/gensquashfs/src/mkfs.h | |
parent | 4390eddccfb3918291e7b8e4d708411f9b828c04 (diff) |
Move the pattern matching from gensquashfs to dir_tree_iterator_t
A simple unit test is added that mainly checks for the behavior of
recursing into a sub-tree and only matching the children at the end,
but not reporting the parents that don't match. The behavior is
inteded to immitate the `find` command.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/gensquashfs/src/mkfs.h')
-rw-r--r-- | bin/gensquashfs/src/mkfs.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/bin/gensquashfs/src/mkfs.h b/bin/gensquashfs/src/mkfs.h index 3157694..81ad038 100644 --- a/bin/gensquashfs/src/mkfs.h +++ b/bin/gensquashfs/src/mkfs.h @@ -42,15 +42,6 @@ #include <errno.h> #include <ctype.h> -/* - Optionally used by fstree_from_dir to execute custom actions for - each discovered node. - - If it returns a value > 0, the new node is discarded, if < 0, scanning is - aborted and returns a failure status. - */ -typedef int (*scan_node_callback)(void *user, dir_entry_t *ent); - typedef struct { sqfs_writer_cfg_t cfg; unsigned int dirscan_flags; @@ -129,8 +120,7 @@ int fstree_from_file_stream(fstree_t *fs, istream_t *file, Returns 0 on success, prints to stderr on failure. */ -int fstree_from_dir(fstree_t *fs, dir_iterator_t *dir, - scan_node_callback cb, void *user); +int fstree_from_dir(fstree_t *fs, dir_iterator_t *dir); int fstree_sort_files(fstree_t *fs, istream_t *sortfile); |