summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-31 19:25:16 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-31 19:25:16 +0200
commit3559e5e0e840839ae85aa02c0748f89676c0a5e8 (patch)
tree004066f10f22b245d22ac73f71fd17ac5c8e3f06 /include
parentc4a945dd254af75d334fdd881076c665184faa31 (diff)
gensquashfs: allow combining packdir and packfile
If packdir and packfile are both specified, use packdir as alternate root. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/fstree.h6
1 files changed, 4 insertions, 2 deletions
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.