ShellPkg: Fixed build error 'variable set but not used'
GCC toolchain cannot build ShellPkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Signed-off-by: Olivier Martin <Olivier.Martin@arm.com> Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14326 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -994,7 +994,6 @@ InternalOpenFileDevicePath(
|
|||||||
SHELL_FILE_HANDLE ShellHandle;
|
SHELL_FILE_HANDLE ShellHandle;
|
||||||
EFI_FILE_PROTOCOL *Handle1;
|
EFI_FILE_PROTOCOL *Handle1;
|
||||||
EFI_FILE_PROTOCOL *Handle2;
|
EFI_FILE_PROTOCOL *Handle2;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DpCopy;
|
|
||||||
FILEPATH_DEVICE_PATH *AlignedNode;
|
FILEPATH_DEVICE_PATH *AlignedNode;
|
||||||
|
|
||||||
if (FileHandle == NULL) {
|
if (FileHandle == NULL) {
|
||||||
@ -1004,7 +1003,6 @@ InternalOpenFileDevicePath(
|
|||||||
Handle1 = NULL;
|
Handle1 = NULL;
|
||||||
Handle2 = NULL;
|
Handle2 = NULL;
|
||||||
Handle = NULL;
|
Handle = NULL;
|
||||||
DpCopy = DevicePath;
|
|
||||||
ShellHandle = NULL;
|
ShellHandle = NULL;
|
||||||
FilePathNode = NULL;
|
FilePathNode = NULL;
|
||||||
AlignedNode = NULL;
|
AlignedNode = NULL;
|
||||||
|
@ -293,7 +293,7 @@ BcfgAddDebug1(
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *FilePath;
|
EFI_DEVICE_PATH_PROTOCOL *FilePath;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *FileNode;
|
/* EFI_DEVICE_PATH_PROTOCOL *FileNode; */
|
||||||
CHAR16 *Str;
|
CHAR16 *Str;
|
||||||
UINT8 *TempByteBuffer;
|
UINT8 *TempByteBuffer;
|
||||||
UINT8 *TempByteStart;
|
UINT8 *TempByteStart;
|
||||||
@ -328,7 +328,7 @@ BcfgAddDebug1(
|
|||||||
|
|
||||||
Str = NULL;
|
Str = NULL;
|
||||||
FilePath = NULL;
|
FilePath = NULL;
|
||||||
FileNode = NULL;
|
/* FileNode = NULL; */
|
||||||
FileList = NULL;
|
FileList = NULL;
|
||||||
Handles = NULL;
|
Handles = NULL;
|
||||||
ShellStatus = SHELL_SUCCESS;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
|
@ -133,8 +133,6 @@ InputBarRefresh (
|
|||||||
UINTN Size;
|
UINTN Size;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
BOOLEAN NoDisplay;
|
BOOLEAN NoDisplay;
|
||||||
UINTN Limit;
|
|
||||||
UINTN mPromptLen;
|
|
||||||
UINTN EventIndex;
|
UINTN EventIndex;
|
||||||
UINTN CursorRow;
|
UINTN CursorRow;
|
||||||
UINTN CursorCol;
|
UINTN CursorCol;
|
||||||
@ -164,12 +162,6 @@ InputBarRefresh (
|
|||||||
gST->ConOut->SetCursorPosition (gST->ConOut, 0, LastRow - 1);
|
gST->ConOut->SetCursorPosition (gST->ConOut, 0, LastRow - 1);
|
||||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_EDIT_LIBINPUTBAR_MAININPUTBAR), gShellDebug1HiiHandle, mPrompt);
|
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_EDIT_LIBINPUTBAR_MAININPUTBAR), gShellDebug1HiiHandle, mPrompt);
|
||||||
|
|
||||||
//
|
|
||||||
// that's the maximum input length that can be displayed on screen
|
|
||||||
//
|
|
||||||
mPromptLen = StrLen (mPrompt);
|
|
||||||
Limit = LastColumn - mPromptLen;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// this is a selection mPrompt, cursor will stay in edit area
|
// this is a selection mPrompt, cursor will stay in edit area
|
||||||
// actually this is for search , search/replace
|
// actually this is for search , search/replace
|
||||||
|
@ -752,7 +752,6 @@ HBufferImageRefresh (
|
|||||||
UINTN StartRow;
|
UINTN StartRow;
|
||||||
UINTN EndRow;
|
UINTN EndRow;
|
||||||
UINTN FStartRow;
|
UINTN FStartRow;
|
||||||
UINTN FEndRow;
|
|
||||||
UINTN Tmp;
|
UINTN Tmp;
|
||||||
|
|
||||||
Orig = HMainEditor.ColorAttributes;
|
Orig = HMainEditor.ColorAttributes;
|
||||||
@ -821,7 +820,6 @@ HBufferImageRefresh (
|
|||||||
}
|
}
|
||||||
|
|
||||||
FStartRow = StartRow;
|
FStartRow = StartRow;
|
||||||
FEndRow = EndRow;
|
|
||||||
|
|
||||||
StartRow = 2 + StartRow - HBufferImage.LowVisibleRow;
|
StartRow = 2 + StartRow - HBufferImage.LowVisibleRow;
|
||||||
EndRow = 2 + EndRow - HBufferImage.LowVisibleRow;
|
EndRow = 2 + EndRow - HBufferImage.LowVisibleRow;
|
||||||
@ -1750,14 +1748,11 @@ HBufferImagePageUp (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
HEFI_EDITOR_LINE *Line;
|
|
||||||
UINTN FRow;
|
UINTN FRow;
|
||||||
UINTN FCol;
|
UINTN FCol;
|
||||||
UINTN Gap;
|
UINTN Gap;
|
||||||
INTN Retreat;
|
INTN Retreat;
|
||||||
|
|
||||||
Line = HBufferImage.CurrentLine;
|
|
||||||
|
|
||||||
FRow = HBufferImage.BufferPosition.Row;
|
FRow = HBufferImage.BufferPosition.Row;
|
||||||
FCol = HBufferImage.BufferPosition.Column;
|
FCol = HBufferImage.BufferPosition.Column;
|
||||||
|
|
||||||
@ -1776,11 +1771,6 @@ HBufferImagePageUp (
|
|||||||
Retreat = Gap;
|
Retreat = Gap;
|
||||||
Retreat = -Retreat;
|
Retreat = -Retreat;
|
||||||
|
|
||||||
//
|
|
||||||
// get correct line
|
|
||||||
//
|
|
||||||
Line = HMoveLine (Retreat);
|
|
||||||
|
|
||||||
FRow -= Gap;
|
FRow -= Gap;
|
||||||
|
|
||||||
HBufferImageMovePosition (FRow, FCol, HBufferImage.HighBits);
|
HBufferImageMovePosition (FRow, FCol, HBufferImage.HighBits);
|
||||||
@ -1798,13 +1788,10 @@ HBufferImageHome (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
HEFI_EDITOR_LINE *Line;
|
|
||||||
UINTN FRow;
|
UINTN FRow;
|
||||||
UINTN FCol;
|
UINTN FCol;
|
||||||
BOOLEAN HighBits;
|
BOOLEAN HighBits;
|
||||||
|
|
||||||
Line = HBufferImage.CurrentLine;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// curosr will at the high bit
|
// curosr will at the high bit
|
||||||
//
|
//
|
||||||
@ -1918,7 +1905,6 @@ HBufferImageDeleteCharacterFromBuffer (
|
|||||||
|
|
||||||
HEFI_EDITOR_LINE *Line;
|
HEFI_EDITOR_LINE *Line;
|
||||||
LIST_ENTRY *Link;
|
LIST_ENTRY *Link;
|
||||||
UINTN StartRow;
|
|
||||||
|
|
||||||
UINTN OldFCol;
|
UINTN OldFCol;
|
||||||
UINTN OldFRow;
|
UINTN OldFRow;
|
||||||
@ -1928,11 +1914,6 @@ HBufferImageDeleteCharacterFromBuffer (
|
|||||||
|
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
//
|
|
||||||
// get the line that start position is at
|
|
||||||
//
|
|
||||||
StartRow = Pos / 0x10;
|
|
||||||
|
|
||||||
Size = HBufferImageGetTotalSize ();
|
Size = HBufferImageGetTotalSize ();
|
||||||
|
|
||||||
if (Size < Count) {
|
if (Size < Count) {
|
||||||
@ -2054,7 +2035,6 @@ HBufferImageAddCharacterToBuffer (
|
|||||||
HEFI_EDITOR_LINE *Line;
|
HEFI_EDITOR_LINE *Line;
|
||||||
|
|
||||||
LIST_ENTRY *Link;
|
LIST_ENTRY *Link;
|
||||||
UINTN StartRow;
|
|
||||||
|
|
||||||
UINTN OldFCol;
|
UINTN OldFCol;
|
||||||
UINTN OldFRow;
|
UINTN OldFRow;
|
||||||
@ -2062,11 +2042,6 @@ HBufferImageAddCharacterToBuffer (
|
|||||||
|
|
||||||
UINTN NewPos;
|
UINTN NewPos;
|
||||||
|
|
||||||
//
|
|
||||||
// get the line that start position is at
|
|
||||||
//
|
|
||||||
StartRow = Pos / 0x10;
|
|
||||||
|
|
||||||
Size = HBufferImageGetTotalSize ();
|
Size = HBufferImageGetTotalSize ();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -181,11 +181,7 @@ HDiskImageRead (
|
|||||||
UINTN Bytes;
|
UINTN Bytes;
|
||||||
|
|
||||||
HEFI_EDITOR_LINE *Line;
|
HEFI_EDITOR_LINE *Line;
|
||||||
UINT64 ByteOffset;
|
|
||||||
|
|
||||||
EDIT_FILE_TYPE BufferTypeBackup;
|
|
||||||
|
|
||||||
BufferTypeBackup = HBufferImage.BufferType;
|
|
||||||
HBufferImage.BufferType = FileTypeDiskBuffer;
|
HBufferImage.BufferType = FileTypeDiskBuffer;
|
||||||
|
|
||||||
DevicePath = gEfiShellProtocol->GetDevicePathFromMap(DeviceName);
|
DevicePath = gEfiShellProtocol->GetDevicePathFromMap(DeviceName);
|
||||||
@ -226,8 +222,6 @@ HDiskImageRead (
|
|||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteOffset = MultU64x32 (Offset, BlkIo->Media->BlockSize);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// read from disk
|
// read from disk
|
||||||
//
|
//
|
||||||
@ -355,10 +349,6 @@ HDiskImageSave (
|
|||||||
VOID *Buffer;
|
VOID *Buffer;
|
||||||
UINTN Bytes;
|
UINTN Bytes;
|
||||||
|
|
||||||
UINT64 ByteOffset;
|
|
||||||
|
|
||||||
EDIT_FILE_TYPE BufferTypeBackup;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// if not modified, directly return
|
// if not modified, directly return
|
||||||
//
|
//
|
||||||
@ -366,7 +356,6 @@ HDiskImageSave (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferTypeBackup = HBufferImage.BufferType;
|
|
||||||
HBufferImage.BufferType = FileTypeDiskBuffer;
|
HBufferImage.BufferType = FileTypeDiskBuffer;
|
||||||
|
|
||||||
DevicePath = gEfiShellProtocol->GetDevicePathFromMap(DeviceName);
|
DevicePath = gEfiShellProtocol->GetDevicePathFromMap(DeviceName);
|
||||||
@ -406,8 +395,6 @@ HDiskImageSave (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteOffset = MultU64x32 (Offset, BlkIo->Media->BlockSize);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// write the buffer to disk
|
// write the buffer to disk
|
||||||
//
|
//
|
||||||
|
@ -43,25 +43,19 @@ ShellCommandRunHexEdit (
|
|||||||
CHAR16 *ProblemParam;
|
CHAR16 *ProblemParam;
|
||||||
SHELL_STATUS ShellStatus;
|
SHELL_STATUS ShellStatus;
|
||||||
LIST_ENTRY *Package;
|
LIST_ENTRY *Package;
|
||||||
CONST CHAR16 *Cwd;
|
|
||||||
CHAR16 *NewName;
|
CHAR16 *NewName;
|
||||||
CHAR16 *Spot;
|
|
||||||
CONST CHAR16 *Name;
|
CONST CHAR16 *Name;
|
||||||
UINTN Offset;
|
UINTN Offset;
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
UINT64 LastOffset;
|
|
||||||
EDIT_FILE_TYPE WhatToDo;
|
EDIT_FILE_TYPE WhatToDo;
|
||||||
|
|
||||||
Buffer = NULL;
|
Buffer = NULL;
|
||||||
ShellStatus = SHELL_SUCCESS;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
NewName = NULL;
|
NewName = NULL;
|
||||||
Cwd = NULL;
|
|
||||||
Buffer = NULL;
|
Buffer = NULL;
|
||||||
Name = NULL;
|
Name = NULL;
|
||||||
Spot = NULL;
|
|
||||||
Offset = 0;
|
Offset = 0;
|
||||||
Size = 0;
|
Size = 0;
|
||||||
LastOffset = 0;
|
|
||||||
WhatToDo = FileTypeNone;
|
WhatToDo = FileTypeNone;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -598,7 +598,6 @@ HMainCommandCut (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
HEFI_EDITOR_LINE *Line;
|
|
||||||
LIST_ENTRY *Link;
|
LIST_ENTRY *Link;
|
||||||
UINT8 *Buffer;
|
UINT8 *Buffer;
|
||||||
UINTN Count;
|
UINTN Count;
|
||||||
@ -623,8 +622,6 @@ HMainCommandCut (
|
|||||||
Link = Link->ForwardLink;
|
Link = Link->ForwardLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
Line = CR (Link, HEFI_EDITOR_LINE, Link, EFI_EDITOR_LINE_LIST);
|
|
||||||
|
|
||||||
Count = HMainEditor.SelectEnd - HMainEditor.SelectStart + 1;
|
Count = HMainEditor.SelectEnd - HMainEditor.SelectStart + 1;
|
||||||
Buffer = AllocateZeroPool (Count);
|
Buffer = AllocateZeroPool (Count);
|
||||||
if (Buffer == NULL) {
|
if (Buffer == NULL) {
|
||||||
|
@ -190,9 +190,6 @@ HMemImageRead (
|
|||||||
CHAR16 *Str;
|
CHAR16 *Str;
|
||||||
HEFI_EDITOR_LINE *Line;
|
HEFI_EDITOR_LINE *Line;
|
||||||
|
|
||||||
EDIT_FILE_TYPE BufferTypeBackup;
|
|
||||||
|
|
||||||
BufferTypeBackup = HBufferImage.BufferType;
|
|
||||||
HBufferImage.BufferType = FileTypeMemBuffer;
|
HBufferImage.BufferType = FileTypeMemBuffer;
|
||||||
|
|
||||||
Buffer = AllocateZeroPool (Size);
|
Buffer = AllocateZeroPool (Size);
|
||||||
@ -301,8 +298,6 @@ HMemImageSave (
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
VOID *Buffer;
|
VOID *Buffer;
|
||||||
|
|
||||||
EDIT_FILE_TYPE BufferTypeBackup;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// not modified, so directly return
|
// not modified, so directly return
|
||||||
//
|
//
|
||||||
@ -310,7 +305,6 @@ HMemImageSave (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferTypeBackup = HBufferImage.BufferType;
|
|
||||||
HBufferImage.BufferType = FileTypeMemBuffer;
|
HBufferImage.BufferType = FileTypeMemBuffer;
|
||||||
|
|
||||||
Buffer = AllocateZeroPool (Size);
|
Buffer = AllocateZeroPool (Size);
|
||||||
|
@ -217,7 +217,6 @@ ShellCommandRunMm (
|
|||||||
UINT64 Buffer;
|
UINT64 Buffer;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
CHAR16 *AddressStr;
|
|
||||||
// CHAR16 *ValueStr;
|
// CHAR16 *ValueStr;
|
||||||
BOOLEAN Complete;
|
BOOLEAN Complete;
|
||||||
CHAR16 *InputStr;
|
CHAR16 *InputStr;
|
||||||
@ -245,7 +244,6 @@ ShellCommandRunMm (
|
|||||||
Width = EfiPciWidthUint8;
|
Width = EfiPciWidthUint8;
|
||||||
Size = 1;
|
Size = 1;
|
||||||
AccessType = EfiMemory;
|
AccessType = EfiMemory;
|
||||||
AddressStr = NULL;
|
|
||||||
// ValueStr = NULL;
|
// ValueStr = NULL;
|
||||||
Interactive = TRUE;
|
Interactive = TRUE;
|
||||||
Package = NULL;
|
Package = NULL;
|
||||||
|
@ -2054,13 +2054,11 @@ ShellCommandRunPci (
|
|||||||
LIST_ENTRY *Package;
|
LIST_ENTRY *Package;
|
||||||
CHAR16 *ProblemParam;
|
CHAR16 *ProblemParam;
|
||||||
SHELL_STATUS ShellStatus;
|
SHELL_STATUS ShellStatus;
|
||||||
UINTN Size;
|
|
||||||
CONST CHAR16 *Temp;
|
CONST CHAR16 *Temp;
|
||||||
|
|
||||||
ShellStatus = SHELL_SUCCESS;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
Address = 0;
|
Address = 0;
|
||||||
Size = 0;
|
|
||||||
IoDev = NULL;
|
IoDev = NULL;
|
||||||
HandleBuf = NULL;
|
HandleBuf = NULL;
|
||||||
Package = NULL;
|
Package = NULL;
|
||||||
|
@ -490,11 +490,9 @@ EditGetDefaultFileName (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINTN Suffix;
|
UINTN Suffix;
|
||||||
BOOLEAN FoundNewFile;
|
|
||||||
CHAR16 *FileNameTmp;
|
CHAR16 *FileNameTmp;
|
||||||
|
|
||||||
Suffix = 0;
|
Suffix = 0;
|
||||||
FoundNewFile = FALSE;
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
FileNameTmp = CatSPrint (NULL, L"NewFile%d.%s", Suffix, Extension);
|
FileNameTmp = CatSPrint (NULL, L"NewFile%d.%s", Suffix, Extension);
|
||||||
|
@ -674,9 +674,7 @@ DoDhByHandle(
|
|||||||
{
|
{
|
||||||
CHAR16 *ProtocolInfoString;
|
CHAR16 *ProtocolInfoString;
|
||||||
SHELL_STATUS ShellStatus;
|
SHELL_STATUS ShellStatus;
|
||||||
EFI_STATUS Status;
|
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
|
||||||
ShellStatus = SHELL_SUCCESS;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
ProtocolInfoString = NULL;
|
ProtocolInfoString = NULL;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Main file for bcfg shell Install1 function.
|
Main file for bcfg shell Install1 function.
|
||||||
|
|
||||||
Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -293,7 +293,6 @@ BcfgAddInstall1(
|
|||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *FilePath;
|
EFI_DEVICE_PATH_PROTOCOL *FilePath;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *FileNode;
|
|
||||||
CHAR16 *Str;
|
CHAR16 *Str;
|
||||||
UINT8 *TempByteBuffer;
|
UINT8 *TempByteBuffer;
|
||||||
UINT8 *TempByteStart;
|
UINT8 *TempByteStart;
|
||||||
@ -328,7 +327,6 @@ BcfgAddInstall1(
|
|||||||
|
|
||||||
Str = NULL;
|
Str = NULL;
|
||||||
FilePath = NULL;
|
FilePath = NULL;
|
||||||
FileNode = NULL;
|
|
||||||
FileList = NULL;
|
FileList = NULL;
|
||||||
Handles = NULL;
|
Handles = NULL;
|
||||||
ShellStatus = SHELL_SUCCESS;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
|
@ -662,12 +662,9 @@ BuildNextStatement (
|
|||||||
OUT END_TAG_TYPE *EndTag
|
OUT END_TAG_TYPE *EndTag
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
CHAR16 *Buffer;
|
|
||||||
UINTN BufferSize;
|
|
||||||
|
|
||||||
*EndTag = EndTagMax;
|
*EndTag = EndTagMax;
|
||||||
|
|
||||||
for(Buffer = NULL, BufferSize = 0
|
for(
|
||||||
; ParameterNumber < gEfiShellParametersProtocol->Argc
|
; ParameterNumber < gEfiShellParametersProtocol->Argc
|
||||||
; ParameterNumber++
|
; ParameterNumber++
|
||||||
) {
|
) {
|
||||||
|
@ -87,6 +87,7 @@ CopySingleFile(
|
|||||||
Response = *Resp;
|
Response = *Resp;
|
||||||
List = NULL;
|
List = NULL;
|
||||||
DestVolumeInfo = NULL;
|
DestVolumeInfo = NULL;
|
||||||
|
ShellStatus = SHELL_SUCCESS;
|
||||||
|
|
||||||
ReadSize = PcdGet16(PcdShellFileOperationSize);
|
ReadSize = PcdGet16(PcdShellFileOperationSize);
|
||||||
// Why bother copying a file to itself
|
// Why bother copying a file to itself
|
||||||
@ -255,7 +256,7 @@ CopySingleFile(
|
|||||||
//
|
//
|
||||||
// return
|
// return
|
||||||
//
|
//
|
||||||
return (SHELL_SUCCESS);
|
return ShellStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -537,12 +538,11 @@ ProcessValidateAndCopyFiles(
|
|||||||
{
|
{
|
||||||
SHELL_STATUS ShellStatus;
|
SHELL_STATUS ShellStatus;
|
||||||
EFI_SHELL_FILE_INFO *List;
|
EFI_SHELL_FILE_INFO *List;
|
||||||
EFI_STATUS Status;
|
|
||||||
EFI_FILE_INFO *FileInfo;
|
EFI_FILE_INFO *FileInfo;
|
||||||
|
|
||||||
List = NULL;
|
List = NULL;
|
||||||
|
|
||||||
Status = ShellOpenFileMetaArg((CHAR16*)DestDir, EFI_FILE_MODE_READ, &List);
|
ShellOpenFileMetaArg((CHAR16*)DestDir, EFI_FILE_MODE_READ, &List);
|
||||||
if (List != NULL && List->Link.ForwardLink != List->Link.BackLink) {
|
if (List != NULL && List->Link.ForwardLink != List->Link.BackLink) {
|
||||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MARG_ERROR), gShellLevel2HiiHandle, DestDir);
|
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MARG_ERROR), gShellLevel2HiiHandle, DestDir);
|
||||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||||
|
@ -81,13 +81,11 @@ LoadDriver(
|
|||||||
{
|
{
|
||||||
EFI_HANDLE LoadedDriverHandle;
|
EFI_HANDLE LoadedDriverHandle;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *Node;
|
|
||||||
EFI_DEVICE_PATH_PROTOCOL *FilePath;
|
EFI_DEVICE_PATH_PROTOCOL *FilePath;
|
||||||
EFI_LOADED_IMAGE_PROTOCOL *LoadedDriverImage;
|
EFI_LOADED_IMAGE_PROTOCOL *LoadedDriverImage;
|
||||||
|
|
||||||
LoadedDriverImage = NULL;
|
LoadedDriverImage = NULL;
|
||||||
FilePath = NULL;
|
FilePath = NULL;
|
||||||
Node = NULL;
|
|
||||||
LoadedDriverHandle = NULL;
|
LoadedDriverHandle = NULL;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
|
@ -1025,7 +1025,6 @@ ShellCommandRunMap (
|
|||||||
CONST CHAR16 *SName;
|
CONST CHAR16 *SName;
|
||||||
CONST CHAR16 *Mapping;
|
CONST CHAR16 *Mapping;
|
||||||
EFI_HANDLE MapAsHandle;
|
EFI_HANDLE MapAsHandle;
|
||||||
CONST EFI_DEVICE_PATH_PROTOCOL *DevPath;
|
|
||||||
SHELL_STATUS ShellStatus;
|
SHELL_STATUS ShellStatus;
|
||||||
BOOLEAN SfoMode;
|
BOOLEAN SfoMode;
|
||||||
BOOLEAN ConstMode;
|
BOOLEAN ConstMode;
|
||||||
@ -1037,7 +1036,6 @@ ShellCommandRunMap (
|
|||||||
ProblemParam = NULL;
|
ProblemParam = NULL;
|
||||||
Mapping = NULL;
|
Mapping = NULL;
|
||||||
SName = NULL;
|
SName = NULL;
|
||||||
DevPath = NULL;
|
|
||||||
ShellStatus = SHELL_SUCCESS;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
MapAsHandle = NULL;
|
MapAsHandle = NULL;
|
||||||
|
|
||||||
|
@ -135,7 +135,6 @@ GetDestinationLocation(
|
|||||||
{
|
{
|
||||||
EFI_SHELL_FILE_INFO *DestList;
|
EFI_SHELL_FILE_INFO *DestList;
|
||||||
EFI_SHELL_FILE_INFO *Node;
|
EFI_SHELL_FILE_INFO *Node;
|
||||||
EFI_STATUS Status;
|
|
||||||
CHAR16 *DestPath;
|
CHAR16 *DestPath;
|
||||||
CHAR16 *TempLocation;
|
CHAR16 *TempLocation;
|
||||||
UINTN NewSize;
|
UINTN NewSize;
|
||||||
@ -159,7 +158,7 @@ GetDestinationLocation(
|
|||||||
//
|
//
|
||||||
// get the destination path
|
// get the destination path
|
||||||
//
|
//
|
||||||
Status = ShellOpenFileMetaArg((CHAR16*)DestDir, EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ|EFI_FILE_MODE_CREATE, &DestList);
|
ShellOpenFileMetaArg((CHAR16*)DestDir, EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ|EFI_FILE_MODE_CREATE, &DestList);
|
||||||
if (DestList == NULL || IsListEmpty(&DestList->Link)) {
|
if (DestList == NULL || IsListEmpty(&DestList->Link)) {
|
||||||
//
|
//
|
||||||
// Not existing... must be renaming
|
// Not existing... must be renaming
|
||||||
|
@ -33,7 +33,6 @@ IsDirectoryEmpty (
|
|||||||
IN EFI_HANDLE FileHandle
|
IN EFI_HANDLE FileHandle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
|
||||||
EFI_FILE_INFO *FileInfo;
|
EFI_FILE_INFO *FileInfo;
|
||||||
BOOLEAN NoFile;
|
BOOLEAN NoFile;
|
||||||
BOOLEAN RetVal;
|
BOOLEAN RetVal;
|
||||||
@ -41,9 +40,9 @@ IsDirectoryEmpty (
|
|||||||
RetVal = TRUE;
|
RetVal = TRUE;
|
||||||
NoFile = FALSE;
|
NoFile = FALSE;
|
||||||
|
|
||||||
for (Status = FileHandleFindFirstFile(FileHandle, &FileInfo)
|
for (FileHandleFindFirstFile(FileHandle, &FileInfo)
|
||||||
; !NoFile
|
; !NoFile
|
||||||
; Status = FileHandleFindNextFile(FileHandle, FileInfo, &NoFile)
|
; FileHandleFindNextFile(FileHandle, FileInfo, &NoFile)
|
||||||
){
|
){
|
||||||
if (StrStr(FileInfo->FileName, L".") != FileInfo->FileName
|
if (StrStr(FileInfo->FileName, L".") != FileInfo->FileName
|
||||||
&&StrStr(FileInfo->FileName, L"..") != FileInfo->FileName) {
|
&&StrStr(FileInfo->FileName, L"..") != FileInfo->FileName) {
|
||||||
|
@ -378,7 +378,6 @@ ShellCommandRunTime (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
LIST_ENTRY *Package;
|
LIST_ENTRY *Package;
|
||||||
CHAR16 *Message;
|
|
||||||
EFI_TIME TheTime;
|
EFI_TIME TheTime;
|
||||||
CHAR16 *ProblemParam;
|
CHAR16 *ProblemParam;
|
||||||
SHELL_STATUS ShellStatus;
|
SHELL_STATUS ShellStatus;
|
||||||
@ -387,13 +386,11 @@ ShellCommandRunTime (
|
|||||||
CONST CHAR16 *TempLocation;
|
CONST CHAR16 *TempLocation;
|
||||||
UINTN TzMinutes;
|
UINTN TzMinutes;
|
||||||
|
|
||||||
ShellStatus = SHELL_SUCCESS;
|
|
||||||
ProblemParam = NULL;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
//
|
//
|
||||||
Message = NULL;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
|
ProblemParam = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// initialize the shell lib (we must be in non-auto-init...)
|
// initialize the shell lib (we must be in non-auto-init...)
|
||||||
|
@ -29,21 +29,18 @@ ShellCommandRunCls (
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
LIST_ENTRY *Package;
|
LIST_ENTRY *Package;
|
||||||
CHAR16 *Message;
|
|
||||||
UINTN Background;
|
UINTN Background;
|
||||||
UINTN ForeColor;
|
UINTN ForeColor;
|
||||||
CHAR16 *ProblemParam;
|
CHAR16 *ProblemParam;
|
||||||
SHELL_STATUS ShellStatus;
|
SHELL_STATUS ShellStatus;
|
||||||
CONST CHAR16 *Param1;
|
CONST CHAR16 *Param1;
|
||||||
|
|
||||||
ShellStatus = SHELL_SUCCESS;
|
|
||||||
ProblemParam = NULL;
|
|
||||||
Background = 0;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
//
|
//
|
||||||
Message = NULL;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
|
ProblemParam = NULL;
|
||||||
|
Background = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
// initialize the shell lib (we must be in non-auto-init...)
|
// initialize the shell lib (we must be in non-auto-init...)
|
||||||
|
@ -41,7 +41,6 @@ ShellCommandRunHelp (
|
|||||||
LIST_ENTRY *Package;
|
LIST_ENTRY *Package;
|
||||||
CHAR16 *ProblemParam;
|
CHAR16 *ProblemParam;
|
||||||
SHELL_STATUS ShellStatus;
|
SHELL_STATUS ShellStatus;
|
||||||
CHAR16 *OutText;
|
|
||||||
CONST COMMAND_LIST *CommandList;
|
CONST COMMAND_LIST *CommandList;
|
||||||
CONST COMMAND_LIST *Node;
|
CONST COMMAND_LIST *Node;
|
||||||
CHAR16 *CommandToGetHelpOn;
|
CHAR16 *CommandToGetHelpOn;
|
||||||
@ -53,7 +52,6 @@ ShellCommandRunHelp (
|
|||||||
PrintCommandText = TRUE;
|
PrintCommandText = TRUE;
|
||||||
ProblemParam = NULL;
|
ProblemParam = NULL;
|
||||||
ShellStatus = SHELL_SUCCESS;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
OutText = NULL;
|
|
||||||
CommandToGetHelpOn = NULL;
|
CommandToGetHelpOn = NULL;
|
||||||
SectionToGetHelpOn = NULL;
|
SectionToGetHelpOn = NULL;
|
||||||
Found = FALSE;
|
Found = FALSE;
|
||||||
|
Reference in New Issue
Block a user