diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fstree.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/fstree.h b/include/fstree.h index d08ccae..96ddf8f 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -21,6 +21,7 @@ typedef struct fstree_defaults_t fstree_defaults_t; typedef struct tree_node_t tree_node_t; typedef struct fstree_t fstree_t; +typedef struct fstree_stats_t fstree_stats_t; enum { FLAG_DIR_CREATED_IMPLICITLY = 0x01, @@ -80,6 +81,15 @@ struct tree_node_t { sqfs_u8 payload[]; }; +struct fstree_stats_t { + size_t num_ipc; + size_t num_links; + size_t num_slinks; + size_t num_files; + size_t num_devices; + size_t num_dirs; +}; + /* Default settings for new nodes */ struct fstree_defaults_t { sqfs_u32 uid; @@ -201,4 +211,6 @@ tree_node_t *fstree_add_hard_link(fstree_t *fs, const char *path, */ int fstree_resolve_hard_links(fstree_t *fs); +void fstree_collect_stats(const fstree_t *fs, fstree_stats_t *out); + #endif /* FSTREE_H */ |