\r
CHAR16 VariableName[] = L"MyIfrNVData";\r
\r
+/**\r
+ Encode the password using a simple algorithm.\r
+ \r
+ @param Password The string to be encoded.\r
+ @param MaxSize The size of the string.\r
+ \r
+**/\r
VOID\r
EncodePassword (\r
IN CHAR16 *Password,\r
return ;\r
}\r
\r
+/**\r
+ Validate the user's password.\r
+ \r
+ @param PrivateData This driver's private context data.\r
+ @param StringId The user's input.\r
+ \r
+ @retval EFI_SUCCESS The user's input matches the password.\r
+ @retval EFI_NOT_READY The user's input does not match the password.\r
+**/\r
EFI_STATUS\r
ValidatePassword (\r
- DRIVER_SAMPLE_PRIVATE_DATA *PrivateData,\r
- EFI_STRING_ID StringId\r
+ IN DRIVER_SAMPLE_PRIVATE_DATA *PrivateData,\r
+ IN EFI_STRING_ID StringId\r
)\r
{\r
EFI_STATUS Status;\r
return Status;\r
}\r
\r
+/**\r
+ Encode the password using a simple algorithm.\r
+ \r
+ @param PrivateData This driver's private context data.\r
+ @param StringId The password from User.\r
+ \r
+ @retval EFI_SUCESS The operation is successful.\r
+ @return Other value if gRT->SetVariable () fails.\r
+ \r
+**/\r
EFI_STATUS\r
SetPassword (\r
- DRIVER_SAMPLE_PRIVATE_DATA *PrivateData,\r
- EFI_STRING_ID StringId\r
+ IN DRIVER_SAMPLE_PRIVATE_DATA *PrivateData,\r
+ IN EFI_STRING_ID StringId\r
)\r
{\r
EFI_STATUS Status;\r
return Status;\r
}\r
\r
+/**\r
+ Main entry for this driver.\r
+ \r
+ @param ImageHandle Image handle this driver.\r
+ @param SystemTable Pointer to SystemTable.\r
+\r
+ @retval EFI_SUCESS This function always complete successfully.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
DriverSampleInit (\r
\r
**/\r
\r
-#ifndef _DRIVER_SAMPLE_H\r
-#define _DRIVER_SAMPLE_H\r
+#ifndef _DRIVER_SAMPLE_H_\r
+#define _DRIVER_SAMPLE_H_\r
\r
#include <Uefi.h>\r
\r
\r
**/\r
\r
-#ifndef _NVDATASTRUC_H\r
-#define _NVDATASTRUC_H\r
+#ifndef _NVDATASTRUC_H_\r
+#define _NVDATASTRUC_H_\r
\r
#define FORMSET_GUID \\r
{ \\r
return Statement;\r
}\r
\r
+/**\r
+ Convert a numeric value to a Unicode String and insert it to String Package.\r
+ This string is used as the Unicode Name for the EFI Variable. This is to support\r
+ the deprecated vareqval opcode.\r
+ \r
+ @param FormSet The FormSet.\r
+ @param Statement The numeric question whose VarStoreInfo.VarName is the\r
+ numeric value which is used to produce the Unicode Name\r
+ for the EFI Variable.\r
+ \r
+ If the Statement is NULL, the ASSERT.\r
+ If the opcode is not Numeric, then ASSERT.\r
+ \r
+ @retval EFI_SUCCESS The funtion always succeeds.\r
+**/\r
EFI_STATUS\r
UpdateCheckBoxStringToken (\r
IN CONST FORM_BROWSER_FORMSET *FormSet,\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+ Check if the next opcode is the EFI_IFR_EXTEND_OP_VAREQNAME.\r
+ \r
+ @param OpCodeData The current opcode.\r
+ \r
+ @retval TRUE Yes.\r
+ @retval FALSE No.\r
+**/\r
BOOLEAN\r
IsNextOpCodeGuidedVarEqName (\r
UINT8 *OpCodeData\r
UINTN\r
ConsolePrint (\r
IN CHAR16 *Fmt,\r
- IN ...\r
+ ...\r
)\r
{\r
VA_LIST Args;\r
PrintStringAt (\r
IN UINTN Column,\r
IN UINTN Row,\r
- CHAR16 *String\r
+ IN CHAR16 *String\r
)\r
{\r
return PrintAt (Column, Row, L"%s", String);\r
@param StringBuffer The passed in pointer to the buffer which will\r
hold the typed in string if HotKey is FALSE\r
@param KeyValue The EFI_KEY value returned if HotKey is TRUE..\r
- @param String Pointer to the first string in the list\r
@param ... A series of (quantity == NumberOfLines) text\r
strings which will be used to construct the dialog\r
box\r
// Question value may be changed, need invoke its Callback()\r
//\r
ConfigAccess = Selection->FormSet->ConfigAccess;\r
- if ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) && (ConfigAccess != NULL)) {\r
+ if (((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != 0) && (ConfigAccess != NULL)) {\r
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;\r
\r
HiiValue = &Question->HiiValue;\r
Draw a pop up windows based on the dimension, number of lines and\r
strings specified.\r
\r
- @param RequestedWidth The width of the pop-up.\r
+ @param ScreenWidth The width of the pop-up.\r
@param NumberOfLines The number of lines.\r
@param ... A series of text strings that displayed in the pop-up.\r
\r