]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/DynamicCommand/TftpDynamicCommand/TftpApp.c
ShellPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ShellPkg / DynamicCommand / TftpDynamicCommand / TftpApp.c
CommitLineData
09610023
RN
1/** @file\r
2 Entrypoint of "tftp" shell standalone application.\r
3\r
4 Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>\r
5 Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>\r
6\r
56ba3746 7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
09610023
RN
8\r
9**/\r
10#include "Tftp.h"\r
11\r
12//\r
13// String token ID of help message text.\r
14// Shell supports to find help message in the resource section of an application image if\r
15// .MAN file is not found. This global variable is added to make build tool recognizes\r
16// that the help string is consumed by user and then build tool will add the string into\r
17// the resource section. Thus the application can use '-?' option to show help message in\r
18// Shell.\r
19//\r
20GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID mStringHelpTokenId = STRING_TOKEN (STR_GET_HELP_TFTP);\r
21\r
22/**\r
23 Entry point of Tftp standalone application.\r
24\r
25 @param ImageHandle The image handle of the process.\r
26 @param SystemTable The EFI System Table pointer.\r
27\r
28 @retval EFI_SUCCESS Tftp command is executed sucessfully.\r
29 @retval EFI_ABORTED HII package was failed to initialize.\r
30 @retval others Other errors when executing tftp command.\r
31**/\r
32EFI_STATUS\r
33EFIAPI\r
34TftpAppInitialize (\r
35 IN EFI_HANDLE ImageHandle,\r
36 IN EFI_SYSTEM_TABLE *SystemTable\r
37 )\r
38{\r
39 EFI_STATUS Status;\r
40 mTftpHiiHandle = InitializeHiiPackage (ImageHandle);\r
41 if (mTftpHiiHandle == NULL) {\r
42 return EFI_ABORTED;\r
43 }\r
44\r
45 Status = (EFI_STATUS)RunTftp (ImageHandle, SystemTable);\r
46 HiiRemovePackages (mTftpHiiHandle);\r
47 return Status;\r
48}\r