Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: linux-erofs@lists.ozlabs.org, hsiangkao@linux.alibaba.com
Subject: [PATCH 1/6] erofs-utils: declare prefix_len as u8
Date: Tue,  4 Apr 2023 16:02:18 +0800	[thread overview]
Message-ID: <20230404080224.77577-2-jefflexu@linux.alibaba.com> (raw)
In-Reply-To: <20230404080224.77577-1-jefflexu@linux.alibaba.com>

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@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


  reply	other threads:[~2023-04-04  8:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04  8:02 [PATCH 0/6] erofs-utils: introduce extra xattr name prefix Jingbo Xu
2023-04-04  8:02 ` Jingbo Xu [this message]
2023-04-04  8:02 ` [PATCH 2/6] erofs-utils: extract packedfile API Jingbo Xu
2023-04-04  8:02 ` [PATCH 3/6] erofs-utils: introduce on-disk format for extra xattr name prefix Jingbo Xu
2023-04-04  8:19   ` Gao Xiang
2023-04-04  8:02 ` [PATCH 4/6] erofs-utils: introduce init/cleanup routine " Jingbo Xu
2023-04-04  8:02 ` [PATCH 5/6] erofs-utils: build erofs_xattr_entry upon " Jingbo Xu
2023-04-04  8:02 ` [PATCH 6/6] erofs-utils: mkfs.erofs: introduce --xattr-prefix option Jingbo Xu
2023-04-04  8:02 ` [PATCH] tmp debug Jingbo Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230404080224.77577-2-jefflexu@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox