summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2017-01-10 13:17:28 +0800
committerHao Wu <hao.a.wu@intel.com>2017-01-19 10:14:34 +0800
commitd9b64abbdf70e42f8e20bd372aaf9605cb20b725 (patch)
tree6102f3d449ba3058ba1db0ff87a8600f0771c478 /MdeModulePkg
parenta08cdd228a3ec593c28e1d445cd92cee8e17535b (diff)
downloadedk2-platforms-d9b64abbdf70e42f8e20bd372aaf9605cb20b725.tar.xz
MdeModulePkg/FileExplorer: Remove the codes of searching load file protocol
https://bugzilla.tianocore.org/show_bug.cgi?id=323 FileExplorer no need to search load file protocol to show files. Now remove the codes. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Library/FileExplorerLib/FileExplorer.c56
-rw-r--r--MdeModulePkg/Library/FileExplorerLib/FileExplorer.h3
-rw-r--r--MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf3
3 files changed, 3 insertions, 59 deletions
diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
index 41a22aa00c..9cd366ddf4 100644
--- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
+++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
@@ -1,7 +1,7 @@
/** @file
File explorer related functions.
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -699,9 +699,7 @@ LibFindFileSystem (
)
{
UINTN NoSimpleFsHandles;
- UINTN NoLoadFileHandles;
EFI_HANDLE *SimpleFsHandle;
- EFI_HANDLE *LoadFileHandle;
UINT16 *VolumeLabel;
UINTN Index;
EFI_STATUS Status;
@@ -711,7 +709,6 @@ LibFindFileSystem (
EFI_FILE_SYSTEM_VOLUME_LABEL *Info;
NoSimpleFsHandles = 0;
- NoLoadFileHandles = 0;
OptionNumber = 0;
//
@@ -796,57 +793,6 @@ LibFindFileSystem (
FreePool (SimpleFsHandle);
}
- //
- // Searching for handles that support Load File protocol
- //
- Status = gBS->LocateHandleBuffer (
- ByProtocol,
- &gEfiLoadFileProtocolGuid,
- NULL,
- &NoLoadFileHandles,
- &LoadFileHandle
- );
-
- if (!EFI_ERROR (Status)) {
- for (Index = 0; Index < NoLoadFileHandles; Index++) {
- MenuEntry = LibCreateMenuEntry ();
- if (NULL == MenuEntry) {
- FreePool (LoadFileHandle);
- return EFI_OUT_OF_RESOURCES;
- }
-
- FileContext = (FILE_CONTEXT *) MenuEntry->VariableContext;
- FileContext->DeviceHandle = LoadFileHandle[Index];
- FileContext->IsRoot = TRUE;
-
- FileContext->DevicePath = DevicePathFromHandle (FileContext->DeviceHandle);
- FileContext->FileName = LibDevicePathToStr (FileContext->DevicePath);
-
- MenuEntry->HelpString = LibDevicePathToStr (FileContext->DevicePath);
- MenuEntry->DisplayString = AllocateZeroPool (MAX_CHAR);
- ASSERT (MenuEntry->DisplayString != NULL);
- UnicodeSPrint (
- MenuEntry->DisplayString,
- MAX_CHAR,
- L"Load File [%s]",
- MenuEntry->HelpString
- );
- MenuEntry->DisplayStringToken = HiiSetString (
- gFileExplorerPrivate.FeHiiHandle,
- 0,
- MenuEntry->DisplayString,
- NULL
- );
-
- OptionNumber++;
- InsertTailList (&gFileExplorerPrivate.FsOptionMenu->Head, &MenuEntry->Link);
- }
- }
-
- if (NoLoadFileHandles != 0) {
- FreePool (LoadFileHandle);
- }
-
gFileExplorerPrivate.FsOptionMenu->MenuNumber = OptionNumber;
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h
index fab20523ad..4b5f601b91 100644
--- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h
+++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h
@@ -1,7 +1,7 @@
/** @file
File explorer lib.
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -23,7 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/DevicePath.h>
#include <Protocol/SimpleFileSystem.h>
#include <Protocol/DevicePathToText.h>
-#include <Protocol/LoadFile.h>
#include <Protocol/FormBrowser2.h>
#include <Library/DebugLib.h>
diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf b/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
index 8b4383b3b9..c292aa2e49 100644
--- a/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
@@ -1,7 +1,7 @@
## @file
# library defines a set of interfaces for how to do file explorer.
#
-# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials are licensed and made available under
# the terms and conditions of the BSD License that accompanies this distribution.
# The full text of the license may be found at
@@ -55,7 +55,6 @@
[Protocols]
gEfiSimpleFileSystemProtocolGuid ## CONSUMES
- gEfiLoadFileProtocolGuid ## CONSUMES
gEfiHiiConfigAccessProtocolGuid ## CONSUMES
gEfiFormBrowser2ProtocolGuid ## CONSUMES
gEfiDevicePathToTextProtocolGuid ## CONSUMES