ACK: [PATCH] uefi: uefirtvariable: print out the duplicate variable name (LP: #1340492)

Colin Ian King colin.king at canonical.com
Fri Jul 11 07:33:27 UTC 2014


On 11/07/14 04:20, Ivan Hu wrote:
> When fwts tests find out a duplicate name exist, print out the duplicate
> variable name.
> 
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>  src/uefi/uefirtvariable/uefirtvariable.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
> index 7ddfeb1..fd2dc7e 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -565,6 +565,7 @@ static int getnextvariable_test3(fwts_framework *fw)
>  	uint64_t variablenamesize = MAX_DATA_LENGTH;
>  	uint16_t variablename[MAX_DATA_LENGTH];
>  	EFI_GUID vendorguid;
> +	char name[MAX_DATA_LENGTH];
>  
>  	getnextvariablename.VariableNameSize = &variablenamesize;
>  	getnextvariablename.VariableName = variablename;
> @@ -632,9 +633,10 @@ static int getnextvariable_test3(fwts_framework *fw)
>  		item->hash = hash_func(variablename, variablenamesize);
>  
>  		if (bucket_insert(item)) {
> +			fwts_uefi_str16_to_str(name, sizeof(name), variablename);
>  			fwts_failed(fw, LOG_LEVEL_HIGH,
>  				"UEFIRuntimeGetNextVariableName",
> -				"Duplicate variable name found.");
> +				"Duplicate variable name %s found.", name);
>  			free(item->name);
>  			free(item->guid);
>  			free(item);
> 
Acked-by: Colin Ian King <colin.king at canonical.com>



More information about the fwts-devel mailing list