]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
EFI: replace number with UUID_STR_LEN macro
authorAlison Chaiken <alison@peloton-tech.com>
Sun, 25 Jun 2017 23:43:17 +0000 (16:43 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 4 Aug 2017 13:55:29 +0000 (09:55 -0400)
Changes since v6: none.

Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
disk/part_efi.c
include/part.h

index 1b7ba2794778ec0b3116534e2679fb8a4e915cbd..20d33ef275ffe7618277b33dde051e1a7671bf08 100644 (file)
@@ -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 */
index 83bce05a43d601dc3008e40db5ec907b761e8dfb..6ace09f3aa4b015dfd8058b2bd362b6f873d5947 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <blk.h>
 #include <ide.h>
+#include <uuid.h>
 
 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                       */