From: Jakub Bogusz <qboosh@pld-linux.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsprogs: fix various incorrect printf formats
Date: Tue, 25 Oct 2011 17:59:16 +0200 [thread overview]
Message-ID: <20111025155916.GA19818@stranger.qboosh.pl> (raw)
In-Reply-To: <20111025115233.GB22103@infradead.org>
On Tue, Oct 25, 2011 at 07:52:33AM -0400, Christoph Hellwig wrote:
> Reported-by: Jakub Bogusz <qboosh@pld-linux.org>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
[...]
> Index: xfsprogs/repair/scan.c
> ===================================================================
> --- xfsprogs.orig/repair/scan.c 2011-10-25 13:46:56.562602076 +0200
> +++ xfsprogs/repair/scan.c 2011-10-25 13:47:31.369102715 +0200
> @@ -289,14 +289,14 @@ _("bad back (left) sibling pointer (saw
> */
> set_bmap(agno, agbno, XR_E_MULT);
> do_warn(
> -_("inode 0x%" PRIu64 "bmap block 0x%" PRIu64 " claimed, state is %d\n"),
> +_("inode 0x%" PRIu64 "bmap block %" PRIx64 " claimed, state is %d\n"),
> ino, bno, state);
> break;
> case XR_E_MULT:
> case XR_E_INUSE_FS:
> set_bmap(agno, agbno, XR_E_MULT);
> do_warn(
> -_("inode 0x%" PRIu64 " bmap block 0x%" PRIu64 " claimed, state is %d\n"),
> +_("inode 0x%" PRIu64 " bmap block %" PRIx64 " claimed, state is %d\n"),
> ino, bno, state);
> /*
> * if we made it to here, this is probably a bmap block
> @@ -311,7 +311,7 @@ _("inode 0x%" PRIu64 " bmap block 0x%" P
> case XR_E_BAD_STATE:
> default:
> do_warn(
> -_("bad state %d, inode 0x%" PRIu64 " bmap block 0x%" PRIu64 "\n"),
> +_("bad state %d, inode 0x%" PRIu64 " bmap block %" PRIx64 "\n"),
> state, ino, bno);
> break;
> }
> @@ -338,7 +338,7 @@ _("bad state %d, inode 0x%" PRIu64 " bma
> if (numrecs > mp->m_bmap_dmxr[0] || (isroot == 0 && numrecs <
> mp->m_bmap_dmnr[0])) {
> do_warn(
> -_("inode 0x%" PRIu64 " bad # of bmap records (%u, min - %u, max - %u)\n"),
> +_("inode %" PRIx64 " bad # of bmap records (%u, min - %u, max - %u)\n"),
> ino, numrecs, mp->m_bmap_dmnr[0],
> mp->m_bmap_dmxr[0]);
> return(1);
Erm... the above part of changes is inconsistent.
PRIxnn itself doesn't append "0x" - so either remove "0x" prefix and
keep PRIu64 (thus printing value in decimal) _or_ (xor in terms of
computer logic ;)) keep "0x" prefix and use PRIx64 (thus printing value
in hex).
I'd use decimal at least for inodes (in other places they are printed in
such way).
Also please note that in first 3 messages there were two uses
"0x"+PRIu64...
Regards,
--
Jakub Bogusz http://qboosh.pl/
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-10-25 15:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-25 11:52 [PATCH] xfsprogs: fix various incorrect printf formats Christoph Hellwig
2011-10-25 15:59 ` Jakub Bogusz [this message]
2011-11-02 9:20 ` [PATCH v2] " Christoph Hellwig
2011-11-05 9:00 ` Jakub Bogusz
2011-11-05 9:33 ` Christoph Hellwig
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=20111025155916.GA19818@stranger.qboosh.pl \
--to=qboosh@pld-linux.org \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/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