From caf350448c0020f95b9bfdd65770d86faf548549 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 15 Dec 2019 19:29:34 +0100 Subject: Remove fstree inode table Signed-off-by: David Oberhollenzer --- include/fstree.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/fstree.h b/include/fstree.h index 44428cd..ab44e3e 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -83,13 +83,10 @@ struct tree_node_t { struct fstree_t { struct stat defaults; size_t block_size; - size_t inode_tbl_size; + size_t unique_inode_count; tree_node_t *root; - /* linear array of tree nodes. inode number is array index */ - tree_node_t **inode_table; - /* linear linked list of all regular files */ file_info_t *files; }; @@ -157,8 +154,13 @@ tree_node_t *fstree_add_generic(fstree_t *fs, const char *path, */ int fstree_from_file(fstree_t *fs, const char *filename, FILE *fp); -/* Returns 0 on success. Prints to stderr on failure */ -int fstree_gen_inode_table(fstree_t *fs); +/* + Allocates inode numbers for all nodes. Directory entries are numbered in + ascending order. + + The total inode count is stored in unique_inode_count. + */ +void fstree_gen_inode_numbers(fstree_t *fs); void fstree_gen_file_list(fstree_t *fs); -- cgit v1.2.3