f2fs-tools: Update to 1.12.0
[openwrt/openwrt.git] / package / utils / f2fs-tools / patches / 020-dump.f2fs-fix-incorrect-endian-conversion.patch
1 From a1241763f50d20efc42910e922b9c8845814f024 Mon Sep 17 00:00:00 2001
2 From: Chao Yu <yuchao0@huawei.com>
3 Date: Sun, 9 Dec 2018 19:41:52 -0800
4 Subject: [PATCH] dump.f2fs: fix incorrect endian conversion
5
6 f2fs_inode.i_mode is variable of __le16 type, during endian converison,
7 it should to use le16_to_cpu instead of le32_to_cpu, fix it.
8
9 Signed-off-by: Chao Yu <yuchao0@huawei.com>
10 ---
11 fsck/dump.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14 --- a/fsck/dump.c
15 +++ b/fsck/dump.c
16 @@ -407,7 +407,7 @@ static void dump_file(struct f2fs_sb_inf
17 struct f2fs_node *node_blk, int force)
18 {
19 struct f2fs_inode *inode = &node_blk->i;
20 - u32 imode = le32_to_cpu(inode->i_mode);
21 + u32 imode = le16_to_cpu(inode->i_mode);
22 u32 namelen = le32_to_cpu(inode->i_namelen);
23 char name[F2FS_NAME_LEN + 1] = {0};
24 char path[1024] = {0};