On 2024/9/12 17:50, Gao Xiang wrote:
On 2024/9/6 17:58, Hongzhen Luo wrote:
Prepare for the feature of exporting extended attributes for
`fsck.erofs`.
Signed-off-by: Hongzhen Luo <[email protected]>
---
v2: Expose erofs_match_prefix() directly instead of introducing
another helper function.
v1:
https://lore.kernel.org/all/[email protected]/
---
include/erofs/xattr.h | 3 +++
lib/xattr.c | 11 ++++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/include/erofs/xattr.h b/include/erofs/xattr.h
index 7643611..e89172e 100644
--- a/include/erofs/xattr.h
+++ b/include/erofs/xattr.h
@@ -61,6 +61,9 @@ void erofs_clear_opaque_xattr(struct erofs_inode
*inode);
int erofs_set_origin_xattr(struct erofs_inode *inode);
int erofs_read_xattrs_from_disk(struct erofs_inode *inode);
+bool erofs_match_prefix(const char *key, unsigned int *index,
+ unsigned int *len);
better to add `xattr` in the function name too,
erofs_xattr_prefix_matches?
Agree. I will send a new patch soon.
Thanks,
Hongzhen
Thanks,
Gao Xiang