diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-07 15:50:26 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-08-24 11:43:29 -0700 |
commit | a093b0fcc046f440a5b1c7960e09a6655d30b2be (patch) | |
tree | ba0e845ed130bc1ef6263df3a80c45c7baaa015f /lib | |
parent | 40dce48b2f42fce2925cfdf96b0bd9b20353777a (diff) | |
download | android_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.c | 3 |
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; } |