mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-26 19:51:32 +00:00
f2fs-tools: make fiemap command in accordance with uapi
commit 529967eac0
category: bugfix
issue: #I6VAS0
CVE: NA
Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------
Made "fiemap" command in accordance with user api manual. So, eliminated
NEW_ADDR print out and made it ends in the last extent.
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
This commit is contained in:
parent
cdca0b4dff
commit
025371e721
@ -757,10 +757,11 @@ static void do_fiemap(int argc, char **argv, const struct cmd_desc *cmd)
|
||||
die_errno("FIEMAP failed");
|
||||
|
||||
phy_addr = fm->fm_extents[0].fe_physical / F2FS_BLKSIZE;
|
||||
if (phy_addr == NEW_ADDR)
|
||||
printf("NEW_ADDR ");
|
||||
else
|
||||
printf("%llu ", phy_addr);
|
||||
printf("%llu: %llu\n", fm->fm_start / F2FS_BLKSIZE, phy_addr);
|
||||
|
||||
if (fm->fm_extents[0].fe_flags & FIEMAP_EXTENT_LAST)
|
||||
break;
|
||||
|
||||
fm->fm_start += F2FS_BLKSIZE;
|
||||
}
|
||||
printf("\n");
|
||||
|
Loading…
Reference in New Issue
Block a user