lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210721211240.3632817-1-daeho43@gmail.com>
Date:   Wed, 21 Jul 2021 14:12:40 -0700
From:   Daeho Jeong <daeho43@...il.com>
To:     linux-kernel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net, kernel-team@...roid.com
Cc:     Daeho Jeong <daehojeong@...gle.com>
Subject: [PATCH] f2fs-tools: make fiemap command in accordance with uapi

From: Daeho Jeong <daehojeong@...gle.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@...gle.com>
---
 tools/f2fs_io/f2fs_io.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index aa1a7e4..42dbd60 100644
--- a/tools/f2fs_io/f2fs_io.c
+++ b/tools/f2fs_io/f2fs_io.c
@@ -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");
-- 
2.32.0.402.g57bb445576-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