diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-04-29 03:12:06 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-04-29 23:44:05 +0200 |
commit | 4390eddccfb3918291e7b8e4d708411f9b828c04 (patch) | |
tree | e5983b387ae9f9e0f75a6b6c2a83c3ff03a25221 /bin/gensquashfs/src/mkfs.h | |
parent | f21fa23162d294b1327aaa3528444c1aaceb5b5a (diff) |
gensquashfs: use prefix functionality for glob_files target node
Piece together the prefix path and pass it to the iterator. That way,
we get the full target paths back from the iterator and can use those
directly in the callback for filtering.
We also no longer need the root node for fstree_from_dir (always tree
root) and the callback can no longer return an error state.
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 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/gensquashfs/src/mkfs.h b/bin/gensquashfs/src/mkfs.h index 6923164..3157694 100644 --- a/bin/gensquashfs/src/mkfs.h +++ b/bin/gensquashfs/src/mkfs.h @@ -49,8 +49,7 @@ 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, tree_node_t *root, - dir_entry_t *ent); +typedef int (*scan_node_callback)(void *user, dir_entry_t *ent); typedef struct { sqfs_writer_cfg_t cfg; @@ -130,7 +129,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, tree_node_t *root, dir_iterator_t *dir, +int fstree_from_dir(fstree_t *fs, dir_iterator_t *dir, scan_node_callback cb, void *user); int fstree_sort_files(fstree_t *fs, istream_t *sortfile); |