]> code.ossystems Code Review - openembedded-core.git/commit
wic/engine: use up all free space when expanding partitions
authorAnuj Mittal <anuj.mittal@intel.com>
Thu, 12 Jul 2018 02:05:25 +0000 (10:05 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 29 Jul 2018 23:01:02 +0000 (00:01 +0100)
commit167d0c4a9f45e3b8172fc34bf80f3fa587513b0a
tree9eae1f8bbd39bfab26bd63a8b90051d4dd3f833b
parent2217c4ec7682adce1fe683233d80c6d54888300b
wic/engine: use up all free space when expanding partitions

Currently we just divide up the free space by the number of partitions
that need to be re-sized. This leads to problems when a user has
explicitly specified a subset of partitions (but not all) that need
to re-sized along with the sizes. As an example, for an image with 3
partitions, if we use:

wic write image.wic /dev/sdb --expand 1:10G

This would lead to paritions 2 and 3 each being re-sized to one thirds
of the free space instead of half.

Change the behavior to use up all the free space.

(From OE-Core rev: a88f1b5d88dbc5fb28be24b9787d73b9e0cdf183)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
scripts/lib/wic/engine.py