[edk2-devel] [PATCH v2 0/8] ShellPkg/AcpiView: Refactor Error Logging

Tomas Pilar (tpilar) posted 8 patches 3 years, 9 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
.../UefiShellAcpiViewCommandLib/AcpiParser.c  | 531 ++++--------------
.../UefiShellAcpiViewCommandLib/AcpiParser.h  | 173 +-----
.../AcpiTableParser.c                         |  56 +-
.../AcpiTableParser.h                         |   2 +-
.../UefiShellAcpiViewCommandLib/AcpiView.c    | 226 +++-----
.../UefiShellAcpiViewCommandLib/AcpiView.h    |  36 --
.../AcpiViewConfig.c                          | 180 +-----
.../AcpiViewConfig.h                          | 138 +----
.../UefiShellAcpiViewCommandLib/AcpiViewLog.c | 376 +++++++++++++
.../UefiShellAcpiViewCommandLib/AcpiViewLog.h | 213 +++++++
.../Arm/SbbrValidator.c                       |  65 +--
.../FieldFormatHelper.h                       | 164 ++++++
.../Parsers/Dbg2/Dbg2Parser.c                 | 119 ++--
.../Parsers/Fadt/FadtParser.c                 |  55 +-
.../Parsers/Gtdt/GtdtParser.c                 |  80 +--
.../Parsers/Iort/IortParser.c                 | 214 +++----
.../Parsers/Madt/MadtParser.c                 | 101 ++--
.../Parsers/Mcfg/McfgParser.c                 |  11 +-
.../Parsers/Pptt/PpttParser.c                 | 166 ++----
.../Parsers/Rsdp/RsdpParser.c                 |  38 +-
.../Parsers/Slit/SlitParser.c                 | 125 ++---
.../Parsers/Spcr/SpcrParser.c                 |  23 +-
.../Parsers/Srat/SratParser.c                 | 189 ++-----
.../Parsers/Xsdt/XsdtParser.c                 |  97 +---
.../UefiShellAcpiViewCommandLib.c             |  22 +-
.../UefiShellAcpiViewCommandLib.inf           |   3 +
26 files changed, 1381 insertions(+), 2022 deletions(-)
create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewLog.c
create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewLog.h
create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/FieldFormatHelper.h
[edk2-devel] [PATCH v2 0/8] ShellPkg/AcpiView: Refactor Error Logging
Posted by Tomas Pilar (tpilar) 3 years, 9 months ago
This patch series refactors the error logging in the AcpiView
functionality to a newly created logging facility.

The new error logging facility in AcpiViewLog.[ch] contains
helper functions to log messages of various types and severities,
enumerations of known error types as well as common abstractions
for outputting the log.

This allows for modularity when determining how the output
should be delivered to the user as well as significantly reduced
code footprint of the logging mechanism in the core AcpiView code.

---
v2: Tidy formatting. Remove inline functions.
    Remove assignments in local variable declarations.
    Return macro to access 2D array items.

Patch series also available on github: 
https://github.com/tpilar/edk2/tree/acpiview-error-logging-v2

Tomas Pilar (8):
  ShellPkg/AcpiView: Extract configuration struct
  ShellPkg/AcpiView: Declutter error counters
  ShellPkg/AcpiView: Modify error message
  ShellPkg/AcpiView: Create a logging facility
  ShellPkg/AcpiView: Refactor PrintFieldName
  ShellPkg/AcpiView: Refactor dump helpers
  ShellPkg/AcpiView: Refactor AcpiView
  ShellPkg/AcpiView: Refactor table parsers

 .../UefiShellAcpiViewCommandLib/AcpiParser.c  | 531 ++++--------------
 .../UefiShellAcpiViewCommandLib/AcpiParser.h  | 173 +-----
 .../AcpiTableParser.c                         |  56 +-
 .../AcpiTableParser.h                         |   2 +-
 .../UefiShellAcpiViewCommandLib/AcpiView.c    | 226 +++-----
 .../UefiShellAcpiViewCommandLib/AcpiView.h    |  36 --
 .../AcpiViewConfig.c                          | 180 +-----
 .../AcpiViewConfig.h                          | 138 +----
 .../UefiShellAcpiViewCommandLib/AcpiViewLog.c | 376 +++++++++++++
 .../UefiShellAcpiViewCommandLib/AcpiViewLog.h | 213 +++++++
 .../Arm/SbbrValidator.c                       |  65 +--
 .../FieldFormatHelper.h                       | 164 ++++++
 .../Parsers/Dbg2/Dbg2Parser.c                 | 119 ++--
 .../Parsers/Fadt/FadtParser.c                 |  55 +-
 .../Parsers/Gtdt/GtdtParser.c                 |  80 +--
 .../Parsers/Iort/IortParser.c                 | 214 +++----
 .../Parsers/Madt/MadtParser.c                 | 101 ++--
 .../Parsers/Mcfg/McfgParser.c                 |  11 +-
 .../Parsers/Pptt/PpttParser.c                 | 166 ++----
 .../Parsers/Rsdp/RsdpParser.c                 |  38 +-
 .../Parsers/Slit/SlitParser.c                 | 125 ++---
 .../Parsers/Spcr/SpcrParser.c                 |  23 +-
 .../Parsers/Srat/SratParser.c                 | 189 ++-----
 .../Parsers/Xsdt/XsdtParser.c                 |  97 +---
 .../UefiShellAcpiViewCommandLib.c             |  22 +-
 .../UefiShellAcpiViewCommandLib.inf           |   3 +
 26 files changed, 1381 insertions(+), 2022 deletions(-)
 create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewLog.c
 create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewLog.h
 create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/FieldFormatHelper.h

-- 
2.24.1.windows.2



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

View/Reply Online (#62374): https://edk2.groups.io/g/devel/message/62374
Mute This Topic: https://groups.io/mt/75454447/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-