summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-05-09 19:41:28 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-09-25 09:08:41 +0200
commitd17b14d953b2ab56c938d6c7829b70b91c736efe (patch)
tree17373e682506a689af178eb4e066b68ff8bc4b07
parent8ade2c1776dc5e9c37cd1172031a02bfbdd07601 (diff)
mkfs.ubifs: Fix wrong xattr entry type
The type of xattr entry should be regular file, otherwise xattr entry and xattr inode have inconsistent types. Fixes: 50044efbd6e713 ("mkfs.ubifs: Add extended attribute support") Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--ubifs-utils/mkfs.ubifs/mkfs.ubifs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
index b91a3e2..f92a1ed 100644
--- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
@@ -1243,7 +1243,7 @@ static int add_xattr(struct ubifs_ino_node *host_ino, struct stat *st,
xent->ch.len = len;
xent->padding1 = 0;
- xent->type = UBIFS_ITYPE_DIR;
+ xent->type = UBIFS_ITYPE_REG;
xent->nlen = cpu_to_le16(nm.len);
memcpy(xent->name, nm.name, nm.len + 1);