]> git.proxmox.com Git - mirror_edk2.git/commitdiff
update
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 28 Apr 2009 02:31:48 +0000 (02:31 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 28 Apr 2009 02:31:48 +0000 (02:31 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8194 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c

index 1fb886accccb52464f5cb7f9b53639bae3e42c3c..faacd218fd24e42cb242dc724d6f86584b9be20a 100644 (file)
@@ -1111,7 +1111,13 @@ EmuSetVariable (
     if ((DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize)) ||                                                       \r
         (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxHardwareErrorVariableSize))) {\r
       return EFI_INVALID_PARAMETER;\r
-    }    \r
+    }\r
+    //\r
+    // According to UEFI spec, HARDWARE_ERROR_RECORD variable name convention should be L"HwErrRecXXXX"\r
+    //\r
+    if (StrnCmp(VariableName, L"HwErrRec", StrLen(L"HwErrRec")) != 0) {\r
+      return EFI_INVALID_PARAMETER;\r
+    }\r
   } else {\r
   //\r
   //  The size of the VariableName, including the Unicode Null in bytes plus\r
@@ -1121,7 +1127,8 @@ EmuSetVariable (
         (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > FixedPcdGet32(PcdMaxVariableSize))) {\r
       return EFI_INVALID_PARAMETER;\r
     }  \r
-  }  \r
+  }\r
+\r
   //\r
   // Check whether the input variable is already existed\r
   //\r