summaryrefslogtreecommitdiff
path: root/tar
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-22 01:48:50 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-22 02:13:06 +0200
commit57b6a4c855120bc721cd4e76cca32c7b1a382407 (patch)
tree0ee339243e0062cd5543324383e921cfa5273be2 /tar
parent1bf363ba52025a0cf504b313878ea99c174a1683 (diff)
Add helper functions for working with inodes
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tar')
-rw-r--r--tar/sqfs2tar.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/tar/sqfs2tar.c b/tar/sqfs2tar.c
index 0bacd0e..1afbedf 100644
--- a/tar/sqfs2tar.c
+++ b/tar/sqfs2tar.c
@@ -195,27 +195,7 @@ static int get_xattrs(const sqfs_inode_generic_t *inode, tar_xattr_t **out)
if (xr == NULL)
return 0;
- switch (inode->base.type) {
- case SQFS_INODE_EXT_DIR:
- index = inode->data.dir_ext.xattr_idx;
- break;
- case SQFS_INODE_EXT_FILE:
- index = inode->data.file_ext.xattr_idx;
- break;
- case SQFS_INODE_EXT_SLINK:
- index = inode->data.slink_ext.xattr_idx;
- break;
- case SQFS_INODE_EXT_BDEV:
- case SQFS_INODE_EXT_CDEV:
- index = inode->data.dev_ext.xattr_idx;
- break;
- case SQFS_INODE_EXT_FIFO:
- case SQFS_INODE_EXT_SOCKET:
- index = inode->data.ipc_ext.xattr_idx;
- break;
- default:
- return 0;
- }
+ sqfs_inode_get_xattr_index(inode, &index);
if (index == 0xFFFFFFFF)
return 0;