[PATCH v2 0/4] cmd: gpt: fix gpt read

To partition a block device the partition type GUIDs are needed but 'gpt read' does not provide these. Add the missing parts.
v2: Rename disk_partition_type_uuid() to disk_partition_type_guid(). Use setter for type_guid in allocate_disk_part(). Fix calculation of the size of the partition table descriptor. Use accessor for type_guid field.
*** BLURB HERE ***
Heinrich Schuchardt (4): part: rename disk_partition_type_uuid() cmd: gpt: use UUID accessor more consistently cmd: gpt: fix calc_parts_list_len() cmd: gpt: fix gpt read
cmd/gpt.c | 70 ++++++++++++++++++++++++++++++++----------------- disk/part_efi.c | 2 +- include/part.h | 26 +++++++++++++++--- 3 files changed, 70 insertions(+), 28 deletions(-)

Rename disk_partition_type_uuid to disk_partition_type_guid.
Provide function descriptions for the getter and setter.
Fixes: bcd645428c34 ("part: Add accessors for struct disk_partition type_uuid") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- v2: new patch --- disk/part_efi.c | 2 +- include/part.h | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/disk/part_efi.c b/disk/part_efi.c index 39382c5fae..b7aef3731b 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -299,7 +299,7 @@ int part_get_info_efi(struct blk_desc *desc, int part, } if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) { uuid_bin_to_str(gpt_pte[part - 1].partition_type_guid.b, - (char *)disk_partition_type_uuid(info), + (char *)disk_partition_type_guid(info), UUID_STR_FORMAT_GUID); }
diff --git a/include/part.h b/include/part.h index f321479a5e..db34bc6bb7 100644 --- a/include/part.h +++ b/include/part.h @@ -108,18 +108,38 @@ static inline void disk_partition_clr_uuid(struct disk_partition *info) }
/* Accessors for struct disk_partition field ->type_guid */ -extern char *__invalid_use_of_disk_partition_type_uuid; +extern char *__invalid_use_of_disk_partition_type_guid;
+/** + * disk_partition_type_guid() - get partition type GUID + * + * By using this function to get the partition type GUID we can use + * 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instead of + * '#ifdef CONFIG_PARTITION_TYPE_GUID'. + * + * @info: partition information + * Return: partition type GUID + */ static inline const -char *disk_partition_type_uuid(const struct disk_partition *info) +char *disk_partition_type_guid(const struct disk_partition *info) { #ifdef CONFIG_PARTITION_TYPE_GUID return info->type_guid; #else - return __invalid_use_of_disk_partition_type_uuid; + return __invalid_use_of_disk_partition_type_guid; #endif }
+/** + * disk_partition_set_type_guid() - set partition type GUID + * + * By using this function to set the partition type GUID we can use + * 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instead of + * '#ifdef CONFIG_PARTITION_TYPE_GUID'. + * + * @info: partition information + * @val: partition type GUID as string + */ static inline void disk_partition_set_type_guid(struct disk_partition *info, const char *val) {

Hi Heinrich,
On Sat, 2 Sept 2023 at 01:34, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
Rename disk_partition_type_uuid to disk_partition_type_guid.
Provide function descriptions for the getter and setter.
Fixes: bcd645428c34 ("part: Add accessors for struct disk_partition type_uuid") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
v2: new patch
disk/part_efi.c | 2 +- include/part.h | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
But this doesn't look like a rename
diff --git a/disk/part_efi.c b/disk/part_efi.c index 39382c5fae..b7aef3731b 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -299,7 +299,7 @@ int part_get_info_efi(struct blk_desc *desc, int part, } if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) { uuid_bin_to_str(gpt_pte[part - 1].partition_type_guid.b,
(char *)disk_partition_type_uuid(info),
(char *)disk_partition_type_guid(info), UUID_STR_FORMAT_GUID); }
diff --git a/include/part.h b/include/part.h index f321479a5e..db34bc6bb7 100644 --- a/include/part.h +++ b/include/part.h @@ -108,18 +108,38 @@ static inline void disk_partition_clr_uuid(struct disk_partition *info) }
/* Accessors for struct disk_partition field ->type_guid */ -extern char *__invalid_use_of_disk_partition_type_uuid; +extern char *__invalid_use_of_disk_partition_type_guid;
+/**
- disk_partition_type_guid() - get partition type GUID
- By using this function to get the partition type GUID we can use
- 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instead of
- '#ifdef CONFIG_PARTITION_TYPE_GUID'.
- @info: partition information
- Return: partition type GUID
- */
static inline const -char *disk_partition_type_uuid(const struct disk_partition *info) +char *disk_partition_type_guid(const struct disk_partition *info) { #ifdef CONFIG_PARTITION_TYPE_GUID return info->type_guid; #else
return __invalid_use_of_disk_partition_type_uuid;
return __invalid_use_of_disk_partition_type_guid;
#endif }
+/**
- disk_partition_set_type_guid() - set partition type GUID
- By using this function to set the partition type GUID we can use
- 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instead of
- '#ifdef CONFIG_PARTITION_TYPE_GUID'.
- @info: partition information
- @val: partition type GUID as string
- */
static inline void disk_partition_set_type_guid(struct disk_partition *info, const char *val) { -- 2.40.1

On 9/4/23 18:48, Simon Glass wrote:
Hi Heinrich,
On Sat, 2 Sept 2023 at 01:34, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
Rename disk_partition_type_uuid to disk_partition_type_guid.
Provide function descriptions for the getter and setter.
Fixes: bcd645428c34 ("part: Add accessors for struct disk_partition type_uuid") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
v2: new patch
disk/part_efi.c | 2 +- include/part.h | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
But this doesn't look like a rename
We replace *uuid by *guid. So the function is renamed.
Best regards
Heinrich
diff --git a/disk/part_efi.c b/disk/part_efi.c index 39382c5fae..b7aef3731b 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -299,7 +299,7 @@ int part_get_info_efi(struct blk_desc *desc, int part, } if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) { uuid_bin_to_str(gpt_pte[part - 1].partition_type_guid.b,
(char *)disk_partition_type_uuid(info),
(char *)disk_partition_type_guid(info), UUID_STR_FORMAT_GUID); }
diff --git a/include/part.h b/include/part.h index f321479a5e..db34bc6bb7 100644 --- a/include/part.h +++ b/include/part.h @@ -108,18 +108,38 @@ static inline void disk_partition_clr_uuid(struct disk_partition *info) }
/* Accessors for struct disk_partition field ->type_guid */ -extern char *__invalid_use_of_disk_partition_type_uuid; +extern char *__invalid_use_of_disk_partition_type_guid;
+/**
- disk_partition_type_guid() - get partition type GUID
- By using this function to get the partition type GUID we can use
- 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instead of
- '#ifdef CONFIG_PARTITION_TYPE_GUID'.
- @info: partition information
- Return: partition type GUID
- */ static inline const
-char *disk_partition_type_uuid(const struct disk_partition *info) +char *disk_partition_type_guid(const struct disk_partition *info) { #ifdef CONFIG_PARTITION_TYPE_GUID return info->type_guid; #else
return __invalid_use_of_disk_partition_type_uuid;
#endif }return __invalid_use_of_disk_partition_type_guid;
+/**
- disk_partition_set_type_guid() - set partition type GUID
- By using this function to set the partition type GUID we can use
- 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instead of
- '#ifdef CONFIG_PARTITION_TYPE_GUID'.
- @info: partition information
- @val: partition type GUID as string
- */ static inline void disk_partition_set_type_guid(struct disk_partition *info, const char *val) {
-- 2.40.1

On Sat, Sep 02, 2023 at 09:35:21AM +0200, Heinrich Schuchardt wrote:
Rename disk_partition_type_uuid to disk_partition_type_guid.
Provide function descriptions for the getter and setter.
Fixes: bcd645428c34 ("part: Add accessors for struct disk_partition type_uuid") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com Reviewed-by: Simon Glass sjg@chromium.org
For the series, applied to u-boot/next, thanks!

disk_partition_uuid() and disk_partition_set_uuid() were introduced to let us avoid the usage of #ifdef when dealing with the field uuid of struct disk_partition.
In allocate_disk_part() commit c5f1d005f517 ("part: Add accessors for struct disk_partition uuid") missed to use the setter.
print_gpt_info() and create_gpt_partitions_list() are further functions where we should use the getter.
Fixes: c5f1d005f517 ("part: Add accessors for struct disk_partition uuid") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- v2: new patch --- cmd/gpt.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/cmd/gpt.c b/cmd/gpt.c index 8969efba8c..092f7defff 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -211,10 +211,9 @@ static struct disk_part *allocate_disk_part(struct disk_partition *info, PART_TYPE_LEN); newpart->gpt_part_info.type[PART_TYPE_LEN - 1] = '\0'; newpart->gpt_part_info.bootable = info->bootable; - if (IS_ENABLED(CONFIG_PARTITION_UUIDS)) { - strlcpy(newpart->gpt_part_info.uuid, disk_partition_uuid(info), - UUID_STR_LEN + 1); - } + if (IS_ENABLED(CONFIG_PARTITION_UUIDS)) + disk_partition_set_uuid(&newpart->gpt_part_info, + disk_partition_uuid(info)); newpart->partnum = partnum;
return newpart; @@ -250,9 +249,9 @@ static void print_gpt_info(void) curr->gpt_part_info.name); printf("Type %s, bootable %d\n", curr->gpt_part_info.type, curr->gpt_part_info.bootable & PART_BOOTABLE); -#ifdef CONFIG_PARTITION_UUIDS - printf("UUID %s\n", curr->gpt_part_info.uuid); -#endif + if (CONFIG_IS_ENABLED(PARTITION_UUIDS)) + printf("UUID %s\n", + disk_partition_uuid(&curr->gpt_part_info)); printf("\n"); } } @@ -296,10 +295,12 @@ static int create_gpt_partitions_list(int numparts, const char *guid, (unsigned long long)curr->gpt_part_info.size * curr->gpt_part_info.blksz); strncat(partitions_list, partstr, PART_NAME_LEN + 1); - - strcat(partitions_list, ",uuid="); - strncat(partitions_list, curr->gpt_part_info.uuid, - UUID_STR_LEN + 1); + if (CONFIG_IS_ENABLED(PARTITION_UUIDS)) { + strcat(partitions_list, ",uuid="); + strncat(partitions_list, + disk_partition_uuid(&curr->gpt_part_info), + UUID_STR_LEN + 1); + } strcat(partitions_list, ";"); } return 0;

On Sat, 2 Sept 2023 at 01:34, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
disk_partition_uuid() and disk_partition_set_uuid() were introduced to let us avoid the usage of #ifdef when dealing with the field uuid of struct disk_partition.
In allocate_disk_part() commit c5f1d005f517 ("part: Add accessors for struct disk_partition uuid") missed to use the setter.
print_gpt_info() and create_gpt_partitions_list() are further functions where we should use the getter.
Fixes: c5f1d005f517 ("part: Add accessors for struct disk_partition uuid") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
v2: new patch
cmd/gpt.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

* Avoid incrementing by moving comma into strlen("uuid_disk=,") and considering NUL byte. * Appending a UUID only adds UUID_STR_LEN bytes. Don't count the terminating NUL. * The length of the hexadecimal representation of lba_int is 2 * sizeof(lba_int). * We don't use a 'MiB' postfix but a '0x' prefix. * The uuid field is only needed if configured.
Fixes: 2fcaa413b3f6 ("gpt: harden set_gpt_info() against non NULL-terminated strings") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- v2: new patch --- cmd/gpt.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/cmd/gpt.c b/cmd/gpt.c index 092f7defff..e7a53747fc 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -162,22 +162,29 @@ static bool found_key(const char *str, const char *key) return result; }
+/** + * calc_parts_list_len() - get size of partition table description + * + * @numparts: number of partitions + * Return: string size including terminating NUL + */ static int calc_parts_list_len(int numparts) { - int partlistlen = UUID_STR_LEN + 1 + strlen("uuid_disk="); - /* for the comma */ - partlistlen++; - - /* per-partition additions; numparts starts at 1, so this should be correct */ - partlistlen += numparts * (strlen("name=,") + PART_NAME_LEN + 1); + /* number of hexadecimal digits of the lbaint_t representation */ + const int lbaint_size = 2 * sizeof(lbaint_t); + int partlistlen; + + /* media description including terminating NUL */ + partlistlen = strlen("uuid_disk=;") + UUID_STR_LEN + 1; + /* per-partition descriptions; numparts */ + partlistlen += numparts * (strlen("name=,") + PART_NAME_LEN); /* see part.h for definition of struct disk_partition */ - partlistlen += numparts * (strlen("start=MiB,") + sizeof(lbaint_t) + 1); - partlistlen += numparts * (strlen("size=MiB,") + sizeof(lbaint_t) + 1); - partlistlen += numparts * (strlen("uuid=;") + UUID_STR_LEN + 1); - /* for the terminating null */ - partlistlen++; - debug("Length of partitions_list is %d for %d partitions\n", partlistlen, - numparts); + partlistlen += numparts * (strlen("start=0x,") + lbaint_size); + partlistlen += numparts * (strlen("size=0x,") + lbaint_size); + if (IS_ENABLED(CONFIG_PARTITION_UUIDS)) + partlistlen += numparts * (strlen("uuid=;") + UUID_STR_LEN); + debug("Length of partitions_list is %d for %d partitions\n", + partlistlen, numparts); return partlistlen; }

