ext4-mkfs: Use correct partition size
authorMax Maisel <max.maisel@posteo.de>
Thu, 1 Mar 2018 16:18:15 +0000 (17:18 +0100)
committerMax Maisel <max.maisel@posteo.de>
Thu, 1 Mar 2018 16:58:32 +0000 (17:58 +0100)
src/ext4_mkfs.c

index 594205526bb3074776e00ad0668d1f2dcdb5a0d6..649c272fb40ec89f7cac674d6d079cd52e8360fd 100644 (file)
@@ -709,7 +709,7 @@ int ext4_mkfs(struct ext4_fs *fs, struct ext4_blockdev *bd,
        bd->fs = fs;
 
        if (info->len == 0)
-               info->len = bd->bdif->ph_bcnt * bd->bdif->ph_bsize;
+               info->len = bd->part_size;
 
        if (info->block_size == 0)
                info->block_size = 4096; /*Set block size to default value*/