summaryrefslogtreecommitdiffstats
path: root/ShellPkg
diff options
context:
space:
mode:
authorTomas Pilar <Tomas.Pilar@arm.com>2020-06-19 12:59:54 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-06-30 01:39:50 +0000
commitcae974bea25a3193360390af0b405488a19e1e15 (patch)
treedf038771f86d185e4450c27f110fb6deb64239cd /ShellPkg
parent0f01cec52f4794777feb067e4fa0bfcedfdc124e (diff)
downloadedk2-cae974bea25a3193360390af0b405488a19e1e15.tar.gz
edk2-cae974bea25a3193360390af0b405488a19e1e15.tar.bz2
edk2-cae974bea25a3193360390af0b405488a19e1e15.zip
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>
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c
index 84ffb35957..f1a95b7b8f 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c
@@ -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) {