1 | /** @file
|
---|
2 | Main file for NULL named library for install1 shell command functions.
|
---|
3 |
|
---|
4 | Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
---|
5 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
6 |
|
---|
7 | **/
|
---|
8 |
|
---|
9 | #include <Library/BcfgCommandLib.h>
|
---|
10 |
|
---|
11 | /**
|
---|
12 | Constructor for the Shell Level 1 Commands library.
|
---|
13 |
|
---|
14 | Install the handlers for level 1 UEFI Shell 2.0 commands.
|
---|
15 |
|
---|
16 | @param ImageHandle the image handle of the process
|
---|
17 | @param SystemTable the EFI System Table pointer
|
---|
18 |
|
---|
19 | @retval EFI_SUCCESS the shell command handlers were installed sucessfully
|
---|
20 | @retval EFI_UNSUPPORTED the shell level required was not found.
|
---|
21 | **/
|
---|
22 | EFI_STATUS
|
---|
23 | EFIAPI
|
---|
24 | ShellInstall1CommandsLibConstructor (
|
---|
25 | IN EFI_HANDLE ImageHandle,
|
---|
26 | IN EFI_SYSTEM_TABLE *SystemTable
|
---|
27 | )
|
---|
28 | {
|
---|
29 | //
|
---|
30 | // check our bit of the profiles mask
|
---|
31 | //
|
---|
32 | if ((PcdGet8(PcdShellProfileMask) & BIT2) == 0) {
|
---|
33 | return (EFI_SUCCESS);
|
---|
34 | }
|
---|
35 |
|
---|
36 | return (BcfgLibraryRegisterBcfgCommand(ImageHandle, SystemTable, L"Install1"));
|
---|
37 | }
|
---|
38 |
|
---|
39 | /**
|
---|
40 | Destructor for the library. free any resources.
|
---|
41 |
|
---|
42 | @param ImageHandle The image handle of the process.
|
---|
43 | @param SystemTable The EFI System Table pointer.
|
---|
44 | **/
|
---|
45 | EFI_STATUS
|
---|
46 | EFIAPI
|
---|
47 | ShellInstall1CommandsLibDestructor (
|
---|
48 | IN EFI_HANDLE ImageHandle,
|
---|
49 | IN EFI_SYSTEM_TABLE *SystemTable
|
---|
50 | )
|
---|
51 | {
|
---|
52 | return (BcfgLibraryUnregisterBcfgCommand(ImageHandle, SystemTable));
|
---|
53 | }
|
---|