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