mirror of https://github.com/acidanthera/audk.git
ShellPkg: Update 'echo' command to print everything at once. this allows for format color coding on the output.
signed-off-by: jcarsey reviewed-by: darylm503 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12969 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
94753eb940
commit
eefe286b7b
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Main file for Echo shell level 3 function.
|
Main file for Echo shell level 3 function.
|
||||||
|
|
||||||
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2009 - 2012, 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
|
||||||
|
@ -40,8 +40,12 @@ ShellCommandRunEcho (
|
||||||
SHELL_STATUS ShellStatus;
|
SHELL_STATUS ShellStatus;
|
||||||
UINTN ParamCount;
|
UINTN ParamCount;
|
||||||
CHAR16 *ProblemParam;
|
CHAR16 *ProblemParam;
|
||||||
|
UINTN Size;
|
||||||
|
CHAR16 *PrintString;
|
||||||
|
|
||||||
|
Size = 0;
|
||||||
ProblemParam = NULL;
|
ProblemParam = NULL;
|
||||||
|
PrintString = NULL;
|
||||||
ShellStatus = SHELL_SUCCESS;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -96,13 +100,13 @@ ShellCommandRunEcho (
|
||||||
; ShellCommandLineGetRawValue(Package, ParamCount) != NULL
|
; ShellCommandLineGetRawValue(Package, ParamCount) != NULL
|
||||||
; ParamCount++
|
; ParamCount++
|
||||||
) {
|
) {
|
||||||
|
StrnCatGrow(&PrintString, &Size, ShellCommandLineGetRawValue(Package, ParamCount), 0);
|
||||||
if (ShellCommandLineGetRawValue(Package, ParamCount+1) != NULL) {
|
if (ShellCommandLineGetRawValue(Package, ParamCount+1) != NULL) {
|
||||||
ShellPrintEx(-1, -1, L"%s ", ShellCommandLineGetRawValue(Package, ParamCount));
|
StrnCatGrow(&PrintString, &Size, L" ", 0);
|
||||||
} else {
|
}
|
||||||
ShellPrintEx(-1, -1, L"%s", ShellCommandLineGetRawValue(Package, ParamCount));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_CRLF), gShellLevel3HiiHandle);
|
ShellPrintEx(-1, -1, L"%s\r\n", PrintString);
|
||||||
|
SHELL_FREE_NON_NULL(PrintString);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue