mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
dump.f2fs: minor clean ups
This patch cleans up, pointed by Chao. Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
69952e3e23
commit
1bc76585d5
@ -256,8 +256,7 @@ static void dump_data_blk(struct f2fs_sb_info *sbi, __u64 offset, u32 blkaddr)
|
|||||||
ASSERT(blkaddr == NULL_ADDR);
|
ASSERT(blkaddr == NULL_ADDR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (blkaddr == NULL_ADDR || blkaddr == NEW_ADDR ||
|
if (!is_valid_data_blkaddr(blkaddr)) {
|
||||||
blkaddr == COMPRESS_ADDR) {
|
|
||||||
print_extent(false);
|
print_extent(false);
|
||||||
dump_extent.blk = 0;
|
dump_extent.blk = 0;
|
||||||
dump_extent.len = 1;
|
dump_extent.len = 1;
|
||||||
|
@ -1722,6 +1722,7 @@ int fsck_chk_dentry_blk(struct f2fs_sb_info *sbi, int casefolded, u32 blk_addr,
|
|||||||
|
|
||||||
fsck->dentry_depth++;
|
fsck->dentry_depth++;
|
||||||
new_dentry = calloc(sizeof(struct f2fs_dentry), 1);
|
new_dentry = calloc(sizeof(struct f2fs_dentry), 1);
|
||||||
|
ASSERT(new_dentry != NULL);
|
||||||
new_dentry->depth = fsck->dentry_depth;
|
new_dentry->depth = fsck->dentry_depth;
|
||||||
memcpy(new_dentry->name, child->p_name, F2FS_NAME_LEN);
|
memcpy(new_dentry->name, child->p_name, F2FS_NAME_LEN);
|
||||||
cur_dentry->next = new_dentry;
|
cur_dentry->next = new_dentry;
|
||||||
|
Loading…
Reference in New Issue
Block a user