diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-05 19:06:42 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-06-05 16:01:34 +0200 |
commit | c9a8adc15f9de110771156fdc85fb98533648a53 (patch) | |
tree | cdd6300b1c69a002628a76c4bac45ac6664111d9 /bin/sqfs2tar/src/xattr.c | |
parent | 57ca46cdd74fd1004a3b0476c136e1f26fcf002d (diff) |
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/sqfs2tar/src/xattr.c')
-rw-r--r-- | bin/sqfs2tar/src/xattr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/sqfs2tar/src/xattr.c b/bin/sqfs2tar/src/xattr.c index 8d21cd8..2af856d 100644 --- a/bin/sqfs2tar/src/xattr.c +++ b/bin/sqfs2tar/src/xattr.c @@ -6,13 +6,13 @@ */ #include "sqfs2tar.h" -static dir_entry_xattr_t *mkxattr(const sqfs_xattr_entry_t *key, - const sqfs_xattr_value_t *value) +static sqfs_xattr_t *mkxattr(const sqfs_xattr_entry_t *key, + const sqfs_xattr_value_t *value) { - dir_entry_xattr_t *ent; + sqfs_xattr_t *ent; - ent = dir_entry_xattr_create((const char *)key->key, - value->value, value->size); + ent = sqfs_xattr_create((const char *)key->key, + value->value, value->size); if (ent == NULL) { perror("creating xattr entry"); return NULL; @@ -22,9 +22,9 @@ static dir_entry_xattr_t *mkxattr(const sqfs_xattr_entry_t *key, } int get_xattrs(const char *name, const sqfs_inode_generic_t *inode, - dir_entry_xattr_t **out) + sqfs_xattr_t **out) { - dir_entry_xattr_t *list = NULL, *ent; + sqfs_xattr_t *list = NULL, *ent; sqfs_xattr_value_t *value; sqfs_xattr_entry_t *key; sqfs_xattr_id_t desc; @@ -79,6 +79,6 @@ int get_xattrs(const char *name, const sqfs_inode_generic_t *inode, *out = list; return 0; fail: - dir_entry_xattr_list_free(list); + sqfs_xattr_list_free(list); return -1; } |