]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/AcpiView: Move log reset to main method
authorTomas Pilar <Tomas.Pilar@arm.com>
Fri, 19 Jun 2020 11:59:54 +0000 (12:59 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 30 Jun 2020 01:39:50 +0000 (01:39 +0000)
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>
ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c

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