Update code to follow coding style. Mainly change about:

1. Remove duplicate lib
2. Refine the name for enum member.
Signed-off-by: ydong10
Reviewed-by: lgao4
Reviewed-by: gdong1
Reviewed-by: vanjeff


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12767 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2011-11-23 09:20:57 +00:00
parent fc8ff20ff2
commit eb5e7d3e7a
4 changed files with 11 additions and 13 deletions

View File

@ -73,7 +73,6 @@
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
PalLib|MdePkg/Library/BasePalLibNull/BasePalLibNull.inf
[LibraryClasses.common.PEIM]

View File

@ -1250,7 +1250,7 @@ ParseIfrData (
//
// Numeric minimum value will be used as default value when no default is specified.
//
DefaultData.Type = DEFAULT_VALUE_FROM_DEFAULT;
DefaultData.Type = DefaultValueFromDefault;
switch (IfrOneOf->Flags & EFI_IFR_NUMERIC_SIZE) {
case EFI_IFR_NUMERIC_SIZE_1:
DefaultData.Value = (UINT64) IfrOneOf->data.u8.MinValue;
@ -1404,13 +1404,13 @@ ParseIfrData (
//
// When flag is set, defautl value is TRUE.
//
DefaultData.Type = DEFAULT_VALUE_FROM_FLAG;
DefaultData.Type = DefaultValueFromFlag;
DefaultData.Value = 1;
} else {
//
// When flag is not set, defautl value is FASLE.
//
DefaultData.Type = DEFAULT_VALUE_FROM_DEFAULT;
DefaultData.Type = DefaultValueFromDefault;
DefaultData.Value = 0;
}
//
@ -1430,13 +1430,13 @@ ParseIfrData (
//
// When flag is set, defautl value is TRUE.
//
DefaultData.Type = DEFAULT_VALUE_FROM_FLAG;
DefaultData.Type = DefaultValueFromFlag;
DefaultData.Value = 1;
} else {
//
// When flag is not set, defautl value is FASLE.
//
DefaultData.Type = DEFAULT_VALUE_FROM_DEFAULT;
DefaultData.Type = DefaultValueFromDefault;
DefaultData.Value = 0;
}
//
@ -1664,7 +1664,7 @@ ParseIfrData (
// Prepare new DefaultValue
//
DefaultData.Type = DEFAULT_VALUE_FROM_FLAG;
DefaultData.Type = DefaultValueFromFlag;
DefaultData.Value = IfrOneOfOption->Value.u64;
if ((IfrOneOfOption->Flags & EFI_IFR_OPTION_DEFAULT) == EFI_IFR_OPTION_DEFAULT) {
DefaultData.DefaultId = EFI_HII_DEFAULT_CLASS_STANDARD;
@ -1689,7 +1689,7 @@ ParseIfrData (
//
// Prepare new DefaultValue
//
DefaultData.Type = DEFAULT_VALUE_FROM_DEFAULT;
DefaultData.Type = DefaultValueFromDefault;
DefaultData.Value = IfrOneOfOption->Value.u64;
for (LinkData = DefaultIdArray->Entry.ForwardLink; LinkData != &DefaultIdArray->Entry; LinkData = LinkData->ForwardLink) {
DefaultDataPtr = BASE_CR (LinkData, IFR_DEFAULT_DATA, Entry);
@ -1724,7 +1724,7 @@ ParseIfrData (
//
// Prepare new DefaultValue
//
DefaultData.Type = DEFAULT_VALUE_FROM_OPCODE;
DefaultData.Type = DefaultValueFromOpcode;
DefaultData.DefaultId = VarDefaultId;
DefaultData.Value = IfrDefault->Value.u64;

View File

@ -84,9 +84,9 @@ typedef struct {
// Get default value from IFR data.
//
typedef enum {
DEFAULT_VALUE_FROM_DEFAULT = 0, // Get from the minimum or first one when not set default value.
DEFAULT_VALUE_FROM_FLAG, // Get default value from the defalut flag.
DEFAULT_VALUE_FROM_OPCODE // Get default value from default opcode, highest priority.
DefaultValueFromDefault = 0, // Get from the minimum or first one when not set default value.
DefaultValueFromFlag, // Get default value from the defalut flag.
DefaultValueFromOpcode // Get default value from default opcode, highest priority.
} DEFAULT_VALUE_TYPE;
typedef struct {

View File

@ -65,7 +65,6 @@
[LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_SAL_DRIVER,]
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
[LibraryClasses.IPF.DXE_SAL_DRIVER]