diff options
author | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2013-04-11 14:33:08 +0300 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2013-04-19 16:27:40 +0300 |
commit | e90442d06c2103d97a3abde909e762125075301c (patch) | |
tree | a834bd367fbb70e5abc0da11bbac6b0d7cf0125e | |
parent | 3c1f08b73555fbd09dee556a77f3a01a5bbc185b (diff) | |
download | mic-e90442d06c2103d97a3abde909e762125075301c.tar.gz mic-e90442d06c2103d97a3abde909e762125075301c.tar.bz2 mic-e90442d06c2103d97a3abde909e762125075301c.zip |
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 <artem.bityutskiy@intel.com>
-rw-r--r-- | mic/kickstart/custom_commands/partition.py | 7 |
1 files changed, 6 insertions, 1 deletions
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 |