Hi Heinrich, On Sat, 2 Sept 2023 at 01:34, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
- Avoid incrementing by moving comma into strlen("uuid_disk=,") and considering NUL byte.
- Appending a UUID only adds UUID_STR_LEN bytes. Don't count the terminating NUL.
- The length of the hexadecimal representation of lba_int is 2 * sizeof(lba_int).
- We don't use a 'MiB' postfix but a '0x' prefix.
Why do we want the 0x prefix?
- The uuid field is only needed if configured.
Fixes: 2fcaa413b3f6 ("gpt: harden set_gpt_info() against non NULL-terminated strings") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
v2: new patch
cmd/gpt.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/cmd/gpt.c b/cmd/gpt.c index 092f7defff..e7a53747fc 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -162,22 +162,29 @@ static bool found_key(const char *str, const char *key) return result; }
+/**
- calc_parts_list_len() - get size of partition table description
- @numparts: number of partitions
- Return: string size including terminating NUL
- */
static int calc_parts_list_len(int numparts) {
int partlistlen = UUID_STR_LEN + 1 + strlen("uuid_disk=");
/* for the comma */
partlistlen++;
/* per-partition additions; numparts starts at 1, so this should be correct */
partlistlen += numparts * (strlen("name=,") + PART_NAME_LEN + 1);
/* number of hexadecimal digits of the lbaint_t representation */
const int lbaint_size = 2 * sizeof(lbaint_t);
int partlistlen;
/* media description including terminating NUL */
partlistlen = strlen("uuid_disk=;") + UUID_STR_LEN + 1;
/* per-partition descriptions; numparts */
partlistlen += numparts * (strlen("name=,") + PART_NAME_LEN); /* see part.h for definition of struct disk_partition */
partlistlen += numparts * (strlen("start=MiB,") + sizeof(lbaint_t) + 1);
partlistlen += numparts * (strlen("size=MiB,") + sizeof(lbaint_t) + 1);
partlistlen += numparts * (strlen("uuid=;") + UUID_STR_LEN + 1);
/* for the terminating null */
partlistlen++;
debug("Length of partitions_list is %d for %d partitions\n", partlistlen,
numparts);
partlistlen += numparts * (strlen("start=0x,") + lbaint_size);
partlistlen += numparts * (strlen("size=0x,") + lbaint_size);
if (IS_ENABLED(CONFIG_PARTITION_UUIDS))
partlistlen += numparts * (strlen("uuid=;") + UUID_STR_LEN);
debug("Length of partitions_list is %d for %d partitions\n",
partlistlen, numparts); return partlistlen;
}
-- 2.40.1
Regards, Simon

