ShellPkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
@ -990,7 +990,7 @@ ConsoleLoggerSetMode (
|
||||
ConsoleInfo->CurrentStartRow = 0;
|
||||
ConsoleInfo->OurConOut.ClearScreen (&ConsoleInfo->OurConOut);
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Function definitions for shell simple text in and out on top of file handles.
|
||||
|
||||
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -105,7 +105,7 @@ FileBasedSimpleTextInReadKeyStroke(
|
||||
CharSize = sizeof(CHAR16);
|
||||
} else {
|
||||
CharSize = sizeof(CHAR8);
|
||||
}
|
||||
}
|
||||
//
|
||||
// Decrement the amount of free space by Size or set to zero (for odd length files)
|
||||
//
|
||||
@ -123,7 +123,7 @@ FileBasedSimpleTextInReadKeyStroke(
|
||||
}
|
||||
|
||||
/**
|
||||
Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
||||
Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
||||
SHELL_FILE_HANDLE to support redirecting input from a file.
|
||||
|
||||
@param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
|
||||
@ -162,7 +162,7 @@ CreateSimpleTextInOnFile(
|
||||
ProtocolToReturn->FileHandle = FileHandleToUse;
|
||||
ProtocolToReturn->SimpleTextIn.Reset = FileBasedSimpleTextInReset;
|
||||
ProtocolToReturn->SimpleTextIn.ReadKeyStroke = FileBasedSimpleTextInReadKeyStroke;
|
||||
|
||||
|
||||
Status = gBS->CreateEvent (
|
||||
EVT_NOTIFY_WAIT,
|
||||
TPL_NOTIFY,
|
||||
@ -177,9 +177,9 @@ CreateSimpleTextInOnFile(
|
||||
}
|
||||
///@todo possibly also install SimpleTextInputEx on the handle at this point.
|
||||
Status = gBS->InstallProtocolInterface(
|
||||
&(ProtocolToReturn->TheHandle),
|
||||
&gEfiSimpleTextInProtocolGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&(ProtocolToReturn->TheHandle),
|
||||
&gEfiSimpleTextInProtocolGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&(ProtocolToReturn->SimpleTextIn));
|
||||
if (!EFI_ERROR(Status)) {
|
||||
*HandleLocation = ProtocolToReturn->TheHandle;
|
||||
@ -191,7 +191,7 @@ CreateSimpleTextInOnFile(
|
||||
}
|
||||
|
||||
/**
|
||||
Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
||||
Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
||||
SHELL_FILE_HANDLE to support redirecting input from a file.
|
||||
|
||||
@param[in] SimpleTextIn The pointer to the SimpleTextIn to close.
|
||||
@ -213,8 +213,8 @@ CloseSimpleTextInOnFile(
|
||||
Status = gBS->CloseEvent(((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL *)SimpleTextIn)->SimpleTextIn.WaitForKey);
|
||||
|
||||
Status1 = gBS->UninstallProtocolInterface(
|
||||
((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->TheHandle,
|
||||
&gEfiSimpleTextInProtocolGuid,
|
||||
((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->TheHandle,
|
||||
&gEfiSimpleTextInProtocolGuid,
|
||||
&(((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->SimpleTextIn));
|
||||
|
||||
FreePool(SimpleTextIn);
|
||||
@ -283,9 +283,9 @@ FileBasedSimpleTextOutQueryMode (
|
||||
)
|
||||
{
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *PassThruProtocol;
|
||||
|
||||
|
||||
PassThruProtocol = ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *)This)->OriginalSimpleTextOut;
|
||||
|
||||
|
||||
// Pass the QueryMode call thru to the original SimpleTextOutProtocol
|
||||
return (PassThruProtocol->QueryMode(
|
||||
PassThruProtocol,
|
||||
@ -421,7 +421,7 @@ FileBasedSimpleTextOutOutputString (
|
||||
}
|
||||
|
||||
/**
|
||||
Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
||||
Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
||||
SHELL_FILE_HANDLE to support redirecting output from a file.
|
||||
|
||||
@param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
|
||||
@ -473,9 +473,9 @@ CreateSimpleTextOutOnFile(
|
||||
ProtocolToReturn->SimpleTextOut.Mode->CursorVisible = OriginalProtocol->Mode->CursorVisible;
|
||||
|
||||
Status = gBS->InstallProtocolInterface(
|
||||
&(ProtocolToReturn->TheHandle),
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&(ProtocolToReturn->TheHandle),
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&(ProtocolToReturn->SimpleTextOut));
|
||||
if (!EFI_ERROR(Status)) {
|
||||
*HandleLocation = ProtocolToReturn->TheHandle;
|
||||
@ -488,7 +488,7 @@ CreateSimpleTextOutOnFile(
|
||||
}
|
||||
|
||||
/**
|
||||
Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
||||
Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
||||
SHELL_FILE_HANDLE to support redirecting output from a file.
|
||||
|
||||
@param[in] SimpleTextOut The pointer to the SimpleTextOUT to close.
|
||||
@ -505,8 +505,8 @@ CloseSimpleTextOutOnFile(
|
||||
return (EFI_INVALID_PARAMETER);
|
||||
}
|
||||
Status = gBS->UninstallProtocolInterface(
|
||||
((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->TheHandle,
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->TheHandle,
|
||||
&gEfiSimpleTextOutProtocolGuid,
|
||||
&(((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->SimpleTextOut));
|
||||
FreePool(SimpleTextOut->Mode);
|
||||
FreePool(SimpleTextOut);
|
||||
|
@ -2,7 +2,7 @@
|
||||
Function definitions for shell simple text in and out on top of file handles.
|
||||
|
||||
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -17,7 +17,7 @@
|
||||
#define _SHELL_CONSOLE_WRAPPERS_HEADER_
|
||||
|
||||
/**
|
||||
Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
||||
Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
||||
SHELL_FILE_HANDLE to support redirecting input from a file.
|
||||
|
||||
@param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
|
||||
@ -33,7 +33,7 @@ CreateSimpleTextInOnFile(
|
||||
);
|
||||
|
||||
/**
|
||||
Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
||||
Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
||||
SHELL_FILE_HANDLE to support redirecting input from a file.
|
||||
|
||||
@param[in] SimpleTextIn The pointer to the SimpleTextIn to close.
|
||||
@ -46,7 +46,7 @@ CloseSimpleTextInOnFile(
|
||||
);
|
||||
|
||||
/**
|
||||
Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
||||
Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
||||
SHELL_FILE_HANDLE to support redirecting output from a file.
|
||||
|
||||
@param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
|
||||
@ -64,7 +64,7 @@ CreateSimpleTextOutOnFile(
|
||||
);
|
||||
|
||||
/**
|
||||
Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
||||
Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
||||
SHELL_FILE_HANDLE to support redirecting output from a file.
|
||||
|
||||
@param[in] SimpleTextOut The pointer to the SimpleTextOUT to close.
|
||||
|
@ -21,14 +21,14 @@
|
||||
#define MEM_WRITE_REALLOC_OVERHEAD 1024
|
||||
|
||||
/**
|
||||
File style interface for console (Open).
|
||||
|
||||
File style interface for console (Open).
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[out] NewHandle Ignored.
|
||||
@param[in] FileName Ignored.
|
||||
@param[in] OpenMode Ignored.
|
||||
@param[in] Attributes Ignored.
|
||||
|
||||
|
||||
@retval EFI_NOT_FOUND
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -46,9 +46,9 @@ FileInterfaceOpenNotFound(
|
||||
|
||||
/**
|
||||
File style interface for console (Close, Delete, & Flush)
|
||||
|
||||
|
||||
@param[in] This Ignored.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -65,7 +65,7 @@ FileInterfaceNopGeneric(
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[out] Position Ignored.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -80,10 +80,10 @@ FileInterfaceNopGetPosition(
|
||||
|
||||
/**
|
||||
File style interface for console (SetPosition).
|
||||
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[in] Position Ignored.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -98,12 +98,12 @@ FileInterfaceNopSetPosition(
|
||||
|
||||
/**
|
||||
File style interface for console (GetInfo).
|
||||
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[in] InformationType Ignored.
|
||||
@param[in, out] BufferSize Ignored.
|
||||
@param[out] Buffer Ignored.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -120,12 +120,12 @@ FileInterfaceNopGetInfo(
|
||||
|
||||
/**
|
||||
File style interface for console (SetInfo).
|
||||
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[in] InformationType Ignored.
|
||||
@param[in] BufferSize Ignored.
|
||||
@param[in] Buffer Ignored.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -144,11 +144,11 @@ FileInterfaceNopSetInfo(
|
||||
File style interface for StdOut (Write).
|
||||
|
||||
Writes data to the screen.
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[in, out] BufferSize Size in bytes of Buffer.
|
||||
@param[in] Buffer The pointer to the buffer to write.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED No output console is supported.
|
||||
@return A return value from gST->ConOut->OutputString.
|
||||
**/
|
||||
@ -171,11 +171,11 @@ FileInterfaceStdOutWrite(
|
||||
|
||||
/**
|
||||
File style interface for StdIn (Write).
|
||||
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[in, out] BufferSize Ignored.
|
||||
@param[in] Buffer Ignored.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -193,11 +193,11 @@ FileInterfaceStdInWrite(
|
||||
File style interface for console StdErr (Write).
|
||||
|
||||
Writes error to the error output.
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[in, out] BufferSize Size in bytes of Buffer.
|
||||
@param[in] Buffer The pointer to the buffer to write.
|
||||
|
||||
|
||||
@return A return value from gST->StdErr->OutputString.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -213,11 +213,11 @@ FileInterfaceStdErrWrite(
|
||||
|
||||
/**
|
||||
File style interface for console StdOut (Read).
|
||||
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[in, out] BufferSize Ignored.
|
||||
@param[out] Buffer Ignored.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -233,11 +233,11 @@ FileInterfaceStdOutRead(
|
||||
|
||||
/**
|
||||
File style interface for console StdErr (Read).
|
||||
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[in, out] BufferSize Ignored.
|
||||
@param[out] Buffer Ignored.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED Always.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -253,11 +253,11 @@ FileInterfaceStdErrRead(
|
||||
|
||||
/**
|
||||
File style interface for NUL file (Read).
|
||||
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[in, out] BufferSize Poiner to 0 upon return.
|
||||
@param[out] Buffer Ignored.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Always.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -274,11 +274,11 @@ FileInterfaceNulRead(
|
||||
|
||||
/**
|
||||
File style interface for NUL file (Write).
|
||||
|
||||
|
||||
@param[in] This Ignored.
|
||||
@param[in, out] BufferSize Ignored.
|
||||
@param[in] Buffer Ignored.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -304,7 +304,7 @@ FileInterfaceNulWrite(
|
||||
EFI_STATUS
|
||||
CreateTabCompletionList (
|
||||
IN CONST CHAR16 *InputString,
|
||||
IN CONST UINTN StringLen,
|
||||
IN CONST UINTN StringLen,
|
||||
IN CONST UINTN BufferSize,
|
||||
IN OUT EFI_SHELL_FILE_INFO **TabCompletionList,
|
||||
IN OUT UINTN *TabUpdatePos
|
||||
@ -1025,9 +1025,9 @@ typedef struct {
|
||||
File style interface for Environment Variable (Close).
|
||||
|
||||
Frees the memory for this object.
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -1043,8 +1043,8 @@ FileInterfaceEnvClose(
|
||||
UINTN TotalSize;
|
||||
|
||||
//
|
||||
// Most if not all UEFI commands will have an '\r\n' at the end of any output.
|
||||
// Since the output was redirected to a variable, it does not make sense to
|
||||
// Most if not all UEFI commands will have an '\r\n' at the end of any output.
|
||||
// Since the output was redirected to a variable, it does not make sense to
|
||||
// keep this. So, before closing, strip the trailing '\r\n' from the variable
|
||||
// if it exists.
|
||||
//
|
||||
@ -1063,12 +1063,12 @@ FileInterfaceEnvClose(
|
||||
NewBuffer = AllocateZeroPool (TotalSize);
|
||||
if (NewBuffer == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
}
|
||||
Status = SHELL_GET_ENVIRONMENT_VARIABLE(((EFI_FILE_PROTOCOL_ENVIRONMENT*)This)->Name, &NewSize, NewBuffer);
|
||||
}
|
||||
|
||||
|
||||
if (!EFI_ERROR(Status) && NewBuffer != NULL) {
|
||||
|
||||
|
||||
if (TotalSize / sizeof (CHAR16) >= 3) {
|
||||
if ( (((CHAR16*)NewBuffer)[TotalSize / sizeof (CHAR16) - 2] == CHAR_LINEFEED) &&
|
||||
(((CHAR16*)NewBuffer)[TotalSize / sizeof (CHAR16) - 3] == CHAR_CARRIAGE_RETURN)
|
||||
@ -1112,8 +1112,8 @@ FileInterfaceEnvClose(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SHELL_FREE_NON_NULL(NewBuffer);
|
||||
FreePool((EFI_FILE_PROTOCOL_ENVIRONMENT*)This);
|
||||
return (Status);
|
||||
@ -1121,9 +1121,9 @@ FileInterfaceEnvClose(
|
||||
|
||||
/**
|
||||
File style interface for Environment Variable (Delete).
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
|
||||
|
||||
@retval The return value from FileInterfaceEnvClose().
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -1138,11 +1138,11 @@ FileInterfaceEnvDelete(
|
||||
|
||||
/**
|
||||
File style interface for Environment Variable (Read).
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[in, out] BufferSize Size in bytes of Buffer.
|
||||
@param[out] Buffer The pointer to the buffer to fill.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was read.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -1162,11 +1162,11 @@ FileInterfaceEnvRead(
|
||||
/**
|
||||
File style interface for Volatile Environment Variable (Write).
|
||||
This function also caches the environment variable into gShellEnvVarList.
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[in, out] BufferSize Size in bytes of Buffer.
|
||||
@param[in] Buffer The pointer to the buffer to write.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was successfully write to variable.
|
||||
@retval SHELL_OUT_OF_RESOURCES A memory allocation failed.
|
||||
**/
|
||||
@ -1239,11 +1239,11 @@ FileInterfaceEnvVolWrite(
|
||||
/**
|
||||
File style interface for Non Volatile Environment Variable (Write).
|
||||
This function also caches the environment variable into gShellEnvVarList.
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[in, out] BufferSize Size in bytes of Buffer.
|
||||
@param[in] Buffer The pointer to the buffer to write.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was successfully write to variable.
|
||||
@retval SHELL_OUT_OF_RESOURCES A memory allocation failed.
|
||||
**/
|
||||
@ -1362,7 +1362,7 @@ CreateFileInterfaceEnv(
|
||||
EnvFileInterface->Flush = FileInterfaceNopGeneric;
|
||||
EnvFileInterface->Delete = FileInterfaceEnvDelete;
|
||||
EnvFileInterface->Read = FileInterfaceEnvRead;
|
||||
|
||||
|
||||
CopyMem(EnvFileInterface->Name, EnvName, EnvNameSize);
|
||||
|
||||
//
|
||||
@ -1513,10 +1513,10 @@ typedef struct {
|
||||
|
||||
/**
|
||||
File style interface for Mem (SetPosition).
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[out] Position The position to set.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The position was successfully changed.
|
||||
@retval EFI_INVALID_PARAMETER The Position was invalid.
|
||||
**/
|
||||
@ -1537,12 +1537,12 @@ FileInterfaceMemSetPosition(
|
||||
|
||||
/**
|
||||
File style interface for Mem (GetPosition).
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[out] Position The pointer to the position.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The position was retrieved.
|
||||
**/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FileInterfaceMemGetPosition(
|
||||
@ -1604,11 +1604,11 @@ FileInterfaceMemGetInfo(
|
||||
|
||||
/**
|
||||
File style interface for Mem (Write).
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[in, out] BufferSize Size in bytes of Buffer.
|
||||
@param[in] Buffer The pointer to the buffer to write.
|
||||
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES The operation failed due to lack of resources.
|
||||
@retval EFI_SUCCESS The data was written.
|
||||
**/
|
||||
@ -1659,11 +1659,11 @@ FileInterfaceMemWrite(
|
||||
|
||||
/**
|
||||
File style interface for Mem (Read).
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[in, out] BufferSize Size in bytes of Buffer.
|
||||
@param[in] Buffer The pointer to the buffer to fill.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was read.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -1689,11 +1689,11 @@ FileInterfaceMemRead(
|
||||
File style interface for Mem (Close).
|
||||
|
||||
Frees all memory associated with this object.
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The 'file' was closed.
|
||||
**/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FileInterfaceMemClose(
|
||||
@ -1784,7 +1784,7 @@ typedef struct {
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Position Byte position from the start of the file.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Data was written.
|
||||
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.
|
||||
|
||||
@ -1804,7 +1804,7 @@ FileInterfaceFileSetPosition(
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
@param Position Byte position from the start of the file.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Data was written.
|
||||
@retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open..
|
||||
|
||||
@ -1999,7 +1999,7 @@ FileInterfaceFileOpen (
|
||||
Close and delete the file handle.
|
||||
|
||||
@param This Protocol instance pointer.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The device was opened.
|
||||
@retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.
|
||||
|
||||
@ -2018,9 +2018,9 @@ FileInterfaceFileDelete(
|
||||
|
||||
/**
|
||||
File style interface for File (Close).
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The file was closed.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -2038,13 +2038,13 @@ FileInterfaceFileClose(
|
||||
/**
|
||||
File style interface for File (Write).
|
||||
|
||||
If the file was opened with ASCII mode the data will be processed through
|
||||
If the file was opened with ASCII mode the data will be processed through
|
||||
AsciiSPrint before writing.
|
||||
|
||||
|
||||
@param[in] This The pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[in, out] BufferSize Size in bytes of Buffer.
|
||||
@param[in] Buffer The pointer to the buffer to write.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The data was written.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -2081,10 +2081,10 @@ FileInterfaceFileWrite(
|
||||
|
||||
This will create a new EFI_FILE_PROTOCOL identical to the Templace
|
||||
except that the new one has Unicode and Ascii knowledge.
|
||||
|
||||
|
||||
@param[in] Template A pointer to the EFI_FILE_PROTOCOL object.
|
||||
@param[in] Unicode TRUE for UCS-2, FALSE for ASCII.
|
||||
|
||||
|
||||
@return a new EFI_FILE_PROTOCOL object to be used instead of the template.
|
||||
**/
|
||||
EFI_FILE_PROTOCOL*
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
This is THE shell (application)
|
||||
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -104,7 +104,7 @@ TrimSpaces(
|
||||
}
|
||||
|
||||
/**
|
||||
Parse for the next instance of one string within another string. Can optionally make sure that
|
||||
Parse for the next instance of one string within another string. Can optionally make sure that
|
||||
the string was not escaped (^ character) per the shell specification.
|
||||
|
||||
@param[in] SourceString The string to search within
|
||||
@ -160,13 +160,13 @@ IsValidEnvironmentVariableName(
|
||||
)
|
||||
{
|
||||
CONST CHAR16 *Walker;
|
||||
|
||||
|
||||
Walker = NULL;
|
||||
|
||||
ASSERT (BeginPercent != NULL);
|
||||
ASSERT (EndPercent != NULL);
|
||||
ASSERT (BeginPercent < EndPercent);
|
||||
|
||||
|
||||
if ((BeginPercent + 1) == EndPercent) {
|
||||
return FALSE;
|
||||
}
|
||||
@ -212,9 +212,9 @@ ContainsSplit(
|
||||
SecondQuote = NULL;
|
||||
TempSpot = FindFirstCharacter(CmdLine, L"|", L'^');
|
||||
|
||||
if (FirstQuote == NULL ||
|
||||
TempSpot == NULL ||
|
||||
TempSpot == CHAR_NULL ||
|
||||
if (FirstQuote == NULL ||
|
||||
TempSpot == NULL ||
|
||||
TempSpot == CHAR_NULL ||
|
||||
FirstQuote > TempSpot
|
||||
) {
|
||||
return (BOOLEAN) ((TempSpot != NULL) && (*TempSpot != CHAR_NULL));
|
||||
@ -223,7 +223,7 @@ ContainsSplit(
|
||||
while ((TempSpot != NULL) && (*TempSpot != CHAR_NULL)) {
|
||||
if (FirstQuote == NULL || FirstQuote > TempSpot) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
SecondQuote = FindNextInstance (FirstQuote + 1, L"\"", TRUE);
|
||||
if (SecondQuote == NULL) {
|
||||
break;
|
||||
@ -235,14 +235,14 @@ ContainsSplit(
|
||||
FirstQuote = FindNextInstance (SecondQuote + 1, L"\"", TRUE);
|
||||
TempSpot = FindFirstCharacter(TempSpot + 1, L"|", L'^');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return (BOOLEAN) ((TempSpot != NULL) && (*TempSpot != CHAR_NULL));
|
||||
}
|
||||
|
||||
/**
|
||||
Function to start monitoring for CTRL-S using SimpleTextInputEx. This
|
||||
Function to start monitoring for CTRL-S using SimpleTextInputEx. This
|
||||
feature's enabled state was not known when the shell initially launched.
|
||||
|
||||
@retval EFI_SUCCESS The feature is enabled.
|
||||
@ -266,8 +266,8 @@ InternalEfiShellStartCtrlSMonitor(
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SHELL_NO_IN_EX),
|
||||
ShellInfoObject.HiiHandle);
|
||||
@ -284,7 +284,7 @@ InternalEfiShellStartCtrlSMonitor(
|
||||
&KeyData,
|
||||
NotificationFunction,
|
||||
&ShellInfoObject.CtrlSNotifyHandle1);
|
||||
|
||||
|
||||
KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = SimpleEx->RegisterKeyNotify(
|
||||
@ -302,7 +302,7 @@ InternalEfiShellStartCtrlSMonitor(
|
||||
&KeyData,
|
||||
NotificationFunction,
|
||||
&ShellInfoObject.CtrlSNotifyHandle3);
|
||||
}
|
||||
}
|
||||
KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = SimpleEx->RegisterKeyNotify(
|
||||
@ -1129,7 +1129,7 @@ ProcessCommandLine(
|
||||
|
||||
/**
|
||||
Function try to find location of the Startup.nsh file.
|
||||
|
||||
|
||||
The buffer is callee allocated and should be freed by the caller.
|
||||
|
||||
@param ImageDevicePath The path to the image for shell. first place to look for the startup script
|
||||
@ -1156,7 +1156,7 @@ LocateStartupScript (
|
||||
// Try to find 'Startup.nsh' in the directory where the shell itself was launched.
|
||||
//
|
||||
MapName = ShellInfoObject.NewEfiShellProtocol->GetMapFromDevicePath (&ImageDevicePath);
|
||||
if (MapName != NULL) {
|
||||
if (MapName != NULL) {
|
||||
StartupScriptPath = StrnCatGrow (&StartupScriptPath, &Size, MapName, 0);
|
||||
if (StartupScriptPath == NULL) {
|
||||
//
|
||||
@ -1387,7 +1387,7 @@ AddBufferToFreeList (
|
||||
|
||||
|
||||
/**
|
||||
Create a new buffer list and stores the old one to OldBufferList
|
||||
Create a new buffer list and stores the old one to OldBufferList
|
||||
|
||||
@param OldBufferList The temporary list head used to store the nodes in BufferToFreeList.
|
||||
**/
|
||||
@ -1432,7 +1432,7 @@ AddLineToCommandHistory(
|
||||
|
||||
Count = 0;
|
||||
MaxHistoryCmdCount = PcdGet16(PcdShellMaxHistoryCommandCount);
|
||||
|
||||
|
||||
if (MaxHistoryCmdCount == 0) {
|
||||
return ;
|
||||
}
|
||||
@ -1546,7 +1546,7 @@ StripUnreplacedEnvironmentVariables(
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (FirstQuote == NULL || SecondPercent < FirstQuote) {
|
||||
if (IsValidEnvironmentVariableName(FirstPercent, SecondPercent)) {
|
||||
//
|
||||
@ -1662,16 +1662,16 @@ ShellConvertVariables (
|
||||
; MasterEnvList != NULL && *MasterEnvList != CHAR_NULL
|
||||
; MasterEnvList += StrLen(MasterEnvList) + 1
|
||||
){
|
||||
StrCpyS( ItemTemp,
|
||||
((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
|
||||
StrCpyS( ItemTemp,
|
||||
((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
|
||||
L"%"
|
||||
);
|
||||
StrCatS( ItemTemp,
|
||||
((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
|
||||
StrCatS( ItemTemp,
|
||||
((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
|
||||
MasterEnvList
|
||||
);
|
||||
StrCatS( ItemTemp,
|
||||
((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
|
||||
StrCatS( ItemTemp,
|
||||
((ItemSize+(2*sizeof(CHAR16)))/sizeof(CHAR16)),
|
||||
L"%"
|
||||
);
|
||||
ShellCopySearchAndReplace(NewCommandLine1, NewCommandLine2, NewSize, ItemTemp, EfiShellGetEnv(MasterEnvList), TRUE, FALSE);
|
||||
@ -1697,7 +1697,7 @@ ShellConvertVariables (
|
||||
//
|
||||
ShellCopySearchAndReplace(NewCommandLine1, NewCommandLine2, NewSize, L"^%", L"%", TRUE, FALSE);
|
||||
StrCpyS(NewCommandLine1, NewSize/sizeof(CHAR16), NewCommandLine2);
|
||||
|
||||
|
||||
FreePool(NewCommandLine2);
|
||||
FreePool(ItemTemp);
|
||||
|
||||
@ -1823,7 +1823,7 @@ RunSplitCommand(
|
||||
}
|
||||
|
||||
/**
|
||||
Take the original command line, substitute any variables, free
|
||||
Take the original command line, substitute any variables, free
|
||||
the original string, return the modified copy.
|
||||
|
||||
@param[in] CmdLine pointer to the command line to update.
|
||||
@ -1847,7 +1847,7 @@ ShellSubstituteVariables(
|
||||
}
|
||||
|
||||
/**
|
||||
Take the original command line, substitute any alias in the first group of space delimited characters, free
|
||||
Take the original command line, substitute any alias in the first group of space delimited characters, free
|
||||
the original string, return the modified copy.
|
||||
|
||||
@param[in] CmdLine pointer to the command line to update.
|
||||
@ -1906,7 +1906,7 @@ ShellSubstituteAliases(
|
||||
|
||||
SHELL_FREE_NON_NULL(*CmdLine);
|
||||
SHELL_FREE_NON_NULL(CommandName);
|
||||
|
||||
|
||||
//
|
||||
// re-assign the passed in double pointer to point to our newly allocated buffer
|
||||
//
|
||||
@ -1919,7 +1919,7 @@ ShellSubstituteAliases(
|
||||
Takes the Argv[0] part of the command line and determine the meaning of it.
|
||||
|
||||
@param[in] CmdName pointer to the command line to update.
|
||||
|
||||
|
||||
@retval Internal_Command The name is an internal command.
|
||||
@retval File_Sys_Change the name is a file system change.
|
||||
@retval Script_File_Name the name is a NSH script file.
|
||||
@ -1947,7 +1947,7 @@ GetOperationType(
|
||||
// Test for file system change request. anything ending with first : and cant have spaces.
|
||||
//
|
||||
if (CmdName[(StrLen(CmdName)-1)] == L':') {
|
||||
if ( StrStr(CmdName, L" ") != NULL
|
||||
if ( StrStr(CmdName, L" ") != NULL
|
||||
|| StrLen(StrStr(CmdName, L":")) > 1
|
||||
) {
|
||||
return (Unknown_Invalid);
|
||||
@ -1977,7 +1977,7 @@ GetOperationType(
|
||||
SHELL_FREE_NON_NULL(FileWithPath);
|
||||
return (Efi_Application);
|
||||
}
|
||||
|
||||
|
||||
SHELL_FREE_NON_NULL(FileWithPath);
|
||||
//
|
||||
// No clue what this is... return invalid flag...
|
||||
@ -1994,7 +1994,7 @@ GetOperationType(
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_NOT_FOUND The operation type is unknown or invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFI_STATUS
|
||||
IsValidSplit(
|
||||
IN CONST CHAR16 *CmdLine
|
||||
)
|
||||
@ -2079,13 +2079,13 @@ VerifySplit(
|
||||
// recurse to verify the next item
|
||||
//
|
||||
TempSpot = FindFirstCharacter(CmdLine, L"|", L'^') + 1;
|
||||
if (*TempSpot == L'a' &&
|
||||
if (*TempSpot == L'a' &&
|
||||
(*(TempSpot + 1) == L' ' || *(TempSpot + 1) == CHAR_NULL)
|
||||
) {
|
||||
// If it's an ASCII pipe '|a'
|
||||
TempSpot += 1;
|
||||
}
|
||||
|
||||
|
||||
return (VerifySplit(TempSpot));
|
||||
}
|
||||
|
||||
@ -2149,7 +2149,7 @@ ChangeMappedDrive(
|
||||
// make sure we are the right operation
|
||||
//
|
||||
ASSERT(CmdLine[(StrLen(CmdLine)-1)] == L':' && StrStr(CmdLine, L" ") == NULL);
|
||||
|
||||
|
||||
//
|
||||
// Call the protocol API to do the work
|
||||
//
|
||||
@ -2294,7 +2294,7 @@ ProcessCommandLineToFinal(
|
||||
Run an internal shell command.
|
||||
|
||||
This API will update the shell's environment since these commands are libraries.
|
||||
|
||||
|
||||
@param[in] CmdLine the command line to run.
|
||||
@param[in] FirstParameter the first parameter on the command line
|
||||
@param[in] ParamProtocol the shell parameters protocol pointer
|
||||
@ -2317,7 +2317,7 @@ RunInternalCommand(
|
||||
SHELL_STATUS CommandReturnedStatus;
|
||||
BOOLEAN LastError;
|
||||
CHAR16 *Walker;
|
||||
CHAR16 *NewCmdLine;
|
||||
CHAR16 *NewCmdLine;
|
||||
|
||||
NewCmdLine = AllocateCopyPool (StrSize (CmdLine), CmdLine);
|
||||
if (NewCmdLine == NULL) {
|
||||
@ -2597,7 +2597,7 @@ SetupAndRunCommandOrFile(
|
||||
/**
|
||||
Function will process and run a command line.
|
||||
|
||||
This will determine if the command line represents an internal shell
|
||||
This will determine if the command line represents an internal shell
|
||||
command or dispatch an external application.
|
||||
|
||||
@param[in] CmdLine The command line to parse.
|
||||
@ -2673,7 +2673,7 @@ RunShellCommand(
|
||||
Status = ProcessNewSplitCommandLine(CleanOriginal);
|
||||
SHELL_FREE_NON_NULL(CleanOriginal);
|
||||
return (Status);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// We need the first parameter information so we can determine the operation type
|
||||
@ -2734,7 +2734,7 @@ RunShellCommand(
|
||||
/**
|
||||
Function will process and run a command line.
|
||||
|
||||
This will determine if the command line represents an internal shell
|
||||
This will determine if the command line represents an internal shell
|
||||
command or dispatch an external application.
|
||||
|
||||
@param[in] CmdLine The command line to parse.
|
||||
@ -2907,8 +2907,8 @@ RunScriptFileHandle (
|
||||
; // conditional increment in the body of the loop
|
||||
){
|
||||
ASSERT(CommandLine2 != NULL);
|
||||
StrnCpyS( CommandLine2,
|
||||
PrintBuffSize/sizeof(CHAR16),
|
||||
StrnCpyS( CommandLine2,
|
||||
PrintBuffSize/sizeof(CHAR16),
|
||||
NewScriptFile->CurrentCommand->Cl,
|
||||
PrintBuffSize/sizeof(CHAR16) - 1
|
||||
);
|
||||
@ -2934,8 +2934,8 @@ RunScriptFileHandle (
|
||||
//
|
||||
// Due to variability in starting the find and replace action we need to have both buffers the same.
|
||||
//
|
||||
StrnCpyS( CommandLine,
|
||||
PrintBuffSize/sizeof(CHAR16),
|
||||
StrnCpyS( CommandLine,
|
||||
PrintBuffSize/sizeof(CHAR16),
|
||||
CommandLine2,
|
||||
PrintBuffSize/sizeof(CHAR16) - 1
|
||||
);
|
||||
@ -2990,8 +2990,8 @@ RunScriptFileHandle (
|
||||
Status = ShellCopySearchAndReplace(CommandLine, CommandLine2, PrintBuffSize, L"%8", L"\"\"", FALSE, FALSE);
|
||||
Status = ShellCopySearchAndReplace(CommandLine2, CommandLine, PrintBuffSize, L"%9", L"\"\"", FALSE, FALSE);
|
||||
|
||||
StrnCpyS( CommandLine2,
|
||||
PrintBuffSize/sizeof(CHAR16),
|
||||
StrnCpyS( CommandLine2,
|
||||
PrintBuffSize/sizeof(CHAR16),
|
||||
CommandLine,
|
||||
PrintBuffSize/sizeof(CHAR16) - 1
|
||||
);
|
||||
|
@ -2,7 +2,7 @@
|
||||
function definitions for internal to shell functions.
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -294,7 +294,7 @@ RunCommand(
|
||||
/**
|
||||
Function will process and run a command line.
|
||||
|
||||
This will determine if the command line represents an internal shell
|
||||
This will determine if the command line represents an internal shell
|
||||
command or dispatch an external application.
|
||||
|
||||
@param[in] CmdLine The command line to parse.
|
||||
@ -383,8 +383,8 @@ TrimSpaces(
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Create a new buffer list and stores the old one to OldBufferList
|
||||
|
||||
Create a new buffer list and stores the old one to OldBufferList
|
||||
|
||||
@param OldBufferList The temporary list head used to store the nodes in BufferToFreeList.
|
||||
**/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
function declarations for shell environment functions.
|
||||
|
||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -143,9 +143,9 @@ GetEnvironmentVariableList(
|
||||
if (ListHead == NULL) {
|
||||
return (EFI_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
|
||||
ValBufferSize = INIT_DATA_BUFFER_SIZE;
|
||||
NameBufferSize = INIT_NAME_BUFFER_SIZE;
|
||||
VariableName = AllocateZeroPool(NameBufferSize);
|
||||
@ -171,7 +171,7 @@ GetEnvironmentVariableList(
|
||||
NameSize = NameBufferSize;
|
||||
Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid);
|
||||
}
|
||||
|
||||
|
||||
if (!EFI_ERROR(Status) && CompareGuid(&Guid, &gShellVariableGuid)){
|
||||
VarList = AllocateZeroPool(sizeof(ENV_VAR_LIST));
|
||||
if (VarList == NULL) {
|
||||
@ -200,7 +200,7 @@ GetEnvironmentVariableList(
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
ValSize = ValBufferSize;
|
||||
Status = SHELL_GET_ENVIRONMENT_VARIABLE_AND_ATTRIBUTES(VariableName, &VarList->Atts, &ValSize, VarList->Val);
|
||||
}
|
||||
@ -348,8 +348,8 @@ SetEnvironmentVariables(
|
||||
//
|
||||
// Copy the string into the Key, leaving the last character allocated as NULL to terminate
|
||||
//
|
||||
StrnCpyS( Node->Key,
|
||||
StrStr(CurrentString, L"=") - CurrentString + 1,
|
||||
StrnCpyS( Node->Key,
|
||||
StrStr(CurrentString, L"=") - CurrentString + 1,
|
||||
CurrentString,
|
||||
StrStr(CurrentString, L"=") - CurrentString
|
||||
);
|
||||
@ -413,7 +413,7 @@ ShellFindEnvVarInList (
|
||||
)
|
||||
{
|
||||
ENV_VAR_LIST *Node;
|
||||
|
||||
|
||||
if (Key == NULL || Value == NULL || ValueSize == NULL) {
|
||||
return SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
@ -459,7 +459,7 @@ ShellAddEnvVarToList (
|
||||
ENV_VAR_LIST *Node;
|
||||
CHAR16 *LocalKey;
|
||||
CHAR16 *LocalValue;
|
||||
|
||||
|
||||
if (Key == NULL || Value == NULL || ValueSize == 0) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@ -511,7 +511,7 @@ ShellAddEnvVarToList (
|
||||
Remove a specified environment variable in gShellEnvVarList.
|
||||
|
||||
@param Key The name of the environment variable.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The command executed successfully.
|
||||
@retval EFI_NOT_FOUND The environment variable is not found in
|
||||
gShellEnvVarList.
|
||||
@ -546,7 +546,7 @@ ShellRemvoeEnvVarFromList (
|
||||
/**
|
||||
Initialize the gShellEnvVarList and cache all Shell-Guid-based environment
|
||||
variables.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
ShellInitEnvVarList (
|
||||
|
@ -6,7 +6,7 @@
|
||||
//#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
|
||||
|
||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -266,9 +266,9 @@ ShellRemvoeEnvVarFromList (
|
||||
);
|
||||
|
||||
/**
|
||||
Initialize the gShellEnvVarList and cache all Shell-Guid-based environment
|
||||
Initialize the gShellEnvVarList and cache all Shell-Guid-based environment
|
||||
variables.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
ShellInitEnvVarList (
|
||||
|
@ -146,14 +146,14 @@ GetManFileName(
|
||||
} else {
|
||||
Buffer = AllocateZeroPool(StrSize(ManFileName) + 4*sizeof(CHAR16));
|
||||
if (Buffer != NULL) {
|
||||
StrnCpyS( Buffer,
|
||||
(StrSize(ManFileName) + 4*sizeof(CHAR16))/sizeof(CHAR16),
|
||||
ManFileName,
|
||||
StrnCpyS( Buffer,
|
||||
(StrSize(ManFileName) + 4*sizeof(CHAR16))/sizeof(CHAR16),
|
||||
ManFileName,
|
||||
StrLen(ManFileName)
|
||||
);
|
||||
StrnCatS( Buffer,
|
||||
StrnCatS( Buffer,
|
||||
(StrSize(ManFileName) + 4*sizeof(CHAR16))/sizeof(CHAR16),
|
||||
L".man",
|
||||
L".man",
|
||||
4
|
||||
);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
Copyright (C) 2014, Red Hat, Inc.
|
||||
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -147,8 +147,8 @@ DEBUG_CODE_END();
|
||||
// Remove any non-escaped quotes in the string
|
||||
// Remove any remaining escape characters in the string
|
||||
//
|
||||
for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL)
|
||||
; *NextDelim != CHAR_NULL
|
||||
for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL)
|
||||
; *NextDelim != CHAR_NULL
|
||||
; NextDelim = FindFirstCharacter(NextDelim, L"\"^", CHAR_NULL)
|
||||
) {
|
||||
if (*NextDelim == L'^') {
|
||||
@ -165,9 +165,9 @@ DEBUG_CODE_END();
|
||||
//
|
||||
if (StripQuotation) {
|
||||
CopyMem ((CHAR16*)NextDelim, NextDelim + 1, StrSize (NextDelim + 1));
|
||||
} else{
|
||||
} else{
|
||||
NextDelim++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ DEBUG_CODE_END();
|
||||
parameters for inclusion in EFI_SHELL_PARAMETERS_PROTOCOL. this supports space
|
||||
delimited and quote surrounded parameter definition.
|
||||
|
||||
All special character processing (alias, environment variable, redirection,
|
||||
All special character processing (alias, environment variable, redirection,
|
||||
etc... must be complete before calling this API.
|
||||
|
||||
@param[in] CommandLine String of command line to parse
|
||||
@ -269,7 +269,7 @@ ParseCommandLineToArgs(
|
||||
}
|
||||
ASSERT(Count >= (*Argc));
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
|
||||
Done:
|
||||
SHELL_FREE_NON_NULL(TempParameter);
|
||||
SHELL_FREE_NON_NULL(NewCommandLine);
|
||||
@ -503,7 +503,7 @@ IsUnicodeFile(
|
||||
}
|
||||
gEfiShellProtocol->SetFilePosition(Handle, OriginalFilePosition);
|
||||
gEfiShellProtocol->CloseFile(Handle);
|
||||
return (Status);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -580,7 +580,7 @@ FixFileName (
|
||||
Copy = FileName+1;
|
||||
if ((TempLocation = StrStr(Copy , L"\"")) != NULL) {
|
||||
TempLocation[0] = CHAR_NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Copy = FileName;
|
||||
while(Copy[0] == L' ') {
|
||||
@ -588,7 +588,7 @@ FixFileName (
|
||||
}
|
||||
if ((TempLocation = StrStr(Copy , L" ")) != NULL) {
|
||||
TempLocation[0] = CHAR_NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Copy[0] == CHAR_NULL) {
|
||||
@ -620,7 +620,7 @@ FixVarName (
|
||||
Copy = FileName+1;
|
||||
if ((TempLocation = StrStr(Copy , L"%")) != NULL) {
|
||||
TempLocation[0] = CHAR_NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (FixFileName(Copy));
|
||||
@ -629,9 +629,9 @@ FixVarName (
|
||||
/**
|
||||
Remove the unicode file tag from the begining of the file buffer since that will not be
|
||||
used by StdIn.
|
||||
|
||||
|
||||
@param[in] Handle Pointer to the handle of the file to be processed.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The unicode file tag has been moved successfully.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -837,7 +837,7 @@ UpdateStdInStdOutStdErr(
|
||||
if (StrStr(CommandLineWalker, L" 1>> ") != NULL) {
|
||||
Status = EFI_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >> ")) != NULL) {
|
||||
FirstLocation = MIN(CommandLineWalker, FirstLocation);
|
||||
SetMem16(CommandLineWalker, 8, L' ');
|
||||
@ -864,7 +864,7 @@ UpdateStdInStdOutStdErr(
|
||||
if (StrStr(CommandLineWalker, L" >>a ") != NULL) {
|
||||
Status = EFI_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" 1>a ")) != NULL) {
|
||||
FirstLocation = MIN(CommandLineWalker, FirstLocation);
|
||||
SetMem16(CommandLineWalker, 10, L' ');
|
||||
@ -878,7 +878,7 @@ UpdateStdInStdOutStdErr(
|
||||
if (StrStr(CommandLineWalker, L" 1>a ") != NULL) {
|
||||
Status = EFI_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >a ")) != NULL) {
|
||||
FirstLocation = MIN(CommandLineWalker, FirstLocation);
|
||||
SetMem16(CommandLineWalker, 8, L' ');
|
||||
@ -1107,7 +1107,7 @@ UpdateStdInStdOutStdErr(
|
||||
//
|
||||
// Cant redirect during a reconnect operation.
|
||||
//
|
||||
||(StrStr(NewCommandLine, L"connect -r") != NULL
|
||||
||(StrStr(NewCommandLine, L"connect -r") != NULL
|
||||
&& (StdOutVarName != NULL || StdOutFileName != NULL || StdErrFileName != NULL || StdErrVarName != NULL))
|
||||
//
|
||||
// Check that filetypes (Unicode/Ascii) do not change during an append
|
||||
@ -1307,7 +1307,7 @@ RestoreStdInStdOutStdErr (
|
||||
{
|
||||
SPLIT_LIST *Split;
|
||||
|
||||
if (ShellParameters == NULL
|
||||
if (ShellParameters == NULL
|
||||
||OldStdIn == NULL
|
||||
||OldStdOut == NULL
|
||||
||OldStdErr == NULL
|
||||
@ -1382,7 +1382,7 @@ UpdateArgcArgv(
|
||||
)
|
||||
{
|
||||
BOOLEAN StripParamQuotation;
|
||||
|
||||
|
||||
ASSERT(ShellParameters != NULL);
|
||||
StripParamQuotation = TRUE;
|
||||
|
||||
@ -1396,10 +1396,10 @@ UpdateArgcArgv(
|
||||
if (Type == Script_File_Name) {
|
||||
StripParamQuotation = FALSE;
|
||||
}
|
||||
|
||||
return ParseCommandLineToArgs( NewCommandLine,
|
||||
StripParamQuotation,
|
||||
&(ShellParameters->Argv),
|
||||
|
||||
return ParseCommandLineToArgs( NewCommandLine,
|
||||
StripParamQuotation,
|
||||
&(ShellParameters->Argv),
|
||||
&(ShellParameters->Argc)
|
||||
);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -1422,7 +1422,7 @@ EfiShellEnablePageBreak (
|
||||
variables with the format 'x=y', where x is the
|
||||
environment variable name and y is the value. If this
|
||||
is NULL, then the current shell environment is used.
|
||||
|
||||
|
||||
@param[out] StartImageStatus Returned status from gBS->StartImage.
|
||||
|
||||
@retval EFI_SUCCESS The command executed successfully. The status code
|
||||
@ -1460,7 +1460,7 @@ InternalShellExecuteDevicePath(
|
||||
ZeroMem(&ShellParamsProtocol, sizeof(EFI_SHELL_PARAMETERS_PROTOCOL));
|
||||
|
||||
NewHandle = NULL;
|
||||
|
||||
|
||||
NewCmdLine = AllocateCopyPool (StrSize (CommandLine), CommandLine);
|
||||
if (NewCmdLine == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@ -1505,8 +1505,8 @@ InternalShellExecuteDevicePath(
|
||||
//
|
||||
if (LoadedImage->ImageCodeType != EfiLoaderCode){
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SHELL_IMAGE_NOT_APP),
|
||||
ShellInfoObject.HiiHandle
|
||||
@ -1630,7 +1630,7 @@ FreeAlloc:
|
||||
variables with the format 'x=y', where x is the
|
||||
environment variable name and y is the value. If this
|
||||
is NULL, then the current shell environment is used.
|
||||
|
||||
|
||||
@param[out] StartImageStatus Returned status from the command line.
|
||||
|
||||
@retval EFI_SUCCESS The command executed successfully. The status code
|
||||
@ -2210,7 +2210,7 @@ EfiShellGetGuidFromName(
|
||||
if (Guid == NULL || GuidName == NULL) {
|
||||
return (EFI_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
|
||||
Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);
|
||||
|
||||
if (!EFI_ERROR(Status)) {
|
||||
@ -2762,8 +2762,8 @@ EfiShellGetEnvEx(
|
||||
; Node = (ENV_VAR_LIST*)GetNextNode(&gShellEnvVarList.Link, &Node->Link)
|
||||
){
|
||||
ASSERT(Node->Key != NULL);
|
||||
StrCpyS( CurrentWriteLocation,
|
||||
(Size)/sizeof(CHAR16) - (CurrentWriteLocation - ((CHAR16*)Buffer)),
|
||||
StrCpyS( CurrentWriteLocation,
|
||||
(Size)/sizeof(CHAR16) - (CurrentWriteLocation - ((CHAR16*)Buffer)),
|
||||
Node->Key
|
||||
);
|
||||
CurrentWriteLocation += StrLen(CurrentWriteLocation) + 1;
|
||||
@ -3233,9 +3233,9 @@ EfiShellGetHelpText(
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
StrnCpyS( FixCommand,
|
||||
(StrSize(Command) - 4 * sizeof (CHAR16))/sizeof(CHAR16),
|
||||
Command,
|
||||
StrnCpyS( FixCommand,
|
||||
(StrSize(Command) - 4 * sizeof (CHAR16))/sizeof(CHAR16),
|
||||
Command,
|
||||
StrLen(Command)-4
|
||||
);
|
||||
Status = ProcessManFile(FixCommand, FixCommand, Sections, NULL, HelpText);
|
||||
@ -3295,7 +3295,7 @@ InternalEfiShellGetListAlias(
|
||||
VOID
|
||||
)
|
||||
{
|
||||
|
||||
|
||||
EFI_STATUS Status;
|
||||
EFI_GUID Guid;
|
||||
CHAR16 *VariableName;
|
||||
@ -3330,17 +3330,17 @@ InternalEfiShellGetListAlias(
|
||||
RetVal = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
NameSize = NameBufferSize;
|
||||
Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid);
|
||||
}
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
SHELL_FREE_NON_NULL(RetVal);
|
||||
RetVal = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (CompareGuid(&Guid, &gShellAliasGuid)){
|
||||
ASSERT((RetVal == NULL && RetSize == 0) || (RetVal != NULL));
|
||||
RetVal = StrnCatGrow(&RetVal, &RetSize, VariableName, 0);
|
||||
@ -3355,10 +3355,10 @@ InternalEfiShellGetListAlias(
|
||||
/**
|
||||
Convert a null-terminated unicode string, in-place, to all lowercase.
|
||||
Then return it.
|
||||
|
||||
|
||||
@param Str The null-terminated string to be converted to all lowercase.
|
||||
|
||||
@return The null-terminated string converted into all lowercase.
|
||||
|
||||
@return The null-terminated string converted into all lowercase.
|
||||
**/
|
||||
CHAR16 *
|
||||
ToLower (
|
||||
@ -3385,7 +3385,7 @@ ToLower (
|
||||
@param[out] Volatile upon return of a single command if TRUE indicates
|
||||
this is stored in a volatile fashion. FALSE otherwise.
|
||||
|
||||
@return If Alias is not NULL, it will return a pointer to
|
||||
@return If Alias is not NULL, it will return a pointer to
|
||||
the NULL-terminated command for that alias.
|
||||
If Alias is NULL, ReturnedData points to a ';'
|
||||
delimited list of alias (e.g.
|
||||
@ -3801,7 +3801,7 @@ CleanUpShellEnvironment (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *SimpleEx;
|
||||
|
||||
|
||||
CleanUpShellProtocol (NewShell);
|
||||
|
||||
Status = gBS->CloseEvent(NewShell->ExecutionBreak);
|
||||
@ -3844,21 +3844,21 @@ NotificationFunction(
|
||||
if ( ((KeyData->Key.UnicodeChar == L'c') &&
|
||||
(KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED))) ||
|
||||
(KeyData->Key.UnicodeChar == 3)
|
||||
){
|
||||
){
|
||||
if (ShellInfoObject.NewEfiShellProtocol->ExecutionBreak == NULL) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
}
|
||||
return (gBS->SignalEvent(ShellInfoObject.NewEfiShellProtocol->ExecutionBreak));
|
||||
} else if ((KeyData->Key.UnicodeChar == L's') &&
|
||||
(KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED))
|
||||
){
|
||||
){
|
||||
ShellInfoObject.HaltOutput = TRUE;
|
||||
}
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
Function to start monitoring for CTRL-C using SimpleTextInputEx. This
|
||||
Function to start monitoring for CTRL-C using SimpleTextInputEx. This
|
||||
feature's enabled state was not known when the shell initially launched.
|
||||
|
||||
@retval EFI_SUCCESS The feature is enabled.
|
||||
@ -3882,8 +3882,8 @@ InernalEfiShellStartMonitor(
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SHELL_NO_IN_EX),
|
||||
ShellInfoObject.HiiHandle);
|
||||
@ -3904,7 +3904,7 @@ InernalEfiShellStartMonitor(
|
||||
&KeyData,
|
||||
NotificationFunction,
|
||||
&ShellInfoObject.CtrlCNotifyHandle1);
|
||||
|
||||
|
||||
KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = SimpleEx->RegisterKeyNotify(
|
||||
|
@ -3,7 +3,7 @@
|
||||
manipulation, and initialization of EFI_SHELL_PROTOCOL.
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -36,7 +36,7 @@ typedef struct {
|
||||
|
||||
This must be removed via calling CleanUpShellProtocol().
|
||||
|
||||
@param[in, out] NewShell The pointer to the pointer to the structure
|
||||
@param[in, out] NewShell The pointer to the pointer to the structure
|
||||
to install.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@ -819,7 +819,7 @@ EfiShellIsRootShell(
|
||||
aliases will be returned in ReturnedData.
|
||||
@param[out] Volatile upon return of a single command if TRUE indicates
|
||||
this is stored in a volatile fashion. FALSE otherwise.
|
||||
@return If Alias is not NULL, it will return a pointer to
|
||||
@return If Alias is not NULL, it will return a pointer to
|
||||
the NULL-terminated command for that alias.
|
||||
If Alias is NULL, ReturnedData points to a ';'
|
||||
delimited list of alias (e.g.
|
||||
@ -917,7 +917,7 @@ InternalEfiShellSetEnv(
|
||||
);
|
||||
|
||||
/**
|
||||
Function to start monitoring for CTRL-C using SimpleTextInputEx. This
|
||||
Function to start monitoring for CTRL-C using SimpleTextInputEx. This
|
||||
feature's enabled state was not known when the shell initially launched.
|
||||
|
||||
@retval EFI_SUCCESS The feature is enabled.
|
||||
|
@ -2,4 +2,4 @@ TestArgv.nsh is a very simple shell script to test how the interpreter parses
|
||||
the parameters. It uses ShellCTestApp.efi to dump the parameters passed from the
|
||||
intepreter.
|
||||
|
||||
TestArgv.log is the desired output created using "TestArgv.nsh > TestArgv.log".
|
||||
TestArgv.log is the desired output created using "TestArgv.nsh > TestArgv.log".
|
||||
|
@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This is the shell application
|
||||
#
|
||||
# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2009 - 2018, 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
|
||||
@ -36,4 +36,4 @@
|
||||
|
||||
[LibraryClasses]
|
||||
ShellCEntryLib
|
||||
UefiLib
|
||||
UefiLib
|
||||
|
@ -12,14 +12,14 @@
|
||||
and start and end time values.
|
||||
Dp uses this information to group records in different ways. It also uses
|
||||
timer information to calculate elapsed time for each measurement.
|
||||
|
||||
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
|
||||
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
**/
|
||||
@ -741,10 +741,10 @@ InitSummaryData (
|
||||
|
||||
/**
|
||||
Dump performance data.
|
||||
|
||||
|
||||
@param[in] ImageHandle The image handle.
|
||||
@param[in] SystemTable The system table.
|
||||
|
||||
|
||||
@retval SHELL_SUCCESS Command completed successfully.
|
||||
@retval SHELL_INVALID_PARAMETER Command usage error.
|
||||
@retval SHELL_ABORTED The user aborts the operation.
|
||||
@ -952,7 +952,7 @@ RunDp (
|
||||
**** Cooked (Default)
|
||||
****************************************************************************/
|
||||
GatherStatistics (CustomCumulativeData);
|
||||
if (CumulativeMode) {
|
||||
if (CumulativeMode) {
|
||||
ProcessCumulative (CustomCumulativeData);
|
||||
} else if (AllMode) {
|
||||
Status = DumpAllTrace( Number2Display, ExcludeMode);
|
||||
|
@ -7,7 +7,7 @@
|
||||
// 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
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
@ -108,7 +108,7 @@
|
||||
" -t VALUE - Sets display threshold to VALUE microseconds\r\n"
|
||||
" -n COUNT - Limits display to COUNT lines in All and Raw modes\r\n"
|
||||
" -i - Displays identifier\r\n"
|
||||
" -c TOKEN - Display pre-defined and custom cumulative data\r\n"
|
||||
" -c TOKEN - Display pre-defined and custom cumulative data\r\n"
|
||||
" Pre-defined cumulative token are:\r\n"
|
||||
" 1. LoadImage:\r\n"
|
||||
" 2. StartImage:\r\n"
|
||||
|
@ -44,24 +44,24 @@ extern UINT32 const NumCum;
|
||||
|
||||
///@}
|
||||
|
||||
/**
|
||||
/**
|
||||
Calculate an event's duration in timer ticks.
|
||||
|
||||
|
||||
Given the count direction and the event's start and end timer values,
|
||||
calculate the duration of the event in timer ticks. Information for
|
||||
the current measurement is pointed to by the parameter.
|
||||
|
||||
|
||||
If the measurement's start time is 1, it indicates that the developer
|
||||
is indicating that the measurement began at the release of reset.
|
||||
The start time is adjusted to the timer's starting count before performing
|
||||
the elapsed time calculation.
|
||||
|
||||
|
||||
The calculated duration, in ticks, is the absolute difference between
|
||||
the measurement's ending and starting counts.
|
||||
|
||||
|
||||
@param Measurement Pointer to a MEASUREMENT_RECORD structure containing
|
||||
data for the current measurement.
|
||||
|
||||
|
||||
@return The 64-bit duration of the event.
|
||||
**/
|
||||
UINT64
|
||||
@ -69,14 +69,14 @@ GetDuration (
|
||||
IN OUT MEASUREMENT_RECORD *Measurement
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Determine whether the Measurement record is for an EFI Phase.
|
||||
|
||||
|
||||
The Token and Module members of the measurement record are checked.
|
||||
Module must be empty and Token must be one of SEC, PEI, DXE, BDS, or SHELL.
|
||||
|
||||
|
||||
@param[in] Measurement A pointer to the Measurement record to test.
|
||||
|
||||
|
||||
@retval TRUE The measurement record is for an EFI Phase.
|
||||
@retval FALSE The measurement record is NOT for an EFI Phase.
|
||||
**/
|
||||
@ -99,17 +99,17 @@ IsCorePerf(
|
||||
IN MEASUREMENT_RECORD *Measurement
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Get the file name portion of the Pdb File Name.
|
||||
|
||||
|
||||
The portion of the Pdb File Name between the last backslash and
|
||||
either a following period or the end of the string is converted
|
||||
to Unicode and copied into UnicodeBuffer. The name is truncated,
|
||||
if necessary, to ensure that UnicodeBuffer is not overrun.
|
||||
|
||||
|
||||
@param[in] PdbFileName Pdb file name.
|
||||
@param[out] UnicodeBuffer The resultant Unicode File Name.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
DpGetShortPdbFileName (
|
||||
@ -117,7 +117,7 @@ DpGetShortPdbFileName (
|
||||
OUT CHAR16 *UnicodeBuffer
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Get a human readable name for an image handle.
|
||||
The following methods will be tried orderly:
|
||||
1. Image PDB
|
||||
@ -126,29 +126,29 @@ DpGetShortPdbFileName (
|
||||
4. Image GUID
|
||||
5. Image DevicePath
|
||||
6. Unknown Driver Name
|
||||
|
||||
|
||||
@param[in] Handle
|
||||
|
||||
|
||||
@post The resulting Unicode name string is stored in the
|
||||
mGaugeString global array.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
DpGetNameFromHandle (
|
||||
IN EFI_HANDLE Handle
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Calculate the Duration in microseconds.
|
||||
|
||||
|
||||
Duration is multiplied by 1000, instead of Frequency being divided by 1000 or
|
||||
multiplying the result by 1000, in order to maintain precision. Since Duration is
|
||||
a 64-bit value, multiplying it by 1000 is unlikely to produce an overflow.
|
||||
|
||||
|
||||
The time is calculated as (Duration * 1000) / Timer_Frequency.
|
||||
|
||||
|
||||
@param[in] Duration The event duration in timer ticks.
|
||||
|
||||
|
||||
@return A 64-bit value which is the Elapsed time in microseconds.
|
||||
**/
|
||||
UINT64
|
||||
@ -156,16 +156,16 @@ DurationInMicroSeconds (
|
||||
IN UINT64 Duration
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Get index of Measurement Record's match in the CumData array.
|
||||
|
||||
|
||||
If the Measurement's Token value matches a Token in one of the CumData
|
||||
records, the index of the matching record is returned. The returned
|
||||
index is a signed value so that negative values can indicate that
|
||||
the Measurement didn't match any entry in the CumData array.
|
||||
|
||||
|
||||
@param[in] Measurement A pointer to a Measurement Record to match against the CumData array.
|
||||
|
||||
|
||||
@retval <0 Token is not in the CumData array.
|
||||
@retval >=0 Return value is the index into CumData where Token is found.
|
||||
**/
|
||||
@ -174,17 +174,17 @@ GetCumulativeItem(
|
||||
IN MEASUREMENT_RECORD *Measurement
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Collect verbose statistics about the logged performance measurements.
|
||||
|
||||
|
||||
General Summary information for all Trace measurements is gathered and
|
||||
stored within the SummaryData structure. This information is both
|
||||
used internally by subsequent reporting functions, and displayed
|
||||
at the end of verbose reports.
|
||||
|
||||
|
||||
@pre The SummaryData and CumData structures must be initialized
|
||||
prior to calling this function.
|
||||
|
||||
|
||||
@post The SummaryData and CumData structures contain statistics for the
|
||||
current performance logs.
|
||||
|
||||
@ -196,23 +196,23 @@ GatherStatistics(
|
||||
IN OUT PERF_CUM_DATA *CustomCumulativeData OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Gather and print ALL Trace Records.
|
||||
|
||||
|
||||
Displays all "interesting" Trace measurements in order.<BR>
|
||||
The number of records displayed is controlled by:
|
||||
- records with a duration less than mInterestThreshold microseconds are not displayed.
|
||||
- No more than Limit records are displayed. A Limit of zero will not limit the output.
|
||||
- If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
|
||||
displayed.
|
||||
|
||||
|
||||
@pre The mInterestThreshold global variable is set to the shortest duration to be printed.
|
||||
The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.
|
||||
They must not be in use by a calling function.
|
||||
|
||||
|
||||
@param[in] Limit The number of records to print. Zero is ALL.
|
||||
@param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_ABORTED The user aborts the operation.
|
||||
@return Others from a call to gBS->LocateHandleBuffer().
|
||||
@ -223,20 +223,20 @@ DumpAllTrace(
|
||||
IN BOOLEAN ExcludeFlag
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Gather and print Raw Trace Records.
|
||||
|
||||
|
||||
All Trace measurements with a duration greater than or equal to
|
||||
mInterestThreshold are printed without interpretation.
|
||||
|
||||
|
||||
The number of records displayed is controlled by:
|
||||
- records with a duration less than mInterestThreshold microseconds are not displayed.
|
||||
- No more than Limit records are displayed. A Limit of zero will not limit the output.
|
||||
- If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
|
||||
displayed.
|
||||
|
||||
|
||||
@pre The mInterestThreshold global variable is set to the shortest duration to be printed.
|
||||
|
||||
|
||||
@param[in] Limit The number of records to print. Zero is ALL.
|
||||
@param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@ -248,9 +248,9 @@ DumpRawTrace(
|
||||
IN BOOLEAN ExcludeFlag
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Gather and print Major Phase metrics.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
ProcessPhases(
|
||||
@ -258,11 +258,11 @@ ProcessPhases(
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Gather and print Handle data.
|
||||
|
||||
|
||||
@param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_ABORTED The user aborts the operation.
|
||||
@return Others from a call to gBS->LocateHandleBuffer().
|
||||
@ -273,11 +273,11 @@ ProcessHandles(
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Gather and print PEIM data.
|
||||
|
||||
|
||||
Only prints complete PEIM records
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_ABORTED The user aborts the operation.
|
||||
**/
|
||||
@ -286,14 +286,14 @@ ProcessPeims(
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Gather and print global data.
|
||||
|
||||
|
||||
Strips out incomplete or "Execution Phase" records
|
||||
Only prints records where Handle is NULL
|
||||
Increment TIndex for every record, even skipped ones, so that we have an
|
||||
indication of every measurement record taken.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_ABORTED The user aborts the operation.
|
||||
**/
|
||||
@ -302,16 +302,16 @@ ProcessGlobal(
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Gather and print cumulative data.
|
||||
|
||||
|
||||
Traverse the measurement records and:<BR>
|
||||
For each record with a Token listed in the CumData array:<BR>
|
||||
- Update the instance count and the total, minimum, and maximum durations.
|
||||
Finally, print the gathered cumulative statistics.
|
||||
|
||||
@param[in] CustomCumulativeData The pointer to the custom cumulative data.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
ProcessCumulative(
|
||||
|
@ -39,24 +39,24 @@
|
||||
#include "Literals.h"
|
||||
#include "DpInternal.h"
|
||||
|
||||
/**
|
||||
/**
|
||||
Calculate an event's duration in timer ticks.
|
||||
|
||||
|
||||
Given the count direction and the event's start and end timer values,
|
||||
calculate the duration of the event in timer ticks. Information for
|
||||
the current measurement is pointed to by the parameter.
|
||||
|
||||
|
||||
If the measurement's start time is 1, it indicates that the developer
|
||||
is indicating that the measurement began at the release of reset.
|
||||
The start time is adjusted to the timer's starting count before performing
|
||||
the elapsed time calculation.
|
||||
|
||||
|
||||
The calculated duration, in ticks, is the absolute difference between
|
||||
the measurement's ending and starting counts.
|
||||
|
||||
|
||||
@param Measurement Pointer to a MEASUREMENT_RECORD structure containing
|
||||
data for the current measurement.
|
||||
|
||||
|
||||
@return The 64-bit duration of the event.
|
||||
**/
|
||||
UINT64
|
||||
@ -81,14 +81,14 @@ GetDuration (
|
||||
return Duration;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Determine whether the Measurement record is for an EFI Phase.
|
||||
|
||||
|
||||
The Token and Module members of the measurement record are checked.
|
||||
Module must be empty and Token must be one of SEC, PEI, DXE, BDS, or SHELL.
|
||||
|
||||
|
||||
@param[in] Measurement A pointer to the Measurement record to test.
|
||||
|
||||
|
||||
@retval TRUE The measurement record is for an EFI Phase.
|
||||
@retval FALSE The measurement record is NOT for an EFI Phase.
|
||||
**/
|
||||
@ -139,17 +139,17 @@ IsCorePerf(
|
||||
return RetVal;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Get the file name portion of the Pdb File Name.
|
||||
|
||||
|
||||
The portion of the Pdb File Name between the last backslash and
|
||||
either a following period or the end of the string is converted
|
||||
to Unicode and copied into UnicodeBuffer. The name is truncated,
|
||||
if necessary, to ensure that UnicodeBuffer is not overrun.
|
||||
|
||||
|
||||
@param[in] PdbFileName Pdb file name.
|
||||
@param[out] UnicodeBuffer The resultant Unicode File Name.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
DpGetShortPdbFileName (
|
||||
@ -192,7 +192,7 @@ DpGetShortPdbFileName (
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Get a human readable name for an image handle.
|
||||
The following methods will be tried orderly:
|
||||
1. Image PDB
|
||||
@ -377,17 +377,17 @@ DpGetNameFromHandle (
|
||||
FreePool (StringPtr);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Calculate the Duration in microseconds.
|
||||
|
||||
|
||||
Duration is multiplied by 1000, instead of Frequency being divided by 1000 or
|
||||
multiplying the result by 1000, in order to maintain precision. Since Duration is
|
||||
a 64-bit value, multiplying it by 1000 is unlikely to produce an overflow.
|
||||
|
||||
|
||||
The time is calculated as (Duration * 1000) / Timer_Frequency.
|
||||
|
||||
|
||||
@param[in] Duration The event duration in timer ticks.
|
||||
|
||||
|
||||
@return A 64-bit value which is the Elapsed time in microseconds.
|
||||
**/
|
||||
UINT64
|
||||
@ -398,16 +398,16 @@ DurationInMicroSeconds (
|
||||
return DivU64x32 (Duration, 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Get index of Measurement Record's match in the CumData array.
|
||||
|
||||
|
||||
If the Measurement's Token value matches a Token in one of the CumData
|
||||
records, the index of the matching record is returned. The returned
|
||||
index is a signed value so that negative values can indicate that
|
||||
the Measurement didn't match any entry in the CumData array.
|
||||
|
||||
|
||||
@param[in] Measurement A pointer to a Measurement Record to match against the CumData array.
|
||||
|
||||
|
||||
@retval <0 Token is not in the CumData array.
|
||||
@retval >=0 Return value is the index into CumData where Token is found.
|
||||
**/
|
||||
|
@ -2,7 +2,7 @@
|
||||
The implementation for the 'tftp' Shell command.
|
||||
|
||||
Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@ -50,8 +50,8 @@ STATIC CONST CHAR16 mTftpProgressDelete[] = L"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b
|
||||
@return TRUE The value was returned.
|
||||
@return FALSE A parsing error occured.
|
||||
**/
|
||||
STATIC
|
||||
BOOLEAN
|
||||
STATIC
|
||||
BOOLEAN
|
||||
StringToUint16 (
|
||||
IN CONST CHAR16 *ValueStr,
|
||||
OUT UINT16 *Value
|
||||
@ -64,7 +64,7 @@ StringToUint16 (
|
||||
@param[in] NicNumber The network physical device number.
|
||||
@param[out] NicName Address where to store the NIC name.
|
||||
The memory area has to be at least
|
||||
IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH
|
||||
IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH
|
||||
double byte wide.
|
||||
|
||||
@return EFI_SUCCESS The name of the NIC was returned.
|
||||
@ -75,8 +75,8 @@ StringToUint16 (
|
||||
Managed Network Protocol could not be
|
||||
read.
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
GetNicName (
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NicNumber,
|
||||
@ -102,8 +102,8 @@ GetNicName (
|
||||
@return Others Either the creation of the child or the opening
|
||||
of the protocol failed.
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CreateServiceChildAndOpenProtocol (
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_GUID *ServiceBindingProtocolGuid,
|
||||
@ -124,8 +124,8 @@ CreateServiceChildAndOpenProtocol (
|
||||
@param[in] ChildHandle Handle of the child to be destroyed.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
STATIC
|
||||
VOID
|
||||
CloseProtocolAndDestroyServiceChild (
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_GUID *ServiceBindingProtocolGuid,
|
||||
@ -148,8 +148,8 @@ CloseProtocolAndDestroyServiceChild (
|
||||
(see EFI_MTFTP4_PROTOCOL.GetInfo() status codes)
|
||||
or error when parsing the response of the server.
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
GetFileSize (
|
||||
IN EFI_MTFTP4_PROTOCOL *Mtftp4,
|
||||
IN CONST CHAR8 *FilePath,
|
||||
@ -175,8 +175,8 @@ GetFileSize (
|
||||
(see EFI_MTFTP4_PROTOCOL.ReadFile() status codes).
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
DownloadFile (
|
||||
IN EFI_MTFTP4_PROTOCOL *Mtftp4,
|
||||
IN CONST CHAR16 *FilePath,
|
||||
@ -198,8 +198,8 @@ DownloadFile (
|
||||
@retval EFI_SUCCESS All packets are accepted.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CheckPacket (
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
@ -623,7 +623,7 @@ StringToUint16 (
|
||||
@param[in] NicNumber The network physical device number.
|
||||
@param[out] NicName Address where to store the NIC name.
|
||||
The memory area has to be at least
|
||||
IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH
|
||||
IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH
|
||||
double byte wide.
|
||||
|
||||
@return EFI_SUCCESS The name of the NIC was returned.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
GUID for Shell Map for Get/Set via runtime services.
|
||||
|
||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -22,4 +22,4 @@
|
||||
|
||||
extern EFI_GUID gShellMapGuid;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provides interface to advanced shell functionality for parsing both handle and protocol database.
|
||||
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -120,9 +120,9 @@ GetStringNameFromHandle(
|
||||
|
||||
/**
|
||||
Get best support language for this driver.
|
||||
|
||||
First base on the user input language to search, second base on the current
|
||||
platform used language to search, third get the first language from the
|
||||
|
||||
First base on the user input language to search, second base on the current
|
||||
platform used language to search, third get the first language from the
|
||||
support language list. The caller need to free the buffer of the best language.
|
||||
|
||||
@param[in] SupportedLanguages The support languages for this driver.
|
||||
|
@ -4,7 +4,7 @@
|
||||
This library is for use ONLY by shell commands linked into the shell application.
|
||||
This library will not function if it is used for UEFI Shell 2.0 Applications.
|
||||
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
This program and the accompanying materials
|
||||
@ -507,10 +507,10 @@ ShellCommandConsistMappingUnInitialize (
|
||||
);
|
||||
|
||||
/**
|
||||
Create a consistent mapped name for the device specified by DevicePath
|
||||
Create a consistent mapped name for the device specified by DevicePath
|
||||
based on the Table.
|
||||
|
||||
This must be called after ShellCommandConsistMappingInitialize() and
|
||||
This must be called after ShellCommandConsistMappingInitialize() and
|
||||
before ShellCommandConsistMappingUnInitialize() is called.
|
||||
|
||||
@param[in] DevicePath The pointer to the dev path for the device.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provides interface to shell functionality for shell commands and applications.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, 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
|
||||
@ -1356,9 +1356,9 @@ ShellFileHandleReadLine(
|
||||
|
||||
/**
|
||||
Function to delete a file by name
|
||||
|
||||
|
||||
@param[in] FileName Pointer to file name to delete.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS the file was deleted sucessfully
|
||||
@retval EFI_WARN_DELETE_FAILURE the handle was closed, but the file was not
|
||||
deleted
|
||||
@ -1388,7 +1388,7 @@ ShellDeleteFileByName(
|
||||
|
||||
@param[in] CommandToGetHelpOn Pointer to a string containing the command name of help file to be printed.
|
||||
@param[in] SectionToGetHelpOn Pointer to the section specifier(s).
|
||||
@param[in] PrintCommandText If TRUE, prints the command followed by the help content, otherwise prints
|
||||
@param[in] PrintCommandText If TRUE, prints the command followed by the help content, otherwise prints
|
||||
the help content only.
|
||||
@retval EFI_DEVICE_ERROR The help data format was incorrect.
|
||||
@retval EFI_NOT_FOUND The help data could not be found.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provides interface to advanced shell functionality for parsing both handle and protocol database.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2013-2016 Hewlett-Packard Development Company, L.P.<BR>
|
||||
This program and the accompanying materials
|
||||
@ -163,53 +163,53 @@
|
||||
/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec < 2.4a
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// A unique number identifying the firmware image within the device. The number is
|
||||
///
|
||||
/// A unique number identifying the firmware image within the device. The number is
|
||||
/// between 1 and DescriptorCount.
|
||||
///
|
||||
///
|
||||
UINT8 ImageIndex;
|
||||
///
|
||||
/// A unique number identifying the firmware image type.
|
||||
///
|
||||
/// A unique number identifying the firmware image type.
|
||||
///
|
||||
EFI_GUID ImageTypeId;
|
||||
///
|
||||
/// A unique number identifying the firmware image.
|
||||
///
|
||||
///
|
||||
/// A unique number identifying the firmware image.
|
||||
///
|
||||
UINT64 ImageId;
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image name.
|
||||
///
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image name.
|
||||
///
|
||||
CHAR16 *ImageIdName;
|
||||
///
|
||||
/// Identifies the version of the device firmware. The format is vendor specific and new
|
||||
///
|
||||
/// Identifies the version of the device firmware. The format is vendor specific and new
|
||||
/// version must have a greater value than an old version.
|
||||
///
|
||||
///
|
||||
UINT32 Version;
|
||||
///
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image version name.
|
||||
///
|
||||
///
|
||||
CHAR16 *VersionName;
|
||||
///
|
||||
///
|
||||
/// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
|
||||
///
|
||||
///
|
||||
UINTN Size;
|
||||
///
|
||||
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
|
||||
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
|
||||
/// supported and the current setting value is indicated in AttributesSetting. A
|
||||
/// value of 0 indicates the attribute is not supported and the current setting value in
|
||||
///
|
||||
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
|
||||
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
|
||||
/// supported and the current setting value is indicated in AttributesSetting. A
|
||||
/// value of 0 indicates the attribute is not supported and the current setting value in
|
||||
/// AttributesSetting is meaningless.
|
||||
///
|
||||
///
|
||||
UINT64 AttributesSupported;
|
||||
///
|
||||
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
|
||||
///
|
||||
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
|
||||
/// this parameter.
|
||||
///
|
||||
///
|
||||
UINT64 AttributesSetting;
|
||||
///
|
||||
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
|
||||
///
|
||||
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
|
||||
/// values of this parameter.
|
||||
///
|
||||
///
|
||||
UINT64 Compatibilities;
|
||||
} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V1;
|
||||
|
||||
@ -218,53 +218,53 @@ typedef struct {
|
||||
/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec > 2.4a and < 2.5
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// A unique number identifying the firmware image within the device. The number is
|
||||
///
|
||||
/// A unique number identifying the firmware image within the device. The number is
|
||||
/// between 1 and DescriptorCount.
|
||||
///
|
||||
///
|
||||
UINT8 ImageIndex;
|
||||
///
|
||||
/// A unique number identifying the firmware image type.
|
||||
///
|
||||
/// A unique number identifying the firmware image type.
|
||||
///
|
||||
EFI_GUID ImageTypeId;
|
||||
///
|
||||
/// A unique number identifying the firmware image.
|
||||
///
|
||||
///
|
||||
/// A unique number identifying the firmware image.
|
||||
///
|
||||
UINT64 ImageId;
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image name.
|
||||
///
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image name.
|
||||
///
|
||||
CHAR16 *ImageIdName;
|
||||
///
|
||||
/// Identifies the version of the device firmware. The format is vendor specific and new
|
||||
///
|
||||
/// Identifies the version of the device firmware. The format is vendor specific and new
|
||||
/// version must have a greater value than an old version.
|
||||
///
|
||||
///
|
||||
UINT32 Version;
|
||||
///
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image version name.
|
||||
///
|
||||
///
|
||||
CHAR16 *VersionName;
|
||||
///
|
||||
///
|
||||
/// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
|
||||
///
|
||||
///
|
||||
UINTN Size;
|
||||
///
|
||||
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
|
||||
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
|
||||
/// supported and the current setting value is indicated in AttributesSetting. A
|
||||
/// value of 0 indicates the attribute is not supported and the current setting value in
|
||||
///
|
||||
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
|
||||
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
|
||||
/// supported and the current setting value is indicated in AttributesSetting. A
|
||||
/// value of 0 indicates the attribute is not supported and the current setting value in
|
||||
/// AttributesSetting is meaningless.
|
||||
///
|
||||
///
|
||||
UINT64 AttributesSupported;
|
||||
///
|
||||
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
|
||||
///
|
||||
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
|
||||
/// this parameter.
|
||||
///
|
||||
///
|
||||
UINT64 AttributesSetting;
|
||||
///
|
||||
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
|
||||
///
|
||||
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
|
||||
/// values of this parameter.
|
||||
///
|
||||
///
|
||||
UINT64 Compatibilities;
|
||||
///
|
||||
/// Describes the lowest ImageDescriptor version that the device will accept. Only
|
||||
|
@ -1,6 +1,6 @@
|
||||
## @file
|
||||
# Provides interface to advanced shell functionality for parsing both handle and protocol database.
|
||||
# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>
|
||||
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
# (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
#
|
||||
@ -354,4 +354,4 @@
|
||||
|
||||
[Pcd.common]
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize ## CONSUMES
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellIncludeNtGuids ## CONSUMES
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellIncludeNtGuids ## CONSUMES
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for BCFG command.
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -94,8 +94,8 @@ typedef struct {
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateOptionalData(
|
||||
UINT16 Index,
|
||||
UINTN DataSize,
|
||||
UINT16 Index,
|
||||
UINTN DataSize,
|
||||
UINT8 *Data,
|
||||
IN CONST BCFG_OPERATION_TARGET Target
|
||||
)
|
||||
@ -109,7 +109,7 @@ UpdateOptionalData(
|
||||
UINTN OriginalOptionDataSize;
|
||||
|
||||
UnicodeSPrint(VariableName, sizeof(VariableName), L"%s%04x", Target == BcfgTargetBootOrder?L"Boot":L"Driver", Index);
|
||||
|
||||
|
||||
OriginalSize = 0;
|
||||
OriginalData = NULL;
|
||||
NewData = NULL;
|
||||
@ -157,7 +157,7 @@ UpdateOptionalData(
|
||||
// put the data back under the variable
|
||||
//
|
||||
Status = gRT->SetVariable(
|
||||
VariableName,
|
||||
VariableName,
|
||||
(EFI_GUID*)&gEfiGlobalVariableGuid,
|
||||
EFI_VARIABLE_NON_VOLATILE|EFI_VARIABLE_BOOTSERVICE_ACCESS|EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
NewSize,
|
||||
@ -180,7 +180,7 @@ UpdateOptionalData(
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetBootOptionCrc(
|
||||
UINT32 *Crc,
|
||||
UINT32 *Crc,
|
||||
UINT16 BootIndex
|
||||
)
|
||||
{
|
||||
@ -629,7 +629,7 @@ BcfgAdd(
|
||||
(VOID**)&FilePath);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_HANDLE), gShellBcfgHiiHandle, L"bcfg", HandleNumber);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_HANDLE), gShellBcfgHiiHandle, L"bcfg", HandleNumber);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
@ -660,7 +660,7 @@ BcfgAdd(
|
||||
|| ParentControllerHandleCount > 0
|
||||
|| ChildControllerHandleCount > 0
|
||||
|| !EFI_ERROR(Status) ) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Handle Number");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Handle Number");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -680,18 +680,18 @@ BcfgAdd(
|
||||
//
|
||||
// If filename matched nothing fail
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (FileList->Link.ForwardLink != FileList->Link.BackLink) {
|
||||
//
|
||||
// If filename expanded to multiple names, fail
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Arg = (EFI_SHELL_FILE_INFO*)GetFirstNode(&FileList->Link);
|
||||
if (EFI_ERROR(Arg->Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_OPEN), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_OPEN), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -703,7 +703,7 @@ BcfgAdd(
|
||||
//
|
||||
DevicePath = gEfiShellProtocol->GetDevicePathFromFilePath(Arg->FullName);
|
||||
if (DevicePath == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_DP), gShellBcfgHiiHandle, L"bcfg", Arg->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_DP), gShellBcfgHiiHandle, L"bcfg", Arg->FullName);
|
||||
ShellStatus = SHELL_UNSUPPORTED;
|
||||
} else {
|
||||
if (UsePath) {
|
||||
@ -752,7 +752,7 @@ BcfgAdd(
|
||||
}
|
||||
|
||||
if (TargetLocation == 0xFFFF) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_TARGET_NF), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_TARGET_NF), gShellBcfgHiiHandle, L"bcfg");
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_TARGET), gShellBcfgHiiHandle, TargetLocation);
|
||||
}
|
||||
@ -794,7 +794,7 @@ BcfgAdd(
|
||||
}
|
||||
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", OptionStr);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", OptionStr);
|
||||
} else {
|
||||
NewOrder = AllocateZeroPool ((OrderCount + 1) * sizeof (NewOrder[0]));
|
||||
if (NewOrder != NULL) {
|
||||
@ -882,7 +882,7 @@ BcfgRemove(
|
||||
0,
|
||||
NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
NewOrder = AllocateZeroPool(OrderCount*sizeof(CurrentOrder[0]));
|
||||
@ -903,7 +903,7 @@ BcfgRemove(
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", Target == BcfgTargetBootOrder?(CHAR16*)L"BootOrder":(CHAR16*)L"DriverOrder");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", Target == BcfgTargetBootOrder?(CHAR16*)L"BootOrder":(CHAR16*)L"DriverOrder");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
return (SHELL_SUCCESS);
|
||||
@ -965,7 +965,7 @@ BcfgMove(
|
||||
FreePool(NewOrder);
|
||||
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", Target == BcfgTargetBootOrder?(CHAR16*)L"BootOrder":(CHAR16*)L"DriverOrder");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", Target == BcfgTargetBootOrder?(CHAR16*)L"BootOrder":(CHAR16*)L"DriverOrder");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
return (SHELL_SUCCESS);
|
||||
@ -1027,7 +1027,7 @@ BcfgAddOpt(
|
||||
//
|
||||
Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE, TRUE);
|
||||
if (EFI_ERROR(Status) || (((UINT16)Intermediate) != Intermediate) || StrStr(Walker, L" ") == NULL || ((UINT16)Intermediate) > ((UINT16)OrderCount)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Option Index");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Option Index");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
return (ShellStatus);
|
||||
}
|
||||
@ -1042,7 +1042,7 @@ BcfgAddOpt(
|
||||
}
|
||||
|
||||
//
|
||||
// determine whether we have file with data, quote delimited information, or a hot-key
|
||||
// determine whether we have file with data, quote delimited information, or a hot-key
|
||||
//
|
||||
if (Walker[0] == L'\"') {
|
||||
//
|
||||
@ -1050,12 +1050,12 @@ BcfgAddOpt(
|
||||
//
|
||||
Temp = StrStr(Walker+1, L"\"");
|
||||
if (Temp == NULL || StrLen(Temp) != 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
FileName = StrnCatGrow(&FileName, NULL, Walker+1, 0);
|
||||
if (FileName == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
return (ShellStatus);
|
||||
}
|
||||
@ -1064,7 +1064,7 @@ BcfgAddOpt(
|
||||
Temp2[0] = CHAR_NULL;
|
||||
Temp2++;
|
||||
if (StrLen(Temp2)>0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (EFI_ERROR(ShellFileExists(Walker))) {
|
||||
@ -1086,14 +1086,14 @@ BcfgAddOpt(
|
||||
// filename
|
||||
//
|
||||
if (EFI_ERROR(ShellFileExists(Walker))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FIND_FAIL), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FIND_FAIL), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
FileName = StrnCatGrow(&FileName, NULL, Walker, 0);
|
||||
}
|
||||
} else {
|
||||
if (Target != BcfgTargetBootOrder) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_BOOT_ONLY), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_BOOT_ONLY), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -1103,7 +1103,7 @@ BcfgAddOpt(
|
||||
//
|
||||
Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE, TRUE);
|
||||
if (EFI_ERROR(Status) || (((UINT32)Intermediate) != Intermediate) || StrStr(Walker, L" ") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
NewKeyOption.KeyData.PackedValue = (UINT32)Intermediate;
|
||||
@ -1118,12 +1118,12 @@ BcfgAddOpt(
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
//
|
||||
// Now we know how many EFI_INPUT_KEY structs we need to attach to the end of the EFI_KEY_OPTION struct.
|
||||
// Now we know how many EFI_INPUT_KEY structs we need to attach to the end of the EFI_KEY_OPTION struct.
|
||||
// Re-allocate with the added information.
|
||||
//
|
||||
KeyOptionBuffer = AllocatePool (sizeof(EFI_KEY_OPTION) + (sizeof(EFI_INPUT_KEY) * NewKeyOption.KeyData.Options.InputKeyCount));
|
||||
if (KeyOptionBuffer == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
return ShellStatus;
|
||||
}
|
||||
@ -1135,7 +1135,7 @@ BcfgAddOpt(
|
||||
//
|
||||
Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE, TRUE);
|
||||
if (EFI_ERROR(Status) || (((UINT16)Intermediate) != Intermediate) || StrStr(Walker, L" ") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
((EFI_INPUT_KEY*)(((UINT8*)KeyOptionBuffer) + sizeof(EFI_KEY_OPTION)))[LoopCounter].ScanCode = (UINT16)Intermediate;
|
||||
@ -1152,7 +1152,7 @@ BcfgAddOpt(
|
||||
//
|
||||
Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE, TRUE);
|
||||
if (EFI_ERROR(Status) || (((UINT16)Intermediate) != Intermediate)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
((EFI_INPUT_KEY*)(((UINT8*)KeyOptionBuffer) + sizeof(EFI_KEY_OPTION)))[LoopCounter].UnicodeChar = (UINT16)Intermediate;
|
||||
@ -1173,9 +1173,9 @@ BcfgAddOpt(
|
||||
KeyOptionBuffer->BootOption = CurrentOrder[OptionIndex];
|
||||
Status = GetBootOptionCrc(&(KeyOptionBuffer->BootOptionCrc), KeyOptionBuffer->BootOption);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Option Index");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Option Index");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
@ -1197,11 +1197,11 @@ BcfgAddOpt(
|
||||
sizeof(EFI_KEY_OPTION) + (sizeof(EFI_INPUT_KEY) * NewKeyOption.KeyData.Options.InputKeyCount),
|
||||
KeyOptionBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_VAR_NO_NUM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_VAR_NO_NUM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
ASSERT(FileName == NULL && Data == NULL);
|
||||
@ -1229,7 +1229,7 @@ BcfgAddOpt(
|
||||
}
|
||||
Data = AllocateZeroPool((UINTN)Intermediate);
|
||||
if (Data == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
}
|
||||
if (!EFI_ERROR(Status)) {
|
||||
@ -1242,14 +1242,14 @@ BcfgAddOpt(
|
||||
if (!EFI_ERROR(Status) && ShellStatus == SHELL_SUCCESS && Data != NULL) {
|
||||
Status = UpdateOptionalData(CurrentOrder[OptionIndex], (UINTN)Intermediate, (UINT8*)Data, Target);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (EFI_ERROR(Status) && ShellStatus == SHELL_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SHELL_FREE_NON_NULL(Data);
|
||||
@ -1291,7 +1291,7 @@ BcfgDisplayDump(
|
||||
UINTN OptionalDataOffset;
|
||||
|
||||
if (OrderCount == 0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_BCFG_NONE), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_BCFG_NONE), gShellBcfgHiiHandle, L"bcfg");
|
||||
return (SHELL_SUCCESS);
|
||||
}
|
||||
|
||||
@ -1321,7 +1321,7 @@ BcfgDisplayDump(
|
||||
}
|
||||
|
||||
if (EFI_ERROR(Status) || Buffer == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_READ_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_READ_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
++Errors;
|
||||
goto Cleanup;
|
||||
}
|
||||
@ -1463,7 +1463,7 @@ ShellCommandRunBcfg (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellBcfgHiiHandle, L"bcfg", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellBcfgHiiHandle, L"bcfg", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -1476,7 +1476,7 @@ ShellCommandRunBcfg (
|
||||
if (ShellCommandLineGetFlag(Package, L"-opt")) {
|
||||
CurrentOperation.OptData = ShellCommandLineGetValue(Package, L"-opt");
|
||||
if (CurrentOperation.OptData == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellBcfgHiiHandle, L"bcfg", L"-opt");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellBcfgHiiHandle, L"bcfg", L"-opt");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeOpt;
|
||||
@ -1488,14 +1488,14 @@ ShellCommandRunBcfg (
|
||||
if ((ShellCommandLineGetCount(Package) < 3 && CurrentOperation.Type != BcfgTypeOpt) ||
|
||||
(ShellCommandLineGetCount(Package) < 2 && CurrentOperation.Type == BcfgTypeOpt)
|
||||
){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)ShellCommandLineGetRawValue(Package, 1), L"driver") == 0) {
|
||||
CurrentOperation.Target = BcfgTargetDriverOrder;
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)ShellCommandLineGetRawValue(Package, 1), L"boot") == 0) {
|
||||
CurrentOperation.Target = BcfgTargetBootOrder;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_DRIVER_BOOT), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_DRIVER_BOOT), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -1541,17 +1541,17 @@ ShellCommandRunBcfg (
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-v")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"-v (without dump)");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"-v (without dump)");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"add") == 0) {
|
||||
if ((ParamNumber + 3) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeAdd;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
@ -1563,13 +1563,13 @@ ShellCommandRunBcfg (
|
||||
}
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"addp") == 0) {
|
||||
if ((ParamNumber + 3) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeAddp;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
@ -1581,20 +1581,20 @@ ShellCommandRunBcfg (
|
||||
}
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"addh") == 0) {
|
||||
if ((ParamNumber + 3) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeAddh;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
CurrentOperation.Number1 = (UINT16)Intermediate;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
@ -1605,42 +1605,42 @@ ShellCommandRunBcfg (
|
||||
}
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"rm") == 0) {
|
||||
if ((ParamNumber + 1) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeRm;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
CurrentOperation.Number1 = (UINT16)Intermediate;
|
||||
if (CurrentOperation.Number1 >= Count){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"mv") == 0) {
|
||||
if ((ParamNumber + 2) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeMv;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
CurrentOperation.Number1 = (UINT16)Intermediate;
|
||||
if (CurrentOperation.Number1 >= Count){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
@ -1649,7 +1649,7 @@ ShellCommandRunBcfg (
|
||||
if (CurrentOperation.Number2 == CurrentOperation.Number1
|
||||
||CurrentOperation.Number2 >= Count
|
||||
){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@ -1751,7 +1751,7 @@ ShellCommandRunBcfg (
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Provides interface to shell functionality for shell commands and applications.
|
||||
#
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||
# Copyright (c) 2006 - 2018, 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
|
||||
@ -40,5 +40,5 @@
|
||||
[Protocols]
|
||||
gEfiShellParametersProtocolGuid ## CONSUMES
|
||||
gEfiShellInterfaceGuid ## SOMETIMES_CONSUMES
|
||||
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for support of shell consist mapping.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -56,10 +56,10 @@ typedef struct {
|
||||
@retval EFI_OUT_OF_RESOURCES Out of resources.
|
||||
@retval EFI_SUCCESS The appending was successful.
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(*SERIAL_DECODE_FUNCTION) (
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevPath,
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevPath,
|
||||
DEVICE_CONSIST_MAPPING_INFO *MapInfo,
|
||||
EFI_DEVICE_PATH_PROTOCOL *OrigDevPath
|
||||
);
|
||||
@ -640,7 +640,7 @@ DevPathSerialUsb (
|
||||
UsbIo = NULL;
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = gBS->OpenProtocol(TempHandle, &gEfiUsbIoProtocolGuid, (VOID**)&UsbIo, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
}
|
||||
}
|
||||
|
||||
if (!EFI_ERROR(Status)) {
|
||||
ASSERT(UsbIo != NULL);
|
||||
@ -661,7 +661,7 @@ DevPathSerialUsb (
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
@ -1520,13 +1520,13 @@ ShellCommandConsistMappingInitialize (
|
||||
continue;
|
||||
}
|
||||
|
||||
Status = gBS->HandleProtocol( HandleBuffer[HandleLoop],
|
||||
&gEfiBlockIoProtocolGuid,
|
||||
Status = gBS->HandleProtocol( HandleBuffer[HandleLoop],
|
||||
&gEfiBlockIoProtocolGuid,
|
||||
(VOID **)&BlockIo
|
||||
);
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = gBS->HandleProtocol( HandleBuffer[HandleLoop],
|
||||
&gEfiSimpleFileSystemProtocolGuid,
|
||||
Status = gBS->HandleProtocol( HandleBuffer[HandleLoop],
|
||||
&gEfiSimpleFileSystemProtocolGuid,
|
||||
(VOID **)&SimpleFileSystem
|
||||
);
|
||||
if (EFI_ERROR(Status)) {
|
||||
|
@ -79,7 +79,7 @@ CommandInit(
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
CHAR8 *PlatformLang;
|
||||
|
||||
|
||||
GetEfiGlobalVariable2 (EFI_PLATFORM_LANG_VARIABLE_NAME, (VOID**)&PlatformLang, NULL);
|
||||
if (PlatformLang == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
@ -115,7 +115,7 @@ CommandInit(
|
||||
|
||||
//
|
||||
// Find the best matching matching language from the supported languages
|
||||
// of Unicode Collation2 protocol.
|
||||
// of Unicode Collation2 protocol.
|
||||
//
|
||||
BestLanguage = GetBestLanguage (
|
||||
Uc->SupportedLanguages,
|
||||
@ -311,7 +311,7 @@ ShellCommandFindDynamicCommand (
|
||||
//
|
||||
// not found or out of resources
|
||||
//
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (NextCommand = CommandHandleList; *NextCommand != NULL; NextCommand++) {
|
||||
@ -328,7 +328,7 @@ ShellCommandFindDynamicCommand (
|
||||
if (gUnicodeCollation->StriColl(
|
||||
gUnicodeCollation,
|
||||
(CHAR16*)CommandString,
|
||||
(CHAR16*)DynamicCommand->CommandName) == 0
|
||||
(CHAR16*)DynamicCommand->CommandName) == 0
|
||||
){
|
||||
FreePool(CommandHandleList);
|
||||
return (DynamicCommand);
|
||||
@ -429,7 +429,7 @@ ShellCommandGetDynamicCommandHelp(
|
||||
//
|
||||
// TODO: how to get proper language?
|
||||
//
|
||||
return DynamicCommand->GetHelp(DynamicCommand, "en");
|
||||
return DynamicCommand->GetHelp(DynamicCommand, "en");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -847,7 +847,7 @@ ShellCommandRegisterAlias (
|
||||
{
|
||||
ALIAS_LIST *Node;
|
||||
ALIAS_LIST *CommandAlias;
|
||||
ALIAS_LIST *PrevCommandAlias;
|
||||
ALIAS_LIST *PrevCommandAlias;
|
||||
INTN LexicalMatchValue;
|
||||
|
||||
//
|
||||
@ -896,7 +896,7 @@ ShellCommandRegisterAlias (
|
||||
//
|
||||
// Swap PrevCommandAlias and CommandAlias list entry if PrevCommandAlias list entry
|
||||
// is alphabetically greater than CommandAlias list entry
|
||||
//
|
||||
//
|
||||
if (LexicalMatchValue > 0) {
|
||||
CommandAlias = (ALIAS_LIST *) SwapListEntries (&PrevCommandAlias->Link, &CommandAlias->Link);
|
||||
} else if (LexicalMatchValue < 0) {
|
||||
|
@ -154,7 +154,7 @@ ShellCommandRunComp (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"comp", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"comp", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -162,22 +162,22 @@ ShellCommandRunComp (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"comp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"comp");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"comp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"comp");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TempParam = ShellCommandLineGetRawValue(Package, 1);
|
||||
ASSERT(TempParam != NULL);
|
||||
FileName1 = ShellFindFilePath(TempParam);
|
||||
if (FileName1 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
Status = ShellOpenFileByName(FileName1, &FileHandle1, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
@ -185,12 +185,12 @@ ShellCommandRunComp (
|
||||
ASSERT(TempParam != NULL);
|
||||
FileName2 = ShellFindFilePath(TempParam);
|
||||
if (FileName2 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
Status = ShellOpenFileByName(FileName2, &FileHandle2, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
This sequence is further divided into Blocks and Huffman codings
|
||||
are applied to each Block.
|
||||
|
||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, 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
|
||||
@ -181,7 +181,7 @@ PutDword (
|
||||
|
||||
/**
|
||||
Allocate memory spaces for data structures used in compression process.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Memory was allocated successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
**/
|
||||
@ -740,7 +740,7 @@ MakeLen (
|
||||
|
||||
/**
|
||||
Assign code to each symbol based on the code length array.
|
||||
|
||||
|
||||
@param[in] LoopVar8 The number of symbols.
|
||||
@param[in] Len The code length array.
|
||||
@param[out] Code The stores codes for each symbol.
|
||||
@ -764,7 +764,7 @@ MakeCode (
|
||||
Code[LoopVar1] = Start[Len[LoopVar1]]++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Generates Huffman codes given a frequency distribution of symbols.
|
||||
|
||||
@ -1175,7 +1175,7 @@ HufEncodeStart (
|
||||
/**
|
||||
Outputs an Original Character or a Pointer.
|
||||
|
||||
@param[in] LoopVar5 The original character or the 'String Length' element of
|
||||
@param[in] LoopVar5 The original character or the 'String Length' element of
|
||||
a Pointer.
|
||||
@param[in] LoopVar7 The 'Position' field of a Pointer.
|
||||
**/
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Dblk shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -69,11 +69,11 @@ DisplayTheBlocks(
|
||||
Status = BlockIo->ReadBlocks(BlockIo, BlockIo->Media->MediaId, Lba, BufferSize, Buffer);
|
||||
if (!EFI_ERROR(Status) && Buffer != NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DBLK_HEADER),
|
||||
gShellDebug1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DBLK_HEADER),
|
||||
gShellDebug1HiiHandle,
|
||||
Lba,
|
||||
BufferSize,
|
||||
BlockIo
|
||||
@ -81,7 +81,7 @@ DisplayTheBlocks(
|
||||
|
||||
DumpHex(2,0,BufferSize,Buffer);
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_READ_FAIL), gShellDebug1HiiHandle, L"dblk", L"BlockIo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_READ_FAIL), gShellDebug1HiiHandle, L"dblk", L"BlockIo");
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ ShellCommandRunDblk (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dblk", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dblk", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -143,10 +143,10 @@ ShellCommandRunDblk (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dblk");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dblk");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"dblk");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"dblk");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -160,7 +160,7 @@ ShellCommandRunDblk (
|
||||
Lba = 0;
|
||||
} else {
|
||||
if (!ShellIsHexOrDecimalNumber(LbaString, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", LbaString);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", LbaString);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
ShellConvertStringToUint64(LbaString, &Lba, TRUE, FALSE);
|
||||
@ -170,29 +170,29 @@ ShellCommandRunDblk (
|
||||
BlockCount = 1;
|
||||
} else {
|
||||
if (!ShellIsHexOrDecimalNumber(BlockCountString, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
ShellConvertStringToUint64(BlockCountString, &BlockCount, TRUE, FALSE);
|
||||
if (BlockCount > 0x10) {
|
||||
BlockCount = 0x10;
|
||||
} else if (BlockCount == 0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
//
|
||||
// do the work if we have a valid block identifier
|
||||
//
|
||||
if (gEfiShellProtocol->GetDevicePathFromMap(BlockName) == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
DevPath = (EFI_DEVICE_PATH_PROTOCOL*)gEfiShellProtocol->GetDevicePathFromMap(BlockName);
|
||||
if (gBS->LocateDevicePath(&gEfiBlockIoProtocolGuid, &DevPath, NULL) == EFI_NOT_FOUND) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MAP_PROTOCOL), gShellDebug1HiiHandle, L"dblk", BlockName, L"BlockIo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MAP_PROTOCOL), gShellDebug1HiiHandle, L"dblk", BlockName, L"BlockIo");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ShellStatus = DisplayTheBlocks(gEfiShellProtocol->GetDevicePathFromMap(BlockName), Lba, (UINT8)BlockCount);
|
||||
|
@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Main file for Dmem shell Debug1 function.
|
||||
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<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
|
||||
@ -62,7 +62,7 @@ DisplayMmioMemory(
|
||||
|
||||
Status = gBS->LocateProtocol(&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID**)&PciRbIo);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_NF), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_NF), gShellDebug1HiiHandle, L"dmem");
|
||||
return (SHELL_NOT_FOUND);
|
||||
}
|
||||
Buffer = AllocateZeroPool(Size);
|
||||
@ -72,7 +72,7 @@ DisplayMmioMemory(
|
||||
|
||||
Status = PciRbIo->Mem.Read(PciRbIo, EfiPciWidthUint8, (UINT64)(UINTN)Address, Size, Buffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_ER), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_ER), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMEM_MMIO_HEADER_ROW), gShellDebug1HiiHandle, (UINT64)(UINTN)Address, Size);
|
||||
@ -135,7 +135,7 @@ ShellCommandRunDmem (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dmem", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dmem", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -143,7 +143,7 @@ ShellCommandRunDmem (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Temp1 = ShellCommandLineGetRawValue(Package, 1);
|
||||
@ -152,15 +152,15 @@ ShellCommandRunDmem (
|
||||
Size = 512;
|
||||
} else {
|
||||
if (!ShellIsHexOrDecimalNumber(Temp1, TRUE, FALSE) || EFI_ERROR(ShellConvertStringToUint64(Temp1, (UINT64*)&Address, TRUE, FALSE))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
Temp1 = ShellCommandLineGetRawValue(Package, 2);
|
||||
if (Temp1 == NULL) {
|
||||
Size = 512;
|
||||
} else {
|
||||
if (!ShellIsHexOrDecimalNumber(Temp1, FALSE, FALSE) || EFI_ERROR(ShellConvertStringToUint64(Temp1, &Size, TRUE, FALSE))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@ -204,7 +204,7 @@ ShellCommandRunDmem (
|
||||
}
|
||||
}
|
||||
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMEM_SYSTEM_TABLE), gShellDebug1HiiHandle,
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMEM_SYSTEM_TABLE), gShellDebug1HiiHandle,
|
||||
(UINT64)(UINTN)Address,
|
||||
gST->Hdr.HeaderSize,
|
||||
gST->Hdr.Revision,
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Main file for DmpStore shell Debug1 function.
|
||||
|
||||
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -51,7 +51,7 @@ GetAttrType (
|
||||
|
||||
BufLen = 0;
|
||||
RetString = NULL;
|
||||
|
||||
|
||||
if ((Atts & EFI_VARIABLE_NON_VOLATILE) != 0) {
|
||||
StrnCatGrow (&RetString, &BufLen, L"+NV", 0);
|
||||
}
|
||||
@ -157,11 +157,11 @@ LoadVariablesFromFile (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return SHELL_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
|
||||
|
||||
InitializeListHead (&List);
|
||||
|
||||
|
||||
Position = 0;
|
||||
while (Position < FileSize) {
|
||||
//
|
||||
@ -220,7 +220,7 @@ LoadVariablesFromFile (
|
||||
}
|
||||
|
||||
Position += BufferSize + sizeof (Crc32);
|
||||
|
||||
|
||||
Variable = AllocateZeroPool (sizeof (*Variable) + NameSize + DataSize);
|
||||
if (Variable == NULL) {
|
||||
FreePool (Buffer);
|
||||
@ -239,20 +239,20 @@ LoadVariablesFromFile (
|
||||
InsertTailList (&List, &Variable->Link);
|
||||
FreePool (Buffer);
|
||||
}
|
||||
|
||||
|
||||
if ((Position != FileSize) || (ShellStatus != SHELL_SUCCESS)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_LOAD_BAD_FILE), gShellDebug1HiiHandle, L"dmpstore");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_LOAD_BAD_FILE), gShellDebug1HiiHandle, L"dmpstore");
|
||||
if (Position != FileSize) {
|
||||
ShellStatus = SHELL_VOLUME_CORRUPTED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for ( Link = GetFirstNode (&List)
|
||||
; !IsNull (&List, Link) && (ShellStatus == SHELL_SUCCESS)
|
||||
; Link = GetNextNode (&List, Link)
|
||||
) {
|
||||
Variable = CR (Link, DMP_STORE_VARIABLE, Link, DMP_STORE_VARIABLE_SIGNATURE);
|
||||
|
||||
|
||||
if (((Name == NULL) || gUnicodeCollation->MetaiMatch (gUnicodeCollation, Variable->Name, (CHAR16 *) Name)) &&
|
||||
((Guid == NULL) || CompareGuid (&Variable->Guid, Guid))
|
||||
) {
|
||||
@ -272,7 +272,7 @@ LoadVariablesFromFile (
|
||||
Variable->Data
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_LOAD_GEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", Variable->Name, Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_LOAD_GEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", Variable->Name, Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -369,19 +369,19 @@ AppendSingleVariableToFile (
|
||||
Status = ShellWriteFile (FileHandle, &BufferSize, Buffer);
|
||||
FreePool (Buffer);
|
||||
|
||||
if (!EFI_ERROR (Status) &&
|
||||
if (!EFI_ERROR (Status) &&
|
||||
(BufferSize != sizeof (NameSize) + sizeof (DataSize) + sizeof (*Guid) + sizeof (Attributes) + NameSize + DataSize + sizeof (UINT32))
|
||||
) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
Recursive function to display or delete variables.
|
||||
|
||||
This function will call itself to create a stack-based list of allt he variables to process,
|
||||
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.
|
||||
@ -480,9 +480,9 @@ CascadeProcessVariables (
|
||||
// No matter what happened we process our own variable
|
||||
// Only continue if Guid and VariableName are each either NULL or a match
|
||||
//
|
||||
if ( ( Name == NULL
|
||||
if ( ( Name == NULL
|
||||
|| gUnicodeCollation->MetaiMatch(gUnicodeCollation, FoundVarName, (CHAR16*) Name) )
|
||||
&& ( Guid == NULL
|
||||
&& ( Guid == NULL
|
||||
|| CompareGuid(&FoundVarGuid, Guid) )
|
||||
) {
|
||||
DataSize = 0;
|
||||
@ -634,16 +634,16 @@ ProcessVariables (
|
||||
|
||||
if (!Found) {
|
||||
if (ShellStatus == SHELL_OUT_OF_RESOURCES) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"dmpstore");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"dmpstore");
|
||||
return (ShellStatus);
|
||||
} else if (Name != NULL && Guid == NULL) {
|
||||
if (StandardFormatOutput) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_N_SFO), gShellDebug1HiiHandle, Name);
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_N), gShellDebug1HiiHandle, L"dmpstore", Name);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_N), gShellDebug1HiiHandle, L"dmpstore", Name);
|
||||
}
|
||||
} else if (Name != NULL && Guid != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_GN), gShellDebug1HiiHandle, L"dmpstore", Guid, Name);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_GN), gShellDebug1HiiHandle, L"dmpstore", Guid, Name);
|
||||
} else if (Name == NULL && Guid == NULL) {
|
||||
if (StandardFormatOutput) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_SFO), gShellDebug1HiiHandle);
|
||||
@ -656,7 +656,7 @@ ProcessVariables (
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_G), gShellDebug1HiiHandle, L"dmpstore", Guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (SHELL_NOT_FOUND);
|
||||
}
|
||||
return (ShellStatus);
|
||||
@ -710,7 +710,7 @@ ShellCommandRunDmpStore (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dmpstore", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dmpstore", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -718,19 +718,19 @@ ShellCommandRunDmpStore (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dmpstore");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dmpstore");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-all") && ShellCommandLineGetFlag(Package, L"-guid")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-all", L"-guid");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-all", L"-guid");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-s") && ShellCommandLineGetFlag(Package, L"-l")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l", L"-s");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l", L"-s");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} 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"dmpstore", L"-l or -s", L"-d");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l or -s", L"-d");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if ((ShellCommandLineGetFlag(Package, L"-s") || ShellCommandLineGetFlag(Package, L"-l")) && ShellCommandLineGetFlag(Package, L"-sfo")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l or -s", L"-sfo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l or -s", L"-sfo");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -741,7 +741,7 @@ ShellCommandRunDmpStore (
|
||||
if (GuidStr != NULL) {
|
||||
RStatus = StrToGuid (GuidStr, &GuidData);
|
||||
if (RETURN_ERROR (RStatus) || (GuidStr[GUID_STRING_LENGTH] != L'\0')) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmpstore", GuidStr);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmpstore", GuidStr);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
Guid = &GuidData;
|
||||
@ -762,7 +762,7 @@ ShellCommandRunDmpStore (
|
||||
Type = DmpStoreSave;
|
||||
File = ShellCommandLineGetValue(Package, L"-s");
|
||||
if (File == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"dmpstore", L"-s");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"dmpstore", L"-s");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellOpenFileByName (File, &FileHandle, EFI_FILE_MODE_WRITE | EFI_FILE_MODE_READ, 0);
|
||||
@ -772,16 +772,16 @@ ShellCommandRunDmpStore (
|
||||
//
|
||||
FileInfo = ShellGetFileInfo (FileHandle);
|
||||
if (FileInfo == NULL) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
} else {
|
||||
if ((FileInfo->Attribute & EFI_FILE_DIRECTORY) == EFI_FILE_DIRECTORY) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_IS_DIRECTORY), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_IS_DIRECTORY), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellDeleteFile (&FileHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_DELETE_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_DELETE_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
}
|
||||
}
|
||||
FreePool (FileInfo);
|
||||
@ -795,13 +795,13 @@ ShellCommandRunDmpStore (
|
||||
//
|
||||
// Otherwise it's bad.
|
||||
//
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
}
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = ShellOpenFileByName (File, &FileHandle, EFI_FILE_MODE_CREATE | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
}
|
||||
}
|
||||
|
||||
@ -813,21 +813,21 @@ ShellCommandRunDmpStore (
|
||||
Type = DmpStoreLoad;
|
||||
File = ShellCommandLineGetValue(Package, L"-l");
|
||||
if (File == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"dmpstore", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"dmpstore", L"-l");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellOpenFileByName (File, &FileHandle, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
FileInfo = ShellGetFileInfo (FileHandle);
|
||||
if (FileInfo == NULL) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
} else {
|
||||
if ((FileInfo->Attribute & EFI_FILE_DIRECTORY) == EFI_FILE_DIRECTORY) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_IS_DIRECTORY), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_IS_DIRECTORY), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
FreePool (FileInfo);
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Edit shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -59,7 +59,7 @@ ShellCommandRunEdit (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"edit", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"edit", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -67,7 +67,7 @@ ShellCommandRunEdit (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"edit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"edit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Cwd = gEfiShellProtocol->GetCurDir(NULL);
|
||||
@ -86,7 +86,7 @@ ShellCommandRunEdit (
|
||||
}
|
||||
gEfiShellProtocol->SetCurDir(NULL, Nfs);
|
||||
FreePool(Nfs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ ShellCommandRunEdit (
|
||||
//
|
||||
if (Status == EFI_SUCCESS) {
|
||||
} else if (Status == EFI_OUT_OF_RESOURCES) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"edit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"edit");
|
||||
} else {
|
||||
if (Buffer != NULL) {
|
||||
if (StrCmp (Buffer, L"") != 0) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implements filebuffer interface functions.
|
||||
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -53,7 +53,7 @@ EFI_EDITOR_FILE_BUFFER FileBufferConst = {
|
||||
//
|
||||
// the whole edit area needs to be refreshed
|
||||
//
|
||||
BOOLEAN FileBufferNeedRefresh;
|
||||
BOOLEAN FileBufferNeedRefresh;
|
||||
|
||||
//
|
||||
// only the current line in edit area needs to be refresh
|
||||
@ -144,7 +144,7 @@ FileBufferBackup (
|
||||
|
||||
/**
|
||||
Advance to the next Count lines
|
||||
|
||||
|
||||
@param[in] Count The line number to advance by.
|
||||
@param[in] CurrentLine The pointer to the current line structure.
|
||||
@param[in] LineList The pointer to the linked list of lines.
|
||||
@ -183,7 +183,7 @@ InternalEditorMiscLineAdvance (
|
||||
|
||||
/**
|
||||
Retreat to the previous Count lines.
|
||||
|
||||
|
||||
@param[in] Count The line number to retreat by.
|
||||
@param[in] CurrentLine The pointer to the current line structure.
|
||||
@param[in] LineList The pointer to the linked list of lines.
|
||||
@ -222,7 +222,7 @@ InternalEditorMiscLineRetreat (
|
||||
|
||||
/**
|
||||
Advance/Retreat lines
|
||||
|
||||
|
||||
@param[in] Count line number to advance/retreat
|
||||
>0 : advance
|
||||
<0 : retreat
|
||||
@ -484,7 +484,7 @@ FileBufferPrintLine (
|
||||
UINTN Limit;
|
||||
CHAR16 *PrintLine;
|
||||
CHAR16 *PrintLine2;
|
||||
UINTN BufLen;
|
||||
UINTN BufLen;
|
||||
|
||||
//
|
||||
// print start from correct character
|
||||
@ -710,7 +710,7 @@ FileBufferCreateLine (
|
||||
Set FileName field in FileBuffer.
|
||||
|
||||
@param Str The file name to set.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The filename was successfully set.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_INVALID_PARAMETER Str is not a valid filename.
|
||||
@ -763,10 +763,10 @@ FileBufferFree (
|
||||
|
||||
/**
|
||||
Read a file from disk into the FileBuffer.
|
||||
|
||||
|
||||
@param[in] FileName The filename to read.
|
||||
@param[in] Recover TRUE if is for recover mode, no information printouts.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The load was successful.
|
||||
@retval EFI_LOAD_ERROR The load failed.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@ -823,7 +823,7 @@ FileBufferRead (
|
||||
}
|
||||
|
||||
Info = ShellGetFileInfo(FileHandle);
|
||||
|
||||
|
||||
if (Info->Attribute & EFI_FILE_DIRECTORY) {
|
||||
StatusBarSetStatusString (L"Directory Can Not Be Edited");
|
||||
FreePool (Info);
|
||||
@ -1397,7 +1397,7 @@ UnicodeToAscii (
|
||||
@param[in] FileName The file name for writing.
|
||||
|
||||
@retval EFI_SUCCESS Data was written.
|
||||
@retval EFI_LOAD_ERROR
|
||||
@retval EFI_LOAD_ERROR
|
||||
@retval EFI_OUT_OF_RESOURCES There were not enough resources to write the file.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -1472,7 +1472,7 @@ FileBufferSave (
|
||||
FreePool(Info);
|
||||
return EFI_LOAD_ERROR;
|
||||
}
|
||||
|
||||
|
||||
if (Info != NULL) {
|
||||
Attribute = Info->Attribute & ~EFI_FILE_READ_ONLY;
|
||||
FreePool(Info);
|
||||
@ -1550,7 +1550,7 @@ FileBufferSave (
|
||||
Size = TotalSize - LeftSize;
|
||||
Status = ShellWriteFile (FileHandle, &Size, Cache);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellDeleteFile (&FileHandle);
|
||||
ShellDeleteFile (&FileHandle);
|
||||
FreePool (Cache);
|
||||
return EFI_LOAD_ERROR;
|
||||
}
|
||||
@ -1911,7 +1911,7 @@ FileBufferDoReturn (
|
||||
}
|
||||
|
||||
/**
|
||||
Delete current character from current line. This is the effect caused
|
||||
Delete current character from current line. This is the effect caused
|
||||
by the 'del' key.
|
||||
|
||||
@retval EFI_SUCCESS
|
||||
@ -2023,7 +2023,7 @@ FileBufferScrollRight (
|
||||
/**
|
||||
Insert a char into line
|
||||
|
||||
|
||||
|
||||
@param[in] Line The line to insert into.
|
||||
@param[in] Char The char to insert.
|
||||
@param[in] Pos The position to insert the char at ( start from 0 ).
|
||||
@ -2395,7 +2395,7 @@ FileBufferEnd (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Dispatch input to different handler
|
||||
@param[in] Key The input key. One of:
|
||||
ASCII KEY
|
||||
@ -2610,7 +2610,7 @@ RightCurrentScreen (
|
||||
|
||||
/**
|
||||
Advance/Retreat lines and set CurrentLine in FileBuffer to it
|
||||
|
||||
|
||||
@param[in] Count The line number to advance/retreat
|
||||
>0 : advance
|
||||
<0: retreat
|
||||
@ -2756,7 +2756,7 @@ FileBufferMovePosition (
|
||||
/**
|
||||
Cut current line out and return a pointer to it.
|
||||
|
||||
@param[out] CutLine Upon a successful return pointer to the pointer to
|
||||
@param[out] CutLine Upon a successful return pointer to the pointer to
|
||||
the allocated cut line.
|
||||
|
||||
@retval EFI_SUCCESS The cut was successful.
|
||||
@ -2930,7 +2930,7 @@ FileBufferSearch (
|
||||
|
||||
Column = 0;
|
||||
Position = 0;
|
||||
|
||||
|
||||
//
|
||||
// search if in current line
|
||||
//
|
||||
@ -2949,7 +2949,7 @@ FileBufferSearch (
|
||||
if (CharPos != NULL) {
|
||||
Position = CharPos - Current + 1;
|
||||
Found = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// found
|
||||
@ -2971,8 +2971,8 @@ FileBufferSearch (
|
||||
if (CharPos != NULL) {
|
||||
Position = CharPos - Line->Buffer + 1;
|
||||
Found = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Found) {
|
||||
//
|
||||
// found
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Declares filebuffer interface functions.
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -50,7 +50,7 @@ FileBufferRefresh (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Dispatch input to different handler
|
||||
@param[in] Key The input key. One of:
|
||||
ASCII KEY
|
||||
@ -98,7 +98,7 @@ FileBufferRestorePosition (
|
||||
Set FileName field in FileBuffer.
|
||||
|
||||
@param Str The file name to set.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The filename was successfully set.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_INVALID_PARAMETER Str is not a valid filename.
|
||||
@ -110,10 +110,10 @@ FileBufferSetFileName (
|
||||
|
||||
/**
|
||||
Read a file from disk into the FileBuffer.
|
||||
|
||||
|
||||
@param[in] FileName The filename to read.
|
||||
@param[in] Recover TRUE if is for recover mode, no information printouts.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The load was successful.
|
||||
@retval EFI_LOAD_ERROR The load failed.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@ -131,7 +131,7 @@ FileBufferRead (
|
||||
@param[in] FileName The file name for writing.
|
||||
|
||||
@retval EFI_SUCCESS Data was written.
|
||||
@retval EFI_LOAD_ERROR
|
||||
@retval EFI_LOAD_ERROR
|
||||
@retval EFI_OUT_OF_RESOURCES There were not enough resources to write the file.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -154,7 +154,7 @@ FileBufferMovePosition (
|
||||
/**
|
||||
Cut current line out and return a pointer to it.
|
||||
|
||||
@param[out] CutLine Upon a successful return pointer to the pointer to
|
||||
@param[out] CutLine Upon a successful return pointer to the pointer to
|
||||
the allocated cut line.
|
||||
|
||||
@retval EFI_SUCCESS The cut was successful.
|
||||
|
@ -77,7 +77,7 @@ MainCommandGotoLine (
|
||||
/**
|
||||
Save current file to disk, you can save to current file name or
|
||||
save to another file name.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The file was saved correctly.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A file access error occured.
|
||||
@ -1136,7 +1136,7 @@ MainCommandGotoLine (
|
||||
/**
|
||||
Save current file to disk, you can save to current file name or
|
||||
save to another file name.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The file was saved correctly.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A file access error occured.
|
||||
@ -1150,7 +1150,7 @@ MainCommandSaveFile (
|
||||
CHAR16 *FileName;
|
||||
BOOLEAN OldFile;
|
||||
CHAR16 *Str;
|
||||
SHELL_FILE_HANDLE FileHandle;
|
||||
SHELL_FILE_HANDLE FileHandle;
|
||||
EFI_FILE_INFO *Info;
|
||||
|
||||
//
|
||||
@ -1280,15 +1280,15 @@ MainCommandSaveFile (
|
||||
StatusBarSetStatusString (L"Open Failed");
|
||||
FreePool (FileName);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
Info = ShellGetFileInfo(FileHandle);
|
||||
if (Info == NULL) {
|
||||
StatusBarSetStatusString (L"Access Denied");
|
||||
FreePool (FileName);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Info->Attribute & EFI_FILE_READ_ONLY) {
|
||||
StatusBarSetStatusString (L"Access Denied - Read Only");
|
||||
FreePool (Info);
|
||||
@ -1365,13 +1365,13 @@ MainCommandDisplayHelp (
|
||||
EFI_KEY_DATA KeyData;
|
||||
EFI_STATUS Status;
|
||||
UINTN EventIndex;
|
||||
|
||||
|
||||
//
|
||||
// print helpInfo
|
||||
// print helpInfo
|
||||
//
|
||||
for (CurrentLine = 0; 0 != MainMenuHelpInfo[CurrentLine]; CurrentLine++) {
|
||||
InfoString = HiiGetString(gShellDebug1HiiHandle, MainMenuHelpInfo[CurrentLine], NULL);
|
||||
ShellPrintEx (0, CurrentLine+1, L"%E%s%N", InfoString);
|
||||
ShellPrintEx (0, CurrentLine+1, L"%E%s%N", InfoString);
|
||||
}
|
||||
|
||||
//
|
||||
@ -1414,7 +1414,7 @@ MainCommandDisplayHelp (
|
||||
FileBufferRestorePosition ();
|
||||
FileBufferNeedRefresh = TRUE;
|
||||
FileBufferOnlyLineNeedRefresh = FALSE;
|
||||
FileBufferRefresh ();
|
||||
FileBufferRefresh ();
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@ -1649,10 +1649,10 @@ MainEditorRefresh (
|
||||
//
|
||||
// call the components refresh function
|
||||
//
|
||||
if (EditorFirst
|
||||
|| StrCmp (FileBufferBackupVar.FileName, FileBuffer.FileName) != 0
|
||||
|| FileBufferBackupVar.FileType != FileBuffer.FileType
|
||||
|| FileBufferBackupVar.FileModified != FileBuffer.FileModified
|
||||
if (EditorFirst
|
||||
|| StrCmp (FileBufferBackupVar.FileName, FileBuffer.FileName) != 0
|
||||
|| FileBufferBackupVar.FileType != FileBuffer.FileType
|
||||
|| FileBufferBackupVar.FileModified != FileBuffer.FileModified
|
||||
|| FileBufferBackupVar.ReadOnly != FileBuffer.ReadOnly) {
|
||||
|
||||
MainTitleBarRefresh (MainEditor.FileBuffer->FileName, MainEditor.FileBuffer->FileType, MainEditor.FileBuffer->ReadOnly, MainEditor.FileBuffer->FileModified, MainEditor.ScreenSize.Column, MainEditor.ScreenSize.Row, 0, 0);
|
||||
@ -1660,8 +1660,8 @@ MainEditorRefresh (
|
||||
}
|
||||
|
||||
if (EditorFirst
|
||||
|| FileBufferBackupVar.FilePosition.Row != FileBuffer.FilePosition.Row
|
||||
|| FileBufferBackupVar.FilePosition.Column != FileBuffer.FilePosition.Column
|
||||
|| FileBufferBackupVar.FilePosition.Row != FileBuffer.FilePosition.Row
|
||||
|| FileBufferBackupVar.FilePosition.Column != FileBuffer.FilePosition.Column
|
||||
|| FileBufferBackupVar.ModeInsert != FileBuffer.ModeInsert
|
||||
|| StatusBarGetRefresh()) {
|
||||
|
||||
@ -1906,9 +1906,9 @@ MainEditorKeyInput (
|
||||
Status = MenuBarDispatchFunctionKey (&KeyData.Key);
|
||||
} else {
|
||||
StatusBarSetStatusString (L"Unknown Command");
|
||||
FileBufferMouseNeedRefresh = FALSE;
|
||||
FileBufferMouseNeedRefresh = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (Status != EFI_SUCCESS && Status != EFI_OUT_OF_RESOURCES) {
|
||||
//
|
||||
// not already has some error status
|
||||
@ -1975,6 +1975,6 @@ MainEditorBackup (
|
||||
)
|
||||
{
|
||||
FileBufferBackup ();
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// /**
|
||||
//
|
||||
// Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2005 - 2018, 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
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
#langdef en-US "english"
|
||||
|
||||
#string STR_EDIT_LIBEDITOR_TITLEBAR #language en-US "%EMainEditor init failed on TitleBar init\r\n%N"
|
||||
#string STR_EDIT_LIBEDITOR_TITLEBAR #language en-US "%EMainEditor init failed on TitleBar init\r\n%N"
|
||||
#string STR_EDIT_LIBEDITOR_MAINMENU #language en-US "%EMainEditor init was not successful on MainMenu init\r\n%N"
|
||||
#string STR_EDIT_LIBEDITOR_STATUSBAR #language en-US "%EMainEditor init was not successful on StatusBar init\r\n%N"
|
||||
#string STR_EDIT_LIBEDITOR_INPUTBAR #language en-US "%EMainEditor init was not successful on InputBar init\r\n%N"
|
||||
@ -28,33 +28,33 @@
|
||||
#string STR_EDIT_LIBEDITOR_TITLEBAR_CLEANUP #language en-US "TitleBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_MENUBAR_CLEANUP #language en-US "MenuBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_STATUSBAR_CLEANUP #language en-US "StatusBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_INPUTBAR_CLEANUP #language en-US "InputBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_FILEBUFFER_CLEANUP #language en-US "FileBuffer cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_INPUTBAR_CLEANUP #language en-US "InputBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_FILEBUFFER_CLEANUP #language en-US "FileBuffer cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_MAINEDITOR_INIT #language en-US "%EMainEditor init was not succesful on TitleBar init\r\n%N"
|
||||
#string STR_EDIT_LIBINPUTBAR_MAININPUTBAR #language en-US "%s"
|
||||
#string STR_EDIT_LIBMENUBAR_OPEN_FILE #language en-US "Open File"
|
||||
#string STR_EDIT_LIBMENUBAR_SAVE_FILE #language en-US "Save File"
|
||||
#string STR_EDIT_LIBMENUBAR_OPEN_FILE #language en-US "Open File"
|
||||
#string STR_EDIT_LIBMENUBAR_SAVE_FILE #language en-US "Save File"
|
||||
#string STR_EDIT_LIBMENUBAR_EXIT #language en-US "Exit"
|
||||
#string STR_EDIT_LIBMENUBAR_CUT_LINE #language en-US "Cut Line"
|
||||
#string STR_EDIT_LIBMENUBAR_PASTE_LINE #language en-US "Paste Line"
|
||||
#string STR_EDIT_LIBMENUBAR_GO_TO_LINE #language en-US "Go To Line"
|
||||
#string STR_EDIT_LIBMENUBAR_SEARCH #language en-US "Search"
|
||||
#string STR_EDIT_LIBMENUBAR_SEARCH_REPLACE #language en-US "Search/Replace"
|
||||
#string STR_EDIT_LIBMENUBAR_FILE_TYPE #language en-US "File Type"
|
||||
#string STR_EDIT_LIBMENUBAR_F1 #language en-US "F1"
|
||||
#string STR_EDIT_LIBMENUBAR_F2 #language en-US "F2"
|
||||
#string STR_EDIT_LIBMENUBAR_F3 #language en-US "F3"
|
||||
#string STR_EDIT_LIBMENUBAR_F4 #language en-US "F4"
|
||||
#string STR_EDIT_LIBMENUBAR_F5 #language en-US "F5"
|
||||
#string STR_EDIT_LIBMENUBAR_F6 #language en-US "F6"
|
||||
#string STR_EDIT_LIBMENUBAR_F7 #language en-US "F7"
|
||||
#string STR_EDIT_LIBMENUBAR_F8 #language en-US "F8"
|
||||
#string STR_EDIT_LIBMENUBAR_F9 #language en-US "F9"
|
||||
#string STR_EDIT_LIBMENUBAR_F10 #language en-US "F10"
|
||||
#string STR_EDIT_LIBMENUBAR_F11 #language en-US "F11"
|
||||
#string STR_EDIT_LIBMENUBAR_F12 #language en-US "F12"
|
||||
#string STR_EDIT_LIBMENUBAR_CTRL_E #language en-US "Ctrl+E"
|
||||
#string STR_EDIT_LIBMENUBAR_CTRL_W #language en-US "Ctrl+W"
|
||||
#string STR_EDIT_LIBMENUBAR_CUT_LINE #language en-US "Cut Line"
|
||||
#string STR_EDIT_LIBMENUBAR_PASTE_LINE #language en-US "Paste Line"
|
||||
#string STR_EDIT_LIBMENUBAR_GO_TO_LINE #language en-US "Go To Line"
|
||||
#string STR_EDIT_LIBMENUBAR_SEARCH #language en-US "Search"
|
||||
#string STR_EDIT_LIBMENUBAR_SEARCH_REPLACE #language en-US "Search/Replace"
|
||||
#string STR_EDIT_LIBMENUBAR_FILE_TYPE #language en-US "File Type"
|
||||
#string STR_EDIT_LIBMENUBAR_F1 #language en-US "F1"
|
||||
#string STR_EDIT_LIBMENUBAR_F2 #language en-US "F2"
|
||||
#string STR_EDIT_LIBMENUBAR_F3 #language en-US "F3"
|
||||
#string STR_EDIT_LIBMENUBAR_F4 #language en-US "F4"
|
||||
#string STR_EDIT_LIBMENUBAR_F5 #language en-US "F5"
|
||||
#string STR_EDIT_LIBMENUBAR_F6 #language en-US "F6"
|
||||
#string STR_EDIT_LIBMENUBAR_F7 #language en-US "F7"
|
||||
#string STR_EDIT_LIBMENUBAR_F8 #language en-US "F8"
|
||||
#string STR_EDIT_LIBMENUBAR_F9 #language en-US "F9"
|
||||
#string STR_EDIT_LIBMENUBAR_F10 #language en-US "F10"
|
||||
#string STR_EDIT_LIBMENUBAR_F11 #language en-US "F11"
|
||||
#string STR_EDIT_LIBMENUBAR_F12 #language en-US "F12"
|
||||
#string STR_EDIT_LIBMENUBAR_CTRL_E #language en-US "Ctrl+E"
|
||||
#string STR_EDIT_LIBMENUBAR_CTRL_W #language en-US "Ctrl+W"
|
||||
#string STR_EDIT_HELP_TITLE #language en-US "Help \n"
|
||||
#string STR_EDIT_HELP_BLANK #language en-US " \n"
|
||||
#string STR_EDIT_HELP_LIST_TITLE #language en-US "Control Key Function Key Command \n"
|
||||
@ -69,7 +69,7 @@
|
||||
#string STR_EDIT_HELP_OPEN_FILE #language en-US "Ctrl-O F8 Open File \n"
|
||||
#string STR_EDIT_HELP_FILE_TYPE #language en-US "Ctrl-T F9 File Type \n"
|
||||
#string STR_EDIT_HELP_EXIT_HELP #language en-US "Use Ctrl-W to exit this help \n"
|
||||
#string STR_EDIT_MAIN_INVALID_FILE_NAME #language en-US "%Hedit%N: Invalid File Name\r\n"
|
||||
#string STR_EDIT_MAIN_INIT_FAILED #language en-US "%Hedit%N: Initialization was not successful\r\n"
|
||||
#string STR_EDIT_MAIN_BUFFER #language en-US "%Hedit%N: %s\r\n"
|
||||
#string STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR #language en-US "%Hedit%N: Unknown Editor Error\r\n"
|
||||
#string STR_EDIT_MAIN_INVALID_FILE_NAME #language en-US "%Hedit%N: Invalid File Name\r\n"
|
||||
#string STR_EDIT_MAIN_INIT_FAILED #language en-US "%Hedit%N: Initialization was not successful\r\n"
|
||||
#string STR_EDIT_MAIN_BUFFER #language en-US "%Hedit%N: %s\r\n"
|
||||
#string STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR #language en-US "%Hedit%N: Unknown Editor Error\r\n"
|
||||
|
@ -251,7 +251,7 @@ InputBarRefresh (
|
||||
}
|
||||
|
||||
mReturnString[Size] = CHAR_NULL;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// restore screen attributes
|
||||
|
@ -47,7 +47,7 @@ MenuBarInit (
|
||||
CONST EDITOR_MENU_ITEM *ItemsWalker;
|
||||
|
||||
for (NumItems = 0, ItemsWalker = Items ; ItemsWalker != NULL && ItemsWalker->Function != NULL ; ItemsWalker++,NumItems++);
|
||||
|
||||
|
||||
MenuItems = AllocateZeroPool((NumItems+1) * sizeof(EDITOR_MENU_ITEM));
|
||||
if (MenuItems == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@ -69,7 +69,7 @@ ControlHotKeyInit (
|
||||
)
|
||||
{
|
||||
ControlBasedMenuFunctions = Items;
|
||||
return EFI_SUCCESS;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
/**
|
||||
Refresh function for the menu bar.
|
||||
@ -138,7 +138,7 @@ MenuBarRefresh (
|
||||
|
||||
@param[in] Key The pressed key.
|
||||
|
||||
@retval EFI_NOT_FOUND The key was not a valid function key
|
||||
@retval EFI_NOT_FOUND The key was not a valid function key
|
||||
(an error was sent to the status bar).
|
||||
@return The return value from the called dispatch function.
|
||||
**/
|
||||
@ -167,7 +167,7 @@ MenuBarDispatchFunctionKey (
|
||||
|
||||
@param[in] KeyData The pressed key.
|
||||
|
||||
@retval EFI_NOT_FOUND The key was not a valid control-based key
|
||||
@retval EFI_NOT_FOUND The key was not a valid control-based key
|
||||
(an error was sent to the status bar).
|
||||
@return EFI_SUCCESS.
|
||||
**/
|
||||
|
@ -93,7 +93,7 @@ MenuBarRefresh (
|
||||
|
||||
@param[in] Key The pressed key.
|
||||
|
||||
@retval EFI_NOT_FOUND The key was not a valid function key
|
||||
@retval EFI_NOT_FOUND The key was not a valid function key
|
||||
(an error was sent to the status bar).
|
||||
@return The return value from the called dispatch function.
|
||||
**/
|
||||
@ -107,7 +107,7 @@ MenuBarDispatchFunctionKey (
|
||||
|
||||
@param[in] KeyData The pressed key.
|
||||
|
||||
@retval EFI_NOT_FOUND The key was not a valid control-based key
|
||||
@retval EFI_NOT_FOUND The key was not a valid control-based key
|
||||
(an error was sent to the status bar).
|
||||
@return EFI_SUCCESS.
|
||||
**/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implements statusbar interface functions.
|
||||
|
||||
Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -71,7 +71,7 @@ typedef union {
|
||||
/**
|
||||
Cause the status bar to refresh it's printing on the screen.
|
||||
|
||||
@param[in] EditorFirst TRUE to indicate the first launch of the editor.
|
||||
@param[in] EditorFirst TRUE to indicate the first launch of the editor.
|
||||
FALSE otherwise.
|
||||
@param[in] LastRow LastPrintable row.
|
||||
@param[in] LastCol Last printable column.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Declares statusbar interface functions.
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -38,7 +38,7 @@ StatusBarCleanup (
|
||||
/**
|
||||
Cause the status bar to refresh it's printing on the screen.
|
||||
|
||||
@param[in] EditorFirst TRUE to indicate the first launch of the editor.
|
||||
@param[in] EditorFirst TRUE to indicate the first launch of the editor.
|
||||
FALSE otherwise.
|
||||
@param[in] LastRow LastPrintable row.
|
||||
@param[in] LastCol Last printable column.
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for EfiCompress shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -70,7 +70,7 @@ ShellCommandRunEfiCompress (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"eficompress", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"eficompress", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -78,10 +78,10 @@ ShellCommandRunEfiCompress (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"eficompress");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"eficompress");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"eficompress");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"eficompress");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TempParam = ShellCommandLineGetRawValue(Package, 1);
|
||||
@ -89,26 +89,26 @@ ShellCommandRunEfiCompress (
|
||||
InFileName = ShellFindFilePath(TempParam);
|
||||
OutFileName = ShellCommandLineGetRawValue(Package, 2);
|
||||
if (InFileName == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"eficompress", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"eficompress", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
if (ShellIsDirectory(InFileName) == EFI_SUCCESS){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"eficompress", InFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"eficompress", InFileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (ShellIsDirectory(OutFileName) == EFI_SUCCESS){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"eficompress", OutFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"eficompress", OutFileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
Status = ShellOpenFileByName(InFileName, &InShellFileHandle, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"eficompress", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"eficompress", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
Status = ShellOpenFileByName(OutFileName, &OutShellFileHandle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE|EFI_FILE_MODE_CREATE, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"eficompress", ShellCommandLineGetRawValue(Package, 2));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"eficompress", ShellCommandLineGetRawValue(Package, 2));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
@ -140,7 +140,7 @@ ShellCommandRunEfiCompress (
|
||||
OutSize2 = (UINTN)OutSize;
|
||||
Status = gEfiShellProtocol->WriteFile(OutShellFileHandle, &OutSize2, OutBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_WRITE_FAIL), gShellDebug1HiiHandle, L"eficompress", OutFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_WRITE_FAIL), gShellDebug1HiiHandle, L"eficompress", OutFileName);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for EfiDecompress shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -77,7 +77,7 @@ ShellCommandRunEfiDecompress (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"efidecompress", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"efidecompress", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -85,10 +85,10 @@ ShellCommandRunEfiDecompress (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"efidecompress");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"efidecompress");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"efidecompress");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"efidecompress");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TempParam = ShellCommandLineGetRawValue(Package, 1);
|
||||
@ -96,21 +96,21 @@ ShellCommandRunEfiDecompress (
|
||||
InFileName = ShellFindFilePath(TempParam);
|
||||
OutFileName = ShellCommandLineGetRawValue(Package, 2);
|
||||
if (InFileName == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"efidecompress", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"efidecompress", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
if (ShellIsDirectory(InFileName) == EFI_SUCCESS){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"efidecompress", InFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"efidecompress", InFileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (ShellIsDirectory(OutFileName) == EFI_SUCCESS){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"efidecompress", OutFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"efidecompress", OutFileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
Status = ShellOpenFileByName(InFileName, &InFileHandle, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"efidecompress", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"efidecompress", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines HBufferImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -138,7 +138,7 @@ HBufferImageInit (
|
||||
}
|
||||
|
||||
/**
|
||||
Backup function for HBufferImage. Only a few fields need to be backup.
|
||||
Backup function for HBufferImage. Only a few fields need to be backup.
|
||||
This is for making the file buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@ -190,7 +190,7 @@ HBufferImageBackup (
|
||||
Lines
|
||||
CurrentLine
|
||||
NumLines
|
||||
ListHead
|
||||
ListHead
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
**/
|
||||
@ -946,7 +946,7 @@ HBufferImageRead (
|
||||
case FileTypeMemBuffer:
|
||||
Status = HMemImageRead (MemOffset, MemSize, Recover);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
Status = EFI_NOT_FOUND;
|
||||
break;
|
||||
@ -1013,7 +1013,7 @@ HBufferImageSave (
|
||||
case FileTypeMemBuffer:
|
||||
Status = HMemImageSave (MemOffset, MemSize);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
Status = EFI_NOT_FOUND;
|
||||
break;
|
||||
@ -1030,7 +1030,7 @@ HBufferImageSave (
|
||||
Create a new line and append it to the line list.
|
||||
Fields affected:
|
||||
NumLines
|
||||
Lines
|
||||
Lines
|
||||
|
||||
@retval NULL create line failed.
|
||||
@return the line created.
|
||||
@ -1368,7 +1368,7 @@ HBufferImageDoCharInput (
|
||||
Check user specified FileRow is above current screen.
|
||||
|
||||
@param[in] FileRow Row of file position ( start from 1 ).
|
||||
|
||||
|
||||
@retval TRUE It is above the current screen.
|
||||
@retval FALSE It is not above the current screen.
|
||||
|
||||
@ -1880,12 +1880,12 @@ HBufferImageGetTotalSize (
|
||||
|
||||
/**
|
||||
Delete character from buffer.
|
||||
|
||||
|
||||
@param[in] Pos Position, Pos starting from 0.
|
||||
@param[in] Count The Count of characters to delete.
|
||||
@param[out] DeleteBuffer The DeleteBuffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_SUCCESS Success
|
||||
**/
|
||||
EFI_STATUS
|
||||
HBufferImageDeleteCharacterFromBuffer (
|
||||
@ -2014,7 +2014,7 @@ HBufferImageDeleteCharacterFromBuffer (
|
||||
@param[in] Count Count of characters to add.
|
||||
@param[in] AddBuffer Add buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_SUCCESS Success.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HBufferImageAddCharacterToBuffer (
|
||||
@ -2166,7 +2166,7 @@ HBufferImageDoDelete (
|
||||
|
||||
/**
|
||||
Change the raw buffer to a list of lines for the UI.
|
||||
|
||||
|
||||
@param[in] Buffer The pointer to the buffer to fill.
|
||||
@param[in] Bytes The size of the buffer in bytes.
|
||||
|
||||
@ -2231,7 +2231,7 @@ HBufferImageBufferToList (
|
||||
|
||||
/**
|
||||
Change the list of lines from the UI to a raw buffer.
|
||||
|
||||
|
||||
@param[in] Buffer The pointer to the buffer to fill.
|
||||
@param[in] Bytes The size of the buffer in bytes.
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines BufferImage - the view of the file that is visible at any point,
|
||||
Defines BufferImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -72,7 +72,7 @@ HBufferImageHandleInput (
|
||||
);
|
||||
|
||||
/**
|
||||
Backup function for HBufferImage. Only a few fields need to be backup.
|
||||
Backup function for HBufferImage. Only a few fields need to be backup.
|
||||
This is for making the file buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@ -151,7 +151,7 @@ HBufferImageMovePosition (
|
||||
Create a new line and append it to the line list.
|
||||
Fields affected:
|
||||
NumLines
|
||||
Lines
|
||||
Lines
|
||||
|
||||
@retval NULL create line failed.
|
||||
@return the line created.
|
||||
@ -174,12 +174,12 @@ HBufferImageFree (
|
||||
|
||||
/**
|
||||
Delete character from buffer.
|
||||
|
||||
|
||||
@param[in] Pos Position, Pos starting from 0.
|
||||
@param[in] Count The Count of characters to delete.
|
||||
@param[out] DeleteBuffer The DeleteBuffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_SUCCESS Success
|
||||
**/
|
||||
EFI_STATUS
|
||||
HBufferImageDeleteCharacterFromBuffer (
|
||||
@ -195,7 +195,7 @@ HBufferImageDeleteCharacterFromBuffer (
|
||||
@param[in] Count Count of characters to add.
|
||||
@param[in] AddBuffer Add buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_SUCCESS Success.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HBufferImageAddCharacterToBuffer (
|
||||
@ -206,7 +206,7 @@ HBufferImageAddCharacterToBuffer (
|
||||
|
||||
/**
|
||||
Change the raw buffer to a list of lines for the UI.
|
||||
|
||||
|
||||
@param[in] Buffer The pointer to the buffer to fill.
|
||||
@param[in] Bytes The size of the buffer in bytes.
|
||||
|
||||
@ -221,7 +221,7 @@ HBufferImageBufferToList (
|
||||
|
||||
/**
|
||||
Change the list of lines from the UI to a raw buffer.
|
||||
|
||||
|
||||
@param[in] Buffer The pointer to the buffer to fill.
|
||||
@param[in] Bytes The size of the buffer in bytes.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Functions to deal with Clip Board
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines DiskImage - the view of the file that is visible at any point,
|
||||
Defines DiskImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
|
@ -39,7 +39,7 @@ HEFI_EDITOR_DISK_IMAGE HDiskImageConst = {
|
||||
|
||||
/**
|
||||
Initialization function for HDiskImage.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
**/
|
||||
@ -59,7 +59,7 @@ HDiskImageInit (
|
||||
}
|
||||
|
||||
/**
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
This is for making the Disk buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@ -154,7 +154,7 @@ HDiskImageSetDiskNameOffsetSize (
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HDiskImageRead (
|
||||
@ -326,7 +326,7 @@ HDiskImageRead (
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HDiskImageSave (
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines DiskImage - the view of the file that is visible at any point,
|
||||
Defines DiskImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
Initialization function for HDiskImage.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
**/
|
||||
@ -40,7 +40,7 @@ HDiskImageCleanup (
|
||||
);
|
||||
|
||||
/**
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
This is for making the Disk buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@ -62,7 +62,7 @@ HDiskImageBackup (
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HDiskImageRead (
|
||||
@ -83,7 +83,7 @@ HDiskImageRead (
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HDiskImageSave (
|
||||
|
@ -37,7 +37,7 @@ HEFI_EDITOR_BUFFER_IMAGE HFileImageConst = {
|
||||
|
||||
/**
|
||||
Initialization function for HFileImage
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -60,7 +60,7 @@ HFileImageInit (
|
||||
}
|
||||
|
||||
/**
|
||||
Backup function for HFileImage. Only a few fields need to be backup.
|
||||
Backup function for HFileImage. Only a few fields need to be backup.
|
||||
This is for making the file buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines FileImage - the view of the file that is visible at any point,
|
||||
Defines FileImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
Initialization function for HFileImage
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@ -39,7 +39,7 @@ HFileImageCleanup (
|
||||
);
|
||||
|
||||
/**
|
||||
Backup function for HFileImage. Only a few fields need to be backup.
|
||||
Backup function for HFileImage. Only a few fields need to be backup.
|
||||
This is for making the file buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Main entry point of editor
|
||||
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -74,7 +74,7 @@ ShellCommandRunHexEdit (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"hexedit", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"hexedit", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -86,10 +86,10 @@ ShellCommandRunHexEdit (
|
||||
//
|
||||
if (ShellCommandLineGetFlag(Package, L"-d")){
|
||||
if (ShellCommandLineGetCount(Package) < 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) > 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
WhatToDo = FileTypeDiskBuffer;
|
||||
@ -98,7 +98,7 @@ ShellCommandRunHexEdit (
|
||||
Size = ShellStrToUintn(ShellCommandLineGetRawValue(Package, 3));
|
||||
}
|
||||
if (Offset == (UINTN)-1 || Size == (UINTN)-1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"hexedit", L"-d");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"hexedit", L"-d");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@ -108,15 +108,15 @@ ShellCommandRunHexEdit (
|
||||
//
|
||||
if (ShellCommandLineGetFlag(Package, L"-f") && (WhatToDo == FileTypeNone)){
|
||||
if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Name = ShellCommandLineGetRawValue(Package, 1);
|
||||
if (Name == NULL || !IsValidFileName(Name)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
WhatToDo = FileTypeFileBuffer;
|
||||
@ -129,10 +129,10 @@ ShellCommandRunHexEdit (
|
||||
//
|
||||
if (ShellCommandLineGetFlag(Package, L"-m") && (WhatToDo == FileTypeNone)){
|
||||
if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
WhatToDo = FileTypeMemBuffer;
|
||||
@ -143,10 +143,10 @@ ShellCommandRunHexEdit (
|
||||
Name = ShellCommandLineGetRawValue(Package, 1);
|
||||
if (WhatToDo == FileTypeNone && Name != NULL) {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (!IsValidFileName(Name)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
WhatToDo = FileTypeFileBuffer;
|
||||
@ -154,7 +154,7 @@ ShellCommandRunHexEdit (
|
||||
} else if (WhatToDo == FileTypeNone) {
|
||||
if (gEfiShellProtocol->GetCurDir(NULL) == NULL) {
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
|
||||
} else {
|
||||
NewName = EditGetDefaultFileName(L"bin");
|
||||
Name = NewName;
|
||||
@ -163,10 +163,10 @@ ShellCommandRunHexEdit (
|
||||
}
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS && WhatToDo == FileTypeNone) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (WhatToDo == FileTypeFileBuffer && ShellGetCurrentDir(NULL) == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ ShellCommandRunHexEdit (
|
||||
// print editor exit code on screen
|
||||
//
|
||||
if (Status == EFI_OUT_OF_RESOURCES) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"hexedit");
|
||||
} else if (EFI_ERROR(Status)){
|
||||
if (Buffer != NULL) {
|
||||
if (StrCmp (Buffer, L"") != 0) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main include file for hex editor
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
data types that are used by editor
|
||||
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
// /**
|
||||
//
|
||||
// Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -27,7 +27,7 @@
|
||||
#string STR_HEXEDIT_DISKNAME #language en-US " %H-d DiskName FirstBlockNo. BlockNumber%N Open Disk Block For Editing\n"
|
||||
#string STR_HEXEDIT_OFFSET_SIZE #language en-US " %H-m Offset Size%N Open Memory Region For Editing\n"
|
||||
#string STR_HEXEDIT_FILE_NAME #language en-US "%Hhexedit%N: Invalid File Name\n"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE #language en-US "%EMainEditor init failed on TitleBar init\n%N"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE #language en-US "%EMainEditor init failed on TitleBar init\n%N"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_MAINMENU #language en-US "%EMainEditor init failed on MainMenu init\n%N"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_STATUS #language en-US "%EMainEditor init failed on StatusBar init\n%N"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_INPUTBAR #language en-US "%EMainEditor init failed on InputBar init\n%N"
|
||||
|
@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Defines the Main Editor data type -
|
||||
- Global variables
|
||||
Defines the Main Editor data type -
|
||||
- Global variables
|
||||
- Instances of the other objects of the editor
|
||||
- Main Interfaces
|
||||
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -111,14 +111,14 @@ HMainCommandDisplayHelp (
|
||||
EFI_KEY_DATA KeyData;
|
||||
EFI_STATUS Status;
|
||||
UINTN EventIndex;
|
||||
|
||||
|
||||
//
|
||||
// print helpInfo
|
||||
// print helpInfo
|
||||
//
|
||||
for (CurrentLine = 0; 0 != HexMainMenuHelpInfo[CurrentLine]; CurrentLine++) {
|
||||
InfoString = HiiGetString(gShellDebug1HiiHandle, HexMainMenuHelpInfo[CurrentLine]
|
||||
, NULL);
|
||||
ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString);
|
||||
ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString);
|
||||
}
|
||||
|
||||
//
|
||||
@ -245,7 +245,7 @@ HMainCommandGoToOffset (
|
||||
|
||||
/**
|
||||
Save current opened buffer.
|
||||
If is file buffer, you can save to current file name or
|
||||
If is file buffer, you can save to current file name or
|
||||
save to another file name.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@ -375,7 +375,7 @@ HMainCommandSaveBuffer (
|
||||
// 7. Update File Name field in Title Bar to B
|
||||
// and remove the Modified flag in Title Bar.
|
||||
//
|
||||
Str = CatSPrint(NULL,
|
||||
Str = CatSPrint(NULL,
|
||||
L"File to Save: [%s]",
|
||||
HMainEditor.BufferImage->FileImage->FileName
|
||||
);
|
||||
@ -422,7 +422,7 @@ HMainCommandSaveBuffer (
|
||||
// if just enter pressed, so think save to current file name
|
||||
//
|
||||
if (StrLen (InputBarGetString()) == 0) {
|
||||
FileName = CatSPrint(NULL,
|
||||
FileName = CatSPrint(NULL,
|
||||
L"%s",
|
||||
HMainEditor.BufferImage->FileImage->FileName
|
||||
);
|
||||
@ -476,7 +476,7 @@ HMainCommandSaveBuffer (
|
||||
StatusBarSetStatusString (L"Access Denied");
|
||||
SHELL_FREE_NON_NULL (FileName);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
SHELL_FREE_NON_NULL(Info);
|
||||
//
|
||||
@ -520,7 +520,7 @@ HMainCommandSaveBuffer (
|
||||
} // while
|
||||
} // if opened existing file
|
||||
} // if OldFile
|
||||
|
||||
|
||||
//
|
||||
// save file back to disk
|
||||
//
|
||||
@ -1803,9 +1803,9 @@ HMainEditorCleanup (
|
||||
MenuBarCleanup ();
|
||||
|
||||
StatusBarCleanup ();
|
||||
|
||||
|
||||
InputBarCleanup ();
|
||||
|
||||
|
||||
Status = HBufferImageCleanup ();
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_BUFFERIMAGE_CLEAN), gShellDebug1HiiHandle);
|
||||
@ -1850,28 +1850,28 @@ HMainEditorRefresh (
|
||||
if (HMainEditor.BufferImage->BufferType == FileTypeDiskBuffer) {
|
||||
if (HMainEditor.BufferImage->DiskImage != NULL &&
|
||||
HBufferImageBackupVar.DiskImage != NULL &&
|
||||
(HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset ||
|
||||
(HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset ||
|
||||
HMainEditor.BufferImage->DiskImage->Size != HBufferImageBackupVar.DiskImage->Size) ){
|
||||
NameChange = TRUE;
|
||||
}
|
||||
} else if (HMainEditor.BufferImage->BufferType == FileTypeMemBuffer) {
|
||||
if (HMainEditor.BufferImage->MemImage != NULL &&
|
||||
HBufferImageBackupVar.MemImage != NULL &&
|
||||
(HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset ||
|
||||
(HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset ||
|
||||
HMainEditor.BufferImage->MemImage->Size != HBufferImageBackupVar.MemImage->Size) ){
|
||||
NameChange = TRUE;
|
||||
}
|
||||
} else if (HMainEditor.BufferImage->BufferType == FileTypeFileBuffer) {
|
||||
if ( HMainEditor.BufferImage->FileImage != NULL &&
|
||||
HMainEditor.BufferImage->FileImage->FileName != NULL &&
|
||||
HBufferImageBackupVar.FileImage != NULL &&
|
||||
HBufferImageBackupVar.FileImage->FileName != NULL &&
|
||||
if ( HMainEditor.BufferImage->FileImage != NULL &&
|
||||
HMainEditor.BufferImage->FileImage->FileName != NULL &&
|
||||
HBufferImageBackupVar.FileImage != NULL &&
|
||||
HBufferImageBackupVar.FileImage->FileName != NULL &&
|
||||
StrCmp (HMainEditor.BufferImage->FileImage->FileName, HBufferImageBackupVar.FileImage->FileName) != 0 ) {
|
||||
NameChange = TRUE;
|
||||
}
|
||||
}
|
||||
if ( HMainEditor.BufferImage->FileImage != NULL &&
|
||||
HBufferImageBackupVar.FileImage != NULL &&
|
||||
if ( HMainEditor.BufferImage->FileImage != NULL &&
|
||||
HBufferImageBackupVar.FileImage != NULL &&
|
||||
HMainEditor.BufferImage->FileImage->ReadOnly != HBufferImageBackupVar.FileImage->ReadOnly ) {
|
||||
ReadChange = TRUE;
|
||||
}
|
||||
@ -1885,10 +1885,10 @@ HMainEditorRefresh (
|
||||
//
|
||||
// call the components refresh function
|
||||
//
|
||||
if (HEditorFirst
|
||||
if (HEditorFirst
|
||||
|| NameChange
|
||||
|| HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType
|
||||
|| HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified
|
||||
|| HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType
|
||||
|| HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified
|
||||
|| ReadChange ) {
|
||||
|
||||
MainTitleBarRefresh (
|
||||
@ -1904,8 +1904,8 @@ HMainEditorRefresh (
|
||||
HBufferImageRefresh ();
|
||||
}
|
||||
if (HEditorFirst
|
||||
|| HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row
|
||||
|| HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column
|
||||
|| HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row
|
||||
|| HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column
|
||||
|| StatusBarGetRefresh()) {
|
||||
|
||||
StatusBarRefresh (
|
||||
@ -2334,7 +2334,7 @@ HMainEditorKeyInput (
|
||||
case FileTypeMemBuffer:
|
||||
OldSize = HBufferImage.MemImage->Size;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
OldSize = 0;
|
||||
break;
|
||||
|
@ -1,10 +1,10 @@
|
||||
/** @file
|
||||
Defines the Main Editor data type -
|
||||
- Global variables
|
||||
Defines the Main Editor data type -
|
||||
- Global variables
|
||||
- Instances of the other objects of the editor
|
||||
- Main Interfaces
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Functions to deal with Mem buffer
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -67,7 +67,7 @@ HMemImageInit (
|
||||
}
|
||||
|
||||
/**
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
This is for making the Disk buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines MemImage - the view of the file that is visible at any point,
|
||||
Defines MemImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -30,7 +30,7 @@ HMemImageInit (
|
||||
);
|
||||
|
||||
/**
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
This is for making the Disk buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of various string and line routines
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -18,7 +18,7 @@ extern BOOLEAN HEditorMouseAction;
|
||||
|
||||
/**
|
||||
Free a line and it's internal buffer.
|
||||
|
||||
|
||||
@param[in] Src The line to be freed.
|
||||
**/
|
||||
VOID
|
||||
@ -109,7 +109,7 @@ HLineRetreat (
|
||||
|
||||
@param[in] Count The line number to advance/retreat.
|
||||
>0 : advance
|
||||
<0: retreat
|
||||
<0: retreat
|
||||
|
||||
@retval NULL An error occured.
|
||||
@return A pointer to the line after move.
|
||||
@ -182,7 +182,7 @@ HMoveCurrentLine (
|
||||
Lines
|
||||
CurrentLine
|
||||
NumLines
|
||||
ListHead
|
||||
ListHead
|
||||
|
||||
@param[in] ListHead The list head.
|
||||
@param[in] Lines The lines.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Definitions for various line and string routines
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
@param[in] Count The line number to advance/retreat.
|
||||
>0 : advance
|
||||
<0: retreat
|
||||
<0: retreat
|
||||
|
||||
@retval NULL An error occured.
|
||||
@return A pointer to the line after move.
|
||||
@ -53,7 +53,7 @@ HMoveCurrentLine (
|
||||
Lines
|
||||
CurrentLine
|
||||
NumLines
|
||||
ListHead
|
||||
ListHead
|
||||
|
||||
@param[in] ListHead The list head.
|
||||
@param[in] Lines The lines.
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for LoadPciRom shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -93,7 +93,7 @@ ShellCommandRunLoadPciRom (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"loadpcirom", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"loadpcirom", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -101,7 +101,7 @@ ShellCommandRunLoadPciRom (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"loadpcirom");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"loadpcirom");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (ShellCommandLineGetFlag(Package, L"-nc")) {
|
||||
@ -120,7 +120,7 @@ ShellCommandRunLoadPciRom (
|
||||
){
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)Param, EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ, &FileList);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Param);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Param);
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
break;
|
||||
}
|
||||
@ -134,12 +134,12 @@ ShellCommandRunLoadPciRom (
|
||||
; Node = (EFI_SHELL_FILE_INFO*)GetNextNode(&FileList->Link, &Node->Link)
|
||||
){
|
||||
if (EFI_ERROR(Node->Status)){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
continue;
|
||||
}
|
||||
if (FileHandleIsDirectory(Node->Handle) == EFI_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
continue;
|
||||
}
|
||||
@ -152,7 +152,7 @@ ShellCommandRunLoadPciRom (
|
||||
}
|
||||
Status = gEfiShellProtocol->ReadFile(Node->Handle, &SourceSize, File1Buffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_READ_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_READ_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = LoadEfiDriversFromRomImage (
|
||||
@ -166,7 +166,7 @@ ShellCommandRunLoadPciRom (
|
||||
FreePool(File1Buffer);
|
||||
}
|
||||
} else if (ShellStatus == SHELL_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_SPEC), gShellDebug1HiiHandle, "loadpcirom");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_SPEC), gShellDebug1HiiHandle, "loadpcirom");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
if (FileList != NULL && !IsListEmpty(&FileList->Link)) {
|
||||
@ -234,14 +234,14 @@ LoadEfiDriversFromRomImage (
|
||||
EfiRomHeader = (EFI_PCI_EXPANSION_ROM_HEADER *) (UINTN) RomBarOffset;
|
||||
|
||||
if (EfiRomHeader->Signature != PCI_EXPANSION_ROM_HEADER_SIGNATURE) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_CORRUPT), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_CORRUPT), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
// PrintToken (STRING_TOKEN (STR_LOADPCIROM_IMAGE_CORRUPT), HiiHandle, ImageIndex);
|
||||
return ReturnStatus;
|
||||
}
|
||||
|
||||
//
|
||||
// If the pointer to the PCI Data Structure is invalid, no further images can be located.
|
||||
// The PCI Data Structure must be DWORD aligned.
|
||||
// If the pointer to the PCI Data Structure is invalid, no further images can be located.
|
||||
// The PCI Data Structure must be DWORD aligned.
|
||||
//
|
||||
if (EfiRomHeader->PcirOffset == 0 ||
|
||||
(EfiRomHeader->PcirOffset & 3) != 0 ||
|
||||
@ -340,12 +340,12 @@ LoadEfiDriversFromRomImage (
|
||||
&ImageHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_LOAD_FAIL), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_LOAD_FAIL), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
// PrintToken (STRING_TOKEN (STR_LOADPCIROM_LOAD_IMAGE_ERROR), HiiHandle, ImageIndex, Status);
|
||||
} else {
|
||||
Status = gBS->StartImage (ImageHandle, NULL, NULL);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_START_FAIL), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_START_FAIL), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
// PrintToken (STRING_TOKEN (STR_LOADPCIROM_START_IMAGE), HiiHandle, ImageIndex, Status);
|
||||
} else {
|
||||
ReturnStatus = Status;
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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 acModeanies this distribution. The full text of the license may be found at
|
||||
@ -200,7 +200,7 @@ ShellCommandRunMemMap (
|
||||
Status = ShellCommandLineParse (SfoParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"memmap", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"memmap", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -208,7 +208,7 @@ ShellCommandRunMemMap (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"memmap");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"memmap");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = gBS->GetMemoryMap(&Size, Descriptors, &MapKey, &ItemSize, &Version);
|
||||
@ -218,7 +218,7 @@ ShellCommandRunMemMap (
|
||||
Status = gBS->GetMemoryMap(&Size, Descriptors, &MapKey, &ItemSize, &Version);
|
||||
}
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MEMMAP_GET_FAILED), gShellDebug1HiiHandle, L"memmap");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MEMMAP_GET_FAILED), gShellDebug1HiiHandle, L"memmap");
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
} else {
|
||||
ASSERT(Version == EFI_MEMORY_DESCRIPTOR_VERSION);
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Mode shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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 acModeanies this distribution. The full text of the license may be found at
|
||||
@ -58,7 +58,7 @@ ShellCommandRunMode (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"mode", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"mode", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -66,21 +66,21 @@ ShellCommandRunMode (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"mode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"mode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) == 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"mode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"mode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) == 3) {
|
||||
Temp = ShellCommandLineGetRawValue(Package, 1);
|
||||
if (!ShellIsHexOrDecimalNumber(Temp, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
NewCol = ShellStrToUintn(Temp);
|
||||
Temp = ShellCommandLineGetRawValue(Package, 2);
|
||||
if (!ShellIsHexOrDecimalNumber(Temp, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
NewRow = ShellStrToUintn(Temp);
|
||||
@ -93,7 +93,7 @@ ShellCommandRunMode (
|
||||
if (Col == NewCol && Row == NewRow) {
|
||||
Status = gST->ConOut->SetMode(gST->ConOut, LoopVar);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_SET_FAIL), gShellDebug1HiiHandle, L"mode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_SET_FAIL), gShellDebug1HiiHandle, L"mode");
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
} else {
|
||||
// worked fine...
|
||||
@ -104,7 +104,7 @@ ShellCommandRunMode (
|
||||
}
|
||||
|
||||
if (!Done) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_NO_MATCH), gShellDebug1HiiHandle, L"mode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_NO_MATCH), gShellDebug1HiiHandle, L"mode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Main file for Pci shell Debug1 function.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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
|
||||
@ -2487,7 +2487,7 @@ ShellCommandRunPci (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"pci", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"pci", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -2496,23 +2496,23 @@ ShellCommandRunPci (
|
||||
} else {
|
||||
|
||||
if (ShellCommandLineGetCount(Package) == 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (ShellCommandLineGetCount(Package) > 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (ShellCommandLineGetFlag(Package, L"-ec") && ShellCommandLineGetValue(Package, L"-ec") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"pci", L"-ec");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"pci", L"-ec");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (ShellCommandLineGetFlag(Package, L"-s") && ShellCommandLineGetValue(Package, L"-s") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"pci", L"-s");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"pci", L"-s");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -2524,7 +2524,7 @@ ShellCommandRunPci (
|
||||
HandleBufSize = sizeof (EFI_HANDLE);
|
||||
HandleBuf = (EFI_HANDLE *) AllocateZeroPool (HandleBufSize);
|
||||
if (HandleBuf == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
@ -2540,7 +2540,7 @@ ShellCommandRunPci (
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
HandleBuf = ReallocatePool (sizeof (EFI_HANDLE), HandleBufSize, HandleBuf);
|
||||
if (HandleBuf == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
@ -2555,7 +2555,7 @@ ShellCommandRunPci (
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_NF), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_NF), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
@ -2591,7 +2591,7 @@ ShellCommandRunPci (
|
||||
&Descriptors
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_HANDLE_CFG_ERR), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_HANDLE_CFG_ERR), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
@ -2604,7 +2604,7 @@ ShellCommandRunPci (
|
||||
Status = PciGetNextBusRange (&Descriptors, &MinBus, &MaxBus, &IsEnd);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_BUS_RANGE_ERR), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_BUS_RANGE_ERR), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
@ -2729,7 +2729,7 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
Segment = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -2747,13 +2747,13 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
Bus = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (Bus > PCI_MAX_BUS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -2766,13 +2766,13 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
Device = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (Device > PCI_MAX_DEVICE){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -2786,13 +2786,13 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
Func = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (Func > PCI_MAX_FUNC){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -2806,7 +2806,7 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
ExtendedCapability = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -2826,7 +2826,7 @@ ShellCommandRunPci (
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL, STRING_TOKEN (STR_PCI_NO_FIND), gShellDebug1HiiHandle, L"pci",
|
||||
-1, -1, NULL, STRING_TOKEN (STR_PCI_NO_FIND), gShellDebug1HiiHandle, L"pci",
|
||||
Segment,
|
||||
Bus
|
||||
);
|
||||
@ -2844,7 +2844,7 @@ ShellCommandRunPci (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_NO_CFG), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_NO_CFG), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
goto Done;
|
||||
}
|
||||
@ -4999,13 +4999,13 @@ PrintInterpretedExtendedCompatibilityLinkControl (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_INTERNAL_LINK_CONTROL*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_CONTROL),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_CONTROL),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->RootComplexLinkCapabilities,
|
||||
Header->RootComplexLinkControl,
|
||||
Header->RootComplexLinkStatus
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@ -5031,13 +5031,13 @@ PrintInterpretedExtendedCompatibilityPowerBudgeting (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_POWER_BUDGETING*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_POWER),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_POWER),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->DataSelect,
|
||||
Header->Data,
|
||||
Header->PowerBudgetCapability
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@ -5067,12 +5067,12 @@ PrintInterpretedExtendedCompatibilityAcs (
|
||||
VectorSize = 0;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ACS),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ACS),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->AcsCapability,
|
||||
Header->AcsControl
|
||||
);
|
||||
);
|
||||
if (PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_CONTROL(Header)) {
|
||||
VectorSize = PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_VECTOR_SIZE(Header);
|
||||
if (VectorSize == 0) {
|
||||
@ -5080,12 +5080,12 @@ PrintInterpretedExtendedCompatibilityAcs (
|
||||
}
|
||||
for (LoopCounter = 0 ; LoopCounter * 8 < VectorSize ; LoopCounter++) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ACS2),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ACS2),
|
||||
gShellDebug1HiiHandle,
|
||||
LoopCounter + 1,
|
||||
Header->EgressControlVectorArray[LoopCounter]
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
DumpHex (
|
||||
@ -5113,12 +5113,12 @@ PrintInterpretedExtendedCompatibilityLatencyToleranceReporting (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_LATENCE_TOLERANCE_REPORTING*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LAT),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LAT),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->MaxSnoopLatency,
|
||||
Header->MaxNoSnoopLatency
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@ -5144,11 +5144,11 @@ PrintInterpretedExtendedCompatibilitySerialNumber (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_SERIAL_NUMBER*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_SN),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_SN),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->SerialNumber
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@ -5174,14 +5174,14 @@ PrintInterpretedExtendedCompatibilityRcrb (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_RCRB_HEADER*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_RCRB),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_RCRB),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->VendorId,
|
||||
Header->DeviceId,
|
||||
Header->RcrbCapabilities,
|
||||
Header->RcrbControl
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@ -5207,11 +5207,11 @@ PrintInterpretedExtendedCompatibilityVendorSpecific (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_VENDOR_SPECIFIC*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VEN),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VEN),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->VendorSpecificHeader
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@ -5237,11 +5237,11 @@ PrintInterpretedExtendedCompatibilityECEA (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ECEA),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ECEA),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->AssociationBitmap
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@ -5267,12 +5267,12 @@ PrintInterpretedExtendedCompatibilityAri (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_ARI_CAPABILITY*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ARI),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ARI),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->AriCapability,
|
||||
Header->AriControl
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@ -5299,19 +5299,19 @@ PrintInterpretedExtendedCompatibilityDynamicPowerAllocation (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_DYNAMIC_POWER_ALLOCATION*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_DPA),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_DPA),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->DpaCapability,
|
||||
Header->DpaLatencyIndicator,
|
||||
Header->DpaStatus,
|
||||
Header->DpaControl
|
||||
);
|
||||
);
|
||||
for (LinkCount = 0 ; LinkCount < PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_GET_SUBSTATE_MAX(Header) + 1 ; LinkCount++) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_DPA2),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_DPA2),
|
||||
gShellDebug1HiiHandle,
|
||||
LinkCount+1,
|
||||
Header->DpaPowerAllocationArray[LinkCount]
|
||||
);
|
||||
@ -5342,17 +5342,17 @@ PrintInterpretedExtendedCompatibilityLinkDeclaration (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_LINK_DECLARATION*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->ElementSelfDescription
|
||||
);
|
||||
|
||||
for (LinkCount = 0 ; LinkCount < PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_GET_LINK_COUNT(Header) ; LinkCount++) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR2),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR2),
|
||||
gShellDebug1HiiHandle,
|
||||
LinkCount+1,
|
||||
Header->LinkEntry[LinkCount]
|
||||
);
|
||||
@ -5382,9 +5382,9 @@ PrintInterpretedExtendedCompatibilityAer (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_ADVANCED_ERROR_REPORTING*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_AER),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_AER),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->UncorrectableErrorStatus,
|
||||
Header->UncorrectableErrorMask,
|
||||
Header->UncorrectableErrorSeverity,
|
||||
@ -5431,9 +5431,9 @@ PrintInterpretedExtendedCompatibilityMulticast (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_MULTICAST*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_MULTICAST),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_MULTICAST),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->MultiCastCapability,
|
||||
Header->MulticastControl,
|
||||
Header->McBaseAddress,
|
||||
@ -5471,9 +5471,9 @@ PrintInterpretedExtendedCompatibilityVirtualChannel (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_CAPABILITY*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VC_BASE),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VC_BASE),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->ExtendedVcCount,
|
||||
Header->PortVcCapability1,
|
||||
Header->PortVcCapability2,
|
||||
@ -5484,9 +5484,9 @@ PrintInterpretedExtendedCompatibilityVirtualChannel (
|
||||
for (ItemCount = 0 ; ItemCount < Header->ExtendedVcCount ; ItemCount++) {
|
||||
CapabilityItem = &Header->Capability[ItemCount];
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VC_ITEM),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VC_ITEM),
|
||||
gShellDebug1HiiHandle,
|
||||
ItemCount+1,
|
||||
CapabilityItem->VcResourceCapability,
|
||||
CapabilityItem->PortArbTableOffset,
|
||||
@ -5524,9 +5524,9 @@ PrintInterpretedExtendedCompatibilityResizeableBar (
|
||||
|
||||
for (ItemCount = 0 ; ItemCount < (UINT32)GET_NUMBER_RESIZABLE_BARS(Header) ; ItemCount++) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_RESIZE_BAR),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_RESIZE_BAR),
|
||||
gShellDebug1HiiHandle,
|
||||
ItemCount+1,
|
||||
Header->Capability[ItemCount].ResizableBarCapability,
|
||||
Header->Capability[ItemCount].ResizableBarControl
|
||||
@ -5559,9 +5559,9 @@ PrintInterpretedExtendedCompatibilityTph (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_TPH*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_TPH),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_TPH),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->TphRequesterCapability,
|
||||
Header->TphRequesterControl
|
||||
);
|
||||
@ -5600,9 +5600,9 @@ PrintInterpretedExtendedCompatibilitySecondary (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_SECONDARY_PCIE*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_SECONDARY),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_SECONDARY),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->LinkControl3.Uint32,
|
||||
Header->LaneErrorStatus
|
||||
);
|
||||
@ -5633,7 +5633,7 @@ PrintInterpretedExtendedCompatibilitySecondary (
|
||||
**/
|
||||
EFI_STATUS
|
||||
PrintPciExtendedCapabilityDetails(
|
||||
IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress,
|
||||
IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress,
|
||||
IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
|
||||
IN CONST PCI_CAPABILITY_PCIEXP *PciExpressCapPtr
|
||||
)
|
||||
@ -5666,7 +5666,7 @@ PrintPciExtendedCapabilityDetails(
|
||||
case PCI_EXPRESS_EXTENDED_CAPABILITY_VIRTUAL_CHANNEL_ID:
|
||||
case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTI_FUNCTION_VIRTUAL_CHANNEL_ID:
|
||||
return PrintInterpretedExtendedCompatibilityVirtualChannel(HeaderAddress, HeadersBaseAddress);
|
||||
case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID:
|
||||
case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID:
|
||||
//
|
||||
// should only be present if PCIE_CAP_DEVICEPORT_TYPE(PciExpressCapPtr->PcieCapReg) == 0100b, 0101b, or 0110b
|
||||
//
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for SerMode shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -50,7 +50,7 @@ DisplaySettings (
|
||||
|
||||
Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiSerialIoProtocolGuid, NULL, &NoHandles, &Handles);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
return SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ DisplaySettings (
|
||||
StopBits
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
break;
|
||||
}
|
||||
@ -150,7 +150,7 @@ DisplaySettings (
|
||||
|
||||
if (Index == NoHandles) {
|
||||
if ((NoHandles != 0 && HandleValid) || 0 == NoHandles) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NOT_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NOT_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
@ -199,7 +199,7 @@ ShellCommandRunSerMode (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"sermode", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"sermode", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -207,10 +207,10 @@ ShellCommandRunSerMode (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) < 6 && ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) > 6) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Temp = ShellCommandLineGetRawValue(Package, 1);
|
||||
@ -235,7 +235,7 @@ ShellCommandRunSerMode (
|
||||
}
|
||||
Temp = ShellCommandLineGetRawValue(Package, 3);
|
||||
if (Temp == NULL || StrLen(Temp)>1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
switch(Temp[0]){
|
||||
@ -264,7 +264,7 @@ ShellCommandRunSerMode (
|
||||
Parity = SpaceParity;
|
||||
break;
|
||||
default:
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -284,7 +284,7 @@ ShellCommandRunSerMode (
|
||||
case 8:
|
||||
break;
|
||||
default:
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -308,13 +308,13 @@ ShellCommandRunSerMode (
|
||||
break;
|
||||
|
||||
default:
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiSerialIoProtocolGuid, NULL, &NoHandles, &Handles);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -337,13 +337,13 @@ ShellCommandRunSerMode (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (Status == EFI_INVALID_PARAMETER) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_UNSUPPORTED), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_UNSUPPORTED), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellStatus = SHELL_UNSUPPORTED;
|
||||
} else if (Status == EFI_DEVICE_ERROR) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_DEV_ERROR), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_DEV_ERROR), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_FAIL), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_FAIL), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
}
|
||||
} else {
|
||||
@ -356,7 +356,7 @@ ShellCommandRunSerMode (
|
||||
}
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS && Index == NoHandles) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_BAD_HANDLE), gShellDebug1HiiHandle, L"sermode", HandleIdx);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_BAD_HANDLE), gShellDebug1HiiHandle, L"sermode", HandleIdx);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for SetSize shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -55,7 +55,7 @@ ShellCommandRunSetSize (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"setsize", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"setsize", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -63,13 +63,13 @@ ShellCommandRunSetSize (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
NewSize = 0;
|
||||
} else {
|
||||
Temp1 = ShellCommandLineGetRawValue(Package, 1);
|
||||
if (!ShellIsHexOrDecimalNumber(Temp1, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SIZE_NOT_SPEC), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SIZE_NOT_SPEC), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
NewSize = 0;
|
||||
} else {
|
||||
@ -82,19 +82,19 @@ ShellCommandRunSetSize (
|
||||
Status = ShellOpenFileByName(ShellCommandLineGetRawValue(Package, LoopVar), &FileHandle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE|EFI_FILE_MODE_CREATE, 0);
|
||||
}
|
||||
if (EFI_ERROR(Status) && LoopVar == 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_SPEC), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_SPEC), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"setsize", ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"setsize", ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
break;
|
||||
} else {
|
||||
Status = FileHandleSetSize(FileHandle, NewSize);
|
||||
if (Status == EFI_VOLUME_FULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_VOLUME_FULL), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_VOLUME_FULL), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellStatus = SHELL_VOLUME_FULL;
|
||||
} else if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_SIZE_FAIL), gShellDebug1HiiHandle, L"setsize", ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_SIZE_FAIL), gShellDebug1HiiHandle, L"setsize", ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_SIZE_DONE), gShellDebug1HiiHandle, ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for SetVar shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -378,19 +378,19 @@ ShellCommandRunSetVar (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"setvar", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"setvar", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
} else if (ShellCommandLineCheckDuplicate (Package,&ProblemParam) != EFI_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DUPLICATE), gShellDebug1HiiHandle, L"setvar", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DUPLICATE), gShellDebug1HiiHandle, L"setvar", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"setvar");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"setvar");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
VariableName = ShellCommandLineGetRawValue(Package, 1);
|
||||
@ -400,7 +400,7 @@ ShellCommandRunSetVar (
|
||||
StringGuid = ShellCommandLineGetValue(Package, L"-guid");
|
||||
RStatus = StrToGuid (StringGuid, &Guid);
|
||||
if (RETURN_ERROR (RStatus) || (StringGuid[GUID_STRING_LENGTH] != L'\0')) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"setvar", StringGuid);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"setvar", StringGuid);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
API for SMBIOS table.
|
||||
|
||||
Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -11,7 +11,7 @@
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
#include "UefiShellDebug1CommandsLib.h"
|
||||
#include <Guid/SmBios.h>
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Module for clarifying the content of the smbios structure element information.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -2892,7 +2892,7 @@ DisplaySBDSManufactureDate (
|
||||
/**
|
||||
Display System Reset (Type 23) information.
|
||||
|
||||
|
||||
|
||||
Identifies the system-reset capabilities for the system.
|
||||
Bits 7:6 Reserved for future assignment via this specification, set to 00b.
|
||||
Bit 5 System contains a watchdog timer, either True (1) or False (0).
|
||||
@ -2996,7 +2996,7 @@ DisplaySystemResetCapabilities (
|
||||
/**
|
||||
Display Hardware Security (Type 24) information.
|
||||
|
||||
|
||||
|
||||
Identifies the password and reset status for the system:
|
||||
|
||||
Bits 7:6 Power-on Password Status, one of:
|
||||
|
@ -2,7 +2,7 @@
|
||||
Build a table, each item is (Key, Info) pair.
|
||||
And give a interface of query a string out of a table.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -3412,7 +3412,7 @@ QueryTable (
|
||||
// Check if Key is in the range
|
||||
// or if Key == Value in the table
|
||||
//
|
||||
if ((High > Low && Key >= Low && Key <= High)
|
||||
if ((High > Low && Key >= Low && Key <= High)
|
||||
|| (Table[Index].Key == Key)) {
|
||||
StrnCpyS (Info, InfoLen, Table[Index].Info, InfoLen - 1);
|
||||
StrnCatS (Info, InfoLen, L"\n", InfoLen - 1 - StrLen(Info));
|
||||
|
@ -2,7 +2,7 @@
|
||||
Tools of clarify the content of the smbios table.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, 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
|
||||
@ -69,7 +69,7 @@ ShellCommandRunSmbiosView (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"smbiosview", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"smbiosview", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -77,13 +77,13 @@ ShellCommandRunSmbiosView (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetValue(Package, L"-t") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-t");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-t");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetValue(Package, L"-h") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-h");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-h");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (
|
||||
(ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-h")) ||
|
||||
@ -93,7 +93,7 @@ ShellCommandRunSmbiosView (
|
||||
(ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetFlag(Package, L"-a")) ||
|
||||
(ShellCommandLineGetFlag(Package, L"-s") && ShellCommandLineGetFlag(Package, L"-a"))
|
||||
) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
|
||||
@ -103,30 +103,30 @@ ShellCommandRunSmbiosView (
|
||||
Status1 = LibSmbiosInit ();
|
||||
Status2 = LibSmbios64BitInit ();
|
||||
if (EFI_ERROR (Status1) && EFI_ERROR (Status2)) {
|
||||
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_CANNOT_GET_TABLE), gShellDebug1HiiHandle);
|
||||
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_CANNOT_GET_TABLE), gShellDebug1HiiHandle);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
StructType = STRUCTURE_TYPE_RANDOM;
|
||||
RandomView = TRUE;
|
||||
|
||||
|
||||
Temp = ShellCommandLineGetValue(Package, L"-t");
|
||||
if (Temp != NULL) {
|
||||
StructType = (UINT8) ShellStrToUintn (Temp);
|
||||
}
|
||||
|
||||
|
||||
if (ShellCommandLineGetFlag(Package, L"-a")) {
|
||||
gShowType = SHOW_ALL;
|
||||
}
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status1)) {
|
||||
//
|
||||
// Initialize the StructHandle to be the first handle
|
||||
//
|
||||
StructHandle = INVALID_HANDLE;
|
||||
LibGetSmbiosStructure (&StructHandle, NULL, NULL);
|
||||
|
||||
|
||||
Temp = ShellCommandLineGetValue(Package, L"-h");
|
||||
if (Temp != NULL) {
|
||||
RandomView = FALSE;
|
||||
@ -140,7 +140,7 @@ ShellCommandRunSmbiosView (
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
if (ShellCommandLineGetFlag(Package, L"-s")) {
|
||||
Status = DisplayStatisticsTable (SHOW_DETAIL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
@ -148,7 +148,7 @@ ShellCommandRunSmbiosView (
|
||||
}
|
||||
goto Show64Bit;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Show SMBIOS structure information
|
||||
//
|
||||
@ -174,13 +174,13 @@ Show64Bit:
|
||||
//
|
||||
StructHandle = INVALID_HANDLE;
|
||||
LibGetSmbios64BitStructure (&StructHandle, NULL, NULL);
|
||||
|
||||
|
||||
Temp = ShellCommandLineGetValue(Package, L"-h");
|
||||
if (Temp != NULL) {
|
||||
RandomView = FALSE;
|
||||
StructHandle = (UINT16) ShellStrToUintn(Temp);
|
||||
}
|
||||
|
||||
|
||||
if (ShellCommandLineGetFlag(Package, L"-s")) {
|
||||
Status = DisplaySmbios64BitStatisticsTable (SHOW_DETAIL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
@ -188,7 +188,7 @@ Show64Bit:
|
||||
}
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Show SMBIOS structure information
|
||||
//
|
||||
@ -666,7 +666,7 @@ InitSmbiosTableStatistics (
|
||||
@param[out] NumberOfSmbios64Structures The number of structures in 64-bit SMBIOS table.
|
||||
@param[out] Smbios64TableLength The total length of 64-bit SMBIOS table.
|
||||
|
||||
@retval EFI_SUCCESS Calculation was successful.
|
||||
@retval EFI_SUCCESS Calculation was successful.
|
||||
**/
|
||||
EFI_STATUS
|
||||
CalculateSmbios64BitStructureCountAndLength (
|
||||
@ -677,10 +677,10 @@ CalculateSmbios64BitStructureCountAndLength (
|
||||
{
|
||||
SMBIOS_STRUCTURE_POINTER Smbios;
|
||||
UINT8 *Raw;
|
||||
|
||||
|
||||
*Smbios64TableLength = 0;
|
||||
*NumberOfSmbios64Structures = 0;
|
||||
|
||||
|
||||
Smbios.Raw = (UINT8 *)(UINTN)(Smbios64EntryPoint->TableAddress);
|
||||
while (TRUE) {
|
||||
if (Smbios.Hdr->Type == 127) {
|
||||
@ -702,11 +702,11 @@ CalculateSmbios64BitStructureCountAndLength (
|
||||
//
|
||||
(*Smbios64TableLength) += ((UINTN) Smbios.Raw - (UINTN) Raw);
|
||||
if ((*Smbios64TableLength) > Smbios64EntryPoint->TableMaximumSize) {
|
||||
//
|
||||
// The actual table length exceeds maximum table size,
|
||||
// There should be something wrong with SMBIOS table.
|
||||
//
|
||||
return EFI_INVALID_PARAMETER;
|
||||
//
|
||||
// The actual table length exceeds maximum table size,
|
||||
// There should be something wrong with SMBIOS table.
|
||||
//
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
(*NumberOfSmbios64Structures)++;
|
||||
}
|
||||
@ -727,7 +727,7 @@ InitSmbios64BitTableStatistics (
|
||||
UINT16 Length;
|
||||
UINT16 Offset;
|
||||
UINT16 Index;
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
SMBIOS_STRUCTURE_POINTER SmbiosStruct;
|
||||
SMBIOS_TABLE_3_0_ENTRY_POINT *SMBiosTable;
|
||||
STRUCTURE_STATISTICS *StatisticsPointer;
|
||||
@ -755,9 +755,9 @@ InitSmbios64BitTableStatistics (
|
||||
//
|
||||
Status = CalculateSmbios64BitStructureCountAndLength (SMBiosTable, &mNumberOfSmbios64BitStructures, &mSmbios64BitTableLength);
|
||||
if ((EFI_ERROR (Status)) || (mSmbios64BitTableLength > SMBiosTable->TableMaximumSize)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
mSmbios64BitStatisticsTable = (STRUCTURE_STATISTICS *) AllocateZeroPool (mNumberOfSmbios64BitStructures * sizeof (STRUCTURE_STATISTICS));
|
||||
|
||||
if (mSmbios64BitStatisticsTable == NULL) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for NULL named library for debug1 profile shell command functions.
|
||||
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -173,7 +173,7 @@ GetSystemConfigurationTable (
|
||||
|
||||
/**
|
||||
Clear the line at the specified Row.
|
||||
|
||||
|
||||
@param[in] Row The row number to be cleared ( start from 1 )
|
||||
@param[in] LastCol The last printable column.
|
||||
@param[in] LastRow The last printable row.
|
||||
@ -210,7 +210,7 @@ EditorClearLine (
|
||||
Line[LastCol % (ARRAY_SIZE (Line) - 1)] = CHAR_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// print out the blank line
|
||||
//
|
||||
@ -243,7 +243,7 @@ IsValidFileNameChar (
|
||||
|
||||
/**
|
||||
Check if file name has illegal characters.
|
||||
|
||||
|
||||
@param Name The filename to check.
|
||||
|
||||
@retval TRUE The filename is ok.
|
||||
@ -323,18 +323,18 @@ EditGetDefaultFileName (
|
||||
}
|
||||
|
||||
/**
|
||||
Read a file into an allocated buffer. The buffer is the responsibility
|
||||
Read a file into an allocated buffer. The buffer is the responsibility
|
||||
of the caller to free.
|
||||
|
||||
@param[in] FileName The filename of the file to open.
|
||||
@param[out] Buffer Upon successful return, the pointer to the
|
||||
address of the allocated buffer.
|
||||
@param[out] Buffer Upon successful return, the pointer to the
|
||||
address of the allocated buffer.
|
||||
@param[out] BufferSize If not NULL, then the pointer to the size
|
||||
of the allocated buffer.
|
||||
@param[out] ReadOnly Upon successful return TRUE if the file is
|
||||
read only. FALSE otherwise.
|
||||
|
||||
@retval EFI_NOT_FOUND The filename did not represent a file in the
|
||||
@retval EFI_NOT_FOUND The filename did not represent a file in the
|
||||
file system.
|
||||
@retval EFI_SUCCESS The file was read into the buffer.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@ -381,7 +381,7 @@ ReadFileIntoBuffer (
|
||||
}
|
||||
|
||||
Info = ShellGetFileInfo(FileHandle);
|
||||
|
||||
|
||||
if (Info->Attribute & EFI_FILE_DIRECTORY) {
|
||||
FreePool (Info);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for NULL named library for Profile1 shell command functions.
|
||||
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -312,7 +312,7 @@ ShellCommandRunHexEdit (
|
||||
|
||||
/**
|
||||
Clear the line at the specified Row.
|
||||
|
||||
|
||||
@param[in] Row The row number to be cleared ( start from 1 )
|
||||
@param[in] LastCol The last printable column.
|
||||
@param[in] LastRow The last printable row.
|
||||
@ -326,7 +326,7 @@ EditorClearLine (
|
||||
|
||||
/**
|
||||
Check if file name has illegal characters.
|
||||
|
||||
|
||||
@param Name The filename to check.
|
||||
|
||||
@retval TRUE The filename is ok.
|
||||
@ -351,18 +351,18 @@ EditGetDefaultFileName (
|
||||
);
|
||||
|
||||
/**
|
||||
Read a file into an allocated buffer. The buffer is the responsibility
|
||||
Read a file into an allocated buffer. The buffer is the responsibility
|
||||
of the caller to free.
|
||||
|
||||
@param[in] FileName The filename of the file to open.
|
||||
@param[out] Buffer Upon successful return, the pointer to the
|
||||
address of the allocated buffer.
|
||||
@param[out] Buffer Upon successful return, the pointer to the
|
||||
address of the allocated buffer.
|
||||
@param[out] BufferSize If not NULL, then the pointer to the size
|
||||
of the allocated buffer.
|
||||
@param[out] ReadOnly Upon successful return TRUE if the file is
|
||||
read only. FALSE otherwise.
|
||||
|
||||
@retval EFI_NOT_FOUND The filename did not represent a file in the
|
||||
@retval EFI_NOT_FOUND The filename did not represent a file in the
|
||||
file system. Directories cannot be read with
|
||||
this method.
|
||||
@retval EFI_SUCCESS The file was read into the buffer.
|
||||
|
@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Provides shell Debug1 profile functions
|
||||
#
|
||||
# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2010 - 2018, 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
|
||||
@ -64,8 +64,8 @@
|
||||
EditStatusBar.c
|
||||
EditMenuBar.h
|
||||
EditMenuBar.c
|
||||
|
||||
## Files specific to the text editor
|
||||
|
||||
## Files specific to the text editor
|
||||
Edit/Edit.c
|
||||
Edit/TextEditor.h
|
||||
Edit/TextEditorTypes.h
|
||||
@ -76,7 +76,7 @@
|
||||
Edit/Misc.h
|
||||
Edit/Misc.c
|
||||
Edit/TextEditStrings.uni
|
||||
|
||||
|
||||
## Files specific to the HEX editor
|
||||
HexEdit/BufferImage.h
|
||||
HexEdit/BufferImage.c
|
||||
|
@ -1,6 +1,6 @@
|
||||
// /**
|
||||
//
|
||||
// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
// (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
// This program and the accompanying materials
|
||||
@ -1041,7 +1041,7 @@
|
||||
" 2. The variable value is printed as a hexadecimal dump.\r\n"
|
||||
" 3. Option -d is used to delete variables. Option -s and -l are used to save\r\n"
|
||||
" and load variables to and from a file. The variable name can be specified\r\n"
|
||||
" when using these flags so that the operation only takes effect on\r\n"
|
||||
" when using these flags so that the operation only takes effect on\r\n"
|
||||
" that variable.\r\n"
|
||||
".SH EXAMPLES\r\n"
|
||||
" \r\n"
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for connect shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -36,16 +36,16 @@ ShellConnectDevicePath (
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE Handle;
|
||||
EFI_HANDLE PreviousHandle;
|
||||
|
||||
|
||||
if (DevicePathToConnect == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
PreviousHandle = NULL;
|
||||
do{
|
||||
do{
|
||||
RemainingDevicePath = DevicePathToConnect;
|
||||
Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &RemainingDevicePath, &Handle);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status) && (Handle != NULL)) {
|
||||
if (PreviousHandle == Handle) {
|
||||
Status = EFI_NOT_FOUND;
|
||||
@ -54,16 +54,16 @@ ShellConnectDevicePath (
|
||||
Status = gBS->ConnectController (Handle, NULL, RemainingDevicePath, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} while (!EFI_ERROR (Status) && !IsDevicePathEnd (RemainingDevicePath) );
|
||||
|
||||
|
||||
return Status;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
Connect drivers for PCI root bridge.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Connect drivers successfully.
|
||||
@retval EFI_NOT_FOUND Cannot find PCI root bridge device.
|
||||
|
||||
@ -72,31 +72,31 @@ EFI_STATUS
|
||||
ShellConnectPciRootBridge (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
{
|
||||
UINTN RootBridgeHandleCount;
|
||||
EFI_HANDLE *RootBridgeHandleBuffer;
|
||||
UINTN RootBridgeIndex;
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
RootBridgeHandleCount = 0;
|
||||
|
||||
Status = gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
&gEfiPciRootBridgeIoProtocolGuid,
|
||||
NULL,
|
||||
&RootBridgeHandleCount,
|
||||
&RootBridgeHandleBuffer
|
||||
|
||||
Status = gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
&gEfiPciRootBridgeIoProtocolGuid,
|
||||
NULL,
|
||||
&RootBridgeHandleCount,
|
||||
&RootBridgeHandleBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
for (RootBridgeIndex = 0; RootBridgeIndex < RootBridgeHandleCount; RootBridgeIndex++) {
|
||||
gBS->ConnectController (RootBridgeHandleBuffer[RootBridgeIndex], NULL, NULL, FALSE);
|
||||
}
|
||||
|
||||
for (RootBridgeIndex = 0; RootBridgeIndex < RootBridgeHandleCount; RootBridgeIndex++) {
|
||||
gBS->ConnectController (RootBridgeHandleBuffer[RootBridgeIndex], NULL, NULL, FALSE);
|
||||
}
|
||||
|
||||
FreePool (RootBridgeHandleBuffer);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ ShellConnectFromDevPaths (
|
||||
{
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevPath;
|
||||
EFI_DEVICE_PATH_PROTOCOL *CopyOfDevPath;
|
||||
EFI_DEVICE_PATH_PROTOCOL *Instance;
|
||||
EFI_DEVICE_PATH_PROTOCOL *Instance;
|
||||
EFI_DEVICE_PATH_PROTOCOL *Next;
|
||||
UINTN Length;
|
||||
UINTN Index;
|
||||
@ -210,7 +210,7 @@ ShellConnectFromDevPaths (
|
||||
BOOLEAN AtLeastOneConnected;
|
||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||
UINT8 Class[3];
|
||||
|
||||
|
||||
DevPath = NULL;
|
||||
Length = 0;
|
||||
AtLeastOneConnected = FALSE;
|
||||
@ -266,14 +266,14 @@ ShellConnectFromDevPaths (
|
||||
((DevicePathSubType (Instance) == MSG_USB_CLASS_DP)
|
||||
|| (DevicePathSubType (Instance) == MSG_USB_WWID_DP)
|
||||
)) {
|
||||
|
||||
|
||||
Status = ShellConnectPciRootBridge ();
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(Instance);
|
||||
FreePool(DevPath);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Status = gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
&gEfiPciIoProtocolGuid,
|
||||
@ -281,7 +281,7 @@ ShellConnectFromDevPaths (
|
||||
&HandleArrayCount,
|
||||
&HandleArray
|
||||
);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
for (Index = 0; Index < HandleArrayCount; Index++) {
|
||||
Status = gBS->HandleProtocol (
|
||||
@ -289,7 +289,7 @@ ShellConnectFromDevPaths (
|
||||
&gEfiPciIoProtocolGuid,
|
||||
(VOID **)&PciIo
|
||||
);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x09, 3, &Class);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
@ -313,7 +313,7 @@ ShellConnectFromDevPaths (
|
||||
if (HandleArray != NULL) {
|
||||
FreePool (HandleArray);
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
//
|
||||
// connect the entire device path
|
||||
//
|
||||
@ -323,9 +323,9 @@ ShellConnectFromDevPaths (
|
||||
}
|
||||
}
|
||||
FreePool (Instance);
|
||||
|
||||
|
||||
} while (CopyOfDevPath != NULL);
|
||||
|
||||
|
||||
if (DevPath != NULL) {
|
||||
FreePool(DevPath);
|
||||
}
|
||||
@ -335,7 +335,7 @@ ShellConnectFromDevPaths (
|
||||
} else {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -437,7 +437,7 @@ ShellCommandRunConnect (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"connect", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"connect", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -456,7 +456,7 @@ ShellCommandRunConnect (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"connect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"connect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-c")) {
|
||||
//
|
||||
@ -504,7 +504,7 @@ ShellCommandRunConnect (
|
||||
Status = ShellConvertStringToUint64(Param1, &Intermediate, TRUE, FALSE);
|
||||
Handle1 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
@ -515,22 +515,22 @@ ShellCommandRunConnect (
|
||||
Status = ShellConvertStringToUint64(Param2, &Intermediate, TRUE, FALSE);
|
||||
Handle2 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
Handle2 = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
if (Param1 != NULL && Handle1 == NULL){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Param2 != NULL && Handle2 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Handle2 != NULL && Handle1 != NULL && EFI_ERROR(gBS->OpenProtocol(Handle2, &gEfiDriverBindingProtocolGuid, NULL, gImageHandle, NULL, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ConvertAndConnectControllers(Handle1, Handle2, ShellCommandLineGetFlag(Package, L"-r"), (BOOLEAN)(Count!=0));
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for DevTree shell Driver1 function.
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -58,12 +58,12 @@ DoDevTreeForHandle(
|
||||
|
||||
ASSERT (TheHandle != NULL);
|
||||
ASSERT (HiiString != NULL);
|
||||
|
||||
|
||||
if (ShellGetExecutionBreakFlag()) {
|
||||
ShellStatus = SHELL_ABORTED;
|
||||
return ShellStatus;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// We want controller handles. they will not have LoadedImage or DriverBinding (or others...)
|
||||
//
|
||||
@ -184,7 +184,7 @@ ShellCommandRunDevTree (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"devtree", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"devtree", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -192,7 +192,7 @@ ShellCommandRunDevTree (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"devtree");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"devtree");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@ -206,7 +206,7 @@ ShellCommandRunDevTree (
|
||||
// AsciiSPrint(Language, 10, "en-us");
|
||||
} else {
|
||||
ASSERT(Language == NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"devtree", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"devtree", L"-l");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@ -259,7 +259,7 @@ ShellCommandRunDevTree (
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(Lang, &Intermediate, TRUE, FALSE);
|
||||
if (EFI_ERROR(Status) || ConvertHandleIndexToHandle((UINTN)Intermediate) == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"devtree", Lang);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"devtree", Lang);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ShellStatus = DoDevTreeForHandle(ConvertHandleIndexToHandle((UINTN)Intermediate), Language, FlagD, 0, HiiString);
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for devices shell Driver1 function.
|
||||
|
||||
(C) Copyright 2012-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -19,19 +19,19 @@
|
||||
Get lots of info about a device from its handle.
|
||||
|
||||
@param[in] TheHandle The device handle to get info on.
|
||||
@param[in, out] Type On successful return R, B, or D (root, bus, or
|
||||
@param[in, out] Type On successful return R, B, or D (root, bus, or
|
||||
device) will be placed in this buffer.
|
||||
@param[in, out] Cfg On successful return this buffer will be
|
||||
@param[in, out] Cfg On successful return this buffer will be
|
||||
TRUE if the handle has configuration, FALSE
|
||||
otherwise.
|
||||
@param[in, out] Diag On successful return this buffer will be
|
||||
@param[in, out] Diag On successful return this buffer will be
|
||||
TRUE if the handle has disgnostics, FALSE
|
||||
otherwise.
|
||||
@param[in, out] Parents On successful return this buffer will be
|
||||
@param[in, out] Parents On successful return this buffer will be
|
||||
contain the number of parent handles.
|
||||
@param[in, out] Devices On successful return this buffer will be
|
||||
@param[in, out] Devices On successful return this buffer will be
|
||||
contain the number of devices controlled.
|
||||
@param[in, out] Children On successful return this buffer will be
|
||||
@param[in, out] Children On successful return this buffer will be
|
||||
contain the number of child handles.
|
||||
@param[out] Name The pointer to a buffer that will be allocated
|
||||
and contain the string name of the handle.
|
||||
@ -58,7 +58,7 @@ GetDeviceHandleInfo (
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
UINTN Count;
|
||||
|
||||
if (TheHandle == NULL
|
||||
if (TheHandle == NULL
|
||||
|| Type == NULL
|
||||
|| Cfg == NULL
|
||||
|| Diag == NULL
|
||||
@ -168,7 +168,7 @@ ShellCommandRunDevices (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"devices", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"devices", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -182,7 +182,7 @@ ShellCommandRunDevices (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"devices");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"devices");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -198,7 +198,7 @@ ShellCommandRunDevices (
|
||||
// AsciiSPrint(Language, 10, "en-us");
|
||||
} else {
|
||||
ASSERT(Language == NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"devices", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"devices", L"-l");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@ -253,13 +253,13 @@ ShellCommandRunDevices (
|
||||
ShellStatus = SHELL_ABORTED;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (HandleList != NULL) {
|
||||
FreePool(HandleList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
SHELL_FREE_NON_NULL(Language);
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Dh shell Driver1 function.
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@ -342,7 +342,7 @@ GetProtocolInfoString(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SHELL_FREE_NON_NULL(ProtocolGuidArray);
|
||||
|
||||
if (RetVal == NULL) {
|
||||
@ -395,7 +395,7 @@ GetDriverImageName (
|
||||
|
||||
/**
|
||||
Display driver model information for a given handle.
|
||||
|
||||
|
||||
@param[in] Handle The handle to display info on.
|
||||
@param[in] BestName Use the best name?
|
||||
@param[in] Language The language to output in.
|
||||
@ -483,14 +483,14 @@ DisplayDriverModelHandle (
|
||||
Status = gEfiShellProtocol->GetDeviceName(Handle, EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DRIVER1), gShellDriver1HiiHandle, TempStringPointer!=NULL?TempStringPointer:L"<Unknown>");
|
||||
SHELL_FREE_NON_NULL(TempStringPointer);
|
||||
|
||||
|
||||
TempStringPointer = ConvertDevicePathToText(DevicePath, TRUE, FALSE);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER2),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER2),
|
||||
gShellDriver1HiiHandle,
|
||||
TempStringPointer!=NULL?TempStringPointer:L"<None>",
|
||||
ParentControllerHandleCount == 0?L"ROOT":(ChildControllerHandleCount > 0)?L"BUS":L"DEVICE",
|
||||
ConfigurationStatus?L"YES":L"NO",
|
||||
@ -501,20 +501,20 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (DriverBindingHandleCount == 0) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
|
||||
gShellDriver1HiiHandle,
|
||||
L"<None>"
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
|
||||
gShellDriver1HiiHandle,
|
||||
L""
|
||||
);
|
||||
for (Index = 0; Index < DriverBindingHandleCount; Index++) {
|
||||
@ -536,9 +536,9 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (Image) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER4A),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex (DriverBindingHandleBuffer[Index]),
|
||||
@ -546,9 +546,9 @@ DisplayDriverModelHandle (
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER4B),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex (DriverBindingHandleBuffer[Index]),
|
||||
@ -561,28 +561,28 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (ParentControllerHandleCount == 0) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
|
||||
gShellDriver1HiiHandle,
|
||||
L"<None>"
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
|
||||
gShellDriver1HiiHandle,
|
||||
L""
|
||||
);
|
||||
for (Index = 0; Index < ParentControllerHandleCount; Index++) {
|
||||
Status = gEfiShellProtocol->GetDeviceName(ParentControllerHandleBuffer[Index], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5B),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex (ParentControllerHandleBuffer[Index]),
|
||||
@ -594,28 +594,28 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (ChildControllerHandleCount == 0) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
|
||||
gShellDriver1HiiHandle,
|
||||
L"<None>"
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
|
||||
gShellDriver1HiiHandle,
|
||||
L""
|
||||
);
|
||||
for (Index = 0; Index < ChildControllerHandleCount; Index++) {
|
||||
Status = gEfiShellProtocol->GetDeviceName(ChildControllerHandleBuffer[Index], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6B),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex (ChildControllerHandleBuffer[Index]),
|
||||
@ -675,9 +675,9 @@ DisplayDriverModelHandle (
|
||||
}
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER7),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
@ -692,9 +692,9 @@ DisplayDriverModelHandle (
|
||||
DriverName = NULL;
|
||||
}
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER7B),
|
||||
gShellDriver1HiiHandle,
|
||||
DriverName!=NULL?DriverName:L"<Unknown>"
|
||||
@ -702,11 +702,11 @@ DisplayDriverModelHandle (
|
||||
SHELL_FREE_NON_NULL(DriverName);
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER8),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER8),
|
||||
gShellDriver1HiiHandle,
|
||||
DriverBinding->Version,
|
||||
NumberOfChildren > 0?L"Bus":ControllerHandleCount > 0?L"Device":L"<Unknown>",
|
||||
ConfigurationStatus?L"YES":L"NO",
|
||||
@ -715,29 +715,29 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (ControllerHandleCount == 0) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER9),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
L"None"
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER9),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
L""
|
||||
);
|
||||
for (HandleIndex = 0; HandleIndex < ControllerHandleCount; HandleIndex++) {
|
||||
Status = gEfiShellProtocol->GetDeviceName(ControllerHandleBuffer[HandleIndex], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER9B),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(ControllerHandleBuffer[HandleIndex]),
|
||||
@ -756,9 +756,9 @@ DisplayDriverModelHandle (
|
||||
Status = gEfiShellProtocol->GetDeviceName(ChildControllerHandleBuffer[ChildIndex], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6C),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(ChildControllerHandleBuffer[ChildIndex]),
|
||||
@ -1109,7 +1109,7 @@ ShellCommandRunDh (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"dh", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"dh", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -1117,7 +1117,7 @@ ShellCommandRunDh (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"dh");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"dh");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -118,7 +118,7 @@ ShellCommandRunDisconnect (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"disconnect", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"disconnect", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -127,10 +127,10 @@ ShellCommandRunDisconnect (
|
||||
} else {
|
||||
if (ShellCommandLineGetFlag(Package, L"-r")){
|
||||
if (ShellCommandLineGetCount(Package) > 1){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = DisconnectAll ();
|
||||
@ -151,10 +151,10 @@ ShellCommandRunDisconnect (
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 4){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -171,17 +171,17 @@ ShellCommandRunDisconnect (
|
||||
Handle3 = Param3!=NULL?ConvertHandleIndexToHandle((UINTN)Intermediate3):NULL;
|
||||
|
||||
if (Param1 != NULL && Handle1 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Param2 != NULL && Handle2 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Param3 != NULL && Handle3 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param3);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param3);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Handle2 != NULL && EFI_ERROR(gBS->OpenProtocol(Handle2, &gEfiDriverBindingProtocolGuid, NULL, gImageHandle, NULL, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
|
||||
ASSERT(Param2 != NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_HANDLE_NOT), gShellDriver1HiiHandle, L"disconnect", ShellStrToUintn(Param2), L"driver handle");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_HANDLE_NOT), gShellDriver1HiiHandle, L"disconnect", ShellStrToUintn(Param2), L"driver handle");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ASSERT(Param1 != NULL);
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Drivers shell Driver1 function.
|
||||
|
||||
(C) Copyright 2012-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -29,7 +29,7 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
|
||||
@param[in] TheHandle The handle to get the device path for.
|
||||
|
||||
@retval NULL An error occured.
|
||||
@return A pointer to the driver path as a string. The callee must
|
||||
@return A pointer to the driver path as a string. The callee must
|
||||
free this memory.
|
||||
**/
|
||||
CHAR16*
|
||||
@ -302,7 +302,7 @@ ShellCommandRunDrivers (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"drivers", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"drivers", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -310,7 +310,7 @@ ShellCommandRunDrivers (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drivers");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drivers");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (ShellCommandLineGetFlag(Package, L"-l")){
|
||||
@ -320,7 +320,7 @@ ShellCommandRunDrivers (
|
||||
AsciiSPrint(Language, StrSize(Lang), "%S", Lang);
|
||||
} else {
|
||||
ASSERT(Language == NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drivers", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drivers", L"-l");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for DrvCfg shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -183,7 +183,7 @@ ConfigToFile(
|
||||
STRING_TOKEN(STR_GEN_FILE_OPEN_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName,
|
||||
FileName,
|
||||
Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
@ -199,13 +199,13 @@ ConfigToFile(
|
||||
|
||||
if (EFI_ERROR(Status) || HiiDatabase == NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_PROTOCOL_NF),
|
||||
STRING_TOKEN(STR_GEN_PROTOCOL_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
L"EfiHiiDatabaseProtocol",
|
||||
L"EfiHiiDatabaseProtocol",
|
||||
&gEfiHiiDatabaseProtocolGuid);
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_NOT_FOUND);
|
||||
@ -215,16 +215,16 @@ ConfigToFile(
|
||||
Status = ConvertHandleToHiiHandle(Handle, &HiiHandle, HiiDatabase);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_HANDLE_NOT),
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_HANDLE_NOT),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
L"Device");
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
Status = HiiDatabase->ExportPackageLists(HiiDatabase, HiiHandle, &MainBufferSize, MainBuffer);
|
||||
@ -240,20 +240,20 @@ ConfigToFile(
|
||||
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_WRITE_FAIL),
|
||||
STRING_TOKEN(STR_FILE_WRITE_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_COMP),
|
||||
STRING_TOKEN(STR_DRVCFG_COMP),
|
||||
gShellDriver1HiiHandle);
|
||||
|
||||
return (SHELL_SUCCESS);
|
||||
@ -296,9 +296,9 @@ ConfigFromFile(
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_FILE_OPEN_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName,
|
||||
FileName,
|
||||
Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
@ -314,13 +314,13 @@ ConfigFromFile(
|
||||
|
||||
if (EFI_ERROR(Status) || HiiDatabase == NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_PROTOCOL_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN(STR_GEN_PROTOCOL_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
L"EfiHiiDatabaseProtocol",
|
||||
L"EfiHiiDatabaseProtocol",
|
||||
&gEfiHiiDatabaseProtocolGuid);
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_NOT_FOUND);
|
||||
@ -330,42 +330,42 @@ ConfigFromFile(
|
||||
MainBufferSize = (UINTN)Temp;
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_READ_FAIL),
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_READ_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName);
|
||||
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
MainBuffer = AllocateZeroPool((UINTN)MainBufferSize);
|
||||
MainBuffer = AllocateZeroPool((UINTN)MainBufferSize);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_OUT_MEM),
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_OUT_MEM),
|
||||
gShellDriver1HiiHandle, L"drvcfg");
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
Status = ShellReadFile(FileHandle, &MainBufferSize, MainBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_READ_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_READ_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName);
|
||||
|
||||
ShellCloseFile(&FileHandle);
|
||||
SHELL_FREE_NON_NULL(MainBuffer);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
ShellCloseFile(&FileHandle);
|
||||
@ -378,28 +378,28 @@ ConfigFromFile(
|
||||
Status = ConvertHandleToHiiHandle(Handle, &HiiHandle, HiiDatabase);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_HANDLE_NOT),
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_HANDLE_NOT),
|
||||
gShellDriver1HiiHandle, L"drvcfg",
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
L"Device");
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
Status = HiiDatabase->UpdatePackageList(HiiDatabase, HiiHandle, MainBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_UEFI_FUNC_WARN),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
L"HiiDatabase->UpdatePackageList",
|
||||
L"HiiDatabase->UpdatePackageList",
|
||||
Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
} else {
|
||||
//
|
||||
@ -421,24 +421,24 @@ ConfigFromFile(
|
||||
//
|
||||
TempDevPathString = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)(((CHAR8*)PackageHeader) + sizeof(EFI_HII_PACKAGE_HEADER)), TRUE, TRUE);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_IN_FILE_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_IN_FILE_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
TempDevPathString);
|
||||
SHELL_FREE_NON_NULL(TempDevPathString);
|
||||
} else {
|
||||
Status = HiiDatabase->UpdatePackageList(HiiDatabase, HiiHandle, PackageListHeader);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_UEFI_FUNC_WARN),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
L"HiiDatabase->UpdatePackageList",
|
||||
L"HiiDatabase->UpdatePackageList",
|
||||
Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
} else {
|
||||
@ -446,14 +446,14 @@ ConfigFromFile(
|
||||
gBS->LocateDevicePath(&gEfiHiiConfigAccessProtocolGuid, &DevPath, &Handle);
|
||||
HandleIndex = ConvertHandleToHandleIndex(Handle);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_DONE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_DONE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
HandleIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -463,10 +463,10 @@ ConfigFromFile(
|
||||
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_COMP),
|
||||
STRING_TOKEN(STR_DRVCFG_COMP),
|
||||
gShellDriver1HiiHandle);
|
||||
return (SHELL_SUCCESS);
|
||||
}
|
||||
@ -593,22 +593,22 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_D),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_D),
|
||||
gShellDriver1HiiHandle,
|
||||
DefaultType);
|
||||
} else if (ValidateOptions) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_VALIDATE),
|
||||
STRING_TOKEN (STR_DRVCFG_VALIDATE),
|
||||
gShellDriver1HiiHandle);
|
||||
} else if (SetOptions) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_SET),
|
||||
STRING_TOKEN (STR_DRVCFG_SET),
|
||||
gShellDriver1HiiHandle);
|
||||
}
|
||||
|
||||
@ -619,8 +619,8 @@ PreHiiDrvCfg (
|
||||
goto Done;
|
||||
}
|
||||
for (
|
||||
HandleBuffer = DriverImageHandleBuffer, DriverImageHandleCount = 0
|
||||
; HandleBuffer != NULL && *HandleBuffer != NULL
|
||||
HandleBuffer = DriverImageHandleBuffer, DriverImageHandleCount = 0
|
||||
; HandleBuffer != NULL && *HandleBuffer != NULL
|
||||
; HandleBuffer++,DriverImageHandleCount++);
|
||||
} else {
|
||||
DriverImageHandleCount = 1;
|
||||
@ -666,7 +666,7 @@ PreHiiDrvCfg (
|
||||
ShellStatus = SHELL_UNSUPPORTED;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
BestLanguage = GetBestLanguage (
|
||||
DriverConfiguration->SupportedLanguages,
|
||||
Iso639Language,
|
||||
@ -725,7 +725,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
gShellDriver1HiiHandle);
|
||||
for (LoopCounter = 0; LoopCounter < HandleCount; LoopCounter++) {
|
||||
if ((HandleType[LoopCounter] & HR_CONTROLLER_HANDLE) == HR_CONTROLLER_HANDLE) {
|
||||
@ -742,8 +742,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
}
|
||||
continue;
|
||||
@ -784,7 +784,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_DEF_FORCED),
|
||||
STRING_TOKEN (STR_DRVCFG_DEF_FORCED),
|
||||
gShellDriver1HiiHandle);
|
||||
ShellCmdDriverConfigurationProcessActionRequired (
|
||||
DriverImageHandleBuffer[OuterLoopCounter],
|
||||
@ -797,8 +797,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_FAILED),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_FAILED),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@ -814,15 +814,15 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID),
|
||||
gShellDriver1HiiHandle);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_INV),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_INV),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@ -853,7 +853,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
gShellDriver1HiiHandle);
|
||||
|
||||
ShellCmdDriverConfigurationProcessActionRequired (
|
||||
@ -868,8 +868,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@ -931,7 +931,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_DEF_FORCED),
|
||||
STRING_TOKEN (STR_DRVCFG_DEF_FORCED),
|
||||
gShellDriver1HiiHandle);
|
||||
|
||||
ShellCmdDriverConfigurationProcessActionRequired (
|
||||
@ -946,8 +946,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_FAILED),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_FAILED),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@ -963,15 +963,15 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID),
|
||||
gShellDriver1HiiHandle);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_INV),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_INV),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@ -1004,7 +1004,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
gShellDriver1HiiHandle);
|
||||
|
||||
ShellCmdDriverConfigurationProcessActionRequired (
|
||||
@ -1019,8 +1019,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@ -1081,11 +1081,11 @@ PrintConfigInfoOnAll(
|
||||
Found = TRUE;
|
||||
Index2 = *CurrentHandle == NULL ? 0 : ConvertHandleToHandleIndex(*CurrentHandle);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_LINE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_LINE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
Index2
|
||||
);
|
||||
}
|
||||
@ -1203,7 +1203,7 @@ ShellCommandRunDrvCfg (
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
if (ShellCommandLineGetCount(Package) > 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drvcfg");
|
||||
@ -1236,24 +1236,24 @@ ShellCommandRunDrvCfg (
|
||||
}
|
||||
|
||||
if (InFromFile && EFI_ERROR(ShellFileExists(FileName))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FIND_FAIL), gShellDriver1HiiHandle, L"drvcfg", FileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (OutToFile && !EFI_ERROR(ShellFileExists(FileName))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_EXIST), gShellDriver1HiiHandle, L"drvcfg", FileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (Force && ForceTypeString == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvcfg", L"-f");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FIND_FAIL), gShellDriver1HiiHandle, L"drvcfg", FileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (OutToFile && !EFI_ERROR(ShellFileExists(FileName))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_EXIST), gShellDriver1HiiHandle, L"drvcfg", FileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (Force && ForceTypeString == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvcfg", L"-f");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (Force) {
|
||||
Status = ShellConvertStringToUint64(ForceTypeString, &Intermediate, FALSE, FALSE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellDriver1HiiHandle, L"drvcfg", ForceTypeString, L"-f");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellDriver1HiiHandle, L"drvcfg", ForceTypeString, L"-f");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -1266,7 +1266,7 @@ ShellCommandRunDrvCfg (
|
||||
if (HandleIndex1 != NULL && !EFI_ERROR(ShellConvertStringToUint64(HandleIndex1, &Intermediate, TRUE, FALSE))) {
|
||||
Handle1 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (Handle1 == NULL || (UINT64)(UINTN)Intermediate != Intermediate) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -1276,7 +1276,7 @@ ShellCommandRunDrvCfg (
|
||||
if (HandleIndex2 != NULL && !EFI_ERROR(ShellConvertStringToUint64(HandleIndex2, &Intermediate, TRUE, FALSE))) {
|
||||
Handle2 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (Handle2 == NULL || (UINT64)(UINTN)Intermediate != Intermediate) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -1286,7 +1286,7 @@ ShellCommandRunDrvCfg (
|
||||
if (HandleIndex3 != NULL && !EFI_ERROR(ShellConvertStringToUint64(HandleIndex3, &Intermediate, TRUE, FALSE))) {
|
||||
Handle3 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (Handle3 == NULL || (UINT64)(UINTN)Intermediate != Intermediate) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex3);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex3);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -1294,42 +1294,42 @@ ShellCommandRunDrvCfg (
|
||||
|
||||
if ((InFromFile || OutToFile) && (FileName == NULL)) {
|
||||
if (FileName == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvcfg", InFromFile?L"-i":L"-o");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvcfg", InFromFile?L"-i":L"-o");
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_HANDLE_REQ), gShellDriver1HiiHandle, L"drvcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_HANDLE_REQ), gShellDriver1HiiHandle, L"drvcfg");
|
||||
}
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (!UseHii && (InFromFile || OutToFile)) {
|
||||
if (InFromFile) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDriver1HiiHandle, L"drvcfg", L"-i");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDriver1HiiHandle, L"drvcfg", L"-i");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (OutToFile) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDriver1HiiHandle, L"drvcfg", L"-o");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDriver1HiiHandle, L"drvcfg", L"-o");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (Validate && Force) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-v", L"-f");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-v", L"-f");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (Validate && Set) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-v", L"-s");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-v", L"-s");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (Set && Force) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-s", L"-f");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-s", L"-f");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (OutToFile && InFromFile) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-i", L"-o");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-i", L"-o");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@ -1365,11 +1365,11 @@ ShellCommandRunDrvCfg (
|
||||
} else {
|
||||
if (!EFI_ERROR(gBS->OpenProtocol(Handle1, &gEfiHiiConfigAccessProtocolGuid, NULL, gImageHandle, NULL, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_LINE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_LINE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(Handle1)
|
||||
);
|
||||
goto Done;
|
||||
@ -1399,7 +1399,7 @@ ShellCommandRunDrvCfg (
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SUPPORT),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(Handle1)
|
||||
);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for DrvDiag shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -101,10 +101,10 @@ DoDiagnostics (
|
||||
} else {
|
||||
DriverHandleList = GetHandleListByProtocolList(DiagGuidList);
|
||||
if (DriverHandleList == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROTOCOL_NF), gShellDriver1HiiHandle, L"drvdiag", L"gEfiDriverDiagnosticsProtocolGuid", &gEfiDriverDiagnosticsProtocolGuid);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROTOCOL_NF), gShellDriver1HiiHandle, L"drvdiag", L"gEfiDriverDiagnostics2ProtocolGuid", &gEfiDriverDiagnostics2ProtocolGuid);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROTOCOL_NF), gShellDriver1HiiHandle, L"drvdiag", L"gEfiDriverDiagnosticsProtocolGuid", &gEfiDriverDiagnosticsProtocolGuid);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROTOCOL_NF), gShellDriver1HiiHandle, L"drvdiag", L"gEfiDriverDiagnostics2ProtocolGuid", &gEfiDriverDiagnostics2ProtocolGuid);
|
||||
return (EFI_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
for (Walker = DriverHandleList ; Walker != NULL && *Walker != NULL ; DriverHandleListCount++, Walker++);
|
||||
}
|
||||
|
||||
@ -150,7 +150,7 @@ DoDiagnostics (
|
||||
}
|
||||
if (ControllerHandle == NULL) {
|
||||
PARSE_HANDLE_DATABASE_DEVICES(DriverHandleList[DriverHandleListLoop], &ControllerHandleListCount, &ControllerHandleList);
|
||||
}
|
||||
}
|
||||
if (ControllerHandleListCount == 0) {
|
||||
if (Mode == TestModeList) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DRVDIAG_DRIVER_NO_HANDLES), gShellDriver1HiiHandle);
|
||||
@ -166,7 +166,7 @@ DoDiagnostics (
|
||||
if (AllChilds) {
|
||||
ASSERT(ChildHandleList == NULL);
|
||||
PARSE_HANDLE_DATABASE_MANAGED_CHILDREN(
|
||||
DriverHandleList[DriverHandleListLoop],
|
||||
DriverHandleList[DriverHandleListLoop],
|
||||
ControllerHandleList[ControllerHandleListLoop],
|
||||
&ChildHandleListCount,
|
||||
&ChildHandleList);
|
||||
@ -202,7 +202,7 @@ DoDiagnostics (
|
||||
&OutBuffer);
|
||||
FreePool(Language);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Found && (Lang == NULL||(Lang!=NULL&&(Lang[2]!='-')))){
|
||||
Status = gBS->OpenProtocol(
|
||||
DriverHandleList[DriverHandleListLoop],
|
||||
@ -357,7 +357,7 @@ ShellCommandRunDrvDiag (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"drvdiag", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"drvdiag", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -375,7 +375,7 @@ ShellCommandRunDrvDiag (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drvdiag");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drvdiag");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if ((ShellCommandLineGetFlag(Package, L"-s"))
|
||||
|| (ShellCommandLineGetFlag(Package, L"-e"))
|
||||
@ -403,7 +403,7 @@ ShellCommandRunDrvDiag (
|
||||
Lang = ShellCommandLineGetValue(Package, L"-l");
|
||||
if (ShellCommandLineGetFlag(Package, L"-l") && Lang == NULL) {
|
||||
ASSERT(Language == NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvdiag", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvdiag", L"-l");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
} else if (Lang != NULL) {
|
||||
@ -438,8 +438,8 @@ ShellCommandRunDrvDiag (
|
||||
Mode,
|
||||
Language,
|
||||
ShellCommandLineGetFlag(Package, L"-c"),
|
||||
Handle1,
|
||||
Handle2,
|
||||
Handle1,
|
||||
Handle2,
|
||||
Handle3
|
||||
);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for OpenInfo shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -126,7 +126,7 @@ TraverseHandleDatabase (
|
||||
OpenInfo[OpenInfoIndex].OpenCount,
|
||||
OpenTypeString,
|
||||
Name
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
FreePool (OpenInfo);
|
||||
@ -176,7 +176,7 @@ ShellCommandRunOpenInfo (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"openinfo", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"openinfo", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -187,16 +187,16 @@ ShellCommandRunOpenInfo (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"openinfo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"openinfo");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) == 0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"openinfo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"openinfo");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Param1 = ShellCommandLineGetRawValue(Package, 1);
|
||||
Status = ShellConvertStringToUint64(Param1, &Intermediate, TRUE, FALSE);
|
||||
if (EFI_ERROR(Status) || Param1 == NULL || ConvertHandleIndexToHandle((UINTN)Intermediate) == NULL){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"openinfo", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"openinfo", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TheHandle = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
@ -206,7 +206,7 @@ ShellCommandRunOpenInfo (
|
||||
Status = TraverseHandleDatabase (TheHandle);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"openinfo", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"openinfo", Param1);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Main file for Reconnect shell Driver1 function.
|
||||
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<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
|
||||
@ -29,11 +29,11 @@ VOID
|
||||
ConnectAllConsoles (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
{
|
||||
ShellConnectFromDevPaths(L"ConInDev");
|
||||
ShellConnectFromDevPaths(L"ConOutDev");
|
||||
ShellConnectFromDevPaths(L"ErrOutDev");
|
||||
|
||||
|
||||
ShellConnectFromDevPaths(L"ErrOut");
|
||||
ShellConnectFromDevPaths(L"ConIn");
|
||||
ShellConnectFromDevPaths(L"ConOut");
|
||||
@ -60,7 +60,7 @@ ShellCommandRunReconnect (
|
||||
|
||||
gInReconnect = TRUE;
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
|
||||
|
||||
//
|
||||
// initialize the shell lib (we must be in non-auto-init...)
|
||||
//
|
||||
@ -90,7 +90,7 @@ ShellCommandRunReconnect (
|
||||
}
|
||||
ShellStatus = ShellCommandRunConnect(ImageHandle, SystemTable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gInReconnect = FALSE;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP<BR>
|
||||
// (C) Copyright 2012-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2010 - 2018, 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
|
||||
@ -469,7 +469,7 @@
|
||||
" CTRL - The handle number of the UEFI device\r\n"
|
||||
" TYPE - The device type:\r\n"
|
||||
" [R] - Root Controller\r\n"
|
||||
" [B] - Bus Controller\r\n"
|
||||
" [B] - Bus Controller\r\n"
|
||||
" [D] - Device Controller\r\n"
|
||||
" CFG - A managing driver supports the Driver Configuration\r\n"
|
||||
" Protocol. Yes if 'Y' or 'X'; No if 'N' or '-'.\r\n"
|
||||
@ -522,7 +522,7 @@
|
||||
" 6. If only a single handle is specified and the handle has an\r\n"
|
||||
" EFI_DRIVER_BINDING_PROTOCOL on it, then the handle is assumed to be a\r\n"
|
||||
" driver handle. Otherwise, it is assumed to be a device handle.\r\n"
|
||||
" 7. If no parameters are specified, then the command will attempt to bind\r\n"
|
||||
" 7. If no parameters are specified, then the command will attempt to bind\r\n"
|
||||
" all proper drivers to all devices without recursion. Each connection\r\n"
|
||||
" status will be displayed.\r\n"
|
||||
" 8. Output redirection is not supported for 'connect -r' usage.\r\n"
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Unload shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, 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
|
||||
@ -31,11 +31,11 @@ DumpLoadedImageProtocolInfo (
|
||||
CHAR16 *TheString;
|
||||
|
||||
TheString = GetProtocolInformationDump(TheHandle, &gEfiLoadedImageProtocolGuid, TRUE);
|
||||
|
||||
|
||||
ShellPrintEx(-1, -1, L"%s", TheString);
|
||||
|
||||
SHELL_FREE_NON_NULL(TheString);
|
||||
|
||||
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ ShellCommandRunUnload (
|
||||
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle,L"unload", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle,L"unload", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -97,10 +97,10 @@ ShellCommandRunUnload (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"unload");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"unload");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"unload");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"unload");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Param1 = ShellCommandLineGetRawValue(Package, 1);
|
||||
@ -110,14 +110,14 @@ ShellCommandRunUnload (
|
||||
}
|
||||
|
||||
if (EFI_ERROR(Status) || Param1 == NULL || TheHandle == NULL){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"unload", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"unload", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ASSERT(TheHandle != NULL);
|
||||
if (ShellCommandLineGetFlag(Package, L"-v") || ShellCommandLineGetFlag(Package, L"-verbose")) {
|
||||
DumpLoadedImageProtocolInfo(TheHandle);
|
||||
}
|
||||
|
||||
|
||||
if (!ShellCommandLineGetFlag(Package, L"-n")) {
|
||||
Status = ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_UNLOAD_CONF), gShellDriver1HiiHandle, (UINTN)TheHandle);
|
||||
Status = ShellPromptForResponse(ShellPromptResponseTypeYesNo, NULL, (VOID**)&Resp);
|
||||
|
@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Provides shell install1 functions
|
||||
#
|
||||
# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||
# Copyright (c) 2010 - 2018, 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
|
||||
@ -48,4 +48,4 @@
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellProfileMask ## CONSUMES
|
||||
|
||||
[Guids]
|
||||
gShellInstall1HiiGuid ## UNDEFINED
|
||||
gShellInstall1HiiGuid ## UNDEFINED
|
||||
|
@ -89,13 +89,13 @@ ShellCommandRunEndFor (
|
||||
if (!Found) {
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"For",
|
||||
L"EndFor",
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"For",
|
||||
L"EndFor",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
@ -339,13 +339,13 @@ ShellCommandRunFor (
|
||||
//
|
||||
if (!MoveToTag(GetNextNode, L"endfor", L"for", NULL, CurrentScriptFile, TRUE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
@ -467,12 +467,12 @@ ShellCommandRunFor (
|
||||
ArgSetWalker = ArgSet;
|
||||
if (ArgSetWalker[0] != L'(') {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -490,11 +490,11 @@ ShellCommandRunFor (
|
||||
}
|
||||
if (TempSpot == NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -505,12 +505,12 @@ ShellCommandRunFor (
|
||||
}
|
||||
if (!ShellIsValidForNumber(ArgSetWalker)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -525,12 +525,12 @@ ShellCommandRunFor (
|
||||
}
|
||||
if (ArgSetWalker == NULL || *ArgSetWalker == CHAR_NULL || !ShellIsValidForNumber(ArgSetWalker)){
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -552,12 +552,12 @@ ShellCommandRunFor (
|
||||
if (ArgSetWalker != NULL && *ArgSetWalker != CHAR_NULL) {
|
||||
if (ArgSetWalker == NULL || *ArgSetWalker == CHAR_NULL || !ShellIsValidForNumber(ArgSetWalker)){
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -572,18 +572,18 @@ ShellCommandRunFor (
|
||||
|
||||
if (StrStr(ArgSetWalker, L" ") != NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -602,13 +602,13 @@ ShellCommandRunFor (
|
||||
}
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
@ -659,14 +659,14 @@ ShellCommandRunFor (
|
||||
//
|
||||
if (!MoveToTag(GetNextNode, L"endfor", L"for", NULL, CurrentScriptFile, TRUE, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
@ -721,14 +721,14 @@ ShellCommandRunFor (
|
||||
//
|
||||
if (!MoveToTag(GetNextNode, L"endfor", L"for", NULL, CurrentScriptFile, TRUE, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for goto shell level 1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -83,14 +83,14 @@ ShellCommandRunGoto (
|
||||
if (!MoveToTag(GetNextNode, L"endfor", L"for", CompareString, ShellCommandGetCurrentScriptFile(), FALSE, FALSE, TRUE)) {
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
CompareString,
|
||||
L"Goto",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
CompareString,
|
||||
L"Goto",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for If and else shell level 1 function.
|
||||
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -335,7 +335,7 @@ TestOperation (
|
||||
/**
|
||||
Process an if statement and determine if its is valid or not.
|
||||
|
||||
@param[in, out] PassingState Opon entry, the current state. Upon exit,
|
||||
@param[in, out] PassingState Opon entry, the current state. Upon exit,
|
||||
the new state.
|
||||
@param[in] StartParameterNumber The number of the first parameter of
|
||||
this statement.
|
||||
@ -346,7 +346,7 @@ TestOperation (
|
||||
@param[in] ForceStringCompare TRUE for all string based, FALSE otherwise.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
**/
|
||||
EFI_STATUS
|
||||
ProcessStatement (
|
||||
@ -649,9 +649,9 @@ ProcessStatement (
|
||||
Break up the next part of the if statement (until the next 'and', 'or', or 'then').
|
||||
|
||||
@param[in] ParameterNumber The current parameter number.
|
||||
@param[out] EndParameter Upon successful return, will point to the
|
||||
@param[out] EndParameter Upon successful return, will point to the
|
||||
parameter to start the next iteration with.
|
||||
@param[out] EndTag Upon successful return, will point to the
|
||||
@param[out] EndTag Upon successful return, will point to the
|
||||
type that was found at the end of this statement.
|
||||
|
||||
@retval TRUE A valid statement was found.
|
||||
@ -837,12 +837,12 @@ ShellCommandRunIf (
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
if (!gEfiShellProtocol->BatchIsActive()) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"if");
|
||||
return (SHELL_UNSUPPORTED);
|
||||
}
|
||||
|
||||
if (gEfiShellParametersProtocol->Argc < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"if");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@ -852,14 +852,14 @@ ShellCommandRunIf (
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, CurrentScriptFile, TRUE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndIf",
|
||||
L"If",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndIf",
|
||||
L"If",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
@ -920,12 +920,12 @@ ShellCommandRunIf (
|
||||
// we are at the then
|
||||
//
|
||||
if (CurrentParameter+1 != gEfiShellParametersProtocol->Argc) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_TEXT_AFTER_THEN), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_TEXT_AFTER_THEN), gShellLevel1HiiHandle, L"if");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = PerformResultOperation(CurrentValue);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@ -937,14 +937,14 @@ ShellCommandRunIf (
|
||||
if (!BuildNextStatement(CurrentParameter, &EndParameter, &Ending)) {
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"Then",
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"Then",
|
||||
L"If",
|
||||
CurrentScriptFile!=NULL
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
@ -963,7 +963,7 @@ ShellCommandRunIf (
|
||||
if ((Ending == EndTagOr && CurrentValue) || (Ending == EndTagAnd && !CurrentValue)) {
|
||||
Status = PerformResultOperation(CurrentValue);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
break;
|
||||
@ -1004,7 +1004,7 @@ ShellCommandRunElse (
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
if (gEfiShellParametersProtocol->Argc > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@ -1017,28 +1017,28 @@ ShellCommandRunElse (
|
||||
|
||||
if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
if (!MoveToTag(GetPreviousNode, L"if", L"else", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
@ -1046,14 +1046,14 @@ ShellCommandRunElse (
|
||||
|
||||
if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, CurrentScriptFile, FALSE, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndIf",
|
||||
"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndIf",
|
||||
"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
@ -1082,7 +1082,7 @@ ShellCommandRunEndIf (
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
if (gEfiShellParametersProtocol->Argc > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@ -1094,14 +1094,14 @@ ShellCommandRunEndIf (
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"EndIf",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"EndIf",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Shift shell level 1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -36,7 +36,7 @@ ShellCommandRunShift (
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
if (!gEfiShellProtocol->BatchIsActive()) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"shift");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"shift");
|
||||
return (SHELL_UNSUPPORTED);
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ ShellCommandRunShift (
|
||||
ASSERT(CurrentScriptFile != NULL);
|
||||
|
||||
if (CurrentScriptFile->Argc < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"shift");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"shift");
|
||||
return (SHELL_UNSUPPORTED);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for stall shell level 1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, 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
|
||||
@ -51,7 +51,7 @@ ShellCommandRunStall (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, L"stall", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, L"stall", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -59,20 +59,20 @@ ShellCommandRunStall (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetRawValue(Package, 2) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"stall");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"stall");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetRawValue(Package, 1) == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"stall");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"stall");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(ShellCommandLineGetRawValue(Package, 1), &Intermediate, FALSE, FALSE);
|
||||
if (EFI_ERROR(Status) || ((UINT64)(UINTN)(Intermediate)) != Intermediate) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel1HiiHandle, L"stall", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel1HiiHandle, L"stall", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = gBS->Stall((UINTN)Intermediate);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_STALL_FAILED), gShellLevel1HiiHandle, L"stall");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_STALL_FAILED), gShellLevel1HiiHandle, L"stall");
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for NULL named library for level 1 shell command functions.
|
||||
|
||||
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -103,18 +103,18 @@ ShellLevel1CommandsLibDestructor (
|
||||
It functions so that count starts at 1 and it increases or decreases when it
|
||||
hits the specified tags. when it hits zero the location has been found.
|
||||
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
similar paired types where the entire middle should be ignored.
|
||||
|
||||
If label is used it will be used instead of the count.
|
||||
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
list. Normally GetNextNode or GetPreviousNode.
|
||||
@param[in] DecrementerTag The tag to decrement the count at.
|
||||
@param[in] IncrementerTag The tag to increment the count at.
|
||||
@param[in] Label A label to look for.
|
||||
@param[in, out] ScriptFile The pointer to the current script file structure.
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
location.
|
||||
@param[in] FindOnly TRUE to not change the ScriptFile.
|
||||
@param[in] CommandNode The pointer to the Node to test.
|
||||
@ -227,21 +227,21 @@ TestNodeForMove (
|
||||
It functions so that count starts at 1 and it increases or decreases when it
|
||||
hits the specified tags. when it hits zero the location has been found.
|
||||
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
similar paired types where the entire middle should be ignored.
|
||||
|
||||
If label is used it will be used instead of the count.
|
||||
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
list. Normally GetNextNode or GetPreviousNode.
|
||||
@param[in] DecrementerTag The tag to decrement the count at.
|
||||
@param[in] IncrementerTag The tag to increment the count at.
|
||||
@param[in] Label A label to look for.
|
||||
@param[in, out] ScriptFile The pointer to the current script file structure.
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
location.
|
||||
@param[in] FindOnly TRUE to not change the ScriptFile.
|
||||
@param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in
|
||||
@param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in
|
||||
searching.
|
||||
**/
|
||||
BOOLEAN
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for NULL named library for level 1 shell command functions.
|
||||
|
||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -176,21 +176,21 @@ LIST_ENTRY *
|
||||
It functions so that count starts at 1 and it increases or decreases when it
|
||||
hits the specified tags. when it hits zero the location has been found.
|
||||
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
similar paired types where the entire middle should be ignored.
|
||||
|
||||
If label is used it will be used instead of the count.
|
||||
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
list. Normally GetNextNode or GetPreviousNode.
|
||||
@param[in] DecrementerTag The tag to decrement the count at.
|
||||
@param[in] IncrementerTag The tag to increment the count at.
|
||||
@param[in] Label A label to look for.
|
||||
@param[in, out] ScriptFile The pointer to the current script file structure.
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
location.
|
||||
@param[in] FindOnly TRUE to not change the ScriptFile.
|
||||
@param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in
|
||||
@param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in
|
||||
searching.
|
||||
**/
|
||||
BOOLEAN
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for attrib shell level 2 function.
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, 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
|
||||
@ -70,7 +70,7 @@ ShellCommandRunAttrib (
|
||||
Status = ShellCommandLineParse (AttribParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"attrib", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"attrib", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -133,7 +133,7 @@ ShellCommandRunAttrib (
|
||||
ASSERT(ListOfFiles == NULL);
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)FileName, EFI_FILE_MODE_READ, &ListOfFiles);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
for (FileNode = (EFI_SHELL_FILE_INFO*)GetFirstNode(&ListOfFiles->Link)
|
||||
@ -153,7 +153,7 @@ ShellCommandRunAttrib (
|
||||
FileNode->Info->Attribute&EFI_FILE_READ_ONLY? L'R':L' ',
|
||||
FileNode->FileName
|
||||
);
|
||||
|
||||
|
||||
if (ShellGetExecutionBreakFlag()) {
|
||||
ShellStatus = SHELL_ABORTED;
|
||||
break;
|
||||
@ -162,7 +162,7 @@ ShellCommandRunAttrib (
|
||||
Status = ShellCloseFileMetaArg(&ListOfFiles);
|
||||
ListOfFiles = NULL;
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_CLOSE_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_CLOSE_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
} // for loop for handling wildcard filenames
|
||||
@ -171,7 +171,7 @@ ShellCommandRunAttrib (
|
||||
//
|
||||
// fail as we have conflcting params.
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel2HiiHandle, L"attrib");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel2HiiHandle, L"attrib");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -188,7 +188,7 @@ ShellCommandRunAttrib (
|
||||
// make sure we are not failing on the first one we do... if yes that's an error...
|
||||
//
|
||||
if (ParamNumberCount == 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"attrib");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"attrib");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
break;
|
||||
@ -205,7 +205,7 @@ ShellCommandRunAttrib (
|
||||
ASSERT(ListOfFiles == NULL);
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)FileName, EFI_FILE_MODE_READ, &ListOfFiles);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
for (FileNode = (EFI_SHELL_FILE_INFO*)GetFirstNode(&ListOfFiles->Link)
|
||||
@ -231,7 +231,7 @@ ShellCommandRunAttrib (
|
||||
//
|
||||
Status = ShellSetFileInfo(FileNode->Handle, FileInfo);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
}
|
||||
}
|
||||
@ -247,7 +247,7 @@ ShellCommandRunAttrib (
|
||||
//
|
||||
Status = ShellSetFileInfo(FileNode->Handle, FileInfo);
|
||||
if (EFI_ERROR(Status)) {;
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ ShellCommandRunAttrib (
|
||||
Status = ShellCloseFileMetaArg(&ListOfFiles);
|
||||
ListOfFiles = NULL;
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_CLOSE_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_CLOSE_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
} // for loop for handling wildcard filenames
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user