summaryrefslogtreecommitdiff
path: root/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-04 01:09:18 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-03-04 01:09:18 +0100
commit74b739ac61fb49f93a8ce814a37026bf1d405466 (patch)
tree5f05446ed9081db38bbbd36ed9f3681a15686dd6 /tar
parent44c81eeffe9c8820b1009a7a5c728782aa5ebf40 (diff)
Cleanup: match xattr reader API closer to id table API
Instead of creating everything in the "create" function, cleanup and create/initialize stuff in a "load" function. This allows the xattr reader to be reset/re-used and adds the benefit of not having to lug around references to the super block, compressor and file (altough the later two are hidden inside the meta reader). Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar')
-rw-r--r--tar/sqfs2tar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tar/sqfs2tar.c b/tar/sqfs2tar.c
index 5a786dd..2e4d0ef 100644
--- a/tar/sqfs2tar.c
+++ b/tar/sqfs2tar.c
@@ -611,14 +611,14 @@ int main(int argc, char **argv)
}
if (!no_xattr && !(super.flags & SQFS_FLAG_NO_XATTRS)) {
- xr = sqfs_xattr_reader_create(file, &super, cmp);
+ xr = sqfs_xattr_reader_create(0);
if (xr == NULL) {
sqfs_perror(filename, "creating xattr reader",
SQFS_ERROR_ALLOC);
goto out_dr;
}
- ret = sqfs_xattr_reader_load_locations(xr);
+ ret = sqfs_xattr_reader_load(xr, &super, file, cmp);
if (ret) {
sqfs_perror(filename, "loading xattr table", ret);
goto out_xr;