On 9/4/23 18:48, Simon Glass wrote:
Hi Heinrich, On Sat, 2 Sept 2023 at 01:34, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
- Avoid incrementing by moving comma into strlen("uuid_disk=,") and considering NUL byte.
- Appending a UUID only adds UUID_STR_LEN bytes. Don't count the terminating NUL.
- The length of the hexadecimal representation of lba_int is 2 * sizeof(lba_int).
- We don't use a 'MiB' postfix but a '0x' prefix.
Why do we want the 0x prefix?
This patch is about correcting the number of bytes allocated for the output buffer. Is does not change the output format.
We want 'gpt write' to understand the output of 'gpt read'.
The ustrtoull(p, &p, 0) function call in set_gpt_info() requires the "0x" prefix to understand that size and start are hexadecimal.
See function _parse_integer_fixup_radix().
Best regards
Heinrich
- The uuid field is only needed if configured.
Fixes: 2fcaa413b3f6 ("gpt: harden set_gpt_info() against non NULL-terminated strings") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
v2: new patch
cmd/gpt.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/cmd/gpt.c b/cmd/gpt.c index 092f7defff..e7a53747fc 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -162,22 +162,29 @@ static bool found_key(const char *str, const char *key) return result; }
+/**
- calc_parts_list_len() - get size of partition table description
- @numparts: number of partitions
- Return: string size including terminating NUL
- */ static int calc_parts_list_len(int numparts) {
int partlistlen = UUID_STR_LEN + 1 + strlen("uuid_disk=");
/* for the comma */
partlistlen++;
/* per-partition additions; numparts starts at 1, so this should be correct */
partlistlen += numparts * (strlen("name=,") + PART_NAME_LEN + 1);
/* number of hexadecimal digits of the lbaint_t representation */
const int lbaint_size = 2 * sizeof(lbaint_t);
int partlistlen;
/* media description including terminating NUL */
partlistlen = strlen("uuid_disk=;") + UUID_STR_LEN + 1;
/* per-partition descriptions; numparts */
partlistlen += numparts * (strlen("name=,") + PART_NAME_LEN); /* see part.h for definition of struct disk_partition */
partlistlen += numparts * (strlen("start=MiB,") + sizeof(lbaint_t) + 1);
partlistlen += numparts * (strlen("size=MiB,") + sizeof(lbaint_t) + 1);
partlistlen += numparts * (strlen("uuid=;") + UUID_STR_LEN + 1);
/* for the terminating null */
partlistlen++;
debug("Length of partitions_list is %d for %d partitions\n", partlistlen,
numparts);
partlistlen += numparts * (strlen("start=0x,") + lbaint_size);
partlistlen += numparts * (strlen("size=0x,") + lbaint_size);
if (IS_ENABLED(CONFIG_PARTITION_UUIDS))
partlistlen += numparts * (strlen("uuid=;") + UUID_STR_LEN);
debug("Length of partitions_list is %d for %d partitions\n",
}partlistlen, numparts); return partlistlen;
-- 2.40.1
Regards, Simon

