[PATCH 1/6] erofs-utils: declare prefix_len as u8
Jingbo Xu
jefflexu at linux.alibaba.com
Tue Apr 4 18:02:18 AEST 2023
The on-disk erofs_xattr_entry.e_name_len is declared as u8, which
implies the maximum length of the xattr name.
Let's also declare xattr_prefix.prefix_len as u8 to keep sync with the
on-disk structure.
Signed-off-by: Jingbo Xu <jefflexu at linux.alibaba.com>
---
lib/xattr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/xattr.c b/lib/xattr.c
index 1a22284..a292f2c 100644
--- a/lib/xattr.c
+++ b/lib/xattr.c
@@ -41,7 +41,7 @@ static unsigned int shared_xattrs_count, shared_xattrs_size;
static struct xattr_prefix {
const char *prefix;
- u16 prefix_len;
+ u8 prefix_len;
} xattr_types[] = {
[EROFS_XATTR_INDEX_USER] = {
XATTR_USER_PREFIX,
--
2.19.1.6.gb485710b
More information about the Linux-erofs
mailing list