summaryrefslogtreecommitdiff
path: root/DuetPkg/FSVariable/FSVariable.c
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-27 05:35:08 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-27 05:35:08 +0000
commit3709c4cd5bc3956fee59f31bdd1b7dc5b61a039a (patch)
tree2787bfad81002d6b2b5139e79889dc69e488b835 /DuetPkg/FSVariable/FSVariable.c
parentaa19fa57db2a32a2cf41c6e1dee033129840ff1a (diff)
downloadedk2-platforms-3709c4cd5bc3956fee59f31bdd1b7dc5b61a039a.tar.xz
1. delete Include/Guid/VariableInfo.h
2. move VariableFormat.h into GUID directory and change the “Signature” field of the VARIABLE_STORE_HEADER to gEfiVariableGuid value. 3. merging VARIABLE_INFO_ENTRY structure into the new Include/Guid/VariableFormat.h 4. change gEfiVariableInfoGuid into gEfiVariableGuid. 5. modify FDF files to use new guid value instead of the original signature. 6. all code related to signature is changed to use guid value. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7728 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/FSVariable/FSVariable.c')
-rw-r--r--DuetPkg/FSVariable/FSVariable.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c
index 18b93c08cc..d20b3a78e3 100644
--- a/DuetPkg/FSVariable/FSVariable.c
+++ b/DuetPkg/FSVariable/FSVariable.c
@@ -22,7 +22,7 @@ Abstract:
#include "FSVariable.h"
VARIABLE_STORE_HEADER mStoreHeaderTemplate = {
- VARIABLE_STORE_SIGNATURE,
+ gEfiVariableGuid,
VOLATILE_VARIABLE_STORE_SIZE,
VARIABLE_STORE_FORMATTED,
VARIABLE_STORE_HEALTHY,
@@ -100,15 +100,18 @@ Returns:
--*/
{
- if ((VarStoreHeader->Signature == mStoreHeaderTemplate.Signature) &&
+ if (CompareGuid (&VarStoreHeader->Signature, &mStoreHeaderTemplate.Signature) &&
(VarStoreHeader->Format == mStoreHeaderTemplate.Format) &&
(VarStoreHeader->State == mStoreHeaderTemplate.State)
) {
return EfiValid;
- } else if (VarStoreHeader->Signature == VAR_DEFAULT_VALUE_32 &&
- VarStoreHeader->Size == VAR_DEFAULT_VALUE_32 &&
- VarStoreHeader->Format == VAR_DEFAULT_VALUE &&
- VarStoreHeader->State == VAR_DEFAULT_VALUE
+ } else if (((UINT32 *)(&VarStoreHeader->Signature))[0] == VAR_DEFAULT_VALUE_32 &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[1] == VAR_DEFAULT_VALUE_32 &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[2] == VAR_DEFAULT_VALUE_32 &&
+ ((UINT32 *)(&VarStoreHeader->Signature))[3] == VAR_DEFAULT_VALUE_32 &&
+ VarStoreHeader->Size == VAR_DEFAULT_VALUE_32 &&
+ VarStoreHeader->Format == VAR_DEFAULT_VALUE &&
+ VarStoreHeader->State == VAR_DEFAULT_VALUE
) {
return EfiRaw;