diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-15 08:03:23 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-15 08:03:23 +0000 |
commit | aa75dfeccdd9c88bd64431b1290faf7574854337 (patch) | |
tree | edcebc1aed5fbc6e4fbf969497014e44c48f9041 /MdeModulePkg/Universal/Variable | |
parent | 84213069e942ecee389595d85d698dc2f6a854d8 (diff) | |
download | edk2-platforms-aa75dfeccdd9c88bd64431b1290faf7574854337.tar.xz |
Fix some coding style issues in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9774 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Variable')
-rw-r--r-- | MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 3 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Variable/Pei/Variable.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 12 |
3 files changed, 13 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c index 6bf1d6ec7c..622fe530b3 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c @@ -1363,8 +1363,7 @@ EmuQueryVariableInfo ( This function allocates memory space for variable store area and initializes its attributes.
- @param VariableBase Base of the variable store area created
- @param LastVariableOffset Size of VARIABLE_STORE_HEADER
+ @param VolatileStore Indicates if the variable store is volatile.
**/
EFI_STATUS
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c index b2fa201c74..aa428cac49 100644 --- a/MdeModulePkg/Universal/Variable/Pei/Variable.c +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c @@ -465,7 +465,7 @@ FindVariable ( //
// Record Variable in VariableIndex HOB
//
- if (IndexTable->Length < VARIABLE_INDEX_TABLE_VOLUME && StopRecord != TRUE) {
+ if (IndexTable->Length < VARIABLE_INDEX_TABLE_VOLUME && !StopRecord) {
Offset = (UINT32)((UINTN)Variable - (UINTN)LastVariable);
//
// The distance of two neighbouring VAR_ADDED variable is larger than 2^16,
@@ -476,7 +476,7 @@ FindVariable ( StopRecord = TRUE;
}
- if (StopRecord != TRUE) {
+ if (!StopRecord) {
IndexTable->Index[IndexTable->Length++] = (UINT16) Offset;
}
LastVariable = Variable;
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 4f0ea3c4b7..50c1cca82a 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -2215,7 +2215,7 @@ ReclaimForOS( /**
Initializes variable store area for non-volatile and volatile variable.
- @param SystemTable The pointer of EFI_SYSTEM_TABLE.
+ @param FvbProtocol Pointer to an instance of EFI Firmware Volume Block Protocol.
@retval EFI_SUCCESS Function successfully executed.
@retval EFI_OUT_OF_RESOURCES Fail to allocate enough memory resource.
@@ -2240,6 +2240,7 @@ VariableCommonInitialize ( UINT64 VariableStoreLength;
EFI_EVENT ReadyToBootEvent;
UINTN ScratchSize;
+ UINTN VariableSize;
Status = EFI_SUCCESS;
//
@@ -2353,7 +2354,6 @@ VariableCommonInitialize ( Status = EFI_SUCCESS;
while (IsValidVariableHeader (NextVariable)) {
- UINTN VariableSize = 0;
VariableSize = NextVariable->NameSize + NextVariable->DataSize + sizeof (VARIABLE_HEADER);
if ((NextVariable->Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) {
mVariableModuleGlobal->HwErrVariableTotalSize += HEADER_ALIGN (VariableSize);
@@ -2449,6 +2449,14 @@ VariableClassAddressChangeEvent ( EfiConvertPointer (0x0, (VOID **) &mVariableModuleGlobal);
}
+/**
+ Firmware Volume Block Protocol notification event handler.
+
+ Discover NV Variable Store and install Variable Arch Protocol.
+
+ @param[in] Event Event whose notification function is being invoked.
+ @param[in] Context Pointer to the notification function's context.
+**/
VOID
EFIAPI
FvbNotificationEvent (
|