From b204f2b5272363dec5fc4d8fc78c8af4c3eb8288 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Fri, 25 Nov 2011 07:00:05 +0000 Subject: [PATCH] Add sample code for EFI_IFR_QUESTION_REF3 opcode. Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12783 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/DriverSampleDxe/DriverSample.c | 8 ++++++++ .../Universal/DriverSampleDxe/Vfr.vfr | 2 +- .../Universal/DriverSampleDxe/VfrStrings.uni | Bin 60110 -> 60402 bytes 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index 37a592ce90..4b44330ec8 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -1909,6 +1909,14 @@ DriverSampleInit ( PrivateData->HiiHandle[1] = HiiHandle[1]; + // + // Update the device path string. + // + if (HiiSetString (HiiHandle[0], STRING_TOKEN (STR_DEVICE_PATH), (EFI_STRING) &mHiiVendorDevicePath0, NULL) == 0) { + DriverSampleUnload (ImageHandle); + return EFI_OUT_OF_RESOURCES; + } + // // Very simple example of how one would update a string that is already // in the HII database diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index ab4703eb82..60e9cf2a34 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -320,7 +320,7 @@ formset minimum = 0, maximum = 0xf0, step = 0, - default = 21, + default value = questionrefval(devicepath = STRING_TOKEN (STR_DEVICE_PATH), guid = DRIVER_SAMPLE_FORMSET_GUID, 0x1111), inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP), ideqval MyIfrNVData.HowOldAreYouInYearsManual == 99 diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni index 5a1e23f03db33b834a0614e51093a4d7df156b9d..98764d2408cb3ab6756e65d6e752864b0bfa2391 100644 GIT binary patch delta 71 zcmX?imHE?k<_&2_Cr|T|5p`j3We8*NWN-%3@eBbBjtn6T9+M5ZZ6|M-S2kIJQD*W3 bRi(*JX96Y*?2ef1z-=&ziEFdlu?`ggU>FzK delta 22 ecmex#o%!5V<_&2_Cr>(dZn6R+$L56NlT-kX(+g7o