public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_logprint: print log data to the screen in host-endian order
@ 2026-01-06 18:53 Darrick J. Wong
  2026-01-07  6:13 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2026-01-06 18:53 UTC (permalink / raw)
  To: Andrey Albershteyn; +Cc: xfs

From: Darrick J. Wong <djwong@kernel.org>

Don't make support have to byteswap u32 values when they're digging
through broken logs on x86 systems.  Also make it more obvious which
column is the offset and which are the byte(s).

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 logprint/log_print_all.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/logprint/log_print_all.c b/logprint/log_print_all.c
index 0afad597bb6ce0..9c3cd5fb5cfb31 100644
--- a/logprint/log_print_all.c
+++ b/logprint/log_print_all.c
@@ -55,8 +55,8 @@ xlog_recover_print_data(
 
 		while (j < nums) {
 			if ((j % 8) == 0)
-				printf("%2x ", j);
-			printf("%8x ", *dp);
+				printf("%2x: ", j);
+			printf("%08x ", be32_to_cpu(*dp));
 			dp++;
 			j++;
 			if ((j % 8) == 0)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-07 17:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 18:53 [PATCH] xfs_logprint: print log data to the screen in host-endian order Darrick J. Wong
2026-01-07  6:13 ` Christoph Hellwig
2026-01-07 17:22   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox