summaryrefslogtreecommitdiffstats
path: root/DuetPkg/FSVariable/FSVariable.c
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-30 09:08:49 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-30 09:08:49 +0000
commite5653d946d3e9ade00365950826268a9d4afdf91 (patch)
treecb5514a4fa8cdae7e28fc0f61733d2c9888b555e /DuetPkg/FSVariable/FSVariable.c
parent22f5582e62c270b37969d91ff8e2afcc58f7cbcd (diff)
downloadedk2-e5653d946d3e9ade00365950826268a9d4afdf91.tar.gz
edk2-e5653d946d3e9ade00365950826268a9d4afdf91.tar.bz2
edk2-e5653d946d3e9ade00365950826268a9d4afdf91.zip
Fix some bugs in FSVariable and BdsPlatform for duet platform.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5155 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg/FSVariable/FSVariable.c')
-rw-r--r--DuetPkg/FSVariable/FSVariable.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c
index cfe76ccc95..0977887818 100644
--- a/DuetPkg/FSVariable/FSVariable.c
+++ b/DuetPkg/FSVariable/FSVariable.c
@@ -743,7 +743,6 @@ Returns:
return EFI_INVALID_PARAMETER;
}
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
//
// The size of the VariableName, including the Unicode Null in bytes plus
// the DataSize is limited to maximum size of MAX_HARDWARE_ERROR_VARIABLE_SIZE (32K)
@@ -760,16 +759,7 @@ Returns:
return EFI_INVALID_PARAMETER;
}
}
-#else
- //
- // The size of the VariableName, including the Unicode Null in bytes plus
- // the DataSize is limited to maximum size of MAX_VARIABLE_SIZE (1024) bytes.
- //
- if ((DataSize > MAX_VARIABLE_SIZE) ||
- (sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > MAX_VARIABLE_SIZE)) {
- return EFI_INVALID_PARAMETER;
- }
-#endif
+
//
// Check whether the input variable is already existed
//
@@ -984,7 +974,6 @@ Returns:
return EFI_SUCCESS;
}
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
EFI_STATUS
EFIAPI
QueryVariableInfo (
@@ -1028,21 +1017,12 @@ Returns:
return EFI_INVALID_PARAMETER;
}
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
if((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == 0) {
//
// Make sure the Attributes combination is supported by the platform.
//
return EFI_UNSUPPORTED;
}
-#else
- if((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS)) == 0) {
- //
- // Make sure the Attributes combination is supported by the platform.
- //
- return EFI_UNSUPPORTED;
- }
-#endif
else if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == EFI_VARIABLE_RUNTIME_ACCESS) {
//
// Make sure if runtime bit is set, boot service bit is set also.
@@ -1070,14 +1050,12 @@ Returns:
//
*MaximumVariableSize = MAX_VARIABLE_SIZE - sizeof (VARIABLE_HEADER);
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
//
// Harware error record variable needs larger size.
//
if ((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {
*MaximumVariableSize = MAX_HARDWARE_ERROR_VARIABLE_SIZE - sizeof (VARIABLE_HEADER);
}
-#endif
//
// Point to the starting address of the variables.
@@ -1124,7 +1102,6 @@ Returns:
return EFI_SUCCESS;
}
-#endif
EFI_STATUS
EFIAPI
@@ -1299,9 +1276,7 @@ Returns:
SystemTable->RuntimeServices->GetNextVariableName = GetNextVariableName;
SystemTable->RuntimeServices->SetVariable = SetVariable;
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
SystemTable->RuntimeServices->QueryVariableInfo = QueryVariableInfo;
-#endif
//
// Now install the Variable Runtime Architectural Protocol on a new handle