From 3559e5e0e840839ae85aa02c0748f89676c0a5e8 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 31 May 2019 19:25:16 +0200 Subject: gensquashfs: allow combining packdir and packfile If packdir and packfile are both specified, use packdir as alternate root. Signed-off-by: David Oberhollenzer --- include/fstree.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/fstree.h') diff --git a/include/fstree.h b/include/fstree.h index 13d4c78..33fa8b8 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -220,14 +220,16 @@ void fstree_xattr_deduplicate(fstree_t *fs); /* Parses the file format accepted by gensquashfs and produce a file system - tree from it. + tree from it. File input paths are interpreted as relative to the given + root dir. If rootdir is NULL, use the path where the input file is as root + dir. The function actually chdirs into the root dir. On failure, an error report with filename and line number is written to stderr. Returns 0 on success. */ -int fstree_from_file(fstree_t *fs, const char *filename); +int fstree_from_file(fstree_t *fs, const char *filename, const char *rootdir); /* Recursively scan a directory and generate a file system tree from it. -- cgit v1.2.3