summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-07-17 10:04:04 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-21 22:51:37 +0100
commit8fb8a21b7d4f1fb69f0407f03fd5907d861f7d42 (patch)
tree15f0c3b39a530e58501831197bc67b8598a1e6e2 /scripts/lib/wic/plugins
parentbfd831a8695e6b4e2095deb286014172a6bf5051 (diff)
downloadpoky-8fb8a21b7d4f1fb69f0407f03fd5907d861f7d42.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: 5689139b3cd862e2df49f6b21171f513e8a46c60) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/plugins')
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index aa9cc9f4e3..f20d8433f1 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -313,7 +313,7 @@ class PartitionedImage():
313 part.realnum = 0 313 part.realnum = 0
314 else: 314 else:
315 realnum += 1 315 realnum += 1
316 if self.ptable_format == 'msdos' and realnum > 3: 316 if self.ptable_format == 'msdos' and realnum > 3 and len(partitions) > 4:
317 part.realnum = realnum + 1 317 part.realnum = realnum + 1
318 continue 318 continue
319 part.realnum = realnum 319 part.realnum = realnum