TianoCore EDK2 master
Loading...
Searching...
No Matches
VariablePolicyApp.c
Go to the documentation of this file.
1
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
41EFIAPI
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}
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
Definition: HiiLib.c:253
STATIC EFI_HII_HANDLE InitializeHiiPackage(EFI_HANDLE ImageHandle)
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define GLOBAL_REMOVE_IF_UNREFERENCED
Definition: Base.h:48
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define STRING_TOKEN(t)
VOID * EFI_HII_HANDLE
SHELL_STATUS EFIAPI RunVarPolicy(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI VariablePolicyAppInitialize(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)