summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2017-01-10 08:17:28 +0300
committerHao Wu <hao.a.wu@intel.com>2017-01-19 05:14:34 +0300
commitd9b64abbdf70e42f8e20bd372aaf9605cb20b725 (patch)
tree6102f3d449ba3058ba1db0ff87a8600f0771c478 /MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
parenta08cdd228a3ec593c28e1d445cd92cee8e17535b (diff)
downloadedk2-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/Library/FileExplorerLib/FileExplorer.c')
-rw-r--r--MdeModulePkg/Library/FileExplorerLib/FileExplorer.c56
1 files changed, 1 insertions, 55 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;