From 56786917339c1ac2190b8b903eaf79e60d726973 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 22 Jun 2019 23:18:36 +0200 Subject: Cleanup: unify packdir/packfile based directory changes in gensquashfs This commit removes the packdir/packfile based directory setup magic from fstree_from_file and moves it to gensquashfs. Over there, the common parts are deduplicated. Signed-off-by: David Oberhollenzer --- include/fstree.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/fstree.h b/include/fstree.h index 74d1c7f..784364e 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -7,6 +7,7 @@ #include #include #include +#include #include "str_table.h" @@ -215,19 +216,18 @@ void fstree_xattr_deduplicate(fstree_t *fs); /* Parses the file format accepted by gensquashfs and produce a file system - 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. + tree from it. File input paths are interpreted as relative to the current + working directory. - This function tries to temporarily change the working directory, so if it - fails, the current working directory is undefined. + Data is read from the given file pointer. The filename is only used for + producing error messages. 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, const char *rootdir); +int fstree_from_file(fstree_t *fs, const char *filename, FILE *fp); /* Recursively scan a directory and generate a file system tree from it. -- cgit v1.2.3