diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-25 21:01:08 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-25 21:01:08 +0000 |
commit | 345cd2357af44872b2037f48ce63b05827cfa6c0 (patch) | |
tree | 29d097b32527717f6fbd7f23b69695c312d44cd4 /ShellPkg/Library/UefiShellLevel3CommandsLib/Echo.c | |
parent | b54fd049bdfa0d9520a40d8a1783aa681b40d751 (diff) | |
download | edk2-345cd2357af44872b2037f48ce63b05827cfa6c0.zip edk2-345cd2357af44872b2037f48ce63b05827cfa6c0.tar.gz edk2-345cd2357af44872b2037f48ce63b05827cfa6c0.tar.bz2 |
cls - add input verification.
echo - add input verificaiton.
help - prints out commands in sorted order.
touch - add comments.
type - add error when file not found. add comments.
main lib files:
add comments, clarify error messages.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11427 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel3CommandsLib/Echo.c')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel3CommandsLib/Echo.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/Echo.c b/ShellPkg/Library/UefiShellLevel3CommandsLib/Echo.c index dc6bca0..febfc00 100644 --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/Echo.c +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/Echo.c @@ -1,7 +1,7 @@ /** @file
Main file for Echo shell level 3 function.
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved. <BR>
+ Copyright (c) 2009 - 2011, 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
@@ -37,11 +37,11 @@ ShellCommandRunEcho ( {
EFI_STATUS Status;
LIST_ENTRY *Package;
-// CHAR16 *ProblemParam;
SHELL_STATUS ShellStatus;
UINTN ParamCount;
+ CHAR16 *ProblemParam;
-// ProblemParam = NULL;
+ ProblemParam = NULL;
ShellStatus = SHELL_SUCCESS;
//
@@ -53,16 +53,16 @@ ShellCommandRunEcho ( //
// parse the command line
//
- Status = ShellCommandLineParseEx (ParamList, &Package, NULL, TRUE, TRUE);
-// if (EFI_ERROR(Status)) {
-// if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
-// ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, ProblemParam);
-// FreePool(ProblemParam);
-// ShellStatus = SHELL_INVALID_PARAMETER;
-// } else {
-// ASSERT(FALSE);
-// }
-// } else {
+ 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, ProblemParam);
+ FreePool(ProblemParam);
+ ShellStatus = SHELL_INVALID_PARAMETER;
+ } else {
+ ASSERT(FALSE);
+ }
+ } else {
//
// check for "-?"
//
@@ -109,7 +109,7 @@ ShellCommandRunEcho ( // free the command line package
//
ShellCommandLineFreeVarList (Package);
-// }
+ }
return (ShellStatus);
}
|