summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-11 22:00:31 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-11 22:00:31 +0000
commit411a3c392942828a68fb0f4a92545a384fd43bea (patch)
tree7cbfc7839f46a3179391d75ea4837ae85c7bdabf /ShellPkg
parent75e55c54be7f61757fcd85255f02ff36ae800a58 (diff)
EditTitleBar - Remove ASSERT. Complete display output for Disk and Memory output.
HexEdit - Add more user input verification. Fix output display. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11517 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c2
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c19
2 files changed, 12 insertions, 9 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c
index 08d01ab09..c29ecc00f 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c
@@ -185,7 +185,7 @@ MainTitleBarRefresh (
//
// Print the offset.
//
- ASSERT(FALSE);
+ ShellPrintEx (-1,-1, L"Offset %X | Size %X", Offset, Size);
case FileTypeFileBuffer:
break;
default:
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c
index 1f5e1c908..edd2f6765 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c
@@ -147,12 +147,15 @@ ShellCommandRunHexEdit (
}
Name = ShellCommandLineGetRawValue(Package, 1);
if (WhatToDo == FileTypeNone && Name != NULL) {
- if (!IsValidFileName(Name)) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, Name);
- ShellStatus = SHELL_INVALID_PARAMETER;
- } else {
- WhatToDo = FileTypeFileBuffer;
- }
+ if (ShellCommandLineGetCount(Package) > 2) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle);
+ ShellStatus = SHELL_INVALID_PARAMETER;
+ } else if (!IsValidFileName(Name)) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, Name);
+ ShellStatus = SHELL_INVALID_PARAMETER;
+ } else {
+ WhatToDo = FileTypeFileBuffer;
+ }
} else if (WhatToDo == FileTypeNone) {
if (gEfiShellProtocol->GetCurDir(NULL) == NULL) {
ShellStatus = SHELL_NOT_FOUND;
@@ -235,7 +238,7 @@ ShellCommandRunHexEdit (
//
// back up the status string
//
- Buffer = CatSPrint (NULL, L"%s", StatusBarGetString());
+ Buffer = CatSPrint (NULL, L"%s\r\n", StatusBarGetString());
}
}
@@ -261,7 +264,7 @@ ShellCommandRunHexEdit (
//
// print out the status string
//
- ShellPrintEx(-1, -1, L"%s", gShellDebug1HiiHandle, Buffer);
+ ShellPrintEx(-1, -1, L"%s", Buffer);
} else {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_HEXEDIT_UNKNOWN_EDITOR), gShellDebug1HiiHandle);
}