summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorMaciej Borzecki <maciej.borzecki@rndity.com>2017-01-16 11:41:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-19 22:45:42 +0000
commit57b05e924bba7b2fff07a34690474c0fa3046865 (patch)
tree4f6a44acea9162d09f9d13851126e67e70aa5344 /scripts/lib
parent78cde87bb6e71ec5b603426879267874900d09f3 (diff)
downloadopenembedded-core-57b05e924bba7b2fff07a34690474c0fa3046865.tar.gz
openembedded-core-57b05e924bba7b2fff07a34690474c0fa3046865.tar.bz2
openembedded-core-57b05e924bba7b2fff07a34690474c0fa3046865.zip
wic: partitionedfs: account for non-table partitions when checking if logical parititon is needed
Commit 8c1c43b7901a9fcd8b279eb4250b08157ad345b7 `wic: Create a logical partition only when it is really mandatory` did not account for partitions that are not present in partition table. Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 68301f0b47..721d514326 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -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