From cccbd5aa139b8e0cac233f317cb3e7252daae0d9 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 1 Aug 2019 16:03:59 +0200 Subject: Add ability to write_tar_header to embedd extended attributes This commit patches the tar writer to generate a PAX header with SCHILY xattr key/value pairs if requested. The Schily format is used for two reasons: - It is simple - It is apparently more widely supported than the libarchive format Signed-off-by: David Oberhollenzer --- include/tar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/tar.h') diff --git a/include/tar.h b/include/tar.h index cb56ff0..44db5fe 100644 --- a/include/tar.h +++ b/include/tar.h @@ -113,7 +113,8 @@ typedef struct { headers need to be generated. */ int write_tar_header(int fd, const struct stat *sb, const char *name, - const char *slink_target, unsigned int counter); + const char *slink_target, const tar_xattr_t *xattr, + unsigned int counter); /* calcuate and skip the zero padding */ int skip_padding(int fd, uint64_t size); -- cgit v1.2.3