summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-25 09:08:30 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-25 09:08:30 +0000
commit086cd2c8e932297641aba4986e3376b202365b5a (patch)
tree7e91f16fb20746c2ad19afefe051e72dfa9e6c26 /MdeModulePkg/Universal/SetupBrowserDxe
parentcab302fd4cb652cd05d2d0ff1629fda07d4e330c (diff)
downloadedk2-platforms-086cd2c8e932297641aba4986e3376b202365b5a.tar.xz
Correct DriverSample ConfigAcess protocol ExtractConfig interface.
Correct SetupBrowser to set default value for default sting ID. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8660 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index 15d4af3cf1..4f2c92c818 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -1779,8 +1779,10 @@ GetQuestionDefault (
QUESTION_OPTION *Option;
EFI_HII_VALUE *HiiValue;
UINT8 Index;
+ EFI_STRING StrValue;
- Status = EFI_SUCCESS;
+ Status = EFI_SUCCESS;
+ StrValue = NULL;
//
// Statement don't have storage, skip them
@@ -1823,6 +1825,14 @@ GetQuestionDefault (
CopyMem (HiiValue, &Default->Value, sizeof (EFI_HII_VALUE));
}
+ if (HiiValue->Type == EFI_IFR_TYPE_STRING) {
+ StrValue = HiiGetString (FormSet->HiiHandle, HiiValue->Value.string, NULL);
+ if (StrValue == NULL) {
+ return EFI_NOT_FOUND;
+ }
+ Question->BufferValue = AllocateCopyPool (StrSize (StrValue), StrValue);
+ }
+
return EFI_SUCCESS;
}