diff options
-rw-r--r-- | lib/libf2fs.c | 3 | ||||
-rw-r--r-- | mkfs/f2fs_format_main.c | 7 |
2 files changed, 3 insertions, 7 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; } diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c index c1c0f8d..afe907f 100644 --- a/mkfs/f2fs_format_main.c +++ b/mkfs/f2fs_format_main.c @@ -131,13 +131,8 @@ static void f2fs_parse_options(int argc, char *argv[]) } config.device_name = argv[optind]; - if ((optind + 1) < argc) { - /* We have a sector count. */ + if ((optind + 1) < argc) config.total_sectors = atoll(argv[optind+1]); - MSG(1, "\ttotal_sectors=%"PRIx64" (%"PRIx64" bytes)\n", - config.total_sectors, - config.total_sectors * 512); - } config.segs_per_zone = config.segs_per_sec * config.secs_per_zone; } |