summaryrefslogtreecommitdiff
path: root/include/fstree.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-18 15:55:03 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-18 15:55:03 +0100
commit2777dfe050359c359233b2f00dfb5c3b2dba4ed6 (patch)
treee120ef9c10295c74dc8c3ec6dfa39aaa665e7f6b /include/fstree.h
parentcaf350448c0020f95b9bfdd65770d86faf548549 (diff)
Cleanup: merge the fstree post processing functions
Instead of having 3 different functions for sorting the tree, numbering the nodes and generating a file list, that all have to be used in the right order, this commit merges them into a single "fstree_post_process" function. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/fstree.h')
-rw-r--r--include/fstree.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/fstree.h b/include/fstree.h
index ab44e3e..dd1440e 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -155,14 +155,15 @@ tree_node_t *fstree_add_generic(fstree_t *fs, const char *path,
int fstree_from_file(fstree_t *fs, const char *filename, FILE *fp);
/*
- Allocates inode numbers for all nodes. Directory entries are numbered in
- ascending order.
+ This function performs all the necessary post processing steps on the file
+ system tree, i.e. recursively sorting all directory entries by name,
+ allocating inode numbers and stringing all files nodes together into a
+ linked list.
- The total inode count is stored in unique_inode_count.
+ The total inode count is stored in unique_inode_count. The head of the file
+ list is pointed to by fs->files.
*/
-void fstree_gen_inode_numbers(fstree_t *fs);
-
-void fstree_gen_file_list(fstree_t *fs);
+void fstree_post_process(fstree_t *fs);
/*
Generate a string holding the full path of a node. Returned
@@ -175,9 +176,6 @@ char *fstree_get_path(tree_node_t *node);
/* ASCIIbetically sort a linked list of tree nodes */
tree_node_t *tree_node_list_sort(tree_node_t *head);
-/* ASCIIbetically sort all sub directories recursively */
-void tree_node_sort_recursive(tree_node_t *root);
-
/*
If the environment variable SOURCE_DATE_EPOCH is set to a parsable number
that fits into an unsigned 32 bit value, return its value. Otherwise,