diff options
-rw-r--r-- | MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 33 | ||||
-rw-r--r-- | MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf | 7 |
2 files changed, 25 insertions, 15 deletions
diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c index bcf3ec97f6..9714dbcf5d 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 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, 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
@@ -1442,7 +1442,12 @@ FileExplorerLibConstructor ( &gFileExplorerPrivate.FeConfigAccess,
NULL
);
- ASSERT_EFI_ERROR (Status);
+ if (Status == EFI_ALREADY_STARTED) {
+ return EFI_SUCCESS;
+ }
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
//
// Post our File Explorer VFR binary to the HII database.
@@ -1486,17 +1491,19 @@ FileExplorerLibDestructor ( ASSERT (gHiiVendorDevicePath != NULL);
- Status = gBS->UninstallMultipleProtocolInterfaces (
- gFileExplorerPrivate.FeDriverHandle,
- &gEfiDevicePathProtocolGuid,
- gHiiVendorDevicePath,
- &gEfiHiiConfigAccessProtocolGuid,
- &gFileExplorerPrivate.FeConfigAccess,
- NULL
- );
- ASSERT_EFI_ERROR (Status);
-
- HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle);
+ if (gFileExplorerPrivate.FeDriverHandle != NULL) {
+ Status = gBS->UninstallMultipleProtocolInterfaces (
+ gFileExplorerPrivate.FeDriverHandle,
+ &gEfiDevicePathProtocolGuid,
+ gHiiVendorDevicePath,
+ &gEfiHiiConfigAccessProtocolGuid,
+ &gFileExplorerPrivate.FeConfigAccess,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle);
+ }
FreePool (gHiiVendorDevicePath);
diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf b/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf index 2770ca98a5..a97fd4a83b 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 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2011 - 2016, 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
@@ -57,4 +57,7 @@ gEfiLoadFileProtocolGuid ## CONSUMES
gEfiHiiConfigAccessProtocolGuid ## CONSUMES
gEfiFormBrowser2ProtocolGuid ## CONSUMES
- gEfiDevicePathToTextProtocolGuid ## CONSUMES
\ No newline at end of file + gEfiDevicePathToTextProtocolGuid ## CONSUMES
+
+[Depex.common.DXE_DRIVER, Depex.common.DXE_RUNTIME_DRIVER, Depex.common.DXE_SAL_DRIVER, Depex.common.DXE_SMM_DRIVER]
+ gEfiFormBrowser2ProtocolGuid AND gEfiHiiDatabaseProtocolGuid
\ No newline at end of file |