diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-13 07:13:11 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-13 07:13:11 +0000 |
commit | 16019c8582b8b44f7106fb2aa604c0a0d56f7356 (patch) | |
tree | b0abf7204bdfa310f44618c1b0a95eae37e30c97 /MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c | |
parent | eccfeab1cac23a27c5b87154765b1713ecb12e22 (diff) | |
download | edk2-platforms-16019c8582b8b44f7106fb2aa604c0a0d56f7356.tar.xz |
Add Example for EFI_BROWSER_ACTION_RETRIEVE callback
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9426 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c')
-rw-r--r-- | MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index a3aa2511bc..d40d60d663 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -556,6 +556,7 @@ DriverCallback ( EFI_IFR_GUID_LABEL *EndLabel;
EFI_INPUT_KEY Key;
DRIVER_SAMPLE_CONFIGURATION *Configuration;
+ UINTN MyVarSize;
if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
//
@@ -624,7 +625,6 @@ DriverCallback ( return EFI_INVALID_PARAMETER;
}
-
Status = EFI_SUCCESS;
PrivateData = DRIVER_SAMPLE_PRIVATE_FROM_THIS (This);
@@ -821,12 +821,13 @@ DriverCallback ( // Change an EFI Variable storage (MyEfiVar) asynchronous, this will cause
// the first statement in Form 3 be suppressed
//
+ MyVarSize = 1;
MyVar = 111;
Status = gRT->SetVariable(
L"MyVar",
&mFormSetGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
- 1,
+ MyVarSize,
&MyVar
);
break;
@@ -870,6 +871,21 @@ DriverCallback ( break;
+ case 0x1111:
+ //
+ // EfiVarstore question takes sample action (print value as debug information)
+ // after read/write question.
+ //
+ MyVarSize = 1;
+ Status = gRT->GetVariable(
+ L"MyVar",
+ &mFormSetGuid,
+ NULL,
+ &MyVarSize,
+ &MyVar
+ );
+ ASSERT_EFI_ERROR (Status);
+ DEBUG ((DEBUG_INFO, "EfiVarstore question: Tall value is %d with value width %d\n", MyVar, MyVarSize));
default:
break;
}
|