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:
@ -2,7 +2,7 @@
|
||||
Main file for Alias shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 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
|
||||
@ -186,7 +186,7 @@ ShellCommandRunAlias (
|
||||
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), gShellLevel3HiiHandle, L"alias", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"alias", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -257,7 +257,7 @@ ShellCommandRunAlias (
|
||||
// Set volatile alias.
|
||||
//
|
||||
ASSERT (VolatileFlag);
|
||||
ASSERT (!DeleteFlag);
|
||||
ASSERT (!DeleteFlag);
|
||||
switch (ShellCommandLineGetCount (Package)) {
|
||||
case 1:
|
||||
case 2:
|
||||
|
@ -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) 2009 - 2014, 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
|
||||
@ -63,7 +63,7 @@ ShellCommandRunCls (
|
||||
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), gShellLevel3HiiHandle, L"cls", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"cls", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Echo shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2012, 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
|
||||
@ -61,7 +61,7 @@ ShellCommandRunEcho (
|
||||
Status = ShellCommandLineParseEx (ParamList, &Package, &ProblemParam, TRUE, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"echo", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"echo", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -104,7 +104,7 @@ ShellCommandRunEcho (
|
||||
StrnCatGrow(&PrintString, &Size, ShellCommandLineGetRawValue(Package, ParamCount), 0);
|
||||
if (ShellCommandLineGetRawValue(Package, ParamCount+1) != NULL) {
|
||||
StrnCatGrow(&PrintString, &Size, L" ", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
ShellPrintEx(-1, -1, L"%s\r\n", PrintString);
|
||||
SHELL_FREE_NON_NULL(PrintString);
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for GetMtc shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2013, 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
|
||||
@ -51,7 +51,7 @@ ShellCommandRunGetMtc (
|
||||
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), gShellLevel3HiiHandle, L"getmtc", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"getmtc", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -64,7 +64,7 @@ ShellCommandRunGetMtc (
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 1) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"getmtc");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"getmtc");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
|
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for Help shell level 3 function.
|
||||
|
||||
Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2014, ARM Limited. All rights reserved. <BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
the resultant list is a double NULL terminated list of NULL terminated strings.
|
||||
|
||||
upon successful return the memory must be caller freed (unless passed back in
|
||||
upon successful return the memory must be caller freed (unless passed back in
|
||||
via a loop where it will get reallocated).
|
||||
|
||||
@param[in,out] DestList double pointer to the list. may be NULL.
|
||||
@ -38,7 +38,7 @@
|
||||
**/
|
||||
EFI_STATUS
|
||||
LexicalInsertIntoList(
|
||||
IN OUT CHAR16 **DestList,
|
||||
IN OUT CHAR16 **DestList,
|
||||
IN OUT UINTN *DestSize,
|
||||
IN CONST CHAR16 *Item
|
||||
)
|
||||
@ -116,7 +116,7 @@ LexicalInsertIntoList(
|
||||
**/
|
||||
EFI_STATUS
|
||||
CopyListOfCommandNames(
|
||||
IN OUT CHAR16 **DestList,
|
||||
IN OUT CHAR16 **DestList,
|
||||
IN OUT UINTN *DestSize,
|
||||
IN CONST COMMAND_LIST *SourceList
|
||||
)
|
||||
@ -146,7 +146,7 @@ CopyListOfCommandNames(
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CopyListOfCommandNamesWithDynamic(
|
||||
IN OUT CHAR16** DestList,
|
||||
IN OUT CHAR16** DestList,
|
||||
IN OUT UINTN *DestSize
|
||||
)
|
||||
{
|
||||
@ -325,7 +325,7 @@ ShellCommandRunHelp (
|
||||
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), gShellLevel3HiiHandle, L"help", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"help", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -339,10 +339,10 @@ ShellCommandRunHelp (
|
||||
&&ShellCommandLineGetFlag(Package, L"-section")
|
||||
&&(ShellCommandLineGetFlag(Package, L"-verbose") || ShellCommandLineGetFlag(Package, L"-v"))
|
||||
){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel3HiiHandle, L"help");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel3HiiHandle, L"help");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetRawValue(Package, 2) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"help");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"help");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -396,7 +396,7 @@ ShellCommandRunHelp (
|
||||
CopyListOfCommandNames(&SortedCommandList, &SortedCommandListSize, ShellCommandGetCommandList(TRUE));
|
||||
CopyListOfCommandNamesWithDynamic(&SortedCommandList, &SortedCommandListSize);
|
||||
|
||||
for (CurrentCommand = SortedCommandList
|
||||
for (CurrentCommand = SortedCommandList
|
||||
; CurrentCommand != NULL && CurrentCommand < SortedCommandList + SortedCommandListSize/sizeof(CHAR16) && *CurrentCommand != CHAR_NULL
|
||||
; CurrentCommand += StrLen(CurrentCommand) + 1
|
||||
) {
|
||||
@ -405,7 +405,7 @@ ShellCommandRunHelp (
|
||||
//
|
||||
if (ShellGetExecutionBreakFlag ()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((gUnicodeCollation->MetaiMatch(gUnicodeCollation, (CHAR16*)CurrentCommand, CommandToGetHelpOn)) ||
|
||||
(gEfiShellProtocol->GetAlias(CommandToGetHelpOn, NULL) != NULL && (gUnicodeCollation->MetaiMatch(gUnicodeCollation, (CHAR16*)CurrentCommand, (CHAR16*)(gEfiShellProtocol->GetAlias(CommandToGetHelpOn, NULL)))))) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Pause shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2014, 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
|
||||
@ -53,7 +53,7 @@ ShellCommandRunPause (
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
if (!gEfiShellProtocol->BatchIsActive()) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel3HiiHandle, L"pause");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel3HiiHandle, L"pause");
|
||||
return (SHELL_UNSUPPORTED);
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ ShellCommandRunPause (
|
||||
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), gShellLevel3HiiHandle, L"pause", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"pause", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -76,7 +76,7 @@ ShellCommandRunPause (
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 1) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"pause");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"pause");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (!ShellCommandLineGetFlag(Package, L"-q")) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Touch shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 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
|
||||
@ -98,7 +98,7 @@ DoTouchByHandle (
|
||||
//
|
||||
Status = TouchFileByHandle(Handle);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Name);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Name);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ DoTouchByHandle (
|
||||
//
|
||||
Status = gEfiShellProtocol->OpenFileByName (Walker->FullName, &Walker->Handle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Walker->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Walker->FullName);
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
} else {
|
||||
Status = DoTouchByHandle(Walker->FullName, FS, Walker->Handle, TRUE);
|
||||
@ -196,7 +196,7 @@ ShellCommandRunTouch (
|
||||
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), gShellLevel3HiiHandle, L"touch", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"touch", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -213,7 +213,7 @@ ShellCommandRunTouch (
|
||||
//
|
||||
// we insufficient parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel3HiiHandle, L"touch");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel3HiiHandle, L"touch");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -226,7 +226,7 @@ ShellCommandRunTouch (
|
||||
){
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)Param, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE, &FileList);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel3HiiHandle, L"touch", (CHAR16*)Param);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel3HiiHandle, L"touch", (CHAR16*)Param);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
break;
|
||||
}
|
||||
@ -239,7 +239,7 @@ ShellCommandRunTouch (
|
||||
// check that we have at least 1 file
|
||||
//
|
||||
if (FileList == NULL || IsListEmpty(&FileList->Link)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel3HiiHandle, L"touch", Param);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel3HiiHandle, L"touch", Param);
|
||||
continue;
|
||||
} else {
|
||||
//
|
||||
@ -253,14 +253,14 @@ ShellCommandRunTouch (
|
||||
// make sure the file opened ok
|
||||
//
|
||||
if (EFI_ERROR(Node->Status)){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Node->FileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Node->FileName);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
continue;
|
||||
}
|
||||
|
||||
Status = DoTouchByHandle(Node->FullName, NULL, Node->Handle, ShellCommandLineGetFlag(Package, L"-r"));
|
||||
if (EFI_ERROR(Status) && Status != EFI_ACCESS_DENIED) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Node->FileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Node->FileName);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
Main file for Type shell level 3 function.
|
||||
|
||||
(C) Copyright 2013-2015 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
|
||||
@ -83,7 +83,7 @@ TypeFileByHandle (
|
||||
//
|
||||
// Allow Line Feed (LF) (0xA) & Carriage Return (CR) (0xD)
|
||||
// characters to be displayed as is.
|
||||
//
|
||||
//
|
||||
if (AsciiChar == '\n' && ((CHAR8*)Buffer)[LoopVar-1] != '\r') {
|
||||
//
|
||||
// In case Line Feed (0xA) is encountered & Carriage Return (0xD)
|
||||
@ -114,7 +114,7 @@ TypeFileByHandle (
|
||||
} else {
|
||||
LoopSize = ReadSize / (sizeof (CHAR16));
|
||||
}
|
||||
|
||||
|
||||
for (LoopVar = 0 ; LoopVar < LoopSize ; LoopVar++) {
|
||||
//
|
||||
// An invalid range of characters is 0x0-0x1F.
|
||||
@ -126,7 +126,7 @@ TypeFileByHandle (
|
||||
//
|
||||
// Allow Line Feed (LF) (0xA) & Carriage Return (CR) (0xD)
|
||||
// characters to be displayed as is.
|
||||
//
|
||||
//
|
||||
if (Ucs2Char == '\n' && ((CHAR16*)Buffer)[LoopVar-1] != '\r') {
|
||||
//
|
||||
// In case Line Feed (0xA) is encountered & Carriage Return (0xD)
|
||||
@ -137,7 +137,7 @@ TypeFileByHandle (
|
||||
ShellPrintEx (-1, -1, L"\r\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Ucs2Char < 0x20) {
|
||||
//
|
||||
// For all other characters which are not printable, display '.'
|
||||
@ -207,7 +207,7 @@ ShellCommandRunType (
|
||||
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), gShellLevel3HiiHandle, L"type", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"type", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -224,13 +224,13 @@ ShellCommandRunType (
|
||||
UnicodeMode = ShellCommandLineGetFlag(Package, L"-u");
|
||||
|
||||
if (AsciiMode && UnicodeMode) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel3HiiHandle, L"type", L"-a & -u");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel3HiiHandle, L"type", L"-a & -u");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetRawValue(Package, 1) == NULL) {
|
||||
//
|
||||
// we insufficient parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel3HiiHandle, L"type");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel3HiiHandle, L"type");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@ -243,7 +243,7 @@ ShellCommandRunType (
|
||||
){
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)Param, EFI_FILE_MODE_READ, &FileList);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"type", (CHAR16*)Param);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"type", (CHAR16*)Param);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
break;
|
||||
}
|
||||
@ -256,7 +256,7 @@ ShellCommandRunType (
|
||||
// check that we have at least 1 file
|
||||
//
|
||||
if (FileList == NULL || IsListEmpty(&FileList->Link)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel3HiiHandle, L"type", Param);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel3HiiHandle, L"type", Param);
|
||||
continue;
|
||||
} else {
|
||||
//
|
||||
@ -275,7 +275,7 @@ ShellCommandRunType (
|
||||
// make sure the file opened ok
|
||||
//
|
||||
if (EFI_ERROR(Node->Status)){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"type", Node->FileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"type", Node->FileName);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
continue;
|
||||
}
|
||||
@ -284,7 +284,7 @@ ShellCommandRunType (
|
||||
// make sure its not a directory
|
||||
//
|
||||
if (FileHandleIsDirectory(Node->Handle) == EFI_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_IS_DIR), gShellLevel3HiiHandle, L"type", Node->FileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_IS_DIR), gShellLevel3HiiHandle, L"type", Node->FileName);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
continue;
|
||||
}
|
||||
|
@ -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) 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
|
||||
@ -64,7 +64,7 @@ ShellCommandRunVer (
|
||||
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), gShellLevel3HiiHandle, L"ver", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"ver", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@ -81,7 +81,7 @@ ShellCommandRunVer (
|
||||
//
|
||||
// we have too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"ver");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"ver");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (ShellCommandLineGetFlag(Package, L"-s")) {
|
||||
|
Reference in New Issue
Block a user