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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user