mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
d2b16a59d5
Added two upstream mailing list patches that fix behavior under big endian systems. Issue was present since version 1.11.0. Tested on Turris Omnia. Original discussion: https://github.com/openwrt/openwrt/pull/1575 Signed-off-by: Rosen Penev <rosenp@gmail.com>
25 lines
835 B
Diff
25 lines
835 B
Diff
From a1241763f50d20efc42910e922b9c8845814f024 Mon Sep 17 00:00:00 2001
|
|
From: Chao Yu <yuchao0@huawei.com>
|
|
Date: Sun, 9 Dec 2018 19:41:52 -0800
|
|
Subject: [PATCH] dump.f2fs: fix incorrect endian conversion
|
|
|
|
f2fs_inode.i_mode is variable of __le16 type, during endian converison,
|
|
it should to use le16_to_cpu instead of le32_to_cpu, fix it.
|
|
|
|
Signed-off-by: Chao Yu <yuchao0@huawei.com>
|
|
---
|
|
fsck/dump.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/fsck/dump.c
|
|
+++ b/fsck/dump.c
|
|
@@ -407,7 +407,7 @@ static void dump_file(struct f2fs_sb_inf
|
|
struct f2fs_node *node_blk, int force)
|
|
{
|
|
struct f2fs_inode *inode = &node_blk->i;
|
|
- u32 imode = le32_to_cpu(inode->i_mode);
|
|
+ u32 imode = le16_to_cpu(inode->i_mode);
|
|
u32 namelen = le32_to_cpu(inode->i_namelen);
|
|
char name[F2FS_NAME_LEN + 1] = {0};
|
|
char path[1024] = {0};
|