mirror of
https://git.yoctoproject.org/poky
synced 2026-09-25 07:36:23 +02:00
wic/direct: Partition numbering is broken for MBR primary partition #4
When wks describes extra partitions that aren't in the partition table (e.g. boot loader) and exactly four primary MBR partitions, the last partition gets added to fstab as partition #5 instead of #4. [YOCTO #13560] (From OE-Core rev: 7537580b3dd21bd512fb26e56e92b6553c549fa8) Signed-off-by: Michael Cooper <michaelcooper81@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
41d225f4a3
commit
7a1d68d136
@@ -316,6 +316,7 @@ class PartitionedImage():
|
|||||||
# Size of a sector used in calculations
|
# Size of a sector used in calculations
|
||||||
self.sector_size = SECTOR_SIZE
|
self.sector_size = SECTOR_SIZE
|
||||||
self.native_sysroot = native_sysroot
|
self.native_sysroot = native_sysroot
|
||||||
|
num_real_partitions = len([p for p in self.partitions if not p.no_table])
|
||||||
|
|
||||||
# calculate the real partition number, accounting for partitions not
|
# calculate the real partition number, accounting for partitions not
|
||||||
# in the partition table and logical partitions
|
# in the partition table and logical partitions
|
||||||
@@ -325,7 +326,7 @@ class PartitionedImage():
|
|||||||
part.realnum = 0
|
part.realnum = 0
|
||||||
else:
|
else:
|
||||||
realnum += 1
|
realnum += 1
|
||||||
if self.ptable_format == 'msdos' and realnum > 3 and len(partitions) > 4:
|
if self.ptable_format == 'msdos' and realnum > 3 and num_real_partitions > 4:
|
||||||
part.realnum = realnum + 1
|
part.realnum = realnum + 1
|
||||||
continue
|
continue
|
||||||
part.realnum = realnum
|
part.realnum = realnum
|
||||||
|
|||||||
Reference in New Issue
Block a user