diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-10-03 15:21:35 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-10-03 15:24:08 +0200 |
commit | 5e7ce8c83dd1ded633b2a1bbeea37cbb53f743f0 (patch) | |
tree | 8dcd7d96a01b9d8a49b3d977de3ffe03cb9e026f /include | |
parent | 1ac7243a2164796f915e0c28853a21f3927ce865 (diff) |
Add a counter-part to sqfs_inode_get_xattr_index
Combines all the type depenend attribute setting and inode type
promotion into a single function.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r-- | include/sqfs/inode.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sqfs/inode.h b/include/sqfs/inode.h index 8b69b7e..336a394 100644 --- a/include/sqfs/inode.h +++ b/include/sqfs/inode.h @@ -552,6 +552,22 @@ SQFS_API int sqfs_inode_get_xattr_index(const sqfs_inode_generic_t *inode, sqfs_u32 *out); /** + * @brief Set the extended attribute index of an inode. + * + * For basic inodes, this function promes the inodes to extended inodes if the + * index is not 0xFFFFFFFF. If the index is 0xFFFFFFFF, the function tries to + * demote extended inode to a basic inode after setting the index. + * + * @param inode A pointer to an inode. + * @param index The extended attribute index. + * + * @return Zero on success, an @ref SQFS_ERROR_CORRUPTED if the node has + * an unknown type set. + */ +SQFS_API int sqfs_inode_set_xattr_index(sqfs_inode_generic_t *inode, + sqfs_u32 index); + +/** * @brief Convert a basic inode to an extended inode. * * For inodes that already have an extended type, this is a no-op. |