]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/FileExplorerLib/FileExplorer.c
MdeModulePkg/FileExplorer: Remove the codes of searching load file protocol
[mirror_edk2.git] / MdeModulePkg / Library / FileExplorerLib / FileExplorer.c
index 41a22aa00c08b70c607170dd45ac123b590a045c..9cd366ddf4f859c3c5c7d3928ab2ba97c7c6dc0a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 File explorer related functions.\r
 \r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under\r
 the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
@@ -699,9 +699,7 @@ LibFindFileSystem (
   )\r
 {\r
   UINTN                        NoSimpleFsHandles;\r
-  UINTN                        NoLoadFileHandles;\r
   EFI_HANDLE                   *SimpleFsHandle;\r
-  EFI_HANDLE                   *LoadFileHandle;\r
   UINT16                       *VolumeLabel;\r
   UINTN                        Index;\r
   EFI_STATUS                   Status;\r
@@ -711,7 +709,6 @@ LibFindFileSystem (
   EFI_FILE_SYSTEM_VOLUME_LABEL *Info;\r
 \r
   NoSimpleFsHandles = 0;\r
-  NoLoadFileHandles = 0;\r
   OptionNumber      = 0;\r
 \r
   //\r
@@ -796,57 +793,6 @@ LibFindFileSystem (
     FreePool (SimpleFsHandle);\r
   }\r
 \r
-  //\r
-  // Searching for handles that support Load File protocol\r
-  //\r
-  Status = gBS->LocateHandleBuffer (\r
-                  ByProtocol,\r
-                  &gEfiLoadFileProtocolGuid,\r
-                  NULL,\r
-                  &NoLoadFileHandles,\r
-                  &LoadFileHandle\r
-                  );\r
-\r
-  if (!EFI_ERROR (Status)) {\r
-    for (Index = 0; Index < NoLoadFileHandles; Index++) {\r
-      MenuEntry = LibCreateMenuEntry ();\r
-      if (NULL == MenuEntry) {\r
-        FreePool (LoadFileHandle);\r
-        return EFI_OUT_OF_RESOURCES;\r
-      }\r
-\r
-      FileContext = (FILE_CONTEXT *) MenuEntry->VariableContext;\r
-      FileContext->DeviceHandle = LoadFileHandle[Index];\r
-      FileContext->IsRoot = TRUE;\r
-\r
-      FileContext->DevicePath = DevicePathFromHandle (FileContext->DeviceHandle);\r
-      FileContext->FileName = LibDevicePathToStr (FileContext->DevicePath);\r
-\r
-      MenuEntry->HelpString = LibDevicePathToStr (FileContext->DevicePath);\r
-      MenuEntry->DisplayString = AllocateZeroPool (MAX_CHAR);\r
-      ASSERT (MenuEntry->DisplayString != NULL);\r
-      UnicodeSPrint (\r
-        MenuEntry->DisplayString,\r
-        MAX_CHAR,\r
-        L"Load File [%s]",\r
-        MenuEntry->HelpString\r
-        );\r
-      MenuEntry->DisplayStringToken = HiiSetString (\r
-                                           gFileExplorerPrivate.FeHiiHandle,\r
-                                           0,\r
-                                           MenuEntry->DisplayString,\r
-                                           NULL\r
-                                           );\r
-\r
-      OptionNumber++;\r
-      InsertTailList (&gFileExplorerPrivate.FsOptionMenu->Head, &MenuEntry->Link);\r
-    }\r
-  }\r
-\r
-  if (NoLoadFileHandles != 0) {\r
-    FreePool (LoadFileHandle);\r
-  }\r
-\r
   gFileExplorerPrivate.FsOptionMenu->MenuNumber = OptionNumber;\r
 \r
   return EFI_SUCCESS;\r