]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg VarCheck: #### in L"Boot####" are upper case hex
authorStar Zeng <star.zeng@intel.com>
Fri, 26 Aug 2016 09:25:03 +0000 (17:25 +0800)
committerStar Zeng <star.zeng@intel.com>
Wed, 31 Aug 2016 07:23:42 +0000 (15:23 +0800)
UEFI spec:
Each load option entry resides in a Boot####, Driver####, SysPrep####,
OsRecovery#### or PlatformRecovery#### variable where #### is replaced
by a unique option number in printable hexadecimal representation using
the digits 0-9, and the upper case versions of the characters A-F
(0000-FFFF).

The patch also makes L"HwErrRec####" follow this rule.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
MdeModulePkg/Library/VarCheckLib/VarCheckLib.c
MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c

index 41b209da169f677009d9538d25452b4c9c275ec2..5ca0d3edca44de30a677f5316db86e0e0f410961 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation functions and structures for var check services.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -96,17 +96,17 @@ VARIABLE_ENTRY_PROPERTY mVarCheckVariableWithWildcardName[] = {
 };\r
 \r
 /**\r
-  Check if a Unicode character is a hexadecimal character.\r
+  Check if a Unicode character is an upper case hexadecimal character.\r
 \r
-  This function checks if a Unicode character is a\r
-  hexadecimal character.  The valid hexadecimal character is\r
-  L'0' to L'9', L'a' to L'f', or L'A' to L'F'.\r
+  This function checks if a Unicode character is an upper case\r
+  hexadecimal character.  The valid upper case hexadecimal character is\r
+  L'0' to L'9', or L'A' to L'F'.\r
 \r
 \r
   @param[in] Char       The character to check against.\r
 \r
-  @retval TRUE          If the Char is a hexadecmial character.\r
-  @retval FALSE         If the Char is not a hexadecmial character.\r
+  @retval TRUE          If the Char is an upper case hexadecmial character.\r
+  @retval FALSE         If the Char is not an upper case hexadecmial character.\r
 \r
 **/\r
 BOOLEAN\r
@@ -115,7 +115,7 @@ VarCheckInternalIsHexaDecimalDigitCharacter (
   IN CHAR16             Char\r
   )\r
 {\r
-  return (BOOLEAN) ((Char >= L'0' && Char <= L'9') || (Char >= L'A' && Char <= L'F') || (Char >= L'a' && Char <= L'f'));\r
+  return (BOOLEAN) ((Char >= L'0' && Char <= L'9') || (Char >= L'A' && Char <= L'F'));\r
 }\r
 \r
 /**\r
index 8f7126e6aea6411e5d784a9073660aabb2e0a492..80dc6341adcf192d15546e99dd2c4107a730416c 100644 (file)
@@ -678,17 +678,17 @@ EFI_GUID *mUefiDefinedGuid[] = {
 };\r
 \r
 /**\r
-  Check if a Unicode character is a hexadecimal character.\r
+  Check if a Unicode character is an upper case hexadecimal character.\r
 \r
-  This function checks if a Unicode character is a\r
-  hexadecimal character.  The valid hexadecimal character is\r
-  L'0' to L'9', L'a' to L'f', or L'A' to L'F'.\r
+  This function checks if a Unicode character is an upper case\r
+  hexadecimal character.  The valid upper case hexadecimal character is\r
+  L'0' to L'9', or L'A' to L'F'.\r
 \r
 \r
   @param[in] Char       The character to check against.\r
 \r
-  @retval TRUE          If the Char is a hexadecmial character.\r
-  @retval FALSE         If the Char is not a hexadecmial character.\r
+  @retval TRUE          If the Char is an upper case hexadecmial character.\r
+  @retval FALSE         If the Char is not an upper case hexadecmial character.\r
 \r
 **/\r
 BOOLEAN\r
@@ -697,7 +697,7 @@ VarCheckUefiIsHexaDecimalDigitCharacter (
   IN CHAR16             Char\r
   )\r
 {\r
-  return (BOOLEAN) ((Char >= L'0' && Char <= L'9') || (Char >= L'A' && Char <= L'F') || (Char >= L'a' && Char <= L'f'));\r
+  return (BOOLEAN) ((Char >= L'0' && Char <= L'9') || (Char >= L'A' && Char <= L'F'));\r
 }\r
 \r
 /**\r