diff options
author | Tomas Pilar <Tomas.Pilar@arm.com> | 2020-06-19 12:59:54 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-06-30 01:39:50 +0000 |
commit | cae974bea25a3193360390af0b405488a19e1e15 (patch) | |
tree | df038771f86d185e4450c27f110fb6deb64239cd /ShellPkg/Library/UefiShellAcpiViewCommandLib | |
parent | 0f01cec52f4794777feb067e4fa0bfcedfdc124e (diff) | |
download | edk2-cae974bea25a3193360390af0b405488a19e1e15.zip edk2-cae974bea25a3193360390af0b405488a19e1e15.tar.gz edk2-cae974bea25a3193360390af0b405488a19e1e15.tar.bz2 |
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/Library/UefiShellAcpiViewCommandLib')
-rw-r--r-- | ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index 84ffb35..f1a95b7 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) {
|