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
This commit is contained in:
jcarsey 2011-04-11 22:00:31 +00:00
parent 75e55c54be
commit 411a3c3929
2 changed files with 12 additions and 9 deletions

View File

@ -185,7 +185,7 @@ MainTitleBarRefresh (
//
// Print the offset.
//
ASSERT(FALSE);
ShellPrintEx (-1,-1, L"Offset %X | Size %X", Offset, Size);
case FileTypeFileBuffer:
break;
default:

View File

@ -147,7 +147,10 @@ ShellCommandRunHexEdit (
}
Name = ShellCommandLineGetRawValue(Package, 1);
if (WhatToDo == FileTypeNone && Name != NULL) {
if (!IsValidFileName(Name)) {
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 {
@ -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);
}