From c9a8adc15f9de110771156fdc85fb98533648a53 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 5 Jun 2023 19:06:42 +0200 Subject: Move dir_entry_xattr_t from libio to libsquashfs The structure and functions are renamed to sqfs_xattr_* instead, an additional helper is added to accept an encoded xattr. Documentation and unit test are added as well. Signed-off-by: David Oberhollenzer --- include/io/dir_entry.h | 15 --------------- include/io/dir_iterator.h | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'include/io') diff --git a/include/io/dir_entry.h b/include/io/dir_entry.h index 7546daf..be5c400 100644 --- a/include/io/dir_entry.h +++ b/include/io/dir_entry.h @@ -84,27 +84,12 @@ typedef struct { char name[]; } dir_entry_t; -typedef struct dir_entry_xattr_t { - struct dir_entry_xattr_t *next; - char *key; - sqfs_u8 *value; - size_t value_len; - char data[]; -} dir_entry_xattr_t; - #ifdef __cplusplus extern "C" { #endif dir_entry_t *dir_entry_create(const char *name); -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 } #endif diff --git a/include/io/dir_iterator.h b/include/io/dir_iterator.h index 6ae1cd1..cc64680 100644 --- a/include/io/dir_iterator.h +++ b/include/io/dir_iterator.h @@ -87,7 +87,7 @@ typedef struct dir_iterator_t { * * @return Zero on success, negative @ref SQFS_ERROR value on failure. */ - int (*read_xattr)(struct dir_iterator_t *it, dir_entry_xattr_t **out); + int (*read_xattr)(struct dir_iterator_t *it, sqfs_xattr_t **out); } dir_iterator_t; enum { -- cgit v1.2.3