aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-22 23:18:36 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-22 23:18:36 +0200
commit56786917339c1ac2190b8b903eaf79e60d726973 (patch)
treec9a5f63a18df3fc570a90b84aadc54cc869af672 /include
parent77bc1dd2116696b6d187cc3bf76de583f4f804fc (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/fstree.h12
1 files changed, 6 insertions, 6 deletions
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 <stdbool.h>
#include <stdint.h>
#include <stddef.h>
+#include <stdio.h>
#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.