diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-16 09:36:33 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-16 09:36:33 +0000 |
commit | e94358a3fe824986cfaa777690170f26aa5a8200 (patch) | |
tree | e87305565825360c34a23bce67b84dc4c6274c0b /MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | |
parent | 63e4dba96ab826bfcd51a98f551c103bc3d3ba3b (diff) | |
download | edk2-e94358a3fe824986cfaa777690170f26aa5a8200.zip edk2-e94358a3fe824986cfaa777690170f26aa5a8200.tar.gz edk2-e94358a3fe824986cfaa777690170f26aa5a8200.tar.bz2 |
Use two PCDs to replace _DISABLE_UNUSED_HII_PROTOCOLS_ macro.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5498 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c')
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 61 |
1 files changed, 36 insertions, 25 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index d7ae310..73c4e0f 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -25,8 +25,6 @@ Revision History #include "HiiDatabase.h"
-#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_
-
/**
Calculate the number of Unicode characters of the incoming Configuration string,
not including NULL terminator.
@@ -447,8 +445,6 @@ OutputConfigBody ( }
-#endif
-
/**
Adjusts the size of a previously allocated buffer.
@@ -660,8 +656,6 @@ HiiConfigRoutingExtractConfig ( OUT EFI_STRING *Results
)
{
-#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_
-
HII_DATABASE_PRIVATE_DATA *Private;
EFI_STRING StringPtr;
EFI_STRING ConfigRequest;
@@ -678,6 +672,15 @@ HiiConfigRoutingExtractConfig ( UINTN RemainSize;
EFI_STRING TmpPtr;
+ //
+ // For size reduction, please define PcdSupportFullConfigRoutingProtocol
+ // as FALSE. But this renders the system to not 100% compliant with
+ // UEFI 2.1. Use this with caution.
+ //
+ if (!FeaturePcdGet (PcdSupportFullConfigRoutingProtocol)) {
+ return EFI_UNSUPPORTED;
+ }
+
if (This == NULL || Progress == NULL || Results == NULL) {
return EFI_INVALID_PARAMETER;
}
@@ -826,9 +829,6 @@ HiiConfigRoutingExtractConfig ( }
return EFI_SUCCESS;
-#else
- return EFI_UNSUPPORTED;
-#endif
}
@@ -862,8 +862,6 @@ HiiConfigRoutingExportConfig ( OUT EFI_STRING *Results
)
{
-#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_
-
EFI_STATUS Status;
HII_DATABASE_PRIVATE_DATA *Private;
LIST_ENTRY StorageListHdr;
@@ -881,6 +879,15 @@ HiiConfigRoutingExportConfig ( EFI_STRING AccessResults;
UINTN TmpSize;
+ //
+ // For size reduction, please define PcdSupportFullConfigRoutingProtocol
+ // as FALSE. But this renders the system to not 100% compliant with
+ // UEFI 2.1. Use this with caution.
+ //
+ if (!FeaturePcdGet (PcdSupportFullConfigRoutingProtocol)) {
+ return EFI_UNSUPPORTED;
+ }
+
if (This == NULL || Results == NULL) {
return EFI_INVALID_PARAMETER;
}
@@ -1050,9 +1057,6 @@ HiiConfigRoutingExportConfig ( }
return EFI_SUCCESS;
-#else
- return EFI_UNSUPPORTED;
-#endif
}
@@ -1089,8 +1093,6 @@ HiiConfigRoutingRouteConfig ( OUT EFI_STRING *Progress
)
{
-#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_
-
HII_DATABASE_PRIVATE_DATA *Private;
EFI_STRING StringPtr;
EFI_STRING ConfigResp;
@@ -1106,6 +1108,15 @@ HiiConfigRoutingRouteConfig ( UINTN RemainSize;
EFI_STRING TmpPtr;
+ //
+ // For size reduction, please define PcdSupportFullConfigRoutingProtocol
+ // as FALSE. But this renders the system to not 100% compliant with
+ // UEFI 2.1. Use this with caution.
+ //
+ if (!FeaturePcdGet (PcdSupportFullConfigRoutingProtocol)) {
+ return EFI_UNSUPPORTED;
+ }
+
if (This == NULL || Progress == NULL) {
return EFI_INVALID_PARAMETER;
}
@@ -1240,9 +1251,6 @@ HiiConfigRoutingRouteConfig ( }
return EFI_SUCCESS;
-#else
- return EFI_UNSUPPORTED;
-#endif
}
@@ -1761,8 +1769,6 @@ HiiGetAltCfg ( OUT EFI_STRING *AltCfgResp
)
{
-#ifndef _DISABLE_UNUSED_HII_PROTOCOLS_
-
EFI_STATUS Status;
EFI_STRING StringPtr;
EFI_STRING HdrStart;
@@ -1778,6 +1784,15 @@ HiiGetAltCfg ( BOOLEAN NameFlag;
BOOLEAN PathFlag;
+ //
+ // For size reduction, please define PcdSupportFullConfigRoutingProtocol
+ // as FALSE. But this renders the system to not 100% compliant with
+ // UEFI 2.1. Use this with caution.
+ //
+ if (!FeaturePcdGet (PcdSupportFullConfigRoutingProtocol)) {
+ return EFI_UNSUPPORTED;
+ }
+
HdrStart = NULL;
HdrEnd = NULL;
GuidStr = NULL;
@@ -1945,10 +1960,6 @@ Exit: return Status;
-#else
- return EFI_UNSUPPORTED;
-#endif
-
}
|