linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao2.yu@samsung.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Changman Lee <cm224.lee@samsung.com>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [PATCH] fibmap.f2fs: fix the wrong stat info
Date: Thu, 22 Jan 2015 11:19:05 +0800	[thread overview]
Message-ID: <00c501d035f2$52ea29e0$f8be7da0$@samsung.com> (raw)

fibmap shows ino, size, blocks with incorrectly decimal number, fix it.

Before:
--------------------------------------------
dev       [8:16]
ino       [0x   238ea : 0]
mode      [0x    81a4 : 33188]
nlink     [0x       1 : 1]
uid       [0x       0 : 0]
gid       [0x       0 : 0]
size      [0x   79e00 : 0]
blksize   [0x    1000 : 4096]
blocks    [0x     268 : 0]
--------------------------------------------

Patched:
--------------------------------------------
dev       [8:16]
ino       [0x   238ea : 145642]
mode      [0x    81a4 : 33188]
nlink     [0x       1 : 1]
uid       [0x       0 : 0]
gid       [0x       0 : 0]
size      [0x   79e00 : 499200]
blksize   [0x    1000 : 4096]
blocks    [0x     268 : 616]
--------------------------------------------

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
---
 tools/fibmap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/fibmap.c b/tools/fibmap.c
index a6a112b..2df8094 100644
--- a/tools/fibmap.c
+++ b/tools/fibmap.c
@@ -33,14 +33,14 @@ void print_stat(struct stat64 *st)
 {
 	printf("--------------------------------------------\n");
 	printf("dev       [%d:%d]\n", major(st->st_dev), minor(st->st_dev));
-	printf("ino       [0x%8lx : %ld]\n", st->st_ino, st->st_ino);
+	printf("ino       [0x%8llx : %lld]\n", st->st_ino, st->st_ino);
 	printf("mode      [0x%8x : %d]\n", st->st_mode, st->st_mode);
 	printf("nlink     [0x%8lx : %ld]\n", st->st_nlink, st->st_nlink);
 	printf("uid       [0x%8x : %d]\n", st->st_uid, st->st_uid);
 	printf("gid       [0x%8x : %d]\n", st->st_gid, st->st_gid);
-	printf("size      [0x%8lx : %ld]\n", st->st_size, st->st_size);
+	printf("size      [0x%8llx : %lld]\n", st->st_size, st->st_size);
 	printf("blksize   [0x%8lx : %ld]\n", st->st_blksize, st->st_blksize);
-	printf("blocks    [0x%8lx : %ld]\n", st->st_blocks, st->st_blocks);
+	printf("blocks    [0x%8llx : %lld]\n", st->st_blocks, st->st_blocks);
 	printf("--------------------------------------------\n\n");
 }
 
-- 
2.2.1



------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet

             reply	other threads:[~2015-01-22  3:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22  3:19 Chao Yu [this message]
2015-01-23 21:19 ` [PATCH] fibmap.f2fs: fix the wrong stat info Jaegeuk Kim
2015-01-26 10:43   ` Chao Yu

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='00c501d035f2$52ea29e0$f8be7da0$@samsung.com' \
    --to=chao2.yu@samsung.com \
    --cc=cm224.lee@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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).