]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/DynamicCommand/DpDynamicCommand/DpApp.c
ShellPkg/Dp: Make the help info align with code
[mirror_edk2.git] / ShellPkg / DynamicCommand / DpDynamicCommand / DpApp.c
CommitLineData
92034c4c
RN
1/** @file\r
2 Entrypoint of "dp" shell standalone application.\r
3\r
4 Copyright (c) 2017, Intel Corporation. All rights reserved. <BR>\r
5\r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15#include "Dp.h"\r
16\r
17//\r
18// String token ID of help message text.\r
19// Shell supports to find help message in the resource section of an application image if\r
20// .MAN file is not found. This global variable is added to make build tool recognizes\r
21// that the help string is consumed by user and then build tool will add the string into\r
22// the resource section. Thus the application can use '-?' option to show help message in\r
23// Shell.\r
24//\r
25GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID mStringHelpTokenId = STRING_TOKEN (STR_GET_HELP_DP);\r
26\r
27/**\r
28 Entry point of Tftp standalone application.\r
29\r
30 @param ImageHandle The image handle of the process.\r
31 @param SystemTable The EFI System Table pointer.\r
32\r
33 @retval EFI_SUCCESS Tftp command is executed sucessfully.\r
34 @retval EFI_ABORTED HII package was failed to initialize.\r
35 @retval others Other errors when executing tftp command.\r
36**/\r
37EFI_STATUS\r
38EFIAPI\r
39DpAppInitialize (\r
40 IN EFI_HANDLE ImageHandle,\r
41 IN EFI_SYSTEM_TABLE *SystemTable\r
42 )\r
43{\r
44 EFI_STATUS Status;\r
45 mDpHiiHandle = InitializeHiiPackage (ImageHandle);\r
46 if (mDpHiiHandle == NULL) {\r
47 return EFI_ABORTED;\r
48 }\r
49\r
50 Status = (EFI_STATUS)RunDp (ImageHandle, SystemTable);\r
51 HiiRemovePackages (mDpHiiHandle);\r
52 return Status;\r
53}\r