From 2285036e10863aba48dc6eed3c1a791118d11956 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 28 Apr 2023 19:36:56 +0200 Subject: gensquashfs: Dismantle the scan_dir wrapper Create the directory iterator externally and pass it to fstree_from_dir. The unit test is also removed, because the heavy lifting is now done outside the function. Signed-off-by: David Oberhollenzer --- bin/gensquashfs/src/mkfs.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bin/gensquashfs/src/mkfs.h') diff --git a/bin/gensquashfs/src/mkfs.h b/bin/gensquashfs/src/mkfs.h index 9064a75..6923164 100644 --- a/bin/gensquashfs/src/mkfs.h +++ b/bin/gensquashfs/src/mkfs.h @@ -130,9 +130,8 @@ 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, - const char *path, scan_node_callback cb, void *user, - unsigned int flags); +int fstree_from_dir(fstree_t *fs, tree_node_t *root, dir_iterator_t *dir, + scan_node_callback cb, void *user); int fstree_sort_files(fstree_t *fs, istream_t *sortfile); -- cgit v1.2.3