/** @file
Main file for DmpStore shell Debug1 function.
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "UefiShellDebug1CommandsLib.h"
L"invalid", // 000
L"invalid", // 001
L"BS", // 010
L"NV+BS", // 011
L"RT+BS", // 100
L"NV+RT+BS", // 101
L"RT+BS", // 110
L"NV+RT+BS", // 111
};
/**
Function to display or delete variables.
@param[in] VariableName The variable name of the EFI variable (or NULL).
@param[in] Guid The GUID of the variable set (or NULL).
@param[in] Delete TRUE to delete, FALSE otherwise.
@retval SHELL_SUCCESS The operation was successful.
@retval SHELL_OUT_OF_RESOURCES A memorty allocation failed.
@retval SHELL_ABORTED The abort message was received.
@retval SHELL_DEVICE_ERROR UEFI Variable Services returned an error.
**/
)
{
Status = gRT->QueryVariableInfo(EFI_VARIABLE_BOOTSERVICE_ACCESS|EFI_VARIABLE_RUNTIME_ACCESS|EFI_VARIABLE_NON_VOLATILE, &MaxStorSize, &RemStorSize, &MaxVarSize);
return (SHELL_DEVICE_ERROR);
}
if (FoundVarName == NULL) {
return (SHELL_OUT_OF_RESOURCES);
}
FoundVarName[0] = CHAR_NULL;
if (DataBuffer == NULL) {
return (SHELL_OUT_OF_RESOURCES);
}
for (;;){
if (ShellGetExecutionBreakFlag()) {
break;
}
if (Status == EFI_NOT_FOUND) {
break;
}
//
// Check if it matches
//
if (VariableName != NULL) {
continue;
}
}
continue;
}
}
//
// do the print or delete
//
if (!Delete) {
-1,
-1,
NULL,
DataSize);
} else {
-1,
-1,
NULL,
-1,
-1,
NULL,
}
}
if (FoundVarName != NULL) {
}
if (DataBuffer != NULL) {
}
if (!Found) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_N), gShellDebug1HiiHandle, VariableName);
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_GN), gShellDebug1HiiHandle, Guid, VariableName);
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_G), gShellDebug1HiiHandle, Guid);
}
return (SHELL_NOT_FOUND);
}
return (SHELL_SUCCESS);
}
{L"-d", TypeFlag},
{L"-l", TypeFlag},
{L"-s", TypeFlag},
{L"-all", TypeFlag},
{L"-guid", TypeValue},
};
/**
Function for 'dmpstore' command.
@param[in] ImageHandle Handle to the Image (NULL if Internal).
@param[in] SystemTable Pointer to the System Table (NULL if Internal).
**/
)
{
} else {
}
} else {
} else if (ShellCommandLineGetFlag(Package, L"-all") && ShellCommandLineGetFlag(Package, L"-guid")) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"-all", L"-guid");
} else if ((ShellCommandLineGetFlag(Package, L"-s") || ShellCommandLineGetFlag(Package, L"-l")) && ShellCommandLineGetFlag(Package, L"-d")) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"-l or -s", L"-d");
} else {
}
} else {
}
} else {
VariableName = NULL;
}
if (ShellStatus == SHELL_SUCCESS) {
///@todo fix this after Jordan makes lib...
} else {
}
}
}
}
}
return ShellStatus;
}