[U-Boot] [PATCH V2 1/3] part_efi: move uuid_string() and string_uuid() to lib/uuid.c

Stephen Warren swarren at wwwdotorg.org
Mon Mar 10 18:29:46 CET 2014


On 03/05/2014 09:45 AM, Przemyslaw Marczak wrote:
> Changes:
> Move functions:
> - disk/part_efi.c uuid_string() to lib/uuid.c -> uuid_bin_to_str()
> - disk/part_efi.c string_uuid() to lib/uuid.c -> uuid_str_to_bin()

> diff --git a/lib/uuid.c b/lib/uuid.c

> -void uuid_str_to_bin(const char *uuid, unsigned char *out)
> +int uuid_str_to_bin(char *uuid, unsigned char *out)
>  {
>  	uint16_t tmp16;
>  	uint32_t tmp32;
>  	uint64_t tmp64;
>  
>  	if (!uuid || !out)
> -		return;
> +		return -EINVAL;
> +
> +	if (strlen(uuid) != UUID_STR_LEN)
> +		return -EINVAL;

Oh. This patch won't compile, since UUID_STR_LEN doesn't exist yet.


More information about the U-Boot mailing list