ShellPkg/AcpiView: Move log reset to main method

The error and warning counters are reset in the AcpiView main method.
This improves reusability of the main method.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Tomas Pilar <tomas.pilar@arm.com>
This commit is contained in:
Tomas Pilar 2020-06-19 12:59:54 +01:00 committed by mergify[bot]
parent 0f01cec52f
commit cae974bea2
1 changed files with 4 additions and 4 deletions

View File

@ -424,6 +424,10 @@ AcpiView (
EfiConfigurationTable = NULL;
OriginalAttribute = 0;
// Reset The error/warning counters
ResetErrorCount ();
ResetWarningCount ();
// Search the table for an entry that matches the ACPI Table Guid
FoundAcpiTable = FALSE;
for (Index = 0; Index < SystemTable->NumberOfTableEntries; Index++) {
@ -566,10 +570,6 @@ ShellCommandRunAcpiView (
Package = NULL;
TmpDumpFileHandle = NULL;
// Reset The error/warning counters
ResetErrorCount ();
ResetWarningCount ();
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
if (EFI_ERROR (Status)) {
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {