Message ID | 1405048839-5013-1-git-send-email-ivan.hu@canonical.com |
---|---|
State | Accepted |
Headers | show |
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@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@canonical.com>
On 07/11/2014 11:20 AM, 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@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: Alex Hung <alex.hung@canonical.com>
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);
When fwts tests find out a duplicate name exist, print out the duplicate variable name. Signed-off-by: Ivan Hu <ivan.hu@canonical.com> --- src/uefi/uefirtvariable/uefirtvariable.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)