[edk2-devel] [PATCH v1 1/6] ShellPkg/AcpiView: Move log reset to main method

Tomas Pilar (tpilar) Tomas.Pilar at arm.com
Thu May 21 18:16:24 UTC 2020


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

Cc: Ray Ni <ray.ni at intel.com>
Cc: Zhichao Gao <zhichao.gao at intel.com>
Signed-off-by: Tomas Pilar <tomas.pilar at arm.com>
---
 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c
index 84ffb3595750..f1a95b7b8f03 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) {
--
2.24.1.windows.2


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60052): https://edk2.groups.io/g/devel/message/60052
Mute This Topic: https://groups.io/mt/74381816/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list