From 168ef9be32ad754d7bcb38ed70787237fc12630d Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 22 Nov 2022 14:45:32 +0100 Subject: Move gensquashfs specific code from libfstree to gensquashfs The "from dir" and from "from file" code, as well as the "sort file" code is specific to gensquashfs, so move them there and the test cases as well. The medium term idea is to reduce libfstree to a stub, merge it into the generic writer and ultimately hoist that into libsquashfs. Signed-off-by: David Oberhollenzer --- include/fstree.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'include') diff --git a/include/fstree.h b/include/fstree.h index 1c5e5ef..51e2fbc 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -182,22 +182,6 @@ tree_node_t *fstree_mknode(tree_node_t *parent, const char *name, tree_node_t *fstree_add_generic(fstree_t *fs, const char *path, const struct stat *sb, const char *extra); -/* - Parses the file format accepted by gensquashfs and produce a file system - tree from it. File input paths are interpreted as relative to the current - working directory. - - 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 *basepath); - -int fstree_from_file_stream(fstree_t *fs, istream_t *file, - const char *basepath); - /* This function performs all the necessary post processing steps on the file system tree, i.e. recursively sorting all directory entries by name, @@ -249,26 +233,6 @@ tree_node_t *fstree_add_hard_link(fstree_t *fs, const char *path, */ int fstree_resolve_hard_link(fstree_t *fs, tree_node_t *node); -/* - Recursively scan a directory to build a file system tree. - - Returns 0 on success, prints to stderr on failure. - */ -int fstree_from_dir(fstree_t *fs, tree_node_t *root, - const char *path, scan_node_callback cb, void *user, - unsigned int flags); - -/* - Same as fstree_from_dir, but scans a sub-directory inside the specified path. - - Returns 0 on success, prints to stderr on failure. - */ -int fstree_from_subdir(fstree_t *fs, tree_node_t *root, - const char *path, const char *subdir, - scan_node_callback cb, void *user, unsigned int flags); - -int fstree_sort_files(fstree_t *fs, istream_t *sortfile); - void fstree_insert_sorted(tree_node_t *root, tree_node_t *n); #endif /* FSTREE_H */ -- cgit v1.2.3