summaryrefslogtreecommitdiff
path: root/disk/part.c
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay73@gmail.com>2015-10-27 11:00:27 +0100
committerTom Rini <trini@konsulko.com>2015-11-12 15:58:58 -0500
commit7561b258a1bdda25daee78824a400d48921f4802 (patch)
tree9947bb71da958c871e8ab8cbe246088f6cb3e118 /disk/part.c
parentb38c108a9833ca2acb568530ebd269760f3925d9 (diff)
gpt: add optional parameter type in gpt command
code under flag CONFIG_PARTITION_TYPE_GUID add parameter "type" to select partition type guid example of use with gpt command : partitions = uuid_disk=${uuid_gpt_disk}; \ name=boot,size=0x6bc00,uuid=${uuid_gpt_boot}; \ name=root,size=0x7538ba00,uuid=${uuid_gpt_root}, \ type=0fc63daf-8483-4772-8e79-3d69d8477de4; gpt write mmc 0 $partitions Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
Diffstat (limited to 'disk/part.c')
-rw-r--r--disk/part.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/disk/part.c b/disk/part.c
index e57a252d94..909712e501 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -392,6 +392,9 @@ int get_partition_info(block_dev_desc_t *dev_desc, int part,
/* The common case is no UUID support */
info->uuid[0] = 0;
#endif
+#ifdef CONFIG_PARTITION_TYPE_GUID
+ info->type_guid[0] = 0;
+#endif
switch (dev_desc->part_type) {
#ifdef CONFIG_MAC_PARTITION
@@ -532,6 +535,9 @@ int get_device_and_partition(const char *ifname, const char *dev_part_str,
#ifdef CONFIG_PARTITION_UUIDS
info->uuid[0] = 0;
#endif
+#ifdef CONFIG_PARTITION_TYPE_GUID
+ info->type_guid[0] = 0;
+#endif
return 0;
}
@@ -639,6 +645,9 @@ int get_device_and_partition(const char *ifname, const char *dev_part_str,
#ifdef CONFIG_PARTITION_UUIDS
info->uuid[0] = 0;
#endif
+#ifdef CONFIG_PARTITION_TYPE_GUID
+ info->type_guid[0] = 0;
+#endif
ret = 0;
goto cleanup;