public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Andrey Albershteyn <aalbersh@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH] xfs_logprint: print log data to the screen in host-endian order
Date: Tue, 6 Jan 2026 10:53:37 -0800	[thread overview]
Message-ID: <20260106185337.GK191501@frogsfrogsfrogs> (raw)

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)

             reply	other threads:[~2026-01-06 18:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 18:53 Darrick J. Wong [this message]
2026-01-07  6:13 ` [PATCH] xfs_logprint: print log data to the screen in host-endian order Christoph Hellwig
2026-01-07 17:22   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260106185337.GK191501@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox