From 74b739ac61fb49f93a8ce814a37026bf1d405466 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 4 Mar 2020 01:09:18 +0100 Subject: 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 --- tar/sqfs2tar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tar') 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; -- cgit v1.2.3