TianoCore EDK2 master
|
#include "UefiShellDebug1CommandsLib.h"
Go to the source code of this file.
Data Structures | |
struct | DMP_STORE_VARIABLE |
Macros | |
#define | DMP_STORE_VARIABLE_SIGNATURE SIGNATURE_32 ('_', 'd', 's', 's') |
Enumerations | |
enum | DMP_STORE_TYPE { DmpStoreDisplay , DmpStoreDelete , DmpStoreSave , DmpStoreLoad } |
Functions | |
CHAR16 * | GetAttrType (IN CONST UINT32 Atts) |
CHAR16 * | BinaryToHexString (IN VOID *Buffer, IN UINTN BufferSize, IN OUT CHAR16 *HexString, IN UINTN HexStringSize) |
SHELL_STATUS | LoadVariablesFromFile (IN SHELL_FILE_HANDLE FileHandle, IN CONST CHAR16 *Name, IN CONST EFI_GUID *Guid, OUT BOOLEAN *Found) |
EFI_STATUS | AppendSingleVariableToFile (IN SHELL_FILE_HANDLE FileHandle, IN CONST CHAR16 *Name, IN CONST EFI_GUID *Guid, IN UINT32 Attributes, IN UINT32 DataSize, IN CONST UINT8 *Data) |
SHELL_STATUS | CascadeProcessVariables (IN CONST CHAR16 *Name OPTIONAL, IN CONST EFI_GUID *Guid OPTIONAL, IN DMP_STORE_TYPE Type, IN EFI_FILE_PROTOCOL *FileHandle OPTIONAL, IN CONST CHAR16 *CONST PrevName, IN EFI_GUID FoundVarGuid, IN BOOLEAN *FoundOne, IN BOOLEAN StandardFormatOutput) |
SHELL_STATUS | ProcessVariables (IN CONST CHAR16 *Name OPTIONAL, IN CONST EFI_GUID *Guid OPTIONAL, IN DMP_STORE_TYPE Type, IN SHELL_FILE_HANDLE FileHandle OPTIONAL, IN BOOLEAN StandardFormatOutput) |
SHELL_STATUS EFIAPI | ShellCommandRunDmpStore (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
STATIC CONST SHELL_PARAM_ITEM | ParamList [] |
Main file for DmpStore shell Debug1 function.
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DmpStore.c.
#define DMP_STORE_VARIABLE_SIGNATURE SIGNATURE_32 ('_', 'd', 's', 's') |
Definition at line 29 of file DmpStore.c.
enum DMP_STORE_TYPE |
Definition at line 12 of file DmpStore.c.
EFI_STATUS AppendSingleVariableToFile | ( | IN SHELL_FILE_HANDLE | FileHandle, |
IN CONST CHAR16 * | Name, | ||
IN CONST EFI_GUID * | Guid, | ||
IN UINT32 | Attributes, | ||
IN UINT32 | DataSize, | ||
IN CONST UINT8 * | Data | ||
) |
Append one variable to file.
[in] | FileHandle | The file to be appended. |
[in] | Name | The variable name. |
[in] | Guid | The variable GUID. |
[in] | Attributes | The variable attributes. |
[in] | DataSize | The variable data size. |
[in] | Data | The variable data. |
EFI_OUT_OF_RESOURCES | There is not enough memory to perform the operation. |
EFI_SUCCESS | The variable is appended to file successfully. |
others | Failed to append the variable to file. |
Definition at line 314 of file DmpStore.c.
CHAR16 * BinaryToHexString | ( | IN VOID * | Buffer, |
IN UINTN | BufferSize, | ||
IN OUT CHAR16 * | HexString, | ||
IN UINTN | HexStringSize | ||
) |
Convert binary to hex format string.
[in] | Buffer | The binary data. |
[in] | BufferSize | The size in bytes of the binary data. |
[in,out] | HexString | Hex format string. |
[in] | HexStringSize | The size in bytes of the string. |
Definition at line 93 of file DmpStore.c.
SHELL_STATUS CascadeProcessVariables | ( | IN CONST CHAR16 *Name | OPTIONAL, |
IN CONST EFI_GUID *Guid | OPTIONAL, | ||
IN DMP_STORE_TYPE | Type, | ||
IN EFI_FILE_PROTOCOL *FileHandle | OPTIONAL, | ||
IN CONST CHAR16 *CONST | PrevName, | ||
IN EFI_GUID | FoundVarGuid, | ||
IN BOOLEAN * | FoundOne, | ||
IN BOOLEAN | StandardFormatOutput | ||
) |
Recursive function to display or delete variables.
This function will call itself to create a stack-based list of allt he variables to process, then fromt he last to the first, they will do either printing or deleting.
This is necessary since once a delete happens GetNextVariableName() will work.
[in] | Name | The variable name of the EFI variable (or NULL). |
[in] | Guid | The GUID of the variable set (or NULL). |
[in] | Type | The operation type. |
[in] | FileHandle | The file to operate on (or NULL). |
[in] | PrevName | The previous variable name from GetNextVariableName. L"" to start. |
[in] | FoundVarGuid | The previous GUID from GetNextVariableName. ignored at start. |
[in] | FoundOne | If a VariableName or Guid was specified and one was printed or deleted, then set this to TRUE, otherwise ignored. |
[in] | StandardFormatOutput | TRUE indicates Standard-Format Output. |
SHELL_SUCCESS | The operation was successful. |
SHELL_OUT_OF_RESOURCES | A memorty allocation failed. |
SHELL_ABORTED | The abort message was received. |
SHELL_DEVICE_ERROR | UEFI Variable Services returned an error. |
SHELL_NOT_FOUND | the Name/Guid pair could not be found. |
Definition at line 417 of file DmpStore.c.
Base on the input attribute value to return the attribute string.
[in] | Atts | The input attribute value |
The | attribute string info. |
Definition at line 39 of file DmpStore.c.
SHELL_STATUS LoadVariablesFromFile | ( | IN SHELL_FILE_HANDLE | FileHandle, |
IN CONST CHAR16 * | Name, | ||
IN CONST EFI_GUID * | Guid, | ||
OUT BOOLEAN * | Found | ||
) |
Load the variable data from file and set to variable data base.
[in] | FileHandle | The file to be read. |
[in] | Name | The name of the variables to be loaded. |
[in] | Guid | The guid of the variables to be loaded. |
[out] | Found | TRUE when at least one variable was loaded and set. |
SHELL_DEVICE_ERROR | Cannot access the file. |
SHELL_VOLUME_CORRUPTED | The file is in bad format. |
SHELL_OUT_OF_RESOURCES | There is not enough memory to perform the operation. |
SHELL_SUCCESS | Successfully load and set the variables. |
Definition at line 133 of file DmpStore.c.
SHELL_STATUS ProcessVariables | ( | IN CONST CHAR16 *Name | OPTIONAL, |
IN CONST EFI_GUID *Guid | OPTIONAL, | ||
IN DMP_STORE_TYPE | Type, | ||
IN SHELL_FILE_HANDLE FileHandle | OPTIONAL, | ||
IN BOOLEAN | StandardFormatOutput | ||
) |
Function to display or delete variables. This will set up and call into the recursive function.
[in] | Name | The variable name of the EFI variable (or NULL). |
[in] | Guid | The GUID of the variable set (or NULL). |
[in] | Type | The operation type. |
[in] | FileHandle | The file to save or load variables. |
[in] | StandardFormatOutput | TRUE indicates Standard-Format Output. |
SHELL_SUCCESS | The operation was successful. |
SHELL_OUT_OF_RESOURCES | A memorty allocation failed. |
SHELL_ABORTED | The abort message was received. |
SHELL_DEVICE_ERROR | UEFI Variable Services returned an error. |
SHELL_NOT_FOUND | the Name/Guid pair could not be found. |
Definition at line 671 of file DmpStore.c.
SHELL_STATUS EFIAPI ShellCommandRunDmpStore | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Function for 'dmpstore' command.
[in] | ImageHandle | Handle to the Image (NULL if Internal). |
[in] | SystemTable | Pointer to the System Table (NULL if Internal). |
Definition at line 747 of file DmpStore.c.
STATIC CONST SHELL_PARAM_ITEM ParamList[] |
Definition at line 729 of file DmpStore.c.