diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-09-22 20:46:58 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-10-24 15:57:18 +0200 |
commit | 0e7b2348ea8fbfd9cb9fb532d552e27a9636010a (patch) | |
tree | 6a1352d49e1598e55ade71f922c92cb2a77ba78c /include | |
parent | 7f89eb3cfff465cf32d03a2ae6919252eae67e9b (diff) |
libsqfs: Add the path lookup function back to the dir reader
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r-- | include/sqfs/dir_reader.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/sqfs/dir_reader.h b/include/sqfs/dir_reader.h index ceac22b..50d3636 100644 --- a/include/sqfs/dir_reader.h +++ b/include/sqfs/dir_reader.h @@ -273,6 +273,23 @@ SQFS_API int sqfs_dir_reader_get_root_inode(sqfs_dir_reader_t *rd, SQFS_API int sqfs_dir_reader_resolve_inum(sqfs_dir_reader_t *rd, sqfs_u32 inode, sqfs_u64 *ref); +/** + * @brief Try to resole a path into an inode reference + * + * @memberof sqfs_dir_reader_t + * + * @param rd A pointer to a directory reader. + * @param path A path to resolve, NULL is interpreted as empty path. + * @param root A directory inode to start from or NULL for the filesystem root. + * @param out Retrns an inode reference on success. + * + * @return Zero on success, a negative @ref SQFS_ERROR number on failure. + */ +SQFS_API int sqfs_dir_reader_resolve_path(sqfs_dir_reader_t *rd, + const char *path, + const sqfs_inode_generic_t *root, + sqfs_u64 *out); + #ifdef __cplusplus } #endif |