wic: check if part_type is set only for msdos partition table

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.

(From OE-Core rev: 52dcccbead0c57d1a3f4afd2f9c7a38a985301ec)

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>
This commit is contained in:
Ed Bartosh 2015-06-02 17:02:00 +03:00 committed by Richard Purdie
parent 0a13707513
commit b7b3e4642c
1 changed files with 1 additions and 1 deletions

View 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.