summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessio Igor Bogani <alessio.bogani@elettra.eu>2016-12-07 15:00:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 11:46:51 +0000
commit98a3e096eaa6cfdf1532c7c03c57222ae8cd6533 (patch)
tree8719166fefecdad6894b7fd73544c62dd2870fe2
parent773ea033e973abd2b97c62b8095d7142c020ad24 (diff)
downloadopenembedded-core-98a3e096eaa6cfdf1532c7c03c57222ae8cd6533.tar.gz
openembedded-core-98a3e096eaa6cfdf1532c7c03c57222ae8cd6533.tar.bz2
openembedded-core-98a3e096eaa6cfdf1532c7c03c57222ae8cd6533.zip
wic: Create a logical partition only when it is really mandatory
Don't worth bother with logical partition on MBR partition type (aka msdos) if disk image generated by wic should have 4 partitions. (From OE-Core rev: 36a558fbdc96094626e7de1a3510691e30885368) Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> 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>
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 9e76487844..9ea4a30cbb 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -201,9 +201,10 @@ class Image():
part['num'] = 0
if disk['ptable_format'] == "msdos":
- if disk['realpart'] > 3:
- part['type'] = 'logical'
- part['num'] = disk['realpart'] + 1
+ if len(self.partitions) > 4:
+ if disk['realpart'] > 3:
+ part['type'] = 'logical'
+ part['num'] = disk['realpart'] + 1
disk['partitions'].append(num)
msger.debug("Assigned %s to %s%d, sectors range %d-%d size %d "