Add a kickstart file partition option for specifying partition type. In case of
GPT partitions, this is an UUID which is stored at offset 0 of the partition
entry in the partition table. In case of MBR partitions, this will be the
1-byte partition type which is stored at offset 4 of the partition entry in the
partition table.
Change-Id: I8d03c2414b8e8c555b18f9f94f60a9e0f7742536
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
self.deleteRemovedAttrs()
self.align = kwargs.get("align", None)
self.extopts = kwargs.get("extopts", None)
self.deleteRemovedAttrs()
self.align = kwargs.get("align", None)
self.extopts = kwargs.get("extopts", None)
+ self.part_type = kwargs.get("part_type", None)
def _getArgsAsStr(self):
retval = FC4_PartData._getArgsAsStr(self)
if self.align:
retval += " --align"
def _getArgsAsStr(self):
retval = FC4_PartData._getArgsAsStr(self)
if self.align:
retval += " --align"
if self.extopts:
retval += " --extoptions=%s" % self.extopts
if self.extopts:
retval += " --extoptions=%s" % self.extopts
+ if self.part_type:
+ retval += " --part-type=%s" % self.part_type
+
return retval
class Mic_Partition(FC4_Partition):
return retval
class Mic_Partition(FC4_Partition):
default=None)
op.add_option("--extoptions", type="string", action="store", dest="extopts",
default=None)
default=None)
op.add_option("--extoptions", type="string", action="store", dest="extopts",
default=None)
+ op.add_option("--part-type", type="string", action="store", dest="part_type",
+ default=None)