mirror of https://github.com/acidanthera/audk.git
1) If DebugAssertEnabled is TRUE, we still need to provide the GET size
function as GetWorker and SetWoker need this function to do ASSERT. 2) 0 should be returned if GetSize is not supported. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1696 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0f769af196
commit
5f5f28c90d
|
@ -174,8 +174,13 @@ PeiPcdGetSize (
|
|||
UINTN Size;
|
||||
UINTN MaxSize;
|
||||
|
||||
if (!FeaturePcdGet(PcdPeiPcdDatabaseGetSizeEnabled)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
//
|
||||
// If DebugAssertEnabled is TRUE, we still need to provide the GET size
|
||||
// function as GetWorker and SetWoker need this function to do ASSERT.
|
||||
//
|
||||
if ((!FeaturePcdGet(PcdPeiPcdDatabaseGetSizeEnabled)) &&
|
||||
(!DebugAssertEnabled ())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
PeiPcdDb = GetPcdDatabase ();
|
||||
|
@ -286,7 +291,7 @@ PeiPcdGetSizeEx (
|
|||
)
|
||||
{
|
||||
if ((!FeaturePcdGet (PcdPeiPcdDatabaseGetSizeEnabled)) || !FeaturePcdGet (PcdPeiPcdDatabaseExEnabled)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return PeiPcdGetSize (GetExPcdTokenNumber (Guid, ExTokenNumber));
|
||||
|
|
Loading…
Reference in New Issue