aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-15 19:29:34 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-12-16 14:46:24 +0100
commitcaf350448c0020f95b9bfdd65770d86faf548549 (patch)
treeba71630dbf0c7b2c2395c23f494d6d1b3c3002f3 /include
parent5aa1bab7fabc55a6f2a2ff2f7d8e2c49421cb215 (diff)
Remove fstree inode table
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/fstree.h14
1 files changed, 8 insertions, 6 deletions
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);