linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: linux-xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH] xfs_logprint: di_gen is unsigned
Date: Mon, 5 Dec 2016 16:48:01 -0600	[thread overview]
Message-ID: <c453839b-61db-9500-b39d-e6580d1748b5@redhat.com> (raw)

di_gen is unsigned:

        __uint32_t      di_gen;         /* generation number */

but we print it as a signed int in logprint, so see oddities like:

 forkoff:24  dmevmask:0x0  dmstate:0  flags:0x0  gen:-628807103

Fix this.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/logprint/log_print_all.c b/logprint/log_print_all.c
index f49316e..3863ba9 100644
--- a/logprint/log_print_all.c
+++ b/logprint/log_print_all.c
@@ -269,7 +269,7 @@ xlog_recover_print_inode_core(
 	       di->di_size, (unsigned long long)di->di_nblocks,
 	       di->di_extsize, di->di_nextents, (int)di->di_anextents);
 	printf(_("		forkoff:%d  dmevmask:0x%x  dmstate:%d  flags:0x%x  "
-	     "gen:%d\n"),
+	     "gen:%u\n"),
 	       (int)di->di_forkoff, di->di_dmevmask, (int)di->di_dmstate,
 	       (int)di->di_flags, di->di_gen);
 	if (di->di_version == 3) {


             reply	other threads:[~2016-12-05 22:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05 22:48 Eric Sandeen [this message]
2016-12-07 19:02 ` [PATCH] xfs_logprint: di_gen is unsigned Brian Foster

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=c453839b-61db-9500-b39d-e6580d1748b5@redhat.com \
    --to=sandeen@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;
as well as URLs for NNTP newsgroup(s).