smbiosview - add user input verification.

HexEdit/Edit
 - More user input verification for HexEdit.
 - updated title bar refreshment.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11448 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey
2011-03-29 19:31:18 +00:00
parent 64d753f12d
commit 980d554e3a
12 changed files with 157 additions and 78 deletions

View File

@ -65,6 +65,12 @@ ShellCommandRunSmbiosView (
if (ShellCommandLineGetCount(Package) > 1) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle);
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetValue(Package, L"-t") == NULL) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"-t");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetValue(Package, L"-h") == NULL) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"-h");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (
(ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-h")) ||
(ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-s")) ||