/** @file\r
Main file for Edit shell Debug1 function.\r
\r
+ (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2005 - 2011, 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
CONST CHAR16 *Cwd;\r
CHAR16 *Nfs;\r
CHAR16 *Spot;\r
+ CONST CHAR16 *TempParam;\r
// SHELL_FILE_HANDLE TempHandle;\r
\r
Buffer = 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), gShellDebug1HiiHandle, ProblemParam);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"edit", ProblemParam); \r
FreePool(ProblemParam);\r
ShellStatus = SHELL_INVALID_PARAMETER;\r
} else {\r
}\r
} else {\r
if (ShellCommandLineGetCount(Package) > 2) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"edit"); \r
ShellStatus = SHELL_INVALID_PARAMETER;\r
} else {\r
Cwd = gEfiShellProtocol->GetCurDir(NULL);\r
// if editor launched with file named\r
//\r
if (ShellCommandLineGetCount(Package) == 2) {\r
- FileBufferSetFileName (ShellCommandLineGetRawValue(Package, 1));\r
+ TempParam = ShellCommandLineGetRawValue(Package, 1);\r
+ ASSERT(TempParam != NULL);\r
+ FileBufferSetFileName (TempParam);\r
// if (EFI_ERROR(ShellFileExists(MainEditor.FileBuffer->FileName))) {\r
// Status = ShellOpenFileByName(MainEditor.FileBuffer->FileName, &TempHandle, EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE, 0);\r
// if (!EFI_ERROR(Status)) {\r
//\r
if (Status == EFI_SUCCESS) {\r
} else if (Status == EFI_OUT_OF_RESOURCES) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_GEN_OUT_MEM), gShellDebug1HiiHandle);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"edit"); \r
} else {\r
if (Buffer != NULL) {\r
if (StrCmp (Buffer, L"") != 0) {\r