Member functions of EFI_SHELL_PARAMETERS_PROTOCOL and functions for creation,\r
manipulation, and initialization of EFI_SHELL_PARAMETERS_PROTOCOL.\r
\r
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2013 Hewlett-Packard Development Company, L.P.\r
+ Copyright (c) 2009 - 2013, 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
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-#include "ShellParametersProtocol.h"\r
-#include "ConsoleWrappers.h"\r
+#include "Shell.h"\r
\r
/**\r
return the next parameter from a command line string;\r
//\r
// Build the full command line\r
//\r
- Status = SHELL_GET_ENVIRONMENT_VARIABLE(L"ShellOpt", &Size, &FullCommandLine);\r
+ Status = SHELL_GET_ENVIRONMENT_VARIABLE(L"ShellOpt", &Size, FullCommandLine);\r
if (Status == EFI_BUFFER_TOO_SMALL) {\r
FullCommandLine = AllocateZeroPool(Size + LoadedImage->LoadOptionsSize);\r
- Status = SHELL_GET_ENVIRONMENT_VARIABLE(L"ShellOpt", &Size, &FullCommandLine);\r
+ Status = SHELL_GET_ENVIRONMENT_VARIABLE(L"ShellOpt", &Size, FullCommandLine);\r
}\r
if (Status == EFI_NOT_FOUND) {\r
//\r
FullCommandLine = AllocateZeroPool(Size);\r
}\r
if (FullCommandLine != NULL) {\r
- if (LoadedImage->LoadOptionsSize != 0){\r
- StrCpy(FullCommandLine, LoadedImage->LoadOptions);\r
- }\r
+ CopyMem (FullCommandLine, LoadedImage->LoadOptions, LoadedImage->LoadOptionsSize);\r
//\r
// Populate Argc and Argv\r
//\r
}\r
if (!EFI_ERROR(Status)) {\r
ShellParameters->StdErr = TempHandle;\r
- gST->StdErr = CreateSimpleTextOutOnFile(TempHandle, &gST->StandardErrorHandle);\r
+ gST->StdErr = CreateSimpleTextOutOnFile(TempHandle, &gST->StandardErrorHandle, gST->StdErr);\r
}\r
}\r
\r
}\r
if (!EFI_ERROR(Status)) {\r
ShellParameters->StdOut = TempHandle;\r
- gST->ConOut = CreateSimpleTextOutOnFile(TempHandle, &gST->ConsoleOutHandle);\r
+ gST->ConOut = CreateSimpleTextOutOnFile(TempHandle, &gST->ConsoleOutHandle, gST->ConOut);\r
}\r
}\r
}\r
TempHandle = CreateFileInterfaceEnv(StdOutVarName);\r
ASSERT(TempHandle != NULL);\r
ShellParameters->StdOut = TempHandle;\r
- gST->ConOut = CreateSimpleTextOutOnFile(TempHandle, &gST->ConsoleOutHandle);\r
+ gST->ConOut = CreateSimpleTextOutOnFile(TempHandle, &gST->ConsoleOutHandle, gST->ConOut);\r
}\r
\r
//\r
TempHandle = CreateFileInterfaceEnv(StdErrVarName);\r
ASSERT(TempHandle != NULL);\r
ShellParameters->StdErr = TempHandle;\r
- gST->StdErr = CreateSimpleTextOutOnFile(TempHandle, &gST->StandardErrorHandle);\r
+ gST->StdErr = CreateSimpleTextOutOnFile(TempHandle, &gST->StandardErrorHandle, gST->StdErr);\r
}\r
\r
//\r