]> code.ossystems Code Review - openembedded-core.git/commit
wic/engine: fix errors when expanding partitions
authorAnuj Mittal <anuj.mittal@intel.com>
Thu, 12 Jul 2018 02:05:24 +0000 (10:05 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 29 Jul 2018 23:01:01 +0000 (00:01 +0100)
commit2217c4ec7682adce1fe683233d80c6d54888300b
treeeadbf88c7662a10bbc41c755955bd8d4d960f85d
parentd12722681a4c13c1a6bc9c965cc43c4544ce7aa9
wic/engine: fix errors when expanding partitions

The UEFI spec implies that GPT partitions should be assumed to be on a 2048
sector boundary (for a 512 byte sector) and the current logic just
divides the free sectors available by the number of partitions that need
re-sizing, which may or may not align and the final result might
overshoot the limits imposed after alignment.

Since we are expanding already aligned partitions, just divide up the
free space in multiples of 2048. Also use the exec_cmd wrapper instead
of the subprocess call directly.

Fixes [YOCTO #12840]

(From OE-Core rev: 5eef63f5afdfbab8e30748cb1bf42bf2e6524759)

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