mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-27 04:00:57 +00:00
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> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
cec37b066b
commit
1a5588cdfb
@ -409,7 +409,7 @@ static void dump_file(struct f2fs_sb_info *sbi, struct node_info *ni,
|
||||
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};
|
||||
|
Loading…
Reference in New Issue
Block a user