[oe-commits] [openembedded-core] 15/63: wic: Create a logical partition only when it is really mandatory

git at git.openembedded.org git at git.openembedded.org
Tue Dec 13 22:56:33 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 36a558fbdc96094626e7de1a3510691e30885368
Author: Alessio Igor Bogani <alessio.bogani at elettra.eu>
AuthorDate: Wed Dec 7 15:00:57 2016 +0100

    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.
    
    Signed-off-by: Alessio Igor Bogani <alessio.bogani at elettra.eu>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/lib/wic/utils/partitionedfs.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 9e76487..9ea4a30 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 "

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list