All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: {PATCH] e2fsprogs: fix printf format in print_blocks_proc()
Date: Thu, 29 May 2014 13:09:10 -0500	[thread overview]
Message-ID: <538777C6.7080001@redhat.com> (raw)

blockcnt is of type e2_blkcnt_t, which is:

typedef __s64 __bitwise         e2_blkcnt_t;

so use %lld not %d to print it.

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

diff --git a/lib/ext2fs/tst_libext2fs.c b/lib/ext2fs/tst_libext2fs.c
index 1f63eb7..b4fb7f2 100644
--- a/lib/ext2fs/tst_libext2fs.c
+++ b/lib/ext2fs/tst_libext2fs.c
@@ -37,7 +37,7 @@ static int print_blocks_proc(ext2_filsys fs EXT2FS_ATTR((unused)),
 			     blk64_t ref_block, int ref_offset,
 			     void *private EXT2FS_ATTR((unused)))
 {
-	printf("%6d %8llu (%d %llu)\n", blockcnt, *blocknr,
+	printf("%6lld %8llu (%d %llu)\n", (long long)blockcnt, *blocknr,
 	       ref_offset, ref_block);
 	return 0;
 }	

                 reply	other threads:[~2014-05-29 18:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=538777C6.7080001@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.