From: Artem Bityutskiy Date: Thu, 11 Apr 2013 11:33:08 +0000 (+0300) Subject: partition.py: add --part-type option X-Git-Tag: 0.19~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e90442d06c2103d97a3abde909e762125075301c;p=tools%2Fmic.git partition.py: add --part-type option 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 --- diff --git a/mic/kickstart/custom_commands/partition.py b/mic/kickstart/custom_commands/partition.py index bb63e10..59a87fb 100644 --- a/mic/kickstart/custom_commands/partition.py +++ b/mic/kickstart/custom_commands/partition.py @@ -26,15 +26,18 @@ class Mic_PartData(FC4_PartData): 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" - 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): @@ -49,4 +52,6 @@ class Mic_Partition(FC4_Partition): 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) return op