From a4ce623c5bd9230c66b0f309fb7d74c7f5ea7ccb Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 4 Apr 2023 21:24:00 +0200 Subject: Move scan callback from libfstree to gensquashfs Signed-off-by: David Oberhollenzer --- bin/gensquashfs/src/mkfs.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bin/gensquashfs') diff --git a/bin/gensquashfs/src/mkfs.h b/bin/gensquashfs/src/mkfs.h index 53fb018..671c3cb 100644 --- a/bin/gensquashfs/src/mkfs.h +++ b/bin/gensquashfs/src/mkfs.h @@ -41,6 +41,15 @@ #include #include +/* + Optionally used by fstree_from_dir and fstree_from_subdir 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, fstree_t *fs, tree_node_t *node); + typedef struct { sqfs_writer_cfg_t cfg; unsigned int dirscan_flags; -- cgit v1.2.3