aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-12-07 15:50:26 -0800
committerGreg Wallace <greg@gregtwallace.com>2016-01-19 22:02:20 -0500
commit8c1bb17576651d98d7d72aa96b36590e5fbc06ad (patch)
tree22596e2ba88b8d99bf3fed3fe5300f384852d9f4 /lib
parentf78e245f6cc927e6d1a3d467e2839bf2a7777c81 (diff)
downloadandroid_external_f2fs-tools-8c1bb17576651d98d7d72aa96b36590e5fbc06ad.tar.gz
android_external_f2fs-tools-8c1bb17576651d98d7d72aa96b36590e5fbc06ad.tar.bz2
android_external_f2fs-tools-8c1bb17576651d98d7d72aa96b36590e5fbc06ad.zip
mkfs.f2fs: show correct partition size
It needs to consider different sector size when showing the total size. Change-Id: I1eaea7df37dd1d6a26e8cda9033f816a040db789 Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libf2fs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index f0a8861..8e10e6a 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -552,7 +552,8 @@ int f2fs_get_device_info(struct f2fs_configuration *c)
}
MSG(0, "Info: sector size = %u\n", c->sector_size);
MSG(0, "Info: total sectors = %"PRIu64" (%"PRIu64" MB)\n",
- c->total_sectors, c->total_sectors >> 11);
+ c->total_sectors, (c->total_sectors *
+ (c->sector_size >> 9)) >> 11);
return 0;
}