VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyApp.c@ 105681

Last change on this file since 105681 was 105670, checked in by vboxsync, 6 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 Functionality specific for standalone UEFI application support.
3
4 This application can provide detailed UEFI variable policy configuration
5 information in the UEFI shell.
6
7 Copyright (c) Microsoft Corporation.
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10**/
11
12#include "VariablePolicy.h"
13
14#include <Library/BaseLib.h>
15#include <Library/HiiLib.h>
16
17extern EFI_HII_HANDLE mVarPolicyShellCommandHiiHandle;
18
19//
20// String token ID of help message text.
21// Shell supports finding the help message in the resource section of an
22// application image if a .MAN file is not found. This global variable is added
23// to make the build tool recognize that the help string is consumed by the user and
24// then the build tool will add the string into the resource section. Thus the
25// application can use '-?' option to show help message in Shell.
26//
27GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID mStringHelpTokenId = STRING_TOKEN (STR_GET_HELP_VAR_POLICY);
28
29/**
30 Entry of the UEFI variable policy application.
31
32 @param ImageHandle The image handle of the process.
33 @param SystemTable The EFI System Table pointer.
34
35 @retval EFI_SUCCESS The application successfully initialized.
36 @retval EFI_ABORTED The application failed to initialize.
37 @retval Others A different error occurred.
38
39**/
40EFI_STATUS
41EFIAPI
42VariablePolicyAppInitialize (
43 IN EFI_HANDLE ImageHandle,
44 IN EFI_SYSTEM_TABLE *SystemTable
45 )
46{
47 EFI_STATUS Status;
48
49 mVarPolicyShellCommandHiiHandle = InitializeHiiPackage (ImageHandle);
50 if (mVarPolicyShellCommandHiiHandle == NULL) {
51 return EFI_ABORTED;
52 }
53
54 Status = (EFI_STATUS)RunVarPolicy (ImageHandle, SystemTable);
55
56 HiiRemovePackages (mVarPolicyShellCommandHiiHandle);
57
58 return Status;
59}
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