MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Utility functions for expression evaluation.
|
||||
|
||||
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -157,7 +157,7 @@ PushStack (
|
||||
(*StackPtr)->Buffer = AllocateCopyPool(Data->BufferLen, Data->Buffer);
|
||||
ASSERT ((*StackPtr)->Buffer != NULL);
|
||||
}
|
||||
|
||||
|
||||
*StackPtr = *StackPtr + 1;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -210,7 +210,7 @@ ResetCurrentExpressionStack (
|
||||
mCurrentExpressionPointer = mCurrentExpressionStack;
|
||||
mFormExpressionPointer = mFormExpressionStack;
|
||||
mStatementExpressionPointer = mStatementExpressionStack;
|
||||
mOptionExpressionPointer = mOptionExpressionStack;
|
||||
mOptionExpressionPointer = mOptionExpressionStack;
|
||||
}
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ ResetMapExpressionListStack (
|
||||
pointer
|
||||
@param StackEnd On input: old stack end; On output: new stack end
|
||||
@param MemberSize The stack member size.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Grow stack success.
|
||||
@retval EFI_OUT_OF_RESOURCES No enough memory for stack space.
|
||||
|
||||
@@ -383,7 +383,7 @@ PushConditionalStack (
|
||||
//
|
||||
// Push the item onto the stack
|
||||
//
|
||||
CopyMem (*StackPtr, Data, sizeof (FORM_EXPRESSION *));
|
||||
CopyMem (*StackPtr, Data, sizeof (FORM_EXPRESSION *));
|
||||
*StackPtr = *StackPtr + 1;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -426,15 +426,15 @@ PopConditionalStack (
|
||||
|
||||
/**
|
||||
Get the expression list count.
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
statement or option?
|
||||
|
||||
@retval >=0 The expression count
|
||||
@retval -1 Input parameter error.
|
||||
|
||||
**/
|
||||
INTN
|
||||
INTN
|
||||
GetConditionalExpressionCount (
|
||||
IN EXPRESS_LEVEL Level
|
||||
)
|
||||
@@ -449,13 +449,13 @@ GetConditionalExpressionCount (
|
||||
default:
|
||||
ASSERT (FALSE);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Get the expression Buffer pointer.
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
statement or option?
|
||||
|
||||
@retval The start pointer of the expression buffer or NULL.
|
||||
@@ -476,7 +476,7 @@ GetConditionalExpressionList (
|
||||
default:
|
||||
ASSERT (FALSE);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -484,7 +484,7 @@ GetConditionalExpressionList (
|
||||
Push the expression options onto the Stack.
|
||||
|
||||
@param Pointer Pointer to the current expression.
|
||||
@param Level Which type this expression belong to. Form,
|
||||
@param Level Which type this expression belong to. Form,
|
||||
statement or option?
|
||||
|
||||
@retval EFI_SUCCESS The value was pushed onto the stack.
|
||||
@@ -528,7 +528,7 @@ PushConditionalExpression (
|
||||
/**
|
||||
Pop the expression options from the Stack
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
@param Level Which type this expression belong to. Form,
|
||||
statement or option?
|
||||
|
||||
@retval EFI_SUCCESS The value was pushed onto the stack.
|
||||
@@ -992,7 +992,7 @@ IfrStrToUpper (
|
||||
/**
|
||||
Check whether this value type can be transfer to EFI_IFR_TYPE_BUFFER type.
|
||||
|
||||
EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to
|
||||
EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to
|
||||
EFI_IFR_TYPE_BUFFER when do the value compare.
|
||||
|
||||
@param Value Expression value to compare on.
|
||||
@@ -1048,11 +1048,11 @@ IsTypeInUINT64 (
|
||||
/**
|
||||
Return the buffer length for this value.
|
||||
|
||||
EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to
|
||||
EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to
|
||||
EFI_IFR_TYPE_BUFFER when do the value compare.
|
||||
|
||||
@param Value Expression value to compare on.
|
||||
|
||||
|
||||
@retval BufLen Return the buffer length.
|
||||
|
||||
**/
|
||||
@@ -1082,7 +1082,7 @@ GetLengthForValue (
|
||||
/**
|
||||
Return the buffer pointer for this value.
|
||||
|
||||
EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to
|
||||
EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to
|
||||
EFI_IFR_TYPE_BUFFER when do the value compare.
|
||||
|
||||
@param Value Expression value to compare on.
|
||||
@@ -1181,13 +1181,13 @@ IfrToString (
|
||||
case EFI_IFR_TYPE_BOOLEAN:
|
||||
String = (Value.Value.b) ? L"True" : L"False";
|
||||
break;
|
||||
|
||||
|
||||
case EFI_IFR_TYPE_BUFFER:
|
||||
case EFI_IFR_TYPE_DATE:
|
||||
case EFI_IFR_TYPE_TIME:
|
||||
case EFI_IFR_TYPE_REF:
|
||||
//
|
||||
// + 3 is base on the unicode format, the length may be odd number,
|
||||
// + 3 is base on the unicode format, the length may be odd number,
|
||||
// so need 1 byte to align, also need 2 bytes for L'\0'.
|
||||
//
|
||||
if (Value.Type == EFI_IFR_TYPE_BUFFER) {
|
||||
@@ -1202,20 +1202,20 @@ IfrToString (
|
||||
ASSERT (TmpBuf != NULL);
|
||||
if (Format == EFI_IFR_STRING_ASCII) {
|
||||
CopyMem (TmpBuf, SrcBuf, SrcLen);
|
||||
PrintFormat = L"%a";
|
||||
PrintFormat = L"%a";
|
||||
} else {
|
||||
// Format == EFI_IFR_STRING_UNICODE
|
||||
CopyMem (TmpBuf, SrcBuf, SrcLen * sizeof (CHAR16));
|
||||
PrintFormat = L"%s";
|
||||
PrintFormat = L"%s";
|
||||
}
|
||||
UnicodeSPrint (Buffer, sizeof (Buffer), PrintFormat, TmpBuf);
|
||||
String = Buffer;
|
||||
String = Buffer;
|
||||
FreePool (TmpBuf);
|
||||
if (Value.Type == EFI_IFR_TYPE_BUFFER) {
|
||||
FreePool (Value.Buffer);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
Result->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
return EFI_SUCCESS;
|
||||
@@ -1587,8 +1587,8 @@ IfrMatch2 (
|
||||
RegExSyntaxTypeList = NULL;
|
||||
|
||||
Status = RegularExpressionProtocol->GetInfo (
|
||||
RegularExpressionProtocol,
|
||||
&RegExSyntaxTypeListSize,
|
||||
RegularExpressionProtocol,
|
||||
&RegExSyntaxTypeListSize,
|
||||
RegExSyntaxTypeList
|
||||
);
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
@@ -1598,8 +1598,8 @@ IfrMatch2 (
|
||||
goto Done;
|
||||
}
|
||||
Status = RegularExpressionProtocol->GetInfo (
|
||||
RegularExpressionProtocol,
|
||||
&RegExSyntaxTypeListSize,
|
||||
RegularExpressionProtocol,
|
||||
&RegExSyntaxTypeListSize,
|
||||
RegExSyntaxTypeList
|
||||
);
|
||||
} else if (EFI_ERROR (Status)) {
|
||||
@@ -1613,7 +1613,7 @@ IfrMatch2 (
|
||||
//
|
||||
Result->Type = EFI_IFR_TYPE_BOOLEAN;
|
||||
Status = RegularExpressionProtocol->MatchString (
|
||||
RegularExpressionProtocol,
|
||||
RegularExpressionProtocol,
|
||||
String[0],
|
||||
String[1],
|
||||
SyntaxType,
|
||||
@@ -1631,7 +1631,7 @@ IfrMatch2 (
|
||||
}
|
||||
|
||||
//
|
||||
// Type specified by SyntaxType is not supported
|
||||
// Type specified by SyntaxType is not supported
|
||||
// in any of the EFI_REGULAR_EXPRESSION_PROTOCOL instances.
|
||||
//
|
||||
Result->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
@@ -1697,7 +1697,7 @@ IfrFind (
|
||||
Status = PopExpression (&Value[2]);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
|
||||
Result->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
@@ -1792,7 +1792,7 @@ IfrMid (
|
||||
Status = PopExpression (&Value[2]);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
|
||||
Result->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
@@ -1838,7 +1838,7 @@ IfrMid (
|
||||
Result->BufferLen = 0;
|
||||
Result->Buffer = NULL;
|
||||
} else {
|
||||
Result->BufferLen = (UINT16)((BufferLen - Base) < Length ? (BufferLen - Base) : Length);
|
||||
Result->BufferLen = (UINT16)((BufferLen - Base) < Length ? (BufferLen - Base) : Length);
|
||||
Result->Buffer = AllocateZeroPool (Result->BufferLen);
|
||||
ASSERT (Result->Buffer != NULL);
|
||||
CopyMem (Result->Buffer, &Buffer[Base], Result->BufferLen);
|
||||
@@ -1848,7 +1848,7 @@ IfrMid (
|
||||
FreePool (Value[2].Buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -1893,9 +1893,9 @@ IfrToken (
|
||||
Status = PopExpression (&Value[2]);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
|
||||
if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
|
||||
Result->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -1910,7 +1910,7 @@ IfrToken (
|
||||
for (Index = 0; Index < 2; Index++) {
|
||||
if (Value[Index + 1].Type != EFI_IFR_TYPE_STRING) {
|
||||
Result->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
Status = EFI_SUCCESS;
|
||||
Status = EFI_SUCCESS;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
@@ -2008,7 +2008,7 @@ IfrSpan (
|
||||
Status = PopExpression (&Value[2]);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) {
|
||||
Result->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
@@ -2256,7 +2256,7 @@ CompareHiiValue (
|
||||
Buf1Len = GetLengthForValue(Value1);
|
||||
Buf2 = GetBufferForValue(Value2);
|
||||
Buf2Len = GetLengthForValue(Value2);
|
||||
|
||||
|
||||
Len = Buf1Len > Buf2Len ? Buf2Len : Buf1Len;
|
||||
*Result = CompareMem (Buf1, Buf2, Len);
|
||||
if ((*Result == 0) && (Buf1Len != Buf2Len)) {
|
||||
@@ -2267,7 +2267,7 @@ CompareHiiValue (
|
||||
*Result = Buf1Len > Buf2Len ? 1 : -1;
|
||||
}
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Take types(integer, boolean) as integer
|
||||
@@ -2334,7 +2334,7 @@ CheckUserPrivilege (
|
||||
/// Enumerate all user information of the current user profile
|
||||
/// to look for any EFI_USER_INFO_ACCESS_SETUP record.
|
||||
///
|
||||
|
||||
|
||||
for (UserInfoHandle = NULL;;) {
|
||||
Status = mUserManager->GetNextInfo (mUserManager, UserProfileHandle, &UserInfoHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -2399,11 +2399,11 @@ CheckUserPrivilege (
|
||||
@param FormSetGuid The formset guid which include the question.
|
||||
@param QuestionId The question id which need to get value from.
|
||||
@param Value The return data about question's value.
|
||||
|
||||
|
||||
@retval TRUE Get the question value success.
|
||||
@retval FALSE Get the question value failed.
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
GetQuestionValueFromForm (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN EFI_HII_HANDLE InputHiiHandle,
|
||||
@@ -2420,10 +2420,10 @@ GetQuestionValueFromForm (
|
||||
BOOLEAN GetTheVal;
|
||||
LIST_ENTRY *Link;
|
||||
|
||||
//
|
||||
// The input parameter DevicePath or InputHiiHandle must have one valid input.
|
||||
//
|
||||
ASSERT ((DevicePath != NULL && InputHiiHandle == NULL) ||
|
||||
// The input parameter DevicePath or InputHiiHandle must have one valid input.
|
||||
//
|
||||
ASSERT ((DevicePath != NULL && InputHiiHandle == NULL) ||
|
||||
(DevicePath == NULL && InputHiiHandle != NULL) );
|
||||
|
||||
GetTheVal = TRUE;
|
||||
@@ -2441,7 +2441,7 @@ GetQuestionValueFromForm (
|
||||
}
|
||||
} else {
|
||||
HiiHandle = InputHiiHandle;
|
||||
}
|
||||
}
|
||||
ASSERT (HiiHandle != NULL);
|
||||
|
||||
//
|
||||
@@ -2457,7 +2457,7 @@ GetQuestionValueFromForm (
|
||||
|
||||
//
|
||||
// Base on the Question Id to get the question info.
|
||||
//
|
||||
//
|
||||
Question = IdToQuestion(FormSet, NULL, QuestionId);
|
||||
if (Question == NULL) {
|
||||
GetTheVal = FALSE;
|
||||
@@ -2480,7 +2480,7 @@ GetQuestionValueFromForm (
|
||||
Form = NULL;
|
||||
}
|
||||
ASSERT (Form != NULL);
|
||||
|
||||
|
||||
//
|
||||
// Get the question value.
|
||||
//
|
||||
@@ -2491,7 +2491,7 @@ GetQuestionValueFromForm (
|
||||
}
|
||||
|
||||
CopyMem (Value, &Question->HiiValue, sizeof (EFI_HII_VALUE));
|
||||
|
||||
|
||||
Done:
|
||||
//
|
||||
// Clean the formset structure and restore the global parameter.
|
||||
@@ -2499,7 +2499,7 @@ Done:
|
||||
if (FormSet != NULL) {
|
||||
DestroyFormSet (FormSet);
|
||||
}
|
||||
|
||||
|
||||
return GetTheVal;
|
||||
}
|
||||
|
||||
@@ -2705,7 +2705,7 @@ EvaluateExpression (
|
||||
TempBuffer [Index/2] = (UINT8) ((DigitUint8 << 4) + TempBuffer [Index/2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2804,7 +2804,7 @@ EvaluateExpression (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Validate the expression value
|
||||
//
|
||||
@@ -3017,14 +3017,14 @@ EvaluateExpression (
|
||||
//
|
||||
// When converting from a string, if case-insensitive compare
|
||||
// with "true" is True, then push True. If a case-insensitive compare
|
||||
// with "false" is True, then push False. Otherwise, push Undefined.
|
||||
// with "false" is True, then push False. Otherwise, push Undefined.
|
||||
//
|
||||
StrPtr = GetToken (Value->Value.string, FormSet->HiiHandle);
|
||||
if (StrPtr == NULL) {
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
IfrStrToUpper (StrPtr);
|
||||
if (StrCmp (StrPtr, L"TRUE") == 0){
|
||||
Value->Value.b = TRUE;
|
||||
@@ -3038,11 +3038,11 @@ EvaluateExpression (
|
||||
FreePool (StrPtr);
|
||||
} else if (Value->Type == EFI_IFR_TYPE_BUFFER) {
|
||||
//
|
||||
// When converting from a buffer, if the buffer is all zeroes,
|
||||
// then push False. Otherwise push True.
|
||||
// When converting from a buffer, if the buffer is all zeroes,
|
||||
// then push False. Otherwise push True.
|
||||
//
|
||||
for (Index =0; Index < Value->BufferLen; Index ++) {
|
||||
if (Value->Buffer[Index] != 0) {
|
||||
if (Value->Buffer[Index] != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3379,15 +3379,15 @@ EvaluateExpression (
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (Data2.Type > EFI_IFR_TYPE_BOOLEAN &&
|
||||
Data2.Type != EFI_IFR_TYPE_STRING &&
|
||||
if (Data2.Type > EFI_IFR_TYPE_BOOLEAN &&
|
||||
Data2.Type != EFI_IFR_TYPE_STRING &&
|
||||
!IsTypeInBuffer(&Data2)) {
|
||||
Value->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
break;
|
||||
}
|
||||
|
||||
if (Data1.Type > EFI_IFR_TYPE_BOOLEAN &&
|
||||
Data1.Type != EFI_IFR_TYPE_STRING &&
|
||||
if (Data1.Type > EFI_IFR_TYPE_BOOLEAN &&
|
||||
Data1.Type != EFI_IFR_TYPE_STRING &&
|
||||
!IsTypeInBuffer(&Data1)) {
|
||||
Value->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
break;
|
||||
@@ -3400,7 +3400,7 @@ EvaluateExpression (
|
||||
if (Data2.Type == EFI_IFR_TYPE_BUFFER) {
|
||||
FreePool (Data2.Buffer);
|
||||
}
|
||||
|
||||
|
||||
if (Status == EFI_UNSUPPORTED) {
|
||||
Value->Type = EFI_IFR_TYPE_UNDEFINED;
|
||||
Status = EFI_SUCCESS;
|
||||
@@ -3446,7 +3446,7 @@ EvaluateExpression (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
Status = IfrMatch (FormSet, Value);
|
||||
break;
|
||||
|
||||
@@ -3624,7 +3624,7 @@ Done:
|
||||
|
||||
/**
|
||||
Check whether the result is TRUE or FALSE.
|
||||
|
||||
|
||||
For the EFI_HII_VALUE value type is numeric, return TRUE if the
|
||||
value is not 0.
|
||||
|
||||
@@ -3661,20 +3661,20 @@ IsTrue (
|
||||
}
|
||||
|
||||
/**
|
||||
Return the result of the expression list. Check the expression list and
|
||||
return the highest priority express result.
|
||||
Return the result of the expression list. Check the expression list and
|
||||
return the highest priority express result.
|
||||
Priority: DisableIf > SuppressIf > GrayOutIf > FALSE
|
||||
|
||||
@param ExpList The input expression list.
|
||||
@param Evaluate Whether need to evaluate the expression first.
|
||||
@param FormSet FormSet associated with this expression.
|
||||
@param Form Form associated with this expression.
|
||||
@param Form Form associated with this expression.
|
||||
|
||||
@retval EXPRESS_RESULT Return the higher priority express result.
|
||||
@retval EXPRESS_RESULT Return the higher priority express result.
|
||||
DisableIf > SuppressIf > GrayOutIf > FALSE
|
||||
|
||||
**/
|
||||
EXPRESS_RESULT
|
||||
EXPRESS_RESULT
|
||||
EvaluateExpressionList (
|
||||
IN FORM_EXPRESSION_LIST *ExpList,
|
||||
IN BOOLEAN Evaluate,
|
||||
@@ -3697,7 +3697,7 @@ EvaluateExpressionList (
|
||||
//
|
||||
// Check whether need to evaluate the expression first.
|
||||
//
|
||||
if (Evaluate) {
|
||||
if (Evaluate) {
|
||||
while (ExpList->Count > Index) {
|
||||
Status = EvaluateExpression (FormSet, Form, ExpList->Expression[Index++]);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -3726,12 +3726,12 @@ EvaluateExpressionList (
|
||||
break;
|
||||
|
||||
default:
|
||||
return ExpressFalse;
|
||||
return ExpressFalse;
|
||||
}
|
||||
|
||||
ReturnVal = ReturnVal < CompareOne ? CompareOne : ReturnVal;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return ReturnVal;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Private structure, MACRO and function definitions for User Interface related functionalities.
|
||||
|
||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -17,15 +17,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
/**
|
||||
Get the expression list count.
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
statement or option?
|
||||
|
||||
@retval >=0 The expression count
|
||||
@retval -1 Input parameter error.
|
||||
|
||||
**/
|
||||
INTN
|
||||
INTN
|
||||
GetConditionalExpressionCount (
|
||||
IN EXPRESS_LEVEL Level
|
||||
);
|
||||
@@ -74,8 +74,8 @@ PushScope (
|
||||
|
||||
/**
|
||||
Get the expression Buffer pointer.
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
statement or option?
|
||||
|
||||
@retval The start pointer of the expression buffer or NULL.
|
||||
@@ -144,7 +144,7 @@ ExtendValueToU64 (
|
||||
Push the expression options onto the Stack.
|
||||
|
||||
@param Pointer Pointer to the current expression.
|
||||
@param Level Which type this expression belong to. Form,
|
||||
@param Level Which type this expression belong to. Form,
|
||||
statement or option?
|
||||
|
||||
@retval EFI_SUCCESS The value was pushed onto the stack.
|
||||
@@ -160,7 +160,7 @@ PushConditionalExpression (
|
||||
/**
|
||||
Pop the expression options from the Stack
|
||||
|
||||
@param Level Which type this expression belong to. Form,
|
||||
@param Level Which type this expression belong to. Form,
|
||||
statement or option?
|
||||
|
||||
@retval EFI_SUCCESS The value was pushed onto the stack.
|
||||
@@ -225,20 +225,20 @@ EvaluateExpression (
|
||||
IN OUT FORM_EXPRESSION *Expression
|
||||
);
|
||||
/**
|
||||
Return the result of the expression list. Check the expression list and
|
||||
return the highest priority express result.
|
||||
Return the result of the expression list. Check the expression list and
|
||||
return the highest priority express result.
|
||||
Priority: DisableIf > SuppressIf > GrayOutIf > FALSE
|
||||
|
||||
@param ExpList The input expression list.
|
||||
@param Evaluate Whether need to evaluate the expression first.
|
||||
@param FormSet FormSet associated with this expression.
|
||||
@param Form Form associated with this expression.
|
||||
@param Form Form associated with this expression.
|
||||
|
||||
@retval EXPRESS_RESULT Return the higher priority express result.
|
||||
@retval EXPRESS_RESULT Return the higher priority express result.
|
||||
DisableIf > SuppressIf > GrayOutIf > FALSE
|
||||
|
||||
**/
|
||||
EXPRESS_RESULT
|
||||
EXPRESS_RESULT
|
||||
EvaluateExpressionList (
|
||||
IN FORM_EXPRESSION_LIST *ExpList,
|
||||
IN BOOLEAN Evaluate,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Parser for IFR binary encoding.
|
||||
|
||||
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -37,7 +37,7 @@ CreateStatement (
|
||||
{
|
||||
FORM_BROWSER_STATEMENT *Statement;
|
||||
EFI_IFR_STATEMENT_HEADER *StatementHdr;
|
||||
INTN ConditionalExprCount;
|
||||
INTN ConditionalExprCount;
|
||||
|
||||
if (Form == NULL) {
|
||||
//
|
||||
@@ -70,8 +70,8 @@ CreateStatement (
|
||||
//
|
||||
// Form is inside of suppressif
|
||||
//
|
||||
|
||||
Statement->Expression = (FORM_EXPRESSION_LIST *) AllocatePool(
|
||||
|
||||
Statement->Expression = (FORM_EXPRESSION_LIST *) AllocatePool(
|
||||
(UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *))));
|
||||
ASSERT (Statement->Expression != NULL);
|
||||
Statement->Expression->Count = (UINTN) ConditionalExprCount;
|
||||
@@ -246,7 +246,7 @@ CreateQuestion (
|
||||
// Check whether old string node already exist.
|
||||
//
|
||||
Find = FALSE;
|
||||
if (!IsListEmpty(&Statement->Storage->NameValueListHead)) {
|
||||
if (!IsListEmpty(&Statement->Storage->NameValueListHead)) {
|
||||
Link = GetFirstNode (&Statement->Storage->NameValueListHead);
|
||||
while (!IsNull (&Statement->Storage->NameValueListHead, Link)) {
|
||||
NameValueNode = NAME_VALUE_NODE_FROM_LINK (Link);
|
||||
@@ -326,7 +326,7 @@ InitializeConfigHdr (
|
||||
{
|
||||
CHAR16 *Name;
|
||||
|
||||
if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
Storage->BrowserStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
|
||||
Name = Storage->BrowserStorage->Name;
|
||||
} else {
|
||||
@@ -621,7 +621,7 @@ GetFstStgFromVarId (
|
||||
@param Storage browser storage info.
|
||||
|
||||
@return Pointer to a FORMSET_STORAGE data structure.
|
||||
|
||||
|
||||
|
||||
**/
|
||||
FORMSET_STORAGE *
|
||||
@@ -707,7 +707,7 @@ InitializeRequestElement (
|
||||
//
|
||||
// Prepare <RequestElement>
|
||||
//
|
||||
if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
|
||||
StrLen = UnicodeSPrint (
|
||||
RequestElement,
|
||||
@@ -1522,7 +1522,7 @@ ParseOpCodes (
|
||||
ExpressionOpCode->ValueType = ((EFI_IFR_GET *) OpCodeData)->VarStoreType;
|
||||
switch (ExpressionOpCode->ValueType) {
|
||||
case EFI_IFR_TYPE_BOOLEAN:
|
||||
case EFI_IFR_TYPE_NUM_SIZE_8:
|
||||
case EFI_IFR_TYPE_NUM_SIZE_8:
|
||||
ExpressionOpCode->ValueWidth = 1;
|
||||
break;
|
||||
|
||||
@@ -1563,8 +1563,8 @@ ParseOpCodes (
|
||||
}
|
||||
CopyMem (&ExpressionOpCode->VarStoreInfo.VarName, &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarName, sizeof (EFI_STRING_ID));
|
||||
CopyMem (&ExpressionOpCode->VarStoreInfo.VarOffset, &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarOffset, sizeof (UINT16));
|
||||
if ((ExpressionOpCode->VarStorage != NULL) &&
|
||||
(ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_NAME_VALUE ||
|
||||
if ((ExpressionOpCode->VarStorage != NULL) &&
|
||||
(ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_NAME_VALUE ||
|
||||
ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE)) {
|
||||
ExpressionOpCode->ValueName = GetToken (ExpressionOpCode->VarStoreInfo.VarName, FormSet->HiiHandle);
|
||||
if (ExpressionOpCode->ValueName == NULL) {
|
||||
@@ -1754,7 +1754,7 @@ ParseOpCodes (
|
||||
//
|
||||
// Form is inside of suppressif
|
||||
//
|
||||
CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool(
|
||||
CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool(
|
||||
(UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *))));
|
||||
ASSERT (CurrentForm->SuppressExpression != NULL);
|
||||
CurrentForm->SuppressExpression->Count = (UINTN) ConditionalExprCount;
|
||||
@@ -1820,7 +1820,7 @@ ParseOpCodes (
|
||||
//
|
||||
// Form is inside of suppressif
|
||||
//
|
||||
CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool(
|
||||
CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool(
|
||||
(UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *))));
|
||||
ASSERT (CurrentForm->SuppressExpression != NULL);
|
||||
CurrentForm->SuppressExpression->Count = (UINTN) ConditionalExprCount;
|
||||
@@ -1972,7 +1972,7 @@ ParseOpCodes (
|
||||
}
|
||||
}
|
||||
}
|
||||
CurrentStatement->StorageWidth = (UINT16) sizeof (EFI_HII_REF);
|
||||
CurrentStatement->StorageWidth = (UINT16) sizeof (EFI_HII_REF);
|
||||
InitializeRequestElement (FormSet, CurrentStatement, CurrentForm);
|
||||
break;
|
||||
|
||||
@@ -2282,7 +2282,7 @@ ParseOpCodes (
|
||||
//
|
||||
// Form is inside of suppressif
|
||||
//
|
||||
CurrentOption->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool(
|
||||
CurrentOption->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool(
|
||||
(UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *))));
|
||||
ASSERT (CurrentOption->SuppressExpression != NULL);
|
||||
CurrentOption->SuppressExpression->Count = (UINTN) ConditionalExprCount;
|
||||
@@ -2396,11 +2396,11 @@ ParseOpCodes (
|
||||
}
|
||||
|
||||
if (SuppressForOption) {
|
||||
PushConditionalExpression(CurrentExpression, ExpressOption);
|
||||
PushConditionalExpression(CurrentExpression, ExpressOption);
|
||||
} else if (SuppressForQuestion) {
|
||||
PushConditionalExpression(CurrentExpression, ExpressStatement);
|
||||
PushConditionalExpression(CurrentExpression, ExpressStatement);
|
||||
} else {
|
||||
PushConditionalExpression(CurrentExpression, ExpressForm);
|
||||
PushConditionalExpression(CurrentExpression, ExpressForm);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -2655,7 +2655,7 @@ ParseOpCodes (
|
||||
default:
|
||||
ASSERT (ParentStatement != NULL);
|
||||
ParentStatement->Locked = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//
|
||||
@@ -2679,7 +2679,7 @@ ParseOpCodes (
|
||||
ResetScopeStack ();
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Parent statement end tag found, update ParentStatement info.
|
||||
//
|
||||
@@ -2722,7 +2722,7 @@ ParseOpCodes (
|
||||
|
||||
case EFI_IFR_SUPPRESS_IF_OP:
|
||||
if (SuppressForOption) {
|
||||
PopConditionalExpression(ExpressOption);
|
||||
PopConditionalExpression(ExpressOption);
|
||||
} else if (SuppressForQuestion) {
|
||||
PopConditionalExpression(ExpressStatement);
|
||||
} else {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Utility functions for UI presentation.
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -74,7 +74,7 @@ EvaluateFormExpressions (
|
||||
Base on the opcode buffer info to get the display statement.
|
||||
|
||||
@param OpCode The input opcode buffer for this statement.
|
||||
|
||||
|
||||
@retval Statement The statement use this opcode buffer.
|
||||
|
||||
**/
|
||||
@@ -103,7 +103,7 @@ GetDisplayStatement (
|
||||
Free the refresh event list.
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
FreeRefreshEvent (
|
||||
VOID
|
||||
)
|
||||
@@ -123,7 +123,7 @@ FreeRefreshEvent (
|
||||
}
|
||||
|
||||
/**
|
||||
Check whether this statement value is changed. If yes, update the statement value and return TRUE;
|
||||
Check whether this statement value is changed. If yes, update the statement value and return TRUE;
|
||||
else return FALSE.
|
||||
|
||||
@param Statement The statement need to check.
|
||||
@@ -145,7 +145,7 @@ UpdateStatement (
|
||||
// Question value may be changed, need invoke its Callback()
|
||||
//
|
||||
ProcessCallBackFunction (gCurrentSelection, gCurrentSelection->FormSet, gCurrentSelection->Form, Statement, EFI_BROWSER_ACTION_RETRIEVE, FALSE);
|
||||
|
||||
|
||||
if (mHiiPackageListUpdated) {
|
||||
//
|
||||
// Package list is updated, force to reparse IFR binary of target Formset
|
||||
@@ -157,8 +157,8 @@ UpdateStatement (
|
||||
|
||||
/**
|
||||
Refresh the question which has refresh guid event attribute.
|
||||
|
||||
@param Event The event which has this function related.
|
||||
|
||||
@param Event The event which has this function related.
|
||||
@param Context The input context info related to this event or the status code return to the caller.
|
||||
**/
|
||||
VOID
|
||||
@@ -177,7 +177,7 @@ RefreshEventNotifyForStatement(
|
||||
|
||||
/**
|
||||
Refresh the questions within this form.
|
||||
|
||||
|
||||
@param Event The event which has this function related.
|
||||
@param Context The input context info related to this event or the status code return to the caller.
|
||||
**/
|
||||
@@ -450,11 +450,11 @@ UpdateHotkeyList (
|
||||
|
||||
@param QuestionId The question id for this request question.
|
||||
|
||||
@retval The attribute for this question or NULL if not found this
|
||||
@retval The attribute for this question or NULL if not found this
|
||||
question in the list.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
UINT32
|
||||
ProcessQuestionExtraAttr (
|
||||
IN EFI_QUESTION_ID QuestionId
|
||||
)
|
||||
@@ -588,7 +588,7 @@ AddStatementToDisplayForm (
|
||||
//
|
||||
// Get the minimal refresh interval value for later use.
|
||||
//
|
||||
if ((Statement->RefreshInterval != 0) &&
|
||||
if ((Statement->RefreshInterval != 0) &&
|
||||
(MinRefreshInterval == 0 || Statement->RefreshInterval < MinRefreshInterval)) {
|
||||
MinRefreshInterval = Statement->RefreshInterval;
|
||||
}
|
||||
@@ -649,7 +649,7 @@ UpdateDataChangedFlag (
|
||||
|
||||
//
|
||||
// Base on the system level to check whether need to show the NV flag.
|
||||
//
|
||||
//
|
||||
switch (gBrowserSettingScope) {
|
||||
case SystemLevel:
|
||||
//
|
||||
@@ -700,13 +700,13 @@ InitializeDisplayFormData (
|
||||
InitializeListHead (&gDisplayFormData.HotKeyListHead);
|
||||
|
||||
Status = gBS->CreateEvent (
|
||||
EVT_NOTIFY_WAIT,
|
||||
EVT_NOTIFY_WAIT,
|
||||
TPL_CALLBACK,
|
||||
EfiEventEmptyFunction,
|
||||
NULL,
|
||||
&mValueChangedEvent
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -863,7 +863,7 @@ GetBrowserStatement (
|
||||
@param Form Form data structure.
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
UpdateStatementStatusForForm (
|
||||
IN FORM_BROWSER_FORMSET *FormSet,
|
||||
IN FORM_BROWSER_FORM *Form
|
||||
@@ -894,7 +894,7 @@ UpdateStatementStatusForForm (
|
||||
@param FormSet FormSet data structure.
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
UpdateStatementStatusForFormSet (
|
||||
IN FORM_BROWSER_FORMSET *FormSet
|
||||
)
|
||||
@@ -919,10 +919,10 @@ UpdateStatementStatusForFormSet (
|
||||
@param SettingScope Setting Scope for Default action.
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
UpdateStatementStatus (
|
||||
IN FORM_BROWSER_FORMSET *FormSet,
|
||||
IN FORM_BROWSER_FORM *Form,
|
||||
IN FORM_BROWSER_FORM *Form,
|
||||
IN BROWSER_SETTING_SCOPE SettingScope
|
||||
)
|
||||
{
|
||||
@@ -966,7 +966,7 @@ UpdateStatementStatus (
|
||||
@retval EFI_SUCESSS This function always return successfully for now.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
ProcessAction (
|
||||
IN UINT32 Action,
|
||||
IN UINT16 DefaultId
|
||||
@@ -1051,7 +1051,7 @@ GetFormsetGuidFromHiiHandle (
|
||||
BufferSize = 0;
|
||||
HiiPackageList = NULL;
|
||||
FindGuid = FALSE;
|
||||
|
||||
|
||||
Status = mHiiDatabase->ExportPackageLists (mHiiDatabase, HiiHandle, &BufferSize, HiiPackageList);
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
HiiPackageList = AllocatePool (BufferSize);
|
||||
@@ -1068,7 +1068,7 @@ GetFormsetGuidFromHiiHandle (
|
||||
//
|
||||
Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER);
|
||||
Offset2 = 0;
|
||||
CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
|
||||
CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32));
|
||||
|
||||
while (Offset < PackageListLength) {
|
||||
Package = ((UINT8 *) HiiPackageList) + Offset;
|
||||
@@ -1257,7 +1257,7 @@ ProcessChangedData (
|
||||
case BROWSER_ACTION_DISCARD:
|
||||
DiscardForm (Selection->FormSet, Selection->Form, Scope);
|
||||
break;
|
||||
|
||||
|
||||
case BROWSER_ACTION_SUBMIT:
|
||||
Status = SubmitForm (Selection->FormSet, Selection->Form, Scope);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -1331,7 +1331,7 @@ ProcessGotoOpCode (
|
||||
FORM_BROWSER_FORM *RefForm;
|
||||
EFI_STATUS Status;
|
||||
EFI_HII_HANDLE HiiHandle;
|
||||
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
StringPtr = NULL;
|
||||
HiiHandle = NULL;
|
||||
@@ -1440,7 +1440,7 @@ ProcessGotoOpCode (
|
||||
if ((RefForm != NULL) && (RefForm->SuppressExpression != NULL)) {
|
||||
if (EvaluateExpressionList(RefForm->SuppressExpression, TRUE, Selection->FormSet, RefForm) != ExpressFalse) {
|
||||
//
|
||||
// Form is suppressed.
|
||||
// Form is suppressed.
|
||||
//
|
||||
PopupErrorMessage(BROWSER_FORM_SUPPRESS, NULL, NULL, NULL);
|
||||
return EFI_SUCCESS;
|
||||
@@ -1565,14 +1565,14 @@ ProcessUserInput (
|
||||
case EFI_IFR_REF_OP:
|
||||
Status = ProcessGotoOpCode(Statement, gCurrentSelection);
|
||||
break;
|
||||
|
||||
|
||||
case EFI_IFR_ACTION_OP:
|
||||
//
|
||||
// Process the Config string <ConfigResp>
|
||||
//
|
||||
Status = ProcessQuestionConfig (gCurrentSelection, Statement);
|
||||
break;
|
||||
|
||||
|
||||
case EFI_IFR_RESET_BUTTON_OP:
|
||||
//
|
||||
// Reset Question to default value specified by DefaultId
|
||||
@@ -1812,9 +1812,9 @@ IsNvUpdateRequiredForForm (
|
||||
about the Selection, form and formset to be displayed.
|
||||
On output, Selection return the screen item that is selected
|
||||
by user.
|
||||
@param SettingLevel Input Settting level, if it is FormLevel, just exit current form.
|
||||
@param SettingLevel Input Settting level, if it is FormLevel, just exit current form.
|
||||
else, we need to exit current formset.
|
||||
|
||||
|
||||
@retval TRUE Exit current form.
|
||||
@retval FALSE User press ESC and keep in current form.
|
||||
**/
|
||||
@@ -1827,7 +1827,7 @@ FindNextMenu (
|
||||
FORM_ENTRY_INFO *CurrentMenu;
|
||||
FORM_ENTRY_INFO *ParentMenu;
|
||||
BROWSER_SETTING_SCOPE Scope;
|
||||
|
||||
|
||||
CurrentMenu = Selection->CurrentMenu;
|
||||
Scope = FormSetLevel;
|
||||
|
||||
@@ -1893,7 +1893,7 @@ FindNextMenu (
|
||||
|
||||
@retval TRUE do the reconnect behavior success.
|
||||
@retval FALSE do the reconnect behavior failed.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
ReconnectController (
|
||||
@@ -1926,7 +1926,7 @@ ReconnectController (
|
||||
@retval EFI_SUCCESS The call back function executes successfully.
|
||||
@return Other value if the call back function failed to execute.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
ProcessCallBackFunction (
|
||||
IN OUT UI_MENU_SELECTION *Selection,
|
||||
IN FORM_BROWSER_FORMSET *FormSet,
|
||||
@@ -1976,7 +1976,7 @@ ProcessCallBackFunction (
|
||||
if ((Question != NULL) && (Statement != Question)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != EFI_IFR_FLAG_CALLBACK) {
|
||||
continue;
|
||||
}
|
||||
@@ -2104,7 +2104,7 @@ ProcessCallBackFunction (
|
||||
//
|
||||
IsQuestionValueChanged(gCurrentSelection->FormSet, gCurrentSelection->Form, Statement, GetSetValueWithEditBuffer);
|
||||
//
|
||||
// According the spec, return value from call back of "changing" and
|
||||
// According the spec, return value from call back of "changing" and
|
||||
// "retrieve" should update to the question's temp buffer.
|
||||
//
|
||||
SetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer);
|
||||
@@ -2113,7 +2113,7 @@ ProcessCallBackFunction (
|
||||
|
||||
case EFI_BROWSER_ACTION_RETRIEVE:
|
||||
//
|
||||
// According the spec, return value from call back of "changing" and
|
||||
// According the spec, return value from call back of "changing" and
|
||||
// "retrieve" should update to the question's temp buffer.
|
||||
//
|
||||
SetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer);
|
||||
@@ -2124,9 +2124,9 @@ ProcessCallBackFunction (
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// If the callback returns EFI_UNSUPPORTED for EFI_BROWSER_ACTION_CHANGING,
|
||||
// then the browser will use the value passed to Callback() and ignore the
|
||||
// value returned by Callback().
|
||||
// If the callback returns EFI_UNSUPPORTED for EFI_BROWSER_ACTION_CHANGING,
|
||||
// then the browser will use the value passed to Callback() and ignore the
|
||||
// value returned by Callback().
|
||||
//
|
||||
if (Action == EFI_BROWSER_ACTION_CHANGING && Status == EFI_UNSUPPORTED) {
|
||||
if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {
|
||||
@@ -2134,7 +2134,7 @@ ProcessCallBackFunction (
|
||||
} else {
|
||||
CopyMem (&HiiValue->Value, &BackUpValue, sizeof (EFI_IFR_TYPE_VALUE));
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Do the question validation.
|
||||
//
|
||||
@@ -2150,7 +2150,7 @@ ProcessCallBackFunction (
|
||||
}
|
||||
|
||||
//
|
||||
// According the spec, return fail from call back of "changing" and
|
||||
// According the spec, return fail from call back of "changing" and
|
||||
// "retrieve", should restore the question's value.
|
||||
//
|
||||
if (Action == EFI_BROWSER_ACTION_CHANGING && Status != EFI_UNSUPPORTED) {
|
||||
@@ -2226,8 +2226,8 @@ ProcessCallBackFunction (
|
||||
|
||||
/**
|
||||
Call the retrieve type call back function for one question to get the initialize data.
|
||||
|
||||
This function only used when in the initialize stage, because in this stage, the
|
||||
|
||||
This function only used when in the initialize stage, because in this stage, the
|
||||
Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead.
|
||||
|
||||
@param ConfigAccess The config access protocol produced by the hii driver.
|
||||
@@ -2237,7 +2237,7 @@ ProcessCallBackFunction (
|
||||
@retval EFI_SUCCESS The call back function executes successfully.
|
||||
@return Other value if the call back function failed to execute.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
ProcessRetrieveForQuestion (
|
||||
IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess,
|
||||
IN FORM_BROWSER_STATEMENT *Statement,
|
||||
@@ -2265,7 +2265,7 @@ ProcessRetrieveForQuestion (
|
||||
//
|
||||
TypeValue = (EFI_IFR_TYPE_VALUE *) Statement->BufferValue;
|
||||
}
|
||||
|
||||
|
||||
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
||||
Status = ConfigAccess->Callback (
|
||||
ConfigAccess,
|
||||
@@ -2357,7 +2357,7 @@ SetupBrowser (
|
||||
|
||||
//
|
||||
// IFR is updated, force to reparse the IFR binary
|
||||
// This check is shared by EFI_BROWSER_ACTION_FORM_CLOSE and
|
||||
// This check is shared by EFI_BROWSER_ACTION_FORM_CLOSE and
|
||||
// EFI_BROWSER_ACTION_RETRIEVE, so code place here.
|
||||
//
|
||||
if (mHiiPackageListUpdated) {
|
||||
@@ -2395,7 +2395,7 @@ SetupBrowser (
|
||||
if (Selection->Form->SuppressExpression != NULL) {
|
||||
if (EvaluateExpressionList(Selection->Form->SuppressExpression, TRUE, Selection->FormSet, Selection->Form) == ExpressSuppress) {
|
||||
//
|
||||
// Form is suppressed.
|
||||
// Form is suppressed.
|
||||
//
|
||||
PopupErrorMessage(BROWSER_FORM_SUPPRESS, NULL, NULL, NULL);
|
||||
Status = EFI_NOT_FOUND;
|
||||
@@ -2484,8 +2484,8 @@ SetupBrowser (
|
||||
//
|
||||
Statement = Selection->Statement;
|
||||
if (Statement != NULL) {
|
||||
if ((ConfigAccess != NULL) &&
|
||||
((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK) &&
|
||||
if ((ConfigAccess != NULL) &&
|
||||
((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK) &&
|
||||
(Statement->Operand != EFI_IFR_PASSWORD_OP)) {
|
||||
Status = ProcessCallBackFunction(Selection, Selection->FormSet, Selection->Form, Statement, EFI_BROWSER_ACTION_CHANGING, FALSE);
|
||||
if (Statement->Operand == EFI_IFR_REF_OP) {
|
||||
@@ -2495,7 +2495,7 @@ SetupBrowser (
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = ProcessGotoOpCode(Statement, Selection);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Callback return error status or status return from process goto opcode.
|
||||
//
|
||||
@@ -2512,8 +2512,8 @@ SetupBrowser (
|
||||
}
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status) &&
|
||||
(Statement->Operand != EFI_IFR_REF_OP) &&
|
||||
if (!EFI_ERROR (Status) &&
|
||||
(Statement->Operand != EFI_IFR_REF_OP) &&
|
||||
((Statement->Storage == NULL) || (Statement->Storage != NULL && Statement->ValueChanged))) {
|
||||
//
|
||||
// Only question value has been changed, browser will trig CHANGED callback.
|
||||
@@ -2540,11 +2540,11 @@ SetupBrowser (
|
||||
}
|
||||
|
||||
//
|
||||
// If question has EFI_IFR_FLAG_RESET_REQUIRED/EFI_IFR_FLAG_RECONNECT_REQUIRED flag and without storage
|
||||
// If question has EFI_IFR_FLAG_RESET_REQUIRED/EFI_IFR_FLAG_RECONNECT_REQUIRED flag and without storage
|
||||
// and process question success till here, trig the gResetFlag/gFlagReconnect.
|
||||
//
|
||||
if ((Status == EFI_SUCCESS) &&
|
||||
(Statement->Storage == NULL)) {
|
||||
if ((Status == EFI_SUCCESS) &&
|
||||
(Statement->Storage == NULL)) {
|
||||
if ((Statement->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) {
|
||||
gResetRequiredFormLevel = TRUE;
|
||||
gResetRequiredSystemLevel = TRUE;
|
||||
@@ -2581,8 +2581,8 @@ SetupBrowser (
|
||||
// Before exit the form, invoke ConfigAccess.Callback() with EFI_BROWSER_ACTION_FORM_CLOSE
|
||||
// for each question with callback flag.
|
||||
//
|
||||
if ((ConfigAccess != NULL) &&
|
||||
((Selection->Action == UI_ACTION_EXIT) ||
|
||||
if ((ConfigAccess != NULL) &&
|
||||
((Selection->Action == UI_ACTION_EXIT) ||
|
||||
(Selection->Handle != mCurrentHiiHandle) ||
|
||||
(!CompareGuid (&Selection->FormSetGuid, &mCurrentFormSetGuid)) ||
|
||||
(Selection->FormId != mCurrentFormId))) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Entry and initialization module for the browser.
|
||||
|
||||
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -152,7 +152,7 @@ GetFirstFormId (
|
||||
**/
|
||||
FORM_ENTRY_INFO *
|
||||
UiFindMenuList (
|
||||
IN EFI_HII_HANDLE HiiHandle,
|
||||
IN EFI_HII_HANDLE HiiHandle,
|
||||
IN EFI_GUID *FormSetGuid,
|
||||
IN UINT16 FormId
|
||||
)
|
||||
@@ -168,7 +168,7 @@ UiFindMenuList (
|
||||
while (!IsNull (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, Link)) {
|
||||
MenuList = FORM_ENTRY_INFO_FROM_LINK (Link);
|
||||
Link = GetNextNode (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, Link);
|
||||
|
||||
|
||||
//
|
||||
// If already find the menu, free the menus behind it.
|
||||
//
|
||||
@@ -208,7 +208,7 @@ UiFindMenuList (
|
||||
|
||||
@param CurrentMenu Current Menu
|
||||
@param SettingLevel Whether find parent menu in Form Level or Formset level.
|
||||
In form level, just find the parent menu;
|
||||
In form level, just find the parent menu;
|
||||
In formset level, find the parent menu which has different
|
||||
formset guid value.
|
||||
|
||||
@@ -228,7 +228,7 @@ UiFindParentMenu (
|
||||
if (CurrentMenu == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
ParentMenu = NULL;
|
||||
Link = &CurrentMenu->Link;
|
||||
|
||||
@@ -285,7 +285,7 @@ UiFreeMenuList (
|
||||
|
||||
/**
|
||||
Copy current Menu list to the new menu list.
|
||||
|
||||
|
||||
@param NewMenuListHead New create Menu list.
|
||||
@param CurrentMenuListHead Current Menu list.
|
||||
|
||||
@@ -622,7 +622,7 @@ SendForm (
|
||||
distribution.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
ProcessStorage (
|
||||
IN OUT UINTN *ResultsDataSize,
|
||||
IN OUT EFI_STRING *ResultsData,
|
||||
@@ -696,8 +696,8 @@ ProcessStorage (
|
||||
}
|
||||
|
||||
/**
|
||||
This routine called this service in the browser to retrieve or set certain uncommitted
|
||||
state information that resides in the open formsets.
|
||||
This routine called this service in the browser to retrieve or set certain uncommitted
|
||||
state information that resides in the open formsets.
|
||||
|
||||
@param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL
|
||||
instance.
|
||||
@@ -801,7 +801,7 @@ BrowserCallback (
|
||||
//
|
||||
// Different formsets may have same varstore, so here just set the flag
|
||||
// not exit the circle.
|
||||
//
|
||||
//
|
||||
Found = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -826,7 +826,7 @@ BrowserCallback (
|
||||
}
|
||||
|
||||
FormsetStorage = FORMSET_STORAGE_FROM_LINK (Link);
|
||||
|
||||
|
||||
Status = ProcessStorage (&TotalSize, &ResultsData, RetrieveData, FormsetStorage->BrowserStorage);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
@@ -837,7 +837,7 @@ BrowserCallback (
|
||||
Status = TotalSize <= *ResultsDataSize ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL;
|
||||
*ResultsDataSize = TotalSize;
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
|
||||
}
|
||||
@@ -936,7 +936,7 @@ InitializeSetup (
|
||||
&mPrivateData.FormBrowserEx2
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
&mPrivateData.Handle,
|
||||
&gEdkiiFormBrowserExProtocolGuid,
|
||||
@@ -962,7 +962,7 @@ InitializeSetup (
|
||||
&Registration
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1465,7 +1465,7 @@ BufferToValue (
|
||||
Buffer = NULL;
|
||||
|
||||
IsString = (BOOLEAN) ((Question->HiiValue.Type == EFI_IFR_TYPE_STRING) ? TRUE : FALSE);
|
||||
if (Question->Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
if (Question->Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
Question->Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
|
||||
IsBufferStorage = TRUE;
|
||||
} else {
|
||||
@@ -1620,17 +1620,17 @@ GetQuestionValue (
|
||||
FreePool (Question->ValueExpression->Result.Buffer);
|
||||
}
|
||||
Question->HiiValue.Type = Question->ValueExpression->Result.Type;
|
||||
CopyMem (&Question->HiiValue.Value, &Question->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
|
||||
CopyMem (&Question->HiiValue.Value, &Question->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get question value by read expression.
|
||||
//
|
||||
if (Question->ReadExpression != NULL && Form->FormType == STANDARD_MAP_FORM_TYPE) {
|
||||
Status = EvaluateExpression (FormSet, Form, Question->ReadExpression);
|
||||
if (!EFI_ERROR (Status) &&
|
||||
if (!EFI_ERROR (Status) &&
|
||||
((Question->ReadExpression->Result.Type < EFI_IFR_TYPE_OTHER) || (Question->ReadExpression->Result.Type == EFI_IFR_TYPE_BUFFER))) {
|
||||
//
|
||||
// Only update question value to the valid result.
|
||||
@@ -1647,7 +1647,7 @@ GetQuestionValue (
|
||||
FreePool (Question->ReadExpression->Result.Buffer);
|
||||
}
|
||||
Question->HiiValue.Type = Question->ReadExpression->Result.Type;
|
||||
CopyMem (&Question->HiiValue.Value, &Question->ReadExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
|
||||
CopyMem (&Question->HiiValue.Value, &Question->ReadExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -1748,7 +1748,7 @@ GetQuestionValue (
|
||||
Dst = (UINT8 *) &Question->HiiValue.Value;
|
||||
}
|
||||
|
||||
if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
|
||||
IsBufferStorage = TRUE;
|
||||
} else {
|
||||
@@ -1933,7 +1933,7 @@ SetQuestionValue (
|
||||
if (Question->ValueExpression != NULL) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Before set question value, evaluate its write expression.
|
||||
//
|
||||
@@ -2028,7 +2028,7 @@ SetQuestionValue (
|
||||
Src = (UINT8 *) &Question->HiiValue.Value;
|
||||
}
|
||||
|
||||
if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {
|
||||
IsBufferStorage = TRUE;
|
||||
} else {
|
||||
@@ -2199,7 +2199,7 @@ SetQuestionValue (
|
||||
return Status;
|
||||
}
|
||||
FreePool (ConfigResp);
|
||||
|
||||
|
||||
//
|
||||
// Sync storage, from editbuffer to buffer.
|
||||
//
|
||||
@@ -2322,9 +2322,9 @@ ValidateQuestion (
|
||||
}
|
||||
|
||||
/**
|
||||
Perform question check.
|
||||
|
||||
If one question has more than one check, process form high priority to low.
|
||||
Perform question check.
|
||||
|
||||
If one question has more than one check, process form high priority to low.
|
||||
Only one error info will be popup.
|
||||
|
||||
@param FormSet FormSet data structure.
|
||||
@@ -2425,7 +2425,7 @@ NoSubmitCheck (
|
||||
|
||||
@param Storage The storage which need to sync.
|
||||
@param ConfigRequest The config request string which used to sync storage.
|
||||
@param SyncOrRestore Sync the buffer to editbuffer or Restore the
|
||||
@param SyncOrRestore Sync the buffer to editbuffer or Restore the
|
||||
editbuffer to buffer
|
||||
if TRUE, copy the editbuffer to the buffer.
|
||||
if FALSE, copy the buffer to the editbuffer.
|
||||
@@ -2452,7 +2452,7 @@ SynchronizeStorage (
|
||||
Status = EFI_SUCCESS;
|
||||
Result = NULL;
|
||||
|
||||
if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
(Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
|
||||
BufferSize = Storage->Size;
|
||||
|
||||
@@ -2787,7 +2787,7 @@ UpdateFlagForForm (
|
||||
if ((Question->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) {
|
||||
gFlagReconnect = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2796,7 +2796,7 @@ UpdateFlagForForm (
|
||||
Also clean ValueChanged flag for all statements.
|
||||
|
||||
Form level or formset level, only one.
|
||||
|
||||
|
||||
@param SetFlag Whether need to set the Reset Flag.
|
||||
@param FormSet FormSet data structure.
|
||||
@param Form Form data structure.
|
||||
@@ -2806,7 +2806,7 @@ VOID
|
||||
ValueChangeResetFlagUpdate (
|
||||
IN BOOLEAN SetFlag,
|
||||
IN FORM_BROWSER_FORMSET *FormSet,
|
||||
IN FORM_BROWSER_FORM *Form
|
||||
IN FORM_BROWSER_FORM *Form
|
||||
)
|
||||
{
|
||||
FORM_BROWSER_FORM *CurrentForm;
|
||||
@@ -2827,8 +2827,8 @@ ValueChangeResetFlagUpdate (
|
||||
}
|
||||
|
||||
/**
|
||||
Base on the return Progress string to find the form.
|
||||
|
||||
Base on the return Progress string to find the form.
|
||||
|
||||
Base on the first return Offset/Width (Name) string to find the form
|
||||
which keep this string.
|
||||
|
||||
@@ -3109,9 +3109,9 @@ ConfirmSaveFail (
|
||||
ASSERT (StringBuffer != NULL);
|
||||
|
||||
UnicodeSPrint (
|
||||
StringBuffer,
|
||||
24 * sizeof (CHAR16) + StrSize (FormTitle),
|
||||
L"Submit Fail For Form: %s.",
|
||||
StringBuffer,
|
||||
24 * sizeof (CHAR16) + StrSize (FormTitle),
|
||||
L"Submit Fail For Form: %s.",
|
||||
FormTitle
|
||||
);
|
||||
|
||||
@@ -3148,9 +3148,9 @@ ConfirmNoSubmitFail (
|
||||
ASSERT (StringBuffer != NULL);
|
||||
|
||||
UnicodeSPrint (
|
||||
StringBuffer,
|
||||
24 * sizeof (CHAR16) + StrSize (FormTitle),
|
||||
L"NO_SUBMIT_IF error For Form: %s.",
|
||||
StringBuffer,
|
||||
24 * sizeof (CHAR16) + StrSize (FormTitle),
|
||||
L"NO_SUBMIT_IF error For Form: %s.",
|
||||
FormTitle
|
||||
);
|
||||
|
||||
@@ -3251,7 +3251,7 @@ DiscardForm (
|
||||
while (!IsNull (&FormSet->FormListHead, Link)) {
|
||||
Form = FORM_BROWSER_FORM_FROM_LINK (Link);
|
||||
Link = GetNextNode (&FormSet->FormListHead, Link);
|
||||
|
||||
|
||||
//
|
||||
// Call callback with Changed type to inform the driver.
|
||||
//
|
||||
@@ -3292,7 +3292,7 @@ DiscardForm (
|
||||
mSystemLevelFormSet = OldFormSet;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3441,9 +3441,9 @@ SubmitForForm (
|
||||
|
||||
@param FormSet FormSet data structure.
|
||||
@param SkipProcessFail Whether skip to process the save failed storage.
|
||||
If submit formset is called when do system level save,
|
||||
set this value to true and process the failed formset
|
||||
together.
|
||||
If submit formset is called when do system level save,
|
||||
set this value to true and process the failed formset
|
||||
together.
|
||||
if submit formset is called when do formset level save,
|
||||
set the value to false and process the failed storage
|
||||
right after process all storages for this formset.
|
||||
@@ -3478,7 +3478,7 @@ SubmitForFormSet (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
Form = NULL;
|
||||
Form = NULL;
|
||||
Status = NoSubmitCheck (FormSet, &Form, &Question);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (SkipProcessFail) {
|
||||
@@ -3639,7 +3639,7 @@ SubmitForFormSet (
|
||||
|
||||
//
|
||||
// 5. Update the NV flag.
|
||||
//
|
||||
//
|
||||
ValueChangeResetFlagUpdate(TRUE, FormSet, NULL);
|
||||
|
||||
//
|
||||
@@ -3690,7 +3690,7 @@ SubmitForSystem (
|
||||
|
||||
//
|
||||
// Remove maintain backup list after save except for the current using FormSet.
|
||||
//
|
||||
//
|
||||
if (!IsHiiHandleInBrowserContext (LocalFormSet->HiiHandle)) {
|
||||
CleanBrowserStorage(LocalFormSet);
|
||||
RemoveEntryList (&LocalFormSet->Link);
|
||||
@@ -3937,7 +3937,7 @@ GetOffsetFromConfigResp (
|
||||
RequestElement += StrLen (Question->BlockName) + StrLen (L"&VALUE=");
|
||||
return RequestElement;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 2. Change all hex digits in Question->BlockName to lower and compare again.
|
||||
//
|
||||
@@ -3973,7 +3973,7 @@ GetDefaultValueFromAltCfg (
|
||||
IN FORM_BROWSER_FORM *Form,
|
||||
IN OUT FORM_BROWSER_STATEMENT *Question
|
||||
)
|
||||
{
|
||||
{
|
||||
BROWSER_STORAGE *Storage;
|
||||
FORMSET_STORAGE *FormSetStorage;
|
||||
CHAR16 *ConfigResp;
|
||||
@@ -4039,7 +4039,7 @@ INTN
|
||||
GetDefaultIdForCallBack (
|
||||
UINTN DefaultId
|
||||
)
|
||||
{
|
||||
{
|
||||
if (DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) {
|
||||
return EFI_BROWSER_ACTION_DEFAULT_STANDARD;
|
||||
} else if (DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) {
|
||||
@@ -4240,7 +4240,7 @@ GetQuestionDefault (
|
||||
// There are Five ways to specify default value for a Question:
|
||||
// 1, use call back function (highest priority)
|
||||
// 2, use ExtractConfig function
|
||||
// 3, use nested EFI_IFR_DEFAULT
|
||||
// 3, use nested EFI_IFR_DEFAULT
|
||||
// 4, set flags of EFI_ONE_OF_OPTION (provide Standard and Manufacturing default)
|
||||
// 5, set flags of EFI_IFR_CHECKBOX (provide Standard and Manufacturing default) (lowest priority)
|
||||
//
|
||||
@@ -4291,7 +4291,7 @@ ReGetDefault:
|
||||
//
|
||||
// Get default value from altcfg string.
|
||||
//
|
||||
if (ConfigAccess != NULL) {
|
||||
if (ConfigAccess != NULL) {
|
||||
Status = GetDefaultValueFromAltCfg(FormSet, Form, Question);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
@@ -4328,7 +4328,7 @@ ReGetDefault:
|
||||
FreePool (Default->ValueExpression->Result.Buffer);
|
||||
}
|
||||
HiiValue->Type = Default->ValueExpression->Result.Type;
|
||||
CopyMem (&HiiValue->Value, &Default->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
|
||||
CopyMem (&HiiValue->Value, &Default->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE));
|
||||
} else {
|
||||
//
|
||||
// Default value is embedded in EFI_IFR_DEFAULT
|
||||
@@ -4467,7 +4467,7 @@ ReGetDefault:
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if ((HiiValue->Value.u64 < Question->Minimum) || (HiiValue->Value.u64 > Question->Maximum)) {
|
||||
@@ -4776,7 +4776,7 @@ CleanAltCfgForFormSet (
|
||||
/**
|
||||
Reset Questions to their initial value or default value in a Form, Formset or System.
|
||||
|
||||
GetDefaultValueScope parameter decides which questions will reset
|
||||
GetDefaultValueScope parameter decides which questions will reset
|
||||
to its default value.
|
||||
|
||||
@param FormSet FormSet data structure.
|
||||
@@ -5067,7 +5067,7 @@ IsQuestionValueChanged (
|
||||
/**
|
||||
Initialize Question's Edit copy from Storage.
|
||||
|
||||
@param Selection Selection contains the information about
|
||||
@param Selection Selection contains the information about
|
||||
the Selection, form and formset to be displayed.
|
||||
Selection action may be updated in retrieve callback.
|
||||
If Selection is NULL, only initialize Question value.
|
||||
@@ -5087,7 +5087,7 @@ LoadFormConfig (
|
||||
EFI_STATUS Status;
|
||||
LIST_ENTRY *Link;
|
||||
FORM_BROWSER_STATEMENT *Question;
|
||||
|
||||
|
||||
Link = GetFirstNode (&Form->StatementListHead);
|
||||
while (!IsNull (&Form->StatementListHead, Link)) {
|
||||
Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link);
|
||||
@@ -5117,7 +5117,7 @@ LoadFormConfig (
|
||||
/**
|
||||
Initialize Question's Edit copy from Storage for the whole Formset.
|
||||
|
||||
@param Selection Selection contains the information about
|
||||
@param Selection Selection contains the information about
|
||||
the Selection, form and formset to be displayed.
|
||||
Selection action may be updated in retrieve callback.
|
||||
If Selection is NULL, only initialize Question value.
|
||||
@@ -5153,7 +5153,7 @@ LoadFormSetConfig (
|
||||
|
||||
//
|
||||
// Finished question initialization.
|
||||
//
|
||||
//
|
||||
FormSet->QuestionInited = TRUE;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -5189,8 +5189,8 @@ RemoveElement (
|
||||
DestStr = NewStr;
|
||||
NewStr += StrLen (RequestElement);
|
||||
CopyMem (DestStr, NewStr, StrSize (NewStr));
|
||||
|
||||
Storage->SpareStrLen += StrLen (RequestElement);
|
||||
|
||||
Storage->SpareStrLen += StrLen (RequestElement);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5235,7 +5235,7 @@ RemoveConfigRequest (
|
||||
if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
|
||||
RequestElement = StrStr (ConfigRequest, L"PATH");
|
||||
ASSERT (RequestElement != NULL);
|
||||
RequestElement = StrStr (RequestElement, SearchKey);
|
||||
RequestElement = StrStr (RequestElement, SearchKey);
|
||||
} else {
|
||||
RequestElement = StrStr (ConfigRequest, SearchKey);
|
||||
}
|
||||
@@ -5305,7 +5305,7 @@ CleanBrowserStorage (
|
||||
RemoveConfigRequest (Storage, Storage->ConfigRequest);
|
||||
} else if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER ||
|
||||
Storage->BrowserStorage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
|
||||
if (Storage->BrowserStorage->ConfigRequest != NULL) {
|
||||
if (Storage->BrowserStorage->ConfigRequest != NULL) {
|
||||
FreePool (Storage->BrowserStorage->ConfigRequest);
|
||||
Storage->BrowserStorage->ConfigRequest = NULL;
|
||||
}
|
||||
@@ -5324,7 +5324,7 @@ CleanBrowserStorage (
|
||||
@retval FALSE The Element not in the configReqeust String.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
ElementValidation (
|
||||
BROWSER_STORAGE *BrowserStorage,
|
||||
CHAR16 *RequestElement
|
||||
@@ -5391,7 +5391,7 @@ AppendConfigRequest (
|
||||
@retval FALSE All elements covered by current used elements.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
ConfigRequestAdjust (
|
||||
IN BROWSER_STORAGE *Storage,
|
||||
IN CHAR16 *Request,
|
||||
@@ -5440,7 +5440,7 @@ ConfigRequestAdjust (
|
||||
if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
|
||||
RequestElement = StrStr (ConfigRequest, L"PATH");
|
||||
ASSERT (RequestElement != NULL);
|
||||
RequestElement = StrStr (RequestElement, SearchKey);
|
||||
RequestElement = StrStr (RequestElement, SearchKey);
|
||||
} else {
|
||||
RequestElement = StrStr (ConfigRequest, SearchKey);
|
||||
}
|
||||
@@ -5476,7 +5476,7 @@ ConfigRequestAdjust (
|
||||
*NextRequestElement = L'\0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!ElementValidation (Storage, RequestElement)) {
|
||||
//
|
||||
// Add this element to the Storage->BrowserStorage->AllRequestElement.
|
||||
@@ -5545,7 +5545,7 @@ LoadStorage (
|
||||
}
|
||||
|
||||
//
|
||||
// Just update the ConfigRequest, if storage already initialized.
|
||||
// Just update the ConfigRequest, if storage already initialized.
|
||||
//
|
||||
if (Storage->BrowserStorage->Initialized) {
|
||||
ConfigRequestAdjust(Storage->BrowserStorage, Storage->ConfigRequest, FALSE);
|
||||
@@ -5569,9 +5569,9 @@ LoadStorage (
|
||||
ConfigRequest = AllocateZeroPool (StrLen);
|
||||
ASSERT (ConfigRequest != NULL);
|
||||
UnicodeSPrint (
|
||||
ConfigRequest,
|
||||
StrLen,
|
||||
L"%s&OFFSET=0&WIDTH=%04x",
|
||||
ConfigRequest,
|
||||
StrLen,
|
||||
L"%s&OFFSET=0&WIDTH=%04x",
|
||||
Storage->ConfigHdr,
|
||||
Storage->BrowserStorage->Size);
|
||||
} else {
|
||||
@@ -5601,7 +5601,7 @@ LoadStorage (
|
||||
if (StrPtr != NULL) {
|
||||
*StrPtr = L'\0';
|
||||
}
|
||||
|
||||
|
||||
Status = ConfigRespToStorage (Storage->BrowserStorage, Result);
|
||||
FreePool (Result);
|
||||
}
|
||||
@@ -5609,7 +5609,7 @@ LoadStorage (
|
||||
Storage->BrowserStorage->ConfigRequest = AllocateCopyPool (StrSize (Storage->ConfigRequest), Storage->ConfigRequest);
|
||||
|
||||
//
|
||||
// Input NULL for ConfigRequest field means sync all fields from editbuffer to buffer.
|
||||
// Input NULL for ConfigRequest field means sync all fields from editbuffer to buffer.
|
||||
//
|
||||
SynchronizeStorage(Storage->BrowserStorage, NULL, TRUE);
|
||||
|
||||
@@ -5737,7 +5737,7 @@ InitializeCurrentSetting (
|
||||
|
||||
//
|
||||
// Extract default from IFR binary for no storage questions.
|
||||
//
|
||||
//
|
||||
ExtractDefault (FormSet, NULL, EFI_HII_DEFAULT_CLASS_STANDARD, FormSetLevel, GetDefaultForNoStorage, NULL, TRUE, FALSE);
|
||||
|
||||
//
|
||||
@@ -5989,7 +5989,7 @@ InitializeFormSet (
|
||||
|
||||
|
||||
/**
|
||||
Save globals used by previous call to SendForm(). SendForm() may be called from
|
||||
Save globals used by previous call to SendForm(). SendForm() may be called from
|
||||
HiiConfigAccess.Callback(), this will cause SendForm() be reentried.
|
||||
So, save globals of previous call to SendForm() and restore them upon exit.
|
||||
|
||||
@@ -6134,13 +6134,13 @@ RestoreBrowserContext (
|
||||
|
||||
/**
|
||||
Find the matched FormSet context in the backup maintain list based on HiiHandle.
|
||||
|
||||
|
||||
@param Handle The Hii Handle.
|
||||
|
||||
|
||||
@return the found FormSet context. If no found, NULL will return.
|
||||
|
||||
**/
|
||||
FORM_BROWSER_FORMSET *
|
||||
FORM_BROWSER_FORMSET *
|
||||
GetFormSetFromHiiHandle (
|
||||
EFI_HII_HANDLE Handle
|
||||
)
|
||||
@@ -6159,15 +6159,15 @@ GetFormSetFromHiiHandle (
|
||||
return FormSet;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
Check whether the input HII handle is the FormSet that is being used.
|
||||
|
||||
|
||||
@param Handle The Hii Handle.
|
||||
|
||||
|
||||
@retval TRUE HII handle is being used.
|
||||
@retval FALSE HII handle is not being used.
|
||||
|
||||
@@ -6201,20 +6201,20 @@ IsHiiHandleInBrowserContext (
|
||||
}
|
||||
Link = GetNextNode (&gBrowserContextList, Link);
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
Perform Password check.
|
||||
Perform Password check.
|
||||
Passwork may be encrypted by driver that requires the specific check.
|
||||
|
||||
|
||||
@param Form Form where Password Statement is in.
|
||||
@param Statement Password statement
|
||||
@param PasswordString Password string to be checked. It may be NULL.
|
||||
NULL means to restore password.
|
||||
"" string can be used to checked whether old password does exist.
|
||||
|
||||
|
||||
@return Status Status of Password check.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -6245,7 +6245,7 @@ PasswordCheck (
|
||||
//
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Prepare password string in HII database
|
||||
//
|
||||
@@ -6279,7 +6279,7 @@ PasswordCheck (
|
||||
|
||||
/**
|
||||
Find the registered HotKey based on KeyData.
|
||||
|
||||
|
||||
@param[in] KeyData A pointer to a buffer that describes the keystroke
|
||||
information for the hot key.
|
||||
|
||||
@@ -6301,7 +6301,7 @@ GetHotKeyFromRegisterList (
|
||||
}
|
||||
Link = GetNextNode (&gBrowserHotKeyList, Link);
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -6310,11 +6310,11 @@ GetHotKeyFromRegisterList (
|
||||
All hot keys have the same scope. The mixed hot keys with the different level are not supported.
|
||||
If no scope is set, the default scope will be FormSet level.
|
||||
After all registered hot keys are removed, previous Scope can reset to another level.
|
||||
|
||||
@param[in] Scope Scope level to be set.
|
||||
|
||||
|
||||
@param[in] Scope Scope level to be set.
|
||||
|
||||
@retval EFI_SUCCESS Scope is set correctly.
|
||||
@retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE.
|
||||
@retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE.
|
||||
@retval EFI_UNSPPORTED Scope level is different from current one that the registered hot keys have.
|
||||
|
||||
**/
|
||||
@@ -6347,15 +6347,15 @@ SetScope (
|
||||
Only support hot key that is not printable character (control key, function key, etc.).
|
||||
If the action value is zero, the hot key will be unregistered if it has been registered.
|
||||
If the same hot key has been registered, the new action and help string will override the previous ones.
|
||||
|
||||
|
||||
@param[in] KeyData A pointer to a buffer that describes the keystroke
|
||||
information for the hot key. Its type is EFI_INPUT_KEY to
|
||||
information for the hot key. Its type is EFI_INPUT_KEY to
|
||||
be supported by all ConsoleIn devices.
|
||||
@param[in] Action Action value that describes what action will be trigged when the hot key is pressed.
|
||||
@param[in] Action Action value that describes what action will be trigged when the hot key is pressed.
|
||||
@param[in] DefaultId Specifies the type of defaults to retrieve, which is only for DEFAULT action.
|
||||
@param[in] HelpString Help string that describes the hot key information.
|
||||
Its value may be NULL for the unregistered hot key.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Hot key is registered or unregistered.
|
||||
@retval EFI_INVALID_PARAMETER KeyData is NULL or HelpString is NULL on register.
|
||||
@retval EFI_NOT_FOUND KeyData is not found to be unregistered.
|
||||
@@ -6376,7 +6376,7 @@ RegisterHotKey (
|
||||
//
|
||||
// Check input parameters.
|
||||
//
|
||||
if (KeyData == NULL || KeyData->UnicodeChar != CHAR_NULL ||
|
||||
if (KeyData == NULL || KeyData->UnicodeChar != CHAR_NULL ||
|
||||
(Action != BROWSER_ACTION_UNREGISTER && HelpString == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -6385,14 +6385,14 @@ RegisterHotKey (
|
||||
// Check whether the input KeyData is in BrowserHotKeyList.
|
||||
//
|
||||
HotKey = GetHotKeyFromRegisterList (KeyData);
|
||||
|
||||
|
||||
//
|
||||
// Unregister HotKey
|
||||
//
|
||||
if (Action == BROWSER_ACTION_UNREGISTER) {
|
||||
if (HotKey != NULL) {
|
||||
//
|
||||
// The registered HotKey is found.
|
||||
// The registered HotKey is found.
|
||||
// Remove it from List, and free its resource.
|
||||
//
|
||||
RemoveEntryList (&HotKey->Link);
|
||||
@@ -6401,7 +6401,7 @@ RegisterHotKey (
|
||||
return EFI_SUCCESS;
|
||||
} else {
|
||||
//
|
||||
// The registered HotKey is not found.
|
||||
// The registered HotKey is not found.
|
||||
//
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
@@ -6434,11 +6434,11 @@ RegisterHotKey (
|
||||
}
|
||||
|
||||
/**
|
||||
Register Exit handler function.
|
||||
When more than one handler function is registered, the latter one will override the previous one.
|
||||
When NULL handler is specified, the previous Exit handler will be unregistered.
|
||||
|
||||
@param[in] Handler Pointer to handler function.
|
||||
Register Exit handler function.
|
||||
When more than one handler function is registered, the latter one will override the previous one.
|
||||
When NULL handler is specified, the previous Exit handler will be unregistered.
|
||||
|
||||
@param[in] Handler Pointer to handler function.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -6510,7 +6510,7 @@ IsBrowserDataModified (
|
||||
@retval EFI_INVALID_PARAMETER The input action value is invalid.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ExecuteAction (
|
||||
IN UINT32 Action,
|
||||
@@ -6530,7 +6530,7 @@ ExecuteAction (
|
||||
Form = NULL;
|
||||
if (gBrowserSettingScope < SystemLevel) {
|
||||
FormSet = gCurrentSelection->FormSet;
|
||||
Form = gCurrentSelection->Form;
|
||||
Form = gCurrentSelection->Form;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -6625,16 +6625,16 @@ SaveReminder (
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// No data is changed. No save is required.
|
||||
// No data is changed. No save is required.
|
||||
//
|
||||
if (!IsDataChanged) {
|
||||
return DataSavedAction;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If data is changed, prompt user to save or discard it.
|
||||
// If data is changed, prompt user to save or discard it.
|
||||
//
|
||||
do {
|
||||
ConfirmRet = (UINT32) mFormDisplay->ConfirmDataChange();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Private MACRO, structure and function definitions for Setup Browser module.
|
||||
|
||||
Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -271,7 +271,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
LIST_ENTRY Link;
|
||||
|
||||
|
||||
EFI_IFR_ONE_OF_OPTION *OpCode; // OneOfOption Data
|
||||
|
||||
EFI_STRING_ID Text;
|
||||
@@ -286,14 +286,14 @@ typedef struct {
|
||||
|
||||
typedef enum {
|
||||
ExpressFalse = 0,
|
||||
ExpressGrayOut,
|
||||
ExpressGrayOut,
|
||||
ExpressSuppress,
|
||||
ExpressDisable
|
||||
} EXPRESS_RESULT;
|
||||
|
||||
typedef enum {
|
||||
ExpressNone = 0,
|
||||
ExpressForm,
|
||||
ExpressForm,
|
||||
ExpressStatement,
|
||||
ExpressOption
|
||||
} EXPRESS_LEVEL;
|
||||
@@ -390,7 +390,7 @@ typedef struct {
|
||||
|
||||
CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>
|
||||
CHAR16 *ConfigAltResp; // Alt config response string for this ConfigRequest.
|
||||
UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>
|
||||
UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>
|
||||
UINTN SpareStrLen;
|
||||
CHAR16 *RestoreConfigRequest; // When submit form fail, the element need to be restored
|
||||
CHAR16 *SyncConfigRequest; // When submit form fail, the element need to be synced
|
||||
@@ -773,10 +773,10 @@ ValidateFormSet (
|
||||
@param SettingScope Setting Scope for Default action.
|
||||
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
UpdateStatementStatus (
|
||||
IN FORM_BROWSER_FORMSET *FormSet,
|
||||
IN FORM_BROWSER_FORM *Form,
|
||||
IN FORM_BROWSER_FORM *Form,
|
||||
IN BROWSER_SETTING_SCOPE SettingScope
|
||||
);
|
||||
|
||||
@@ -922,13 +922,13 @@ EFI_STATUS
|
||||
InitializeFormSet (
|
||||
IN EFI_HII_HANDLE Handle,
|
||||
IN OUT EFI_GUID *FormSetGuid,
|
||||
OUT FORM_BROWSER_FORMSET *FormSet
|
||||
OUT FORM_BROWSER_FORMSET *FormSet
|
||||
);
|
||||
|
||||
/**
|
||||
Reset Questions to their initial value or default value in a Form, Formset or System.
|
||||
|
||||
GetDefaultValueScope parameter decides which questions will reset
|
||||
GetDefaultValueScope parameter decides which questions will reset
|
||||
to its default value.
|
||||
|
||||
@param FormSet FormSet data structure.
|
||||
@@ -961,7 +961,7 @@ ExtractDefault (
|
||||
/**
|
||||
Initialize Question's Edit copy from Storage.
|
||||
|
||||
@param Selection Selection contains the information about
|
||||
@param Selection Selection contains the information about
|
||||
the Selection, form and formset to be displayed.
|
||||
Selection action may be updated in retrieve callback.
|
||||
If Selection is NULL, only initialize Question value.
|
||||
@@ -981,7 +981,7 @@ LoadFormConfig (
|
||||
/**
|
||||
Initialize Question's Edit copy from Storage for the whole Formset.
|
||||
|
||||
@param Selection Selection contains the information about
|
||||
@param Selection Selection contains the information about
|
||||
the Selection, form and formset to be displayed.
|
||||
Selection action may be updated in retrieve callback.
|
||||
If Selection is NULL, only initialize Question value.
|
||||
@@ -1071,7 +1071,7 @@ GetIfrBinaryData (
|
||||
);
|
||||
|
||||
/**
|
||||
Save globals used by previous call to SendForm(). SendForm() may be called from
|
||||
Save globals used by previous call to SendForm(). SendForm() may be called from
|
||||
HiiConfigAccess.Callback(), this will cause SendForm() be reentried.
|
||||
So, save globals of previous call to SendForm() and restore them upon exit.
|
||||
|
||||
@@ -1175,9 +1175,9 @@ BrowserCallback (
|
||||
about the Selection, form and formset to be displayed.
|
||||
On output, Selection return the screen item that is selected
|
||||
by user.
|
||||
@param SettingLevel Input Settting level, if it is FormLevel, just exit current form.
|
||||
@param SettingLevel Input Settting level, if it is FormLevel, just exit current form.
|
||||
else, we need to exit current formset.
|
||||
|
||||
|
||||
@retval TRUE Exit current form.
|
||||
@retval FALSE User press ESC and keep in current form.
|
||||
**/
|
||||
@@ -1229,7 +1229,7 @@ IsNvUpdateRequiredForFormSet (
|
||||
@retval EFI_SUCCESS The call back function executes successfully.
|
||||
@return Other value if the call back function failed to execute.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
ProcessCallBackFunction (
|
||||
IN OUT UI_MENU_SELECTION *Selection,
|
||||
IN FORM_BROWSER_FORMSET *FormSet,
|
||||
@@ -1238,11 +1238,11 @@ ProcessCallBackFunction (
|
||||
IN EFI_BROWSER_ACTION Action,
|
||||
IN BOOLEAN SkipSaveOrDiscard
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Call the retrieve type call back function for one question to get the initialize data.
|
||||
|
||||
This function only used when in the initialize stage, because in this stage, the
|
||||
|
||||
This function only used when in the initialize stage, because in this stage, the
|
||||
Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead.
|
||||
|
||||
@param ConfigAccess The config access protocol produced by the hii driver.
|
||||
@@ -1252,7 +1252,7 @@ ProcessCallBackFunction (
|
||||
@retval EFI_SUCCESS The call back function executes successfully.
|
||||
@return Other value if the call back function failed to execute.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
ProcessRetrieveForQuestion (
|
||||
IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess,
|
||||
IN FORM_BROWSER_STATEMENT *Statement,
|
||||
@@ -1261,22 +1261,22 @@ ProcessRetrieveForQuestion (
|
||||
|
||||
/**
|
||||
Find the matched FormSet context in the backup maintain list based on HiiHandle.
|
||||
|
||||
|
||||
@param Handle The Hii Handle.
|
||||
|
||||
|
||||
@return the found FormSet context. If no found, NULL will return.
|
||||
|
||||
**/
|
||||
FORM_BROWSER_FORMSET *
|
||||
FORM_BROWSER_FORMSET *
|
||||
GetFormSetFromHiiHandle (
|
||||
EFI_HII_HANDLE Handle
|
||||
);
|
||||
|
||||
/**
|
||||
Check whether the input HII handle is the FormSet that is being used.
|
||||
|
||||
|
||||
@param Handle The Hii Handle.
|
||||
|
||||
|
||||
@retval TRUE HII handle is being used.
|
||||
@retval FALSE HII handle is not being used.
|
||||
|
||||
@@ -1291,11 +1291,11 @@ IsHiiHandleInBrowserContext (
|
||||
All hot keys have the same scope. The mixed hot keys with the different level are not supported.
|
||||
If no scope is set, the default scope will be FormSet level.
|
||||
After all registered hot keys are removed, previous Scope can reset to another level.
|
||||
|
||||
@param[in] Scope Scope level to be set.
|
||||
|
||||
|
||||
@param[in] Scope Scope level to be set.
|
||||
|
||||
@retval EFI_SUCCESS Scope is set correctly.
|
||||
@retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE.
|
||||
@retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE.
|
||||
@retval EFI_UNSPPORTED Scope level is different from current one that the registered hot keys have.
|
||||
|
||||
**/
|
||||
@@ -1310,15 +1310,15 @@ SetScope (
|
||||
Only support hot key that is not printable character (control key, function key, etc.).
|
||||
If the action value is zero, the hot key will be unregistered if it has been registered.
|
||||
If the same hot key has been registered, the new action and help string will override the previous ones.
|
||||
|
||||
|
||||
@param[in] KeyData A pointer to a buffer that describes the keystroke
|
||||
information for the hot key. Its type is EFI_INPUT_KEY to
|
||||
information for the hot key. Its type is EFI_INPUT_KEY to
|
||||
be supported by all ConsoleIn devices.
|
||||
@param[in] Action Action value that describes what action will be trigged when the hot key is pressed.
|
||||
@param[in] Action Action value that describes what action will be trigged when the hot key is pressed.
|
||||
@param[in] DefaultId Specifies the type of defaults to retrieve, which is only for DEFAULT action.
|
||||
@param[in] HelpString Help string that describes the hot key information.
|
||||
Its value may be NULL for the unregistered hot key.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Hot key is registered or unregistered.
|
||||
@retval EFI_INVALID_PARAMETER KeyData is NULL.
|
||||
@retval EFI_NOT_FOUND KeyData is not found to be unregistered.
|
||||
@@ -1335,11 +1335,11 @@ RegisterHotKey (
|
||||
);
|
||||
|
||||
/**
|
||||
Register Exit handler function.
|
||||
When more than one handler function is registered, the latter one will override the previous one.
|
||||
When NULL handler is specified, the previous Exit handler will be unregistered.
|
||||
|
||||
@param[in] Handler Pointer to handler function.
|
||||
Register Exit handler function.
|
||||
When more than one handler function is registered, the latter one will override the previous one.
|
||||
When NULL handler is specified, the previous Exit handler will be unregistered.
|
||||
|
||||
@param[in] Handler Pointer to handler function.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -1349,22 +1349,22 @@ RegiserExitHandler (
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Check whether the browser data has been modified.
|
||||
|
||||
Check whether the browser data has been modified.
|
||||
|
||||
@retval TRUE Browser data is changed.
|
||||
@retval FALSE No browser data is changed.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
IsBrowserDataModified (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Execute the action requested by the Action parameter.
|
||||
|
||||
Execute the action requested by the Action parameter.
|
||||
|
||||
@param[in] Action Execute the request action.
|
||||
@param[in] DefaultId The default Id info when need to load default value.
|
||||
@@ -1373,7 +1373,7 @@ IsBrowserDataModified (
|
||||
@retval EFI_INVALID_PARAMETER The input action value is invalid.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ExecuteAction (
|
||||
IN UINT32 Action,
|
||||
@@ -1411,7 +1411,7 @@ IsResetRequired (
|
||||
|
||||
/**
|
||||
Find the registered HotKey based on KeyData.
|
||||
|
||||
|
||||
@param[in] KeyData A pointer to a buffer that describes the keystroke
|
||||
information for the hot key.
|
||||
|
||||
@@ -1435,7 +1435,7 @@ FORM_BROWSER_STATEMENT *
|
||||
GetBrowserStatement (
|
||||
IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Password may be stored as encrypted by Configuration Driver. When change a
|
||||
password, user will be challenged with old password. To validate user input old
|
||||
@@ -1495,7 +1495,7 @@ EFI_STATUS
|
||||
SetupBrowser (
|
||||
IN OUT UI_MENU_SELECTION *Selection
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Free up the resource allocated for all strings required
|
||||
by Setup Browser.
|
||||
@@ -1538,7 +1538,7 @@ UiAddMenuList (
|
||||
**/
|
||||
FORM_ENTRY_INFO *
|
||||
UiFindMenuList (
|
||||
IN EFI_HII_HANDLE HiiHandle,
|
||||
IN EFI_HII_HANDLE HiiHandle,
|
||||
IN EFI_GUID *FormSetGuid,
|
||||
IN UINT16 FormId
|
||||
);
|
||||
@@ -1559,7 +1559,7 @@ UiFreeMenuList (
|
||||
|
||||
@param CurrentMenu Current Menu
|
||||
@param SettingLevel Whether find parent menu in Form Level or Formset level.
|
||||
In form level, just find the parent menu;
|
||||
In form level, just find the parent menu;
|
||||
In formset level, find the parent menu which has different
|
||||
formset guid value.
|
||||
|
||||
@@ -1570,7 +1570,7 @@ UiFindParentMenu (
|
||||
IN FORM_ENTRY_INFO *CurrentMenu,
|
||||
IN BROWSER_SETTING_SCOPE SettingLevel
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Validate the HiiHandle.
|
||||
|
||||
@@ -1587,7 +1587,7 @@ ValidateHiiHandle (
|
||||
|
||||
/**
|
||||
Copy current Menu list to the new menu list.
|
||||
|
||||
|
||||
@param NewMenuListHead New create Menu list.
|
||||
@param CurrentMenuListHead Current Menu list.
|
||||
|
||||
@@ -1649,7 +1649,7 @@ SetArrayData (
|
||||
|
||||
/**
|
||||
Compare two Hii value.
|
||||
|
||||
|
||||
@param Value1 Expression value to compare on left-hand.
|
||||
@param Value2 Expression value to compare on right-hand.
|
||||
@param Result Return value after compare.
|
||||
@@ -1657,10 +1657,10 @@ SetArrayData (
|
||||
return Positive value if Value1 is greater than Value2.
|
||||
retval Negative value if Value1 is less than Value2.
|
||||
@param HiiHandle Only required for string compare.
|
||||
|
||||
|
||||
@retval other Could not perform compare on two values.
|
||||
@retval EFI_SUCCESS Compare the value success.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
CompareHiiValue (
|
||||
@@ -1671,15 +1671,15 @@ CompareHiiValue (
|
||||
);
|
||||
|
||||
/**
|
||||
Perform Password check.
|
||||
Perform Password check.
|
||||
Passwork may be encrypted by driver that requires the specific check.
|
||||
|
||||
|
||||
@param Form Form where Password Statement is in.
|
||||
@param Statement Password statement
|
||||
@param PasswordString Password string to be checked. It may be NULL.
|
||||
NULL means to restore password.
|
||||
"" string can be used to checked whether old password does exist.
|
||||
|
||||
|
||||
@return Status Status of Password check.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -1703,7 +1703,7 @@ FORM_BROWSER_STATEMENT *
|
||||
GetBrowserStatement (
|
||||
IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Initialize the Display form structure data.
|
||||
@@ -1757,7 +1757,7 @@ DevicePathToHiiHandle (
|
||||
@retval FALSE All elements covered by current used elements.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
BOOLEAN
|
||||
ConfigRequestAdjust (
|
||||
IN BROWSER_STORAGE *Storage,
|
||||
IN CHAR16 *Request,
|
||||
@@ -1765,8 +1765,8 @@ ConfigRequestAdjust (
|
||||
);
|
||||
|
||||
/**
|
||||
Perform question check.
|
||||
|
||||
Perform question check.
|
||||
|
||||
If one question has more than one check, process form high priority to low.
|
||||
|
||||
@param FormSet FormSet data structure.
|
||||
@@ -1843,7 +1843,7 @@ GetFstStgFromVarId (
|
||||
@param Storage browser storage info.
|
||||
|
||||
@return Pointer to a FORMSET_STORAGE data structure.
|
||||
|
||||
|
||||
|
||||
**/
|
||||
FORMSET_STORAGE *
|
||||
@@ -1858,7 +1858,7 @@ GetFstStgFromBrsStg (
|
||||
|
||||
@retval TRUE do the reconnect behavior success.
|
||||
@retval FALSE do the reconnect behavior failed.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
ReconnectController (
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// It also produces FormBrowserEx(2) protocol to let user register the different Hot key service.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,9 +1,9 @@
|
||||
## @file
|
||||
# The DXE driver produces FORM BROWSER2 protocol defined in UEFI specification.
|
||||
#
|
||||
# It also produces FormBrowserEx(2) protocol to let user register the different Hot key service.
|
||||
# It also produces FormBrowserEx(2) protocol to let user register the different Hot key service.
|
||||
#
|
||||
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// SetupBrowser Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Setup Browser DXE Driver"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user