package/mke2img: do not overshoot user-specified size
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 28 Dec 2014 20:11:22 +0000 (21:11 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 28 Dec 2014 21:07:39 +0000 (22:07 +0100)
commita869f78ed153c440342478a09640ada2069e786f
treed55b18f48d14fb7bdc124b23e4e1b61dbf3c83b5
parent09a3e7545f12d588cfb4ff1428d6bf4943e34072
package/mke2img: do not overshoot user-specified size

Currently, we forcibly expand the generated filesystem by 1300 blocks
(i.e. a bit more than 1MiB) when we need to generate an ext3 or ext4
filesystem, even if the user already supplied us with the size it wants
the filesystem to be.

In that case, we overshoot what the user requested, which is bad because
the filesystem may no longer fit in the partition it is supposed to be
written into.

Only add extra blocks when we do compute the required size, not when the
user specifies the size.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/mke2img/mke2img