Provide functions for manipulating arrays of extended attributes
commit66262c10d10c173519d423341ec0f4839240b1aa
authorSergey Poznyakoff <gray@gnu.org>
Thu, 2 Sep 2021 17:41:28 +0000 (2 20:41 +0300)
committerSergey Poznyakoff <gray@gnu.org>
Thu, 2 Sep 2021 18:01:58 +0000 (2 21:01 +0300)
treedebb7812bddfea00f352b4f87b53048c0918d649
parenta339f05cd269013fa133d2f148d73f6f7d4247e4
Provide functions for manipulating arrays of extended attributes

* src/common.h (xheader_xattr_free,xheader_xattr_copy): Remove protos.
(xattr_map_init,xattr_map_copy)
(xattr_map_add,xattr_map_free): New protos.
* src/tar.h (xattr_map): New struct.
(tar_stat_info): Replace xattr_map_size and xattr_map with one
field: xattr_map.
* src/xattrs.c (XATTRS_PREFIX,XATTRS_PREFIX_LEN): New defines.
(xheader_xattr_init,xattr_map_init)
(xattr_map_free,xattr_map_add)
(xheader_xattr_add,xattr_map_copy): New functions.
All uses changed.
* src/create.c (start_header): Update to use struct xattr_map.
* src/extract.c: Update to use struct xattr_map.
* src/tar.c: Likewise.
* src/xheader.c (xheader_xattr_init,xheader_xattr_free)
(xheader_xattr_add,xheader_xattr_copy): Remove.
(xattr_coder,xattr_decoder): Use xattr_map_ functions.
src/common.h
src/create.c
src/extract.c
src/tar.c
src/tar.h
src/xattrs.c
src/xheader.c