To partition a block device the partition type GUIDs are needed but 'gpt read' does not provide these. Add the missing parts.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- v2: use accessor for type_guid field --- cmd/gpt.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/cmd/gpt.c b/cmd/gpt.c index e7a53747fc..8e1de24845 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -182,7 +182,9 @@ static int calc_parts_list_len(int numparts) partlistlen += numparts * (strlen("start=0x,") + lbaint_size); partlistlen += numparts * (strlen("size=0x,") + lbaint_size); if (IS_ENABLED(CONFIG_PARTITION_UUIDS)) - partlistlen += numparts * (strlen("uuid=;") + UUID_STR_LEN); + partlistlen += numparts * (strlen("uuid=,") + UUID_STR_LEN); + if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) + partlistlen += numparts * (strlen("type=;") + UUID_STR_LEN); debug("Length of partitions_list is %d for %d partitions\n", partlistlen, numparts); return partlistlen; @@ -221,6 +223,9 @@ static struct disk_part *allocate_disk_part(struct disk_partition *info, if (IS_ENABLED(CONFIG_PARTITION_UUIDS)) disk_partition_set_uuid(&newpart->gpt_part_info, disk_partition_uuid(info)); + if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) + disk_partition_set_type_guid(&newpart->gpt_part_info, + disk_partition_type_guid(info)); newpart->partnum = partnum;
return newpart; @@ -259,6 +264,9 @@ static void print_gpt_info(void) if (CONFIG_IS_ENABLED(PARTITION_UUIDS)) printf("UUID %s\n", disk_partition_uuid(&curr->gpt_part_info)); + if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) + printf("Type GUID %s\n", + disk_partition_type_guid(&curr->gpt_part_info)); printf("\n"); } } @@ -308,6 +316,12 @@ static int create_gpt_partitions_list(int numparts, const char *guid, disk_partition_uuid(&curr->gpt_part_info), UUID_STR_LEN + 1); } + if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) { + strcat(partitions_list, ",type="); + strncat(partitions_list, + disk_partition_type_guid(&curr->gpt_part_info), + UUID_STR_LEN + 1); + } strcat(partitions_list, ";"); } return 0;

On Sat, 2 Sept 2023 at 01:34, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
To partition a block device the partition type GUIDs are needed but 'gpt read' does not provide these. Add the missing parts.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
v2: use accessor for type_guid field
cmd/gpt.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
participants (3)
-
Heinrich Schuchardt
-
Simon Glass
-
Tom Rini