TianoCore EDK2 master
Loading...
Searching...
No Matches
VariablePolicyDynamicCommand.c File Reference

Go to the source code of this file.

Functions

SHELL_STATUS EFIAPI VarPolicyCommandHandler (IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This, IN EFI_SYSTEM_TABLE *SystemTable, IN EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters, IN EFI_SHELL_PROTOCOL *Shell)
 
STATIC CHAR16 *EFIAPI VarPolicyCommandGetHelp (IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This, IN CONST CHAR8 *Language)
 
EFI_STATUS EFIAPI VariablePolicyDynamicCommandEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI VariablePolicyDynamicCommandUnload (IN EFI_HANDLE ImageHandle)
 

Variables

EFI_HII_HANDLE mVarPolicyShellCommandHiiHandle
 
STATIC EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL mVarPolicyDynamicCommand
 

Detailed Description

Functionality specific for dynamic UEFI shell command support.

This command can provide detailed UEFI variable policy configuration information in the UEFI shell.

Copyright (c) Microsoft Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file VariablePolicyDynamicCommand.c.

Function Documentation

◆ VariablePolicyDynamicCommandEntryPoint()

EFI_STATUS EFIAPI VariablePolicyDynamicCommandEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Entry point of the UEFI variable policy dynamic shell command.

Produce the Dynamic Command Protocol to handle the "varpolicy" command.

Parameters
[in]ImageHandleThe image handle of the process.
[in]SystemTableThe EFI System Table pointer.
Return values
EFI_SUCCESSThe "varpolicy" command executed successfully.
EFI_ABORTEDHII package failed to initialize.
othersOther errors when executing "varpolicy" command.

Definition at line 105 of file VariablePolicyDynamicCommand.c.

◆ VariablePolicyDynamicCommandUnload()

EFI_STATUS EFIAPI VariablePolicyDynamicCommandUnload ( IN EFI_HANDLE  ImageHandle)

Unload the dynamic "varpolicy" UEFI Shell command.

Parameters
[in]ImageHandleThe image handle of the process.
Return values
EFI_SUCCESSThe image is unloaded.
OthersFailed to unload the image.

Definition at line 139 of file VariablePolicyDynamicCommand.c.

◆ VarPolicyCommandGetHelp()

STATIC CHAR16 *EFIAPI VarPolicyCommandGetHelp ( IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL This,
IN CONST CHAR8 *  Language 
)

This is the command help handler function pointer callback type. This function is responsible for displaying help information for the associated command.

Parameters
[in]ThisThe instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
[in]LanguageThe pointer to the language string to use.
Returns
string Pool allocated help string, must be freed by caller.

Definition at line 72 of file VariablePolicyDynamicCommand.c.

◆ VarPolicyCommandHandler()

SHELL_STATUS EFIAPI VarPolicyCommandHandler ( IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL This,
IN EFI_SYSTEM_TABLE SystemTable,
IN EFI_SHELL_PARAMETERS_PROTOCOL ShellParameters,
IN EFI_SHELL_PROTOCOL Shell 
)

This is the shell command handler function pointer callback type.

This function handles the command when it is invoked in the shell.

Parameters
[in]ThisThe instance of the EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL.
[in]SystemTableThe pointer to the system table.
[in]ShellParametersThe parameters associated with the command.
[in]ShellThe instance of the shell protocol used in the context of processing this command.
Returns
EFI_SUCCESS the operation was successful
other the operation failed.

Definition at line 43 of file VariablePolicyDynamicCommand.c.

Variable Documentation

◆ mVarPolicyDynamicCommand

STATIC EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL mVarPolicyDynamicCommand
Initial value:
= {
VAR_POLICY_COMMAND_NAME,
}
SHELL_STATUS EFIAPI VarPolicyCommandHandler(IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This, IN EFI_SYSTEM_TABLE *SystemTable, IN EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters, IN EFI_SHELL_PROTOCOL *Shell)
STATIC CHAR16 *EFIAPI VarPolicyCommandGetHelp(IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This, IN CONST CHAR8 *Language)

Definition at line 84 of file VariablePolicyDynamicCommand.c.

◆ mVarPolicyShellCommandHiiHandle

EFI_HII_HANDLE mVarPolicyShellCommandHiiHandle
extern

Definition at line 34 of file VariablePolicy.c.