summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-07-17 10:25:28 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-29 16:50:53 +0100
commit5b2a7393f98081946e30e311e7277d253f6ddd9a (patch)
tree0d61bdb7eeafa0b285d030c8b6af03df89908791 /scripts
parenta746a4c171e39e2d7b1c96269910bd48a273deb3 (diff)
downloadpoky-5b2a7393f98081946e30e311e7277d253f6ddd9a.tar.gz
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] (From OE-Core rev: a1d18c00b8c9ce800a5147eaa71372083b8ae91e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/imager/direct.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index edf5e5d221..4c547e04a6 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -108,7 +108,7 @@ class DirectImageCreator(BaseImageCreator):
108 if pnum == num: 108 if pnum == num:
109 if part.no_table: 109 if part.no_table:
110 return 0 110 return 0
111 if self.ptable_format == 'msdos' and realnum > 3: 111 if self.ptable_format == 'msdos' and realnum > 3 and len(parts) > 4:
112 # account for logical partition numbering, ex. sda5.. 112 # account for logical partition numbering, ex. sda5..
113 return realnum + 1 113 return realnum + 1
114 return realnum 114 return realnum