diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-07 15:50:26 -0800 |
---|---|---|
committer | Greg Wallace <greg@gregtwallace.com> | 2016-01-19 22:02:20 -0500 |
commit | 8c1bb17576651d98d7d72aa96b36590e5fbc06ad (patch) | |
tree | 22596e2ba88b8d99bf3fed3fe5300f384852d9f4 /lib | |
parent | f78e245f6cc927e6d1a3d467e2839bf2a7777c81 (diff) | |
download | android_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.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; } |