From efa204aedf3578d193b2832b42cf365c7aee48f9 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 15 Dec 2020 11:07:12 +0100 Subject: libfstree: make the directory scanning code a little more generic - Instead of using the fstree root, let the caller specify it. - Add a flag to prevent recursion into sub directories. Signed-off-by: David Oberhollenzer --- bin/gensquashfs/mkfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/gensquashfs') diff --git a/bin/gensquashfs/mkfs.c b/bin/gensquashfs/mkfs.c index 6f26d56..4120242 100644 --- a/bin/gensquashfs/mkfs.c +++ b/bin/gensquashfs/mkfs.c @@ -191,8 +191,10 @@ int main(int argc, char **argv) } if (opt.infile == NULL) { - if (fstree_from_dir(&sqfs.fs, opt.packdir, opt.dirscan_flags)) + if (fstree_from_dir(&sqfs.fs, sqfs.fs.root, + opt.packdir, opt.dirscan_flags)) { goto out; + } } else { if (read_fstree(&sqfs.fs, &opt, sqfs.xwr, sehnd)) goto out; -- cgit v1.2.3