wic: partitionedfs: account for non-table partitions when checking if logical parititon is needed

Commit 8c1c43b790 `wic: Create a logical partition
only when it is really mandatory` did not account for partitions that are not
present in partition table.

(From OE-Core rev: 57b05e924bba7b2fff07a34690474c0fa3046865)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Maciej Borzecki 2017-01-16 11:41:51 +01:00 committed by Richard Purdie
parent 47400e3648
commit cb10cfd64f
1 changed files with 2 additions and 1 deletions

View File

@ -201,7 +201,8 @@ class Image():
part['num'] = 0
if disk['ptable_format'] == "msdos":
if len(self.partitions) > 4:
# only count the partitions that are in partition table
if len([p for p in self.partitions if not p['no_table']]) > 4:
if disk['realpart'] > 3:
part['type'] = 'logical'
part['num'] = disk['realpart'] + 1