diff mbox

[U-Boot,v2,1/6] EFI: replace number with UUID_STR_LEN macro

Message ID 1496076573-14495-2-git-send-email-alison@peloton-tech.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Alison Chaiken May 29, 2017, 4:49 p.m. UTC
From: Alison Chaiken <alison@she-devel.com>

Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
---
 disk/part_efi.c | 2 +-
 include/part.h  | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Tom Rini May 31, 2017, 2:07 a.m. UTC | #1
On Mon, May 29, 2017 at 09:49:28AM -0700, alison@peloton-tech.com wrote:

> From: Alison Chaiken <alison@she-devel.com>
> 
> Signed-off-by: Alison Chaiken <alison@peloton-tech.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Lukasz Majewski May 31, 2017, 7:37 a.m. UTC | #2
Hi Alison,

> From: Alison Chaiken <alison@she-devel.com>
> 
> Signed-off-by: Alison Chaiken <alison@peloton-tech.com>

Acked-by: Lukasz Majewski <lukma@denx.de>

> ---
>  disk/part_efi.c | 2 +-
>  include/part.h  | 5 +++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/disk/part_efi.c b/disk/part_efi.c
> index 1b7ba27..20d33ef 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 83bce05..6ace09f 100644
> --- a/include/part.h
> +++ b/include/part.h
> @@ -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
> 			*/




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
diff mbox

Patch

diff --git a/disk/part_efi.c b/disk/part_efi.c
index 1b7ba27..20d33ef 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 83bce05..6ace09f 100644
--- a/include/part.h
+++ b/include/part.h
@@ -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 			*/