The redundant functions which are never called have been
removed. They are GetProducerString,ChangeVariableDevicePath,
EfiReallocatePool,Var_UpdateAllConsoleOption and BOpt_IsEfiApp.
https://bugzilla.tianocore.org/show_bug.cgi?id=1063
Cc: Liming Gao
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei
---
.../Universal/BdsDxe/BootMaint/BmLib.c| 36 ---
.../Universal/BdsDxe/BootMaint/BootMaint.h| 53 ---
.../Universal/BdsDxe/BootMaint/BootOption.c | 62 --
.../BdsDxe/BootMaint/ConsoleOption.c | 64 ---
.../Universal/BdsDxe/BootMaint/Variable.c | 63 --
.../Universal/BdsDxe/FrontPage.c | 29 -
.../Universal/BdsDxe/FrontPage.h | 17 -
7 files changed, 324 deletions(-)
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
index d27113c015..a7ff449557 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
@@ -323,42 +323,6 @@ EfiDevicePathInstanceCount (
return Count;
}
-/**
- Adjusts the size of a previously allocated buffer.
-
-
- @param OldPool - A pointer to the buffer whose size is being
adjusted.
- @param OldSize - The size of the current buffer.
- @param NewSize - The size of the new buffer.
-
- @return The newly allocated buffer.
- @retval NULL Allocation failed.
-
-**/
-VOID *
-EfiReallocatePool (
- IN VOID *OldPool,
- IN UINTNOldSize,
- IN UINTNNewSize
- )
-{
- VOID *NewPool;
-
- NewPool = NULL;
- if (NewSize != 0) {
-NewPool = AllocateZeroPool (NewSize);
- }
-
- if (OldPool != NULL) {
-if (NewPool != NULL) {
- CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
-}
-
-FreePool (OldPool);
- }
-
- return NewPool;
-}
/**
Get a string from the Data Hub record based on
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
index bdd22c8e75..b3b905d7ef 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
@@ -548,22 +548,6 @@ BOpt_IsEfiImageName (
IN UINT16 *FileName
);
-/**
-
- Check whether current FileName point to a valid Efi Application
-
- @param Dir Pointer to current Directory
- @param FileName Pointer to current File name.
-
- @retval TRUE Is a valid Efi Application
- @retval FALSE not a valid Efi Application
-
-**/
-BOOLEAN
-BOpt_IsEfiApp (
- IN EFI_FILE_HANDLE Dir,
- IN UINT16 *FileName
- );
/**
@@ -702,18 +686,6 @@ FreeAllConsoles (
VOID
);
-/**
- Update the device path that describing a terminal device
- based on the new BaudRate, Data Bits, parity and Stop Bits
- set.
-
- @param DevicePath The devicepath protocol instance wanted to be updated.
-
-**/
-VOID
-ChangeVariableDevicePath (
- IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath
- );
/**
Update the multi-instance device path of Terminal Device based on
@@ -875,15 +847,6 @@ Var_UpdateErrorOutOption (
VOID
);
-/**
- Update the device path of "ConOut", "ConIn" and "ErrOut" based on the new
BaudRate, Data Bits,
- parity and stop Bits set.
-
-**/
-VOID
-Var_UpdateAllConsoleOption (
- VOID
- );
/**
This function update the "BootNext" EFI Variable. If there is no "BootNex"
specified in BMM,
@@ -1154,22 +1117,6 @@ EfiLibFileInfo (
IN EFI_FILE_HANDLE FHand
);
-/**
- Adjusts the size of a previously allocated buffer.
-
- @param OldPool A pointer to the buffer whose size is being adjusted.
- @param OldSize The size of the current buffer.
- @param NewSize The size of the new buffer.
-
- @return The newly allocated buffer. if NULL, allocation failed.
-
-**/
-VOID*
-EfiReallocatePool (
- IN VOID *OldPool,
- IN UINTNOldSize,
- IN UINTNNewSize
- );
/**
Function deletes the variable specified by VarName and VarGuid.
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
index 895f13f214..c4a0e17f3b 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
@@ -1192,69 +1192,7 @@ BOpt_IsEfiImageName (
return FALSE;
}
-/**
-
- Check whether current FileName point to a valid Efi Application
-
- @param Dir Pointer to current Directory
- @param FileName Pointer to current File name.
-
- @retval TRUE Is a valid Efi Application
- @retval FALSE not a valid Efi Application
-
-**/
-BOOLEAN
-BOpt_IsEfiApp (
- IN EFI_FILE_HANDLE Dir,
- IN UINT