@param NextString string follow the possible PathHdr string.\r
\r
@retval EFI_INVALID_PARAMETER The device path is not valid or the incoming parameter is invalid.\r
- @retval EFI_OUT_OF_RESOURCES Lake of resources to store neccesary structures.\r
+ @retval EFI_OUT_OF_RESOURCES Lake of resources to store necessary structures.\r
@retval EFI_SUCCESS The device path is retrieved and translated to binary format.\r
The Input string not include PathHdr section.\r
\r
\r
@param String KeywordRequestformat string.\r
@param Keyword return the extract keyword string.\r
- @param NextString return the next string follow this keyword sectin.\r
+ @param NextString return the next string follow this keyword section.\r
\r
@retval EFI_SUCCESS Success to get the keyword string.\r
- @retval EFI_INVALID_PARAMETER Parsr the input string return error.\r
+ @retval EFI_INVALID_PARAMETER Parse the input string return error.\r
\r
**/\r
EFI_STATUS\r
\r
@param String KeywordRequestformat string.\r
@param Value return the extract value string.\r
- @param NextString return the next string follow this keyword sectin.\r
+ @param NextString return the next string follow this keyword section.\r
\r
@retval EFI_SUCCESS Success to get the keyword string.\r
- @retval EFI_INVALID_PARAMETER Parsr the input string return error.\r
+ @retval EFI_INVALID_PARAMETER Parse the input string return error.\r
\r
**/\r
EFI_STATUS\r
\r
@param String KeywordRequestformat string.\r
@param FilterFlags return the filter condition.\r
- @param NextString return the next string follow this keyword sectin.\r
+ @param NextString return the next string follow this keyword section.\r
\r
@retval EFI_SUCCESS Success to get the keyword string.\r
- @retval EFI_INVALID_PARAMETER Parsr the input string return error.\r
+ @retval EFI_INVALID_PARAMETER Parse the input string return error.\r
\r
**/\r
BOOLEAN\r
String = KeywordPtr;\r
} else {\r
//\r
- // Only has paltform defined filter section, just skip it.\r
+ // Only has platform defined filter section, just skip it.\r
//\r
String += StrLen (String);\r
}\r
\r
This is a internal function.\r
\r
- @param OpCodeData The questin binary ifr data.\r
+ @param OpCodeData The question binary ifr data.\r
@param KeywordRequest KeywordRequestformat string.\r
- @param NextString return the next string follow this keyword sectin.\r
+ @param NextString return the next string follow this keyword section.\r
@param ReadOnly Return whether this question is read only.\r
\r
@retval KEYWORD_HANDLER_NO_ERROR Success validate.\r
@param BufferSize Length of the buffer.\r
@param StringDest Buffer to store the string text. \r
\r
- @retval EFI_SUCCESS The string text was outputed successfully.\r
+ @retval EFI_SUCCESS The string text was outputted successfully.\r
@retval EFI_OUT_OF_RESOURCES Out of resource.\r
\r
**/\r
if (EFI_ERROR (Status)) {\r
goto Done;\r
}\r
- \r
+ ASSERT (String != NULL);\r
if (StrCmp(KeywordValue, String) == 0) {\r
*StringId = CurrentStringId;\r
goto Done;\r
if (EFI_ERROR (Status)) {\r
goto Done;\r
}\r
- \r
+ ASSERT (String != NULL);\r
if (StrCmp(KeywordValue, String) == 0) {\r
*StringId = CurrentStringId;\r
goto Done;\r
if (EFI_ERROR (Status)) {\r
goto Done;\r
}\r
-\r
+ ASSERT (String != NULL);\r
BlockSize += StringSize;\r
if (StrCmp(KeywordValue, String) == 0) {\r
*StringId = CurrentStringId;\r
if (EFI_ERROR (Status)) {\r
goto Done;\r
}\r
-\r
+ ASSERT (String != NULL);\r
BlockSize += StringSize;\r
if (StrCmp(KeywordValue, String) == 0) {\r
*StringId = CurrentStringId;\r
@param KeywordValue Keyword value.\r
@param StringId String Id for this keyword.\r
\r
- @retval KEYWORD_HANDLER_NO_ERROR Get String id succes.\r
+ @retval KEYWORD_HANDLER_NO_ERROR Get String id successfully.\r
@retval KEYWORD_HANDLER_KEYWORD_NOT_FOUND Not found the string id in the string package.\r
@retval KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND Not found the string package for this namespace.\r
@retval KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR Out of resource error.\r
}\r
\r
/**\r
- Converts all hex dtring characters in range ['A'..'F'] to ['a'..'f'] for \r
+ Converts all hex string characters in range ['A'..'F'] to ['a'..'f'] for\r
hex digits that appear between a '=' and a '&' in a config string.\r
\r
If ConfigString is NULL, then ASSERT().\r
@param[in] DriverHandle The driver handle which supports a Device Path Protocol\r
that is the routing information PATH. Each byte of\r
the Device Path associated with DriverHandle is converted\r
- to a 2 Unicode character hexidecimal string.\r
+ to a 2 Unicode character hexadecimal string.\r
\r
@retval NULL DriverHandle does not support the Device Path Protocol.\r
@retval Other A pointer to the Null-terminate Unicode <ConfigHdr> string\r
}\r
\r
/**\r
- Genereate the KeywordResp String.\r
+ Generate the KeywordResp String.\r
\r
<KeywordResp> ::= <NameSpaceId><PathHdr>'&'<Keyword>'&VALUE='<Number>['&READONLY']\r
\r
RespStrLen += StrLen (PathHdr);\r
\r
//\r
- // 1.3 Keyword setion.\r
+ // 1.3 Keyword section.\r
// 'KEYWORD='<String>[':'<DecCh>(1/4)]\r
//\r
RespStrLen += 8 + StrLen (KeywordData);\r
}\r
\r
//\r
- // return the already get MultiKeywordString even error occured.\r
+ // return the already get MultiKeywordString even error occurred.\r
//\r
if (MultiKeywordResp == NULL) {\r
Status = EFI_NOT_FOUND;\r
StringPtr = NextStringPtr;\r
\r
//\r
- // 5. Find ReadOnly filter.\r
+ // 5. Find READONLY tag.\r
//\r
- if ((StringPtr != NULL) && StrnCmp (StringPtr, L"&ReadOnly", StrLen (L"&ReadOnly")) == 0) {\r
+ if ((StringPtr != NULL) && StrnCmp (StringPtr, L"&READONLY", StrLen (L"&READONLY")) == 0) {\r
ReadOnly = TRUE;\r
- StringPtr += StrLen (L"&ReadOnly");\r
+ StringPtr += StrLen (L"&READONLY");\r
} else {\r
ReadOnly = FALSE;\r
}\r
// 8. Check the readonly flag.\r
//\r
if (ExtractReadOnlyFromOpCode (OpCode) != ReadOnly) {\r
+ //\r
+ // Extracting readonly flag form opcode and extracting "READONLY" tag form KeywordString should have the same results.\r
+ // If not, the input KeywordString must be incorrect, return the error status to caller.\r
+ //\r
+ *ProgressErr = KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED;\r
+ Status = EFI_INVALID_PARAMETER;\r
+ goto Done;\r
+ }\r
+ if (ReadOnly) {\r
*ProgressErr = KEYWORD_HANDLER_ACCESS_NOT_PERMITTED;\r
Status = EFI_ACCESS_DENIED;\r
- goto Done; \r
+ goto Done;\r
}\r
\r
//\r
@retval EFI_SUCCESS The specified action was completed successfully.\r
\r
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:\r
- 1.Progress, ProgressErr, or Resuts is NULL.\r
+ 1.Progress, ProgressErr, or Results is NULL.\r
2.Parsing of the KeywordString resulted in an error. See\r
Progress and ProgressErr for more data.\r
\r