/** @file\r
Main file for goto shell level 1 function.\r
\r
+ Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
SHELL_STATUS ShellStatus;\r
CHAR16 *CompareString;\r
UINTN Size;\r
+ SCRIPT_FILE *CurrentScriptFile;\r
\r
ShellStatus = SHELL_SUCCESS;\r
CompareString = NULL;\r
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);\r
if (EFI_ERROR(Status)) {\r
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, ProblemParam);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, L"goto", ProblemParam);\r
FreePool(ProblemParam);\r
ShellStatus = SHELL_INVALID_PARAMETER;\r
} else {\r
}\r
} else {\r
if (ShellCommandLineGetRawValue(Package, 2) != NULL) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"goto");\r
ShellStatus = SHELL_INVALID_PARAMETER;\r
} else if (ShellCommandLineGetRawValue(Package, 1) == NULL) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"goto");\r
ShellStatus = SHELL_INVALID_PARAMETER;\r
} else {\r
Size = 0;\r
// Check forwards and then backwards for a label...\r
//\r
if (!MoveToTag(GetNextNode, L"endfor", L"for", CompareString, ShellCommandGetCurrentScriptFile(), FALSE, FALSE, TRUE)) {\r
+ CurrentScriptFile = ShellCommandGetCurrentScriptFile();\r
ShellPrintHiiEx(\r
-1, \r
-1, \r
gShellLevel1HiiHandle, \r
CompareString, \r
L"Goto", \r
- ShellCommandGetCurrentScriptFile()!=NULL\r
- &&ShellCommandGetCurrentScriptFile()->CurrentCommand!=NULL\r
- ?ShellCommandGetCurrentScriptFile()->CurrentCommand->Line:0);\r
+ CurrentScriptFile!=NULL \r
+ && CurrentScriptFile->CurrentCommand!=NULL\r
+ ? CurrentScriptFile->CurrentCommand->Line:0);\r
ShellStatus = SHELL_NOT_FOUND;\r
}\r
FreePool(CompareString);\r