diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-25 21:22:20 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-25 21:22:20 +0000 |
commit | 3737ac2bc3c2e6589d88be97345d641ea2006933 (patch) | |
tree | d2798373c799cb9c728d2ec4e7b1bb39f2d59d11 /ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c | |
parent | 2442e62af75a0c5087fce3fb2040e26a485b0d31 (diff) | |
download | edk2-platforms-3737ac2bc3c2e6589d88be97345d641ea2006933.tar.xz |
comp - add comments and add input verification
bcfg - updated for bugs.
compress - rename for coding standards. add comments.
dblk - add comments, input verification, and a header line
dmem - add comments, add input verification, add system table info
dmpstore - add comments
eficompress - add comments and add input verification
efidecompress - add comments and add input verification
loadpcirom - add comments and more output messages
memmap - add more output to exceed the spec.
mm - move functions, add comments, add input verification.
mode - add comment
pci - add input verification.
SerMode - add comments and add input verification
setsize - add comments and add input verification
setvar - add comments and add input verification
smbiosview - add input verification.
clarify error messages.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11438 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c index b9ff013d60..a45a721df3 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c @@ -1,7 +1,7 @@ /** @file
Tools of clarify the content of the smbios table.
- Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2005 - 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
@@ -52,7 +52,7 @@ ShellCommandRunSmbiosView ( Package = NULL;
ShellStatus = SHELL_SUCCESS;
- Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
+ Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
if (EFI_ERROR(Status)) {
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, ProblemParam);
@@ -65,11 +65,21 @@ 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") && ShellCommandLineGetFlag(Package, L"-h")) ||
+ (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-s")) ||
+ (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-a")) ||
+ (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetFlag(Package, L"-s")) ||
+ (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetFlag(Package, L"-a")) ||
+ (ShellCommandLineGetFlag(Package, L"-s") && ShellCommandLineGetFlag(Package, L"-a"))
+ ) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle);
+ ShellStatus = SHELL_INVALID_PARAMETER;
} else {
//
// Init Lib
- //
+
Status = LibSmbiosInit ();
if (EFI_ERROR (Status)) {
ShellStatus = SHELL_NOT_FOUND;
@@ -370,7 +380,7 @@ InitSmbiosTableStatistics ( mStatisticsTable = NULL;
}
- mStatisticsTable = (STRUCTURE_STATISTICS *) AllocatePool (SMBiosTable->NumberOfSmbiosStructures * sizeof (STRUCTURE_STATISTICS));
+ mStatisticsTable = (STRUCTURE_STATISTICS *) AllocateZeroPool (SMBiosTable->NumberOfSmbiosStructures * sizeof (STRUCTURE_STATISTICS));
if (mStatisticsTable == NULL) {
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_SMBIOSVIEW_OUT_OF_MEM), gShellDebug1HiiHandle);
|