From 237e849da45eac8dbd343fbaa9bac40135e879f7 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Mon, 20 Jun 2016 18:24:34 +0800 Subject: MdeModulePkg/HiiDB: Record fail info if fail to save data for EfiVarStore HiiConfigRoutingRouteConfig function returns 'Progress' to indicate the failure info in the ConfigResp string. But when fail to route the ConfigResp for EfiVarStore, it doesn't return the correct failure info. Now this patch is to fix this issue and add debug info let user know the reason of failure. Cc: Liming Gao Cc: Eric Dong Cc: Chao Zhang Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi Reviewed-by: Eric Dong Reviewed-by: Liming Gao Reviewed-by: Chao Zhang --- MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 106f25db11..0578352325 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -4060,6 +4060,7 @@ RouteConfigRespForEfiVarStore ( BufferSize = 0; VarStore = NULL; VarStoreName = NULL; + *Result = RequestResp; NameSize = AsciiStrSize ((CHAR8 *)EfiVarStoreInfo->Name); VarStoreName = AllocateZeroPool (NameSize * sizeof (CHAR16)); @@ -4071,6 +4072,7 @@ RouteConfigRespForEfiVarStore ( Status = gRT->GetVariable (VarStoreName, &EfiVarStoreInfo->Guid, NULL, &BufferSize, NULL); if (Status != EFI_BUFFER_TOO_SMALL) { + DEBUG ((DEBUG_ERROR, "The variable does not exist!")); goto Done; } @@ -4089,6 +4091,7 @@ RouteConfigRespForEfiVarStore ( Status = gRT->SetVariable (VarStoreName, &EfiVarStoreInfo->Guid, EfiVarStoreInfo->Attributes, BufferSize, VarStore); if (EFI_ERROR (Status)) { + *Result = RequestResp; goto Done; } -- cgit v1.2.3