summaryrefslogtreecommitdiff
path: root/unpack/dump_xattrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'unpack/dump_xattrs.c')
-rw-r--r--unpack/dump_xattrs.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/unpack/dump_xattrs.c b/unpack/dump_xattrs.c
index c619767..13bddfe 100644
--- a/unpack/dump_xattrs.c
+++ b/unpack/dump_xattrs.c
@@ -17,27 +17,7 @@ int dump_xattrs(sqfs_xattr_reader_t *xattr, const sqfs_inode_generic_t *inode)
if (xattr == 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;