diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-06-20 18:24:34 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-07-07 12:46:39 +0800 |
commit | 237e849da45eac8dbd343fbaa9bac40135e879f7 (patch) | |
tree | 7fa1102b9d2823b9616ea30b9ab0fb3c0c29f6e6 /MdeModulePkg/Universal | |
parent | 3a986a353db249e3ae128d47bff3a13c6e13a037 (diff) | |
download | edk2-platforms-237e849da45eac8dbd343fbaa9bac40135e879f7.tar.xz |
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 <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 3 |
1 files changed, 3 insertions, 0 deletions
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;
}
|