From 6351872732fce77186f401050eee92c7c3aa3461 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 20 May 2023 17:04:15 +0200 Subject: libtar: add a dir_iterator_t implementation for tar files The existing istream_t wrapper is mered into this one as well, we can open the files via the iterators open_file_ro function. Unit tests and tar2sqfs are modified accordingly. Signed-off-by: David Oberhollenzer --- include/io/dir_iterator.h | 9 +++++++-- include/io/xattr.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include/io') diff --git a/include/io/dir_iterator.h b/include/io/dir_iterator.h index 377f07e..20fcdff 100644 --- a/include/io/dir_iterator.h +++ b/include/io/dir_iterator.h @@ -23,6 +23,11 @@ typedef enum { * @brief A directory entry returned by a @ref dir_iterator_t */ typedef struct { + /** + * @brief Total size of file entries + */ + sqfs_u64 size; + /** * @brief Unix time stamp when the entry was last modified. * @@ -49,14 +54,14 @@ typedef struct { * * On Windows and other non-Unix OSes, this always reports user 0. */ - sqfs_u32 uid; + sqfs_u64 uid; /** * @brief ID of the group that owns the entry. * * On Windows and other non-Unix OSes, this always reports group 0. */ - sqfs_u32 gid; + sqfs_u64 gid; /** * @brief Unix style permissions and entry type. diff --git a/include/io/xattr.h b/include/io/xattr.h index cf35bca..d9f3e65 100644 --- a/include/io/xattr.h +++ b/include/io/xattr.h @@ -24,6 +24,8 @@ extern "C" { dir_entry_xattr_t *dir_entry_xattr_create(const char *key, const sqfs_u8 *value, size_t value_len); +dir_entry_xattr_t *dir_entry_xattr_list_copy(const dir_entry_xattr_t *list); + void dir_entry_xattr_list_free(dir_entry_xattr_t *list); #ifdef __cplusplus -- cgit v1.2.3