summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.c
diff options
context:
space:
mode:
authorJaben Carsey <jaben.carsey@intel.com>2014-09-10 20:55:37 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-10 20:55:37 +0000
commitfba9b6ba24bbbed0666f4e184c95f6b15a581d49 (patch)
tree3b5aad6fe6046f2a658707c822644852efc0bebf /ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.c
parent7b01f0f312247afbbeb08880670ae8db81c637cf (diff)
downloadedk2-platforms-fba9b6ba24bbbed0666f4e184c95f6b15a581d49.tar.xz
ShellPkg: Use the new library for "bcfg" command
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Chris Phillips <chrisp@hp.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> Reviewed by: Tapan Shah <tapandshah@hp.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16093 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.c')
-rw-r--r--ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.c36
1 files changed, 3 insertions, 33 deletions
diff --git a/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.c b/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.c
index b7f0878b73..e26a86283e 100644
--- a/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.c
+++ b/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.c
@@ -12,24 +12,7 @@
**/
-#include "UefiShellInstall1CommandsLib.h"
-
-STATIC CONST CHAR16 mFileName[] = L"ShellCommands";
-EFI_HANDLE gShellInstall1HiiHandle = NULL;
-
-/**
- Function to get the filename with help context if HII will not be used.
-
- @return The filename with help text in it.
-**/
-CONST CHAR16*
-EFIAPI
-ShellCommandGetManFileNameInstall1 (
- VOID
- )
-{
- return (mFileName);
-}
+#include <Library/BcfgCommandLib.h>
/**
Constructor for the Shell Level 1 Commands library.
@@ -56,17 +39,7 @@ ShellInstall1CommandsLibConstructor (
return (EFI_SUCCESS);
}
- gShellInstall1HiiHandle = HiiAddPackages (&gShellInstall1HiiGuid, gImageHandle, UefiShellInstall1CommandsLibStrings, NULL);
- if (gShellInstall1HiiHandle == NULL) {
- return (EFI_DEVICE_ERROR);
- }
-
- //
- // install our shell command handlers that are always installed
- //
- ShellCommandRegisterCommandName(L"bcfg", ShellCommandRunBcfgInstall , ShellCommandGetManFileNameInstall1, 0, L"Install", FALSE, gShellInstall1HiiHandle, STRING_TOKEN(STR_GET_HELP_BCFG));
-
- return (EFI_SUCCESS);
+ return (BcfgLibraryRegisterBcfgCommand(ImageHandle, SystemTable, L"Install1"));
}
/**
@@ -82,8 +55,5 @@ ShellInstall1CommandsLibDestructor (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
- if (gShellInstall1HiiHandle != NULL) {
- HiiRemovePackages(gShellInstall1HiiHandle);
- }
- return (EFI_SUCCESS);
+ return (BcfgLibraryUnregisterBcfgCommand(ImageHandle, SystemTable));
}