[oe-commits] [openembedded-core] 23/41: wic: fix calculation of partition number

git at git.openembedded.org git at git.openembedded.org
Tue Aug 29 14:13:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

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

commit a1d18c00b8c9ce800a5147eaa71372083b8ae91e
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Mon Jul 17 10:25:28 2017 +0300

    wic: fix calculation of partition number
    
    Total number of partitions should be taken into account when calculating
    real partition number for msdos partition table. The number can be
    different for the 4th partition: it can be 4 if there are 4 partitions in
    the table and 5 if there are more than 4 partitions in the table. In the
    latter case number 4 is occupied by extended partition.
    
    [YOCTO #11790]
    
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 scripts/lib/wic/imager/direct.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index edf5e5d..4c547e0 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -108,7 +108,7 @@ class DirectImageCreator(BaseImageCreator):
             if pnum == num:
                 if  part.no_table:
                     return 0
-                if self.ptable_format == 'msdos' and realnum > 3:
+                if self.ptable_format == 'msdos' and realnum > 3 and len(parts) > 4:
                     # account for logical partition numbering, ex. sda5..
                     return realnum + 1
                 return realnum

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


More information about the Openembedded-commits mailing list