From 2d3cb9c4323a803268206db3a9363abc67d908d0 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 5 Jun 2023 19:15:13 +0200 Subject: libsqfs: Add an xattr writer function to add a combined key-value struct Signed-off-by: David Oberhollenzer --- bin/tar2sqfs/src/process_tarball.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/tar2sqfs/src') diff --git a/bin/tar2sqfs/src/process_tarball.c b/bin/tar2sqfs/src/process_tarball.c index 5b0cbdd..9ad7d9a 100644 --- a/bin/tar2sqfs/src/process_tarball.c +++ b/bin/tar2sqfs/src/process_tarball.c @@ -56,7 +56,9 @@ static int copy_xattr(sqfs_writer_t *sqfs, const char *filename, } for (xattr = list; xattr != NULL; xattr = xattr->next) { - if (sqfs_get_xattr_prefix_id(xattr->key) < 0) { + ret = sqfs_xattr_writer_add(sqfs->xwr, xattr); + + if (ret == SQFS_ERROR_UNSUPPORTED) { fprintf(stderr, "%s: squashfs does not " "support xattr prefix of %s\n", dont_skip ? "ERROR" : "WARNING", @@ -67,8 +69,6 @@ static int copy_xattr(sqfs_writer_t *sqfs, const char *filename, continue; } - ret = sqfs_xattr_writer_add(sqfs->xwr, xattr->key, xattr->value, - xattr->value_len); if (ret) { sqfs_perror(filename, "storing xattr key-value pair", ret); -- cgit v1.2.3