[edk2-devel] [PATCH v3 8/8] OvmfPkg/LegacyBootManagerLib: Fix debug macro arguments

Michael Kubacki posted 8 patches 3 years, 5 months ago
[edk2-devel] [PATCH v3 8/8] OvmfPkg/LegacyBootManagerLib: Fix debug macro arguments
Posted by Michael Kubacki 3 years, 5 months ago
From: Michael Kubacki <michael.kubacki@microsoft.com>

The DEBUG macro updated in this patch previously contained 11 print
specifiers in the debug string but passeed 13 arguments. This change
attempts to update the macro to the author's intention so the number
of specifiers match the number of arguments.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---
 OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c b/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c
index 032aacba68de..2e92bce726a9 100644
--- a/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c
+++ b/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c
@@ -1159,8 +1159,8 @@ LegacyBmPrintBbsTable (
   UINT16  Index;
 
   DEBUG ((DEBUG_INFO, "\n"));
-  DEBUG ((DEBUG_INFO, " NO  Prio bb/dd/ff cl/sc Type Stat segm:offs\n"));
-  DEBUG ((DEBUG_INFO, "=============================================\n"));
+  DEBUG ((DEBUG_INFO, " NO  Prio bb/dd/ff cl/sc Type Stat segm:offs mseg dseg\n"));
+  DEBUG ((DEBUG_INFO, "======================================================\n"));
   for (Index = 0; Index < BbsCount; Index++) {
     if (!LegacyBmValidBbsEntry (&LocalBbsTable[Index])) {
       continue;
@@ -1168,7 +1168,7 @@ LegacyBmPrintBbsTable (
 
     DEBUG (
       (DEBUG_INFO,
-       " %02x: %04x %02x/%02x/%02x %02x/%02x %04x %04x %04x:%04x\n",
+       " %02x: %04x %02x/%02x/%02x %02x/%02x %04x %04x %04x:%04x %04x %04x\n",
        (UINTN)Index,
        (UINTN)LocalBbsTable[Index].BootPriority,
        (UINTN)LocalBbsTable[Index].Bus,
-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#93112): https://edk2.groups.io/g/devel/message/93112
Mute This Topic: https://groups.io/mt/93429917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v3 8/8] OvmfPkg/LegacyBootManagerLib: Fix debug macro arguments
Posted by Ard Biesheuvel 3 years, 5 months ago
On Sat, 3 Sept 2022 at 00:23, <mikuback@linux.microsoft.com> wrote:
>
> From: Michael Kubacki <michael.kubacki@microsoft.com>
>
> The DEBUG macro updated in this patch previously contained 11 print
> specifiers in the debug string but passeed 13 arguments. This change
> attempts to update the macro to the author's intention so the number
> of specifiers match the number of arguments.
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>

> ---
>  OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c b/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c
> index 032aacba68de..2e92bce726a9 100644
> --- a/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c
> +++ b/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBm.c
> @@ -1159,8 +1159,8 @@ LegacyBmPrintBbsTable (
>    UINT16  Index;
>
>    DEBUG ((DEBUG_INFO, "\n"));
> -  DEBUG ((DEBUG_INFO, " NO  Prio bb/dd/ff cl/sc Type Stat segm:offs\n"));
> -  DEBUG ((DEBUG_INFO, "=============================================\n"));
> +  DEBUG ((DEBUG_INFO, " NO  Prio bb/dd/ff cl/sc Type Stat segm:offs mseg dseg\n"));
> +  DEBUG ((DEBUG_INFO, "======================================================\n"));
>    for (Index = 0; Index < BbsCount; Index++) {
>      if (!LegacyBmValidBbsEntry (&LocalBbsTable[Index])) {
>        continue;
> @@ -1168,7 +1168,7 @@ LegacyBmPrintBbsTable (
>
>      DEBUG (
>        (DEBUG_INFO,
> -       " %02x: %04x %02x/%02x/%02x %02x/%02x %04x %04x %04x:%04x\n",
> +       " %02x: %04x %02x/%02x/%02x %02x/%02x %04x %04x %04x:%04x %04x %04x\n",
>         (UINTN)Index,
>         (UINTN)LocalBbsTable[Index].BootPriority,
>         (UINTN)LocalBbsTable[Index].Bus,
> --
> 2.28.0.windows.1
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#93124): https://edk2.groups.io/g/devel/message/93124
Mute This Topic: https://groups.io/mt/93429917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v3 8/8] OvmfPkg/LegacyBootManagerLib: Fix debug macro arguments
Posted by Gerd Hoffmann 3 years, 5 months ago
On Fri, Sep 02, 2022 at 06:22:06PM -0400, mikuback@linux.microsoft.com wrote:
> From: Michael Kubacki <michael.kubacki@microsoft.com>
> 
> The DEBUG macro updated in this patch previously contained 11 print
> specifiers in the debug string but passeed 13 arguments. This change
> attempts to update the macro to the author's intention so the number
> of specifiers match the number of arguments.
> 
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>

Acked-by: Gerd Hoffmann <kraxel@redhat.com>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#93122): https://edk2.groups.io/g/devel/message/93122
Mute This Topic: https://groups.io/mt/93429917/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-