From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F1A5F81B5E for ; Tue, 17 Jan 2017 18:50:50 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 17 Jan 2017 18:50:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,247,1477983600"; d="scan'208";a="214605494" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 17 Jan 2017 18:50:50 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 17 Jan 2017 18:50:50 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 17 Jan 2017 18:50:50 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Wed, 18 Jan 2017 10:50:39 +0800 From: "Dong, Eric" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Yao, Jiewen" Thread-Topic: [patch 1/3] MdeModulePkg/FileExplorer: Remove the codes of searching load file protocol Thread-Index: AQHSb72UXtkGadprsUWhI/O0bCFVwKE9i8jw Date: Wed, 18 Jan 2017 02:50:38 +0000 Message-ID: References: <1484546246-54936-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1484546246-54936-1-git-send-email-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch 1/3] MdeModulePkg/FileExplorer: Remove the codes of searching load file protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2017 02:50:51 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong -----Original Message----- From: Bi, Dandan=20 Sent: Monday, January 16, 2017 1:57 PM To: edk2-devel@lists.01.org Cc: Dong, Eric ; Gao, Liming ; Y= ao, Jiewen Subject: [patch 1/3] MdeModulePkg/FileExplorer: Remove the codes of searchi= ng load file protocol https://bugzilla.tianocore.org/show_bug.cgi?id=3D323 FileExplorer no need to search load file protocol to show files. Now remove the codes. Cc: Eric Dong Cc: Liming Gao Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- .../Library/FileExplorerLib/FileExplorer.c | 56 +-----------------= ---- .../Library/FileExplorerLib/FileExplorer.h | 3 +- .../Library/FileExplorerLib/FileExplorerLib.inf | 3 +- 3 files changed, 3 insertions(+), 59 deletions(-) diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c b/MdeModul= ePkg/Library/FileExplorerLib/FileExplorer.c index 41a22aa..9cd366d 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c @@ -1,9 +1,9 @@ /** @file File explorer related functions. =20 -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made availabl= e under the terms and conditions of the BSD License that accompanies this = distribution. The full text of the license may be found at http://opensource.org/licens= es/bsd-license.php. =20 @@ -697,23 +697,20 @@ EFI_STATUS LibFindFileSystem ( VOID ) { UINTN NoSimpleFsHandles; - UINTN NoLoadFileHandles; EFI_HANDLE *SimpleFsHandle; - EFI_HANDLE *LoadFileHandle; UINT16 *VolumeLabel; UINTN Index; EFI_STATUS Status; MENU_ENTRY *MenuEntry; FILE_CONTEXT *FileContext; UINTN OptionNumber; EFI_FILE_SYSTEM_VOLUME_LABEL *Info; =20 NoSimpleFsHandles =3D 0; - NoLoadFileHandles =3D 0; OptionNumber =3D 0; =20 // // Locate Handles that support Simple File System protocol // @@ -794,61 +791,10 @@ LibFindFileSystem ( =20 if (NoSimpleFsHandles !=3D 0) { FreePool (SimpleFsHandle); } =20 - // - // Searching for handles that support Load File protocol - // - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiLoadFileProtocolGuid, - NULL, - &NoLoadFileHandles, - &LoadFileHandle - ); - - if (!EFI_ERROR (Status)) { - for (Index =3D 0; Index < NoLoadFileHandles; Index++) { - MenuEntry =3D LibCreateMenuEntry (); - if (NULL =3D=3D MenuEntry) { - FreePool (LoadFileHandle); - return EFI_OUT_OF_RESOURCES; - } - - FileContext =3D (FILE_CONTEXT *) MenuEntry->VariableContext; - FileContext->DeviceHandle =3D LoadFileHandle[Index]; - FileContext->IsRoot =3D TRUE; - - FileContext->DevicePath =3D DevicePathFromHandle (FileContext->Devic= eHandle); - FileContext->FileName =3D LibDevicePathToStr (FileContext->DevicePat= h); - - MenuEntry->HelpString =3D LibDevicePathToStr (FileContext->DevicePat= h); - MenuEntry->DisplayString =3D AllocateZeroPool (MAX_CHAR); - ASSERT (MenuEntry->DisplayString !=3D NULL); - UnicodeSPrint ( - MenuEntry->DisplayString, - MAX_CHAR, - L"Load File [%s]", - MenuEntry->HelpString - ); - MenuEntry->DisplayStringToken =3D HiiSetString ( - gFileExplorerPrivate.FeHiiHandl= e, - 0, - MenuEntry->DisplayString, - NULL - ); - - OptionNumber++; - InsertTailList (&gFileExplorerPrivate.FsOptionMenu->Head, &MenuEntry= ->Link); - } - } - - if (NoLoadFileHandles !=3D 0) { - FreePool (LoadFileHandle); - } - gFileExplorerPrivate.FsOptionMenu->MenuNumber =3D OptionNumber; =20 return EFI_SUCCESS; } =20 diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h b/MdeModul= ePkg/Library/FileExplorerLib/FileExplorer.h index fab2052..4b5f601 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h @@ -1,9 +1,9 @@ /** @file File explorer lib. =20 -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials =20 are licensed and made available under the terms and conditions of the BSD = License =20 which accompanies this distribution. The full text of the license may be = found at =20 http://opensource.org/licenses/bsd-license.php = =20 = =20 @@ -21,11 +21,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITH= ER EXPRESS OR IMPLIED. =20 #include #include #include #include -#include #include =20 #include #include #include diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf b/Mde= ModulePkg/Library/FileExplorerLib/FileExplorerLib.inf index 8b4383b..c292aa2 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf @@ -1,9 +1,9 @@ ## @file # library defines a set of interfaces for how to do file explorer. # -# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights=20 +reserved.
# This program and the accompanying materials are licensed and made avail= able under # the terms and conditions of the BSD License that accompanies= this distribution. # The full text of the license may be found at # http://opensource.org/= licenses/bsd-license.php. # @@ -53,11 +53,10 @@ [Guids] gEfiFileSystemVolumeLabelInfoIdGuid ## CONSUMES ## GUID (Indic= ate the information type is volume) gEfiIfrTianoGuid ## CONSUMES ## GUID (Exten= ded IFR Guid Opcode) =20 [Protocols] gEfiSimpleFileSystemProtocolGuid ## CONSUMES - gEfiLoadFileProtocolGuid ## CONSUMES gEfiHiiConfigAccessProtocolGuid ## CONSUMES gEfiFormBrowser2ProtocolGuid ## CONSUMES gEfiDevicePathToTextProtocolGuid ## CONSUMES =20 [Depex.common.DXE_DRIVER] -- 1.9.5.msysgit.1