]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: check if part_type is set only for msdos partition table
authorEd Bartosh <ed.bartosh@linux.intel.com>
Tue, 2 Jun 2015 14:02:00 +0000 (17:02 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Jun 2015 22:55:37 +0000 (23:55 +0100)
Specifying partition type(GUID) makes sense for gpt partition table.

Current code checks if part-type is specified and throws exception
if it is. This makes sense to do only for msdos partition table.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/utils/partitionedfs.py

index 06d4eac0e514a96fc5d3a8e653b82873b3c1c68e..eacf2679d2b23baa3949cbd09a3fbad4917e9e0e 100644 (file)
@@ -138,7 +138,7 @@ class Image:
                 raise ImageError("No disk %s for partition %s" \
                                  % (p['disk_name'], p['mountpoint']))
 
-            if p['part_type']:
+            if ptable_format == 'msdos' and p['part_type']:
                 # The --part-type can also be implemented for MBR partitions,
                 # in which case it would map to the 1-byte "partition type"
                 # filed at offset 3 of the partition entry.