From: Alison Chaiken Date: Sun, 25 Jun 2017 23:43:17 +0000 (-0700) Subject: EFI: replace number with UUID_STR_LEN macro X-Git-Tag: v2017.09-rc2~128 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=db9b6200a4b38d0ca9e2c1aac6acaee671baff7d;p=u-boot EFI: replace number with UUID_STR_LEN macro Changes since v6: none. Signed-off-by: Alison Chaiken --- diff --git a/disk/part_efi.c b/disk/part_efi.c index 1b7ba27947..20d33ef275 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -183,7 +183,7 @@ void part_print_efi(struct blk_desc *dev_desc) ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz); gpt_entry *gpt_pte = NULL; int i = 0; - char uuid[37]; + char uuid[UUID_STR_LEN + 1]; unsigned char *uuid_bin; /* This function validates AND fills in the GPT header and PTE */ diff --git a/include/part.h b/include/part.h index 83bce05a43..6ace09f3aa 100644 --- a/include/part.h +++ b/include/part.h @@ -9,6 +9,7 @@ #include #include +#include struct block_drvr { char *name; @@ -54,10 +55,10 @@ typedef struct disk_partition { uchar type[32]; /* string type description */ int bootable; /* Active/Bootable flag is set */ #if CONFIG_IS_ENABLED(PARTITION_UUIDS) - char uuid[37]; /* filesystem UUID as string, if exists */ + char uuid[UUID_STR_LEN + 1]; /* filesystem UUID as string, if exists */ #endif #ifdef CONFIG_PARTITION_TYPE_GUID - char type_guid[37]; /* type GUID as string, if exists */ + char type_guid[UUID_STR_LEN + 1]; /* type GUID as string, if exists */ #endif #ifdef CONFIG_DOS_PARTITION uchar sys_ind; /* partition type */