diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-07 01:24:19 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-07 01:24:19 +0200 |
commit | e71c56420a8fc3dc7e36eb059304a362b47a1c15 (patch) | |
tree | 3661327d3cd901f214bc8996bb2cf00432fd00c8 /include/sqfs/meta_reader.h | |
parent | 3d9ba1a234d0966de21d8d592bea7b4ffc325586 (diff) |
Move meta reader/writer functions to respective headers
The dir.h and inode.h headers contained meta data reader/writer
related functions. This commit moves them to the propper headers.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs/meta_reader.h')
-rw-r--r-- | include/sqfs/meta_reader.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sqfs/meta_reader.h b/include/sqfs/meta_reader.h index eef18b7..a529dba 100644 --- a/include/sqfs/meta_reader.h +++ b/include/sqfs/meta_reader.h @@ -38,6 +38,22 @@ SQFS_API void sqfs_meta_reader_get_position(sqfs_meta_reader_t *m, SQFS_API int sqfs_meta_reader_read(sqfs_meta_reader_t *m, void *data, size_t size); +/* Returns 0 on success. Internally prints to stderr on failure */ +SQFS_API int sqfs_meta_reader_read_dir_header(sqfs_meta_reader_t *m, + sqfs_dir_header_t *hdr); + +/* Entry can be freed with a single free() call. + The function internally prints to stderr on failure */ +SQFS_API sqfs_dir_entry_t *sqfs_meta_reader_read_dir_ent(sqfs_meta_reader_t *m); + +/* Inode can be freed with a single free() call. + The function internally prints error message to stderr on failure. */ +SQFS_API +sqfs_inode_generic_t *sqfs_meta_reader_read_inode(sqfs_meta_reader_t *ir, + sqfs_super_t *super, + uint64_t block_start, + size_t offset); + #ifdef __cplusplus } #endif |