linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs_logprint: di_gen is unsigned
@ 2016-12-05 22:48 Eric Sandeen
  2016-12-07 19:02 ` Brian Foster
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2016-12-05 22:48 UTC (permalink / raw)
  To: linux-xfs

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) {


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

end of thread, other threads:[~2016-12-07 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 22:48 [PATCH] xfs_logprint: di_gen is unsigned Eric Sandeen
2016-12-07 19:02 ` Brian Foster

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).