VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/DynamicCommand/HttpDynamicCommand/HttpApp.c@ 105670

Last change on this file since 105670 was 105670, checked in by vboxsync, 4 months ago

Devices/EFI/FirmwareNew: Merge edk2-stable-202405 and make it build on aarch64, bugref:4643

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1/** @file
2 Entrypoint of "http" shell standalone application.
3
4 Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>
5 Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>
6 Copyright (c) 2020, Broadcom. All rights reserved.<BR>
7
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10**/
11#include "Http.h"
12
13/*
14 * String token ID of help message text.
15 * Shell supports to find help message in the resource section of an
16 * application image if * .MAN file is not found.
17 * This global variable is added to make build tool recognizes
18 * that the help string is consumed by user and then build tool will
19 * add the string into the resource section.
20 * Thus the application can use '-?' option to show help message in Shell.
21 */
22GLOBAL_REMOVE_IF_UNREFERENCED
23EFI_STRING_ID mStringHelpTokenId = STRING_TOKEN (STR_GET_HELP_HTTP);
24
25/**
26 Entry point of Http standalone application.
27
28 @param ImageHandle The image handle of the process.
29 @param SystemTable The EFI System Table pointer.
30
31 @retval EFI_SUCCESS Http command is executed successfully.
32 @retval EFI_ABORTED HII package was failed to initialize.
33 @retval others Other errors when executing http command.
34**/
35EFI_STATUS
36EFIAPI
37HttpAppInitialize (
38 IN EFI_HANDLE ImageHandle,
39 IN EFI_SYSTEM_TABLE *SystemTable
40 )
41{
42 EFI_STATUS Status;
43 SHELL_STATUS ShellStatus;
44
45 mHttpHiiHandle = InitializeHiiPackage (ImageHandle);
46 if (mHttpHiiHandle == NULL) {
47 return EFI_ABORTED;
48 }
49
50 Status = EFI_SUCCESS;
51
52 ShellStatus = RunHttp (ImageHandle, SystemTable);
53
54 HiiRemovePackages (mHttpHiiHandle);
55
56 if (Status != SHELL_SUCCESS) {
57 Status = ENCODE_ERROR (ShellStatus);
58 }
59
60 return Status;
61}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette