aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-12-07 15:50:26 -0800
committerSteve Kondik <steve@cyngn.com>2016-08-24 11:43:29 -0700
commita093b0fcc046f440a5b1c7960e09a6655d30b2be (patch)
treeba0e845ed130bc1ef6263df3a80c45c7baaa015f /lib
parent40dce48b2f42fce2925cfdf96b0bd9b20353777a (diff)
downloadandroid_external_f2fs-tools-a093b0fcc046f440a5b1c7960e09a6655d30b2be.tar.gz
android_external_f2fs-tools-a093b0fcc046f440a5b1c7960e09a6655d30b2be.tar.bz2
android_external_f2fs-tools-a093b0fcc046f440a5b1c7960e09a6655d30b2be.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;
}