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
This commit is contained in:
Jaben Carsey
2014-09-10 20:55:37 +00:00
committed by jcarsey
parent 7b01f0f312
commit fba9b6ba24
9 changed files with 10 additions and 2992 deletions

View File

@ -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));